Skip to content

perf(source-control): drop the diffstat from the pull-request skill's merges - #12461

Merged
kyle-sexton merged 2 commits into
mainfrom
perf/12242-cut-large-bash-output
Nov 2, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
perf/12242-cut-large-bash-output

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #12242

Summary

git merge prints a diffstat of every changed file. In this repository's transcripts from 2026-10-31T00:00Z to 2026-11-02T00:00Z, 570 Bash results over 10 KB carried 9.1 MB; git merge produced 14 of them (255,724 characters), and in each the diffstat and create/delete-mode lines were 95-99% of the text.

Fix

  • push-branch.sh's stale-base merge runs git merge --no-edit --no-stat.
  • The /source-control:pull-request ready local-merge fallback (reference/ready-for-review.md) runs git merge --no-stat.
  • Changelog fragment for source-control, bump: patch.

Verification

  • push-branch.test.sh: 191 passed, 0 failed.

Remaining

  • perf: attribute and cut Bash results over 10 KB from skill steps and scripts #12242 stays open: the AFTER figure is measured over a window of the same length once this merges.
  • Most of the over-10 KB volume comes from reads that one-off agent briefs write (whole files, full diffs), not from skill steps; the issue carries that proposal.
  • check-skill.sh root mode (2.9% of the volume) was not cut: its INFO lines carry skip notes the suite pins as contract.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 2, 2026 13:31
… merges

push-branch.sh's stale-base merge and the ready step's local-merge
fallback pass --no-stat. In the 2026-10-31..11-02 transcripts, merge
diffstats were 95-99% of each of 14 Bash results over 10 KB.

Refs: #12242

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 2, 2026 18:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T18:34:34.647609Z 1abe06c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 1abe06cb717229fdf33a7029ca356ae329f87298: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk in all 3 changed files:

  • plugins/source-control/skills/pull-request/scripts/push-branch.sh: sync_stale_base now runs git merge --no-edit --no-stat. --no-stat is a valid git merge option and overrides any merge.stat config. It hides only the diffstat. Conflict output and the exit status are unchanged, so the if success check and the fallback paths after it behave as before. The merge output was already sent to stderr. The script's own merged $ref into …; HEAD is now … line still prints.
  • plugins/source-control/skills/pull-request/reference/ready-for-review.md: the local-merge fallback snippet gets the same flag. The && chain into push-branch.sh is unchanged.
  • .changes/source-control/perf-12242-merge-no-stat-3b8d1f40.md: bump: patch fits a change that only alters output. Its text matches the diff.

I found no test in scripts/*.test.sh that checks merge diffstat output, so dropping it should break no existing test. The push-branch.test.sh result in the PR (191 passed) is the author's claim; I did not run it.

Closing issue: the PR only references #12242 (Refs:) and states the issue stays open. The PR context file has no closing-issue section, so there are no acceptance criteria to check.

No plugin manifest changed, and no .claude/rules/ path rules or paved-path entries came up for these files. Prior findings: none (round 0 of 3).

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 1abe06cb717229fdf33a7029ca356ae329f87298: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12461

I found no security issues.

I read every hunk in all 3 changed files:

  • plugins/source-control/skills/pull-request/scripts/push-branch.sh: the stale-base merge in sync_stale_base now adds --no-stat. The flag is a fixed string, so it carries no input from the caller or from the pull request. Signing (-S), the $ref argument, the merge-failure handling and stderr redirection work exactly as before. Only the diffstat is dropped from the output, so this path can't leak anything new or be used for injection.
  • plugins/source-control/skills/pull-request/reference/ready-for-review.md: the local-merge fallback snippet adds --no-stat. The snippet keeps every guard it had, and the && chain into push-branch.sh is unchanged.
  • .changes/source-control/perf-12242-merge-no-stat-3b8d1f40.md: a changelog fragment (bump: patch) with nothing that runs.

No changed file matches a trusted-path glob. The diff touches no trust control, merge hold, plugin manifest or token scope, and it removes no instruction. The pull request description makes the same claims as the diff and contains no embedded directives. There were no earlier findings on this pull request (0 rounds, cap 3).

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 971e449 Nov 2, 2026
71 of 85 checks passed
@kyle-sexton
kyle-sexton deleted the perf/12242-cut-large-bash-output branch November 2, 2026 19:13
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 3, survived 1, timeout 0, no coverage 0, invalid 0, not run 3.
Covered-code score 75%; mutation score 75%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/autonomy/skills/setup/scripts/check-security-binding.mjs 3 0 0 0 0 0
plugins/source-control/skills/babysit-loop/scripts/publish-promotion-evidence.mjs 0 0 0 0 0 3
plugins/source-control/skills/pull-request/scripts/push-branch.sh 0 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/source-control/skills/pull-request/scripts/push-branch.sh:474 other productive no-assertion

The run's summary has the full report.

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.

1 participant