Skip to content

ci(spec-sync): apply PR-summary follow-ups (stream-truncate, idempotent edit) - #125

Merged
tian-lan-landing merged 1 commit into
mainfrom
ci/spec-sync-summary-followups
Jul 22, 2026
Merged

ci(spec-sync): apply PR-summary follow-ups (stream-truncate, idempotent edit)#125
tian-lan-landing merged 1 commit into
mainfrom
ci/spec-sync-summary-followups

Conversation

@tian-lan-landing

Copy link
Copy Markdown
Collaborator

Applies to ade-python the two Copilot suggestions already applied to ade-typescript#92 (since #124 was merged):

  • Stream-truncate the diff ({ …; } | head -c 120000) instead of buffering it all in memory.
  • Idempotent body edit: skip if ## What changed already present; write via --body-file -.

Keeps scripts/spec-sync/summarize-pr.sh byte-identical across both repos. Verified: byte-identical to #92 final, bash -n + shellcheck clean, stub tests pass (append, idempotent skip).

…nt edit)

Mirror the two Copilot suggestions applied to ade-typescript#92:
- Truncate the diff while streaming (`{ ...; } | head -c`) instead of
  buffering the whole (possibly multi-MB) spec diff into a variable first.
- Make the body edit idempotent: skip if a "## What changed" section is
  already present, and write via `gh pr edit --body-file -` (stdin) rather
  than a large `--body` argument.

Keeps summarize-pr.sh byte-identical to ade-typescript's.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 07:56

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 spec-sync PR summarization to reduce memory usage and make body updates idempotent.

Changes:

  • Streams and truncates diffs at 120,000 bytes.
  • Prevents duplicate ## What changed sections.
  • Uses stdin for safe PR body updates.

@tian-lan-landing
tian-lan-landing merged commit 767eaf6 into main Jul 22, 2026
8 of 9 checks passed
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.

2 participants