Repository navigation
Pull requests get a Test changes summary of deleted or skipped tests and edits to their own checks (GST-3386) - #4645
Merged
Merged
Conversation
…and edits to their own checks (GST-3386) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…ee workflow Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/red-team#1 reader=red-team Review-Finding: lib/gate-diff/git.ts:314:stale-comment reader=core Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…an off the persist-credentials assertion Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s a non-behavioral harness change Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Test changes report names test files git can only read as binary, undecodable, symlink or submodule, so a removal hidden in one never reads as a quiet pass. Review-Finding: p1/red-team#1 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Test changes report takes its file list from the same merge base the scan used, so a stale local main never lists upstream edits to check files as the pull request's own. Review-Finding: p3/outside-voice#1 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every gstack pull request now gets a flag-only Test changes check listing removed or skipped tests, loosened limits and edits to the files that run its own checks.
Why: agents write most of our tests, and a pull request shouldn't be able to quietly weaken them or grade itself with an edited checker; this two-week trial measures how often that happens.
Nothing to do: the check isn't required, and a flag never turns it red.
What changed
Pull requests now get a Test changes summary; main had none.
Before/after as text: Pull requests now get a Test changes summary; main had none
A pull request could delete or skip a test, or edit the workflow that grades it, and nothing on the pull request said so. Now a check on every pull request lists hunks that remove or skip a test, add a suppression, bypass a check or loosen a limit, counts test declarations added and removed, and names edits to the files that run this repository's own checks. It runs main's copy of the scan on
pull_request_target, reads the pull request's commits as git objects without checking them out, and exits 0 on any flag.gstack-gate-diffgains--head <sha>to scan merge-base to a fetched commit without touching the working tree.Why
"A pull request shouldn't be able to grade itself." Agents write most of our tests, so this trial shows reviewers, on every pull request, where tests or checks got weaker, and measures how often that happens before anything is made blocking.
Blast radius
The new workflow is not a required check and never checks out or runs pull request code. It checks out main only with a read-only, non-persisted token, and pull request fields reach the shell only through
env:(test/test-changes-workflow-safety.test.ts, read and run).gstack-gate-diffkeeps its working-tree path unchanged unless--headis passed (bin/gstack-gate-diff, file:line read; 141 focused tests and the full free suite passed at this head).Test Coverage
Coverage: 67% of 15 changed code paths have a test at two stars or better; 0 regressions found. Tests: 1855 → 1855 (audit only, the head was frozen).
Leftover gaps, proposed but not written: declarations in .md/.json hunks not counted; RH-13/14/15 counts (only RH-1 exercised);
--basewithout--headrejected;gstack-gate-diff --headwith no sha; the partial-read line.Tests ran: focused 141
Tests ran: free 1736 files (from the CI run at this head)
Pre-Landing Review
No blocking issues. This was a read-only final review of this head: six readers (a batched testing, security and state-machine reader, a red team, an adversarial reader, a second-model review on gpt-6.1-sol, and a targeted reader for check-editing code) all returned no blockers. The second-model review's verdict was clean.
Below-floor notes, shipped as notes:
[skip ci]commit whose subject looks like a test declaration can raise the "tests added" count by one.RH-15?tag) aren't reported; the doc doesn't say so.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
sf-21aeda12e999security finding, details recorded privatelysf-029f7901d801security finding, details recorded privatelyExploratory QA
Functional, smoke budget: a normal run over this pull request exited 0, printed the TEST_CHANGES line and wrote the summary without touching the working tree; an unknown head commit exited 1 with
TEST_CHANGES: errorandhead_unresolvable. Verdict: pass. Not run locally: the realrefs/pull/N/headfetch underpull_request_target.Eval Results
No prompt-related files changed — evals skipped.
Scope Drift
Scope Check: CLEAN
TODOS
No TODO items completed in this PR.
Documentation
Status: current. The documentation already matches this branch, so no edits were needed (read-only audit).
Scope: dd61103..f362224 on
test-changes-report, 7 commits, 11 files. The audit covered the committed diff; there was no staged, unstaged or new-file content. The changes are the new flag-only Test changes workflow (.github/workflows/test-changes.yml,scripts/test-changes-report.ts),gstack-gate-diff --head <sha>anddiffRangeinlib/gate-diff/git.ts, the free-workflow listing inscripts/test-pr-profile.ts, and tests.Documentation health:
docs/ship-policy.md: Current. The new#test-changessection matches the workflow, the watched-file list, the four tags (RH-1/13/14/15) and the exit behavior.changelog.d/test-changes-report.md: Current, read only.docs/designs/HONEST_WORK_GATE_INTEGRITY.md: Advisory. Its CLI contract predates--head.docs/troubleshooting.md: Gap. There is no entry forGATE_ERROR=internal reason=head_unresolvable.docs/PROJECT_STRUCTURE.md,CONTRIBUTING.md: Current. Their workflow summaries are generic and need no entry.Coverage debt:
gstack-gate-diff --headhas reference coverage (usage text, ship-policy) but no how-to or troubleshooting entry.Diagram drift: none found.
Tests
bun testover the report, workflow-safety, gate-diff CLI and lib, free-fixtures, ci-history-read, pr-profile and harness-version tests): 141 pass, 0 failbun run test: carried from the free-tests run at this head (1736 files, 0 failed)Agent notes
Part B of GST-3386; land refusal (Decision B2) is out of scope until the trial reports. Lane GSTA-749.
Approvals
No approvals recorded for branch test-changes-report.
Plan: approved (record r-4819689303c4)
Plan check: approved (record r-4819689303c4)
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=7 fixed=0 scope=frozen ledgers_read=2 dispatches=4
Gate edits: none detected (4 listed, 2 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)