Skip to content

feat(spec-sync): concise PR overview, generated title, skip specs in Copilot review - #141

Merged
tian-lan-landing merged 2 commits into
mainfrom
feat/spec-sync-pr-summary-improvements
Aug 5, 2026
Merged

feat(spec-sync): concise PR overview, generated title, skip specs in Copilot review#141
tian-lan-landing merged 2 commits into
mainfrom
feat/spec-sync-pr-summary-improvements

Conversation

@tian-lan-landing

Copy link
Copy Markdown
Collaborator

Three tweaks to the spec-sync PR-authoring, from review feedback on #140.

1. Concise "What changed". The summarize-pr.sh prompt now produces the GitHub "Pull request overview" shape — one lead sentence + a short **Changes:** bullet list — instead of the verbose, resource-grouped output. No sub-headers, no long parentheticals.

2. Generated PR title. A second small LLM call writes a title summary, set via the same REST PATCH that updates the body. The workflow passes the static prefix spec-sync(v1) / spec-sync(v2); the model writes only the suffix, e.g. spec-sync(v2): document DPT-3 Fast and presigned-URL validity. Best-effort — the static title stands on failure, and thinking:{type:"disabled"} keeps it cheap/deterministic like the body call.

3. Copilot skips the spec snapshots. copilot-instructions.md now tells Copilot code review to skip specs/*.json and specs/_generated/ entirely (no comments at all) — they mirror the upstream OpenAPI spec (fetched live, regenerated each sync) and cannot be fixed here; spec issues belong upstream.

Note: a hard guarantee (repo Settings → Copilot → Content exclusion → specs/**) is UI-only and out of scope for this PR; this is the committable soft rule.

…Copilot review

- Rewrite the "What changed" prompt to the concise GitHub "Pull request
  overview" style: one lead sentence + a short **Changes:** bullet list
  (no resource sub-headers, no long parentheticals).
- Generate a PR title from the diff and set it via the same REST PATCH.
  The workflow passes the static "spec-sync(v1|v2)" prefix; the LLM writes
  only the summary suffix. Best-effort — the static title stands on failure.
- Tell Copilot code review to skip the spec snapshot files entirely
  (specs/*.json, specs/_generated/) — they mirror the upstream spec,
  fetched live and regenerated each sync, so spec issues belong upstream.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 5, 2026 02:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates automated spec-sync PR authoring and review guidance.

Changes:

  • Produces concise PR summaries and generated titles.
  • Passes V1/V2 title prefixes through the workflow.
  • Instructs Copilot to skip generated spec snapshots.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
scripts/spec-sync/summarize-pr.sh Generates concise summaries and title suffixes.
.github/workflows/spec-sync.yml Configures V1/V2 title prefixes.
.github/copilot-instructions.md Adds snapshot review exclusions.

Comment thread .github/copilot-instructions.md Outdated
- Description prompt: add a no-surface-change escape hatch so a mechanical-only
  snapshot PR emits a single "no SDK changes" sentence instead of being forced
  to invent 2-5 bullets.
- Copilot instructions: the snapshot skip was phrased as a "review only
  src/tests/docs" allowlist, which also dropped api.md/README.md — the exact
  hand-maintained surface docs the wiring commit updates. Reframe as a
  denylist that skips only the spec snapshots and explicitly keeps those in scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 5, 2026 02:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (1)

scripts/spec-sync/summarize-pr.sh:89

  • The advertised 60-character suffix limit is only a prompt instruction; the enforced cap is applied after adding the prefix and still permits a suffix of roughly 105 characters for the configured prefixes. Since model output is untrusted and may ignore prompt constraints, enforce the suffix limit before composing the title so generated PR titles remain concise.
    title="${title:0:120}"

@tian-lan-landing
tian-lan-landing merged commit a6e9739 into main Aug 5, 2026
8 of 9 checks passed
@tian-lan-landing
tian-lan-landing deleted the feat/spec-sync-pr-summary-improvements branch August 5, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants