Repository navigation
Add a weekly report of the wrong edits gstack's tests fail to catch (GST-3386) - #4652
Merged
Merged
Conversation
…GST-3386) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # scripts/harness-pins/scripts/test-pr-profile.ts.json
…s, and checks tests pass before the control Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…and Stryker Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # scripts/harness-pins/scripts/test-pr-profile.ts.json
3 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 22, 2026
…ed harness pin, and warns when reviewers ran unlogged (GST-3463) (#4669) A pull request no longer needs a fresh /ship when merging main only updates a harness pin file it shares with another PR, and /ship's review summary now warns when reviewers produced output that the run never logged. Why: #4652 paid for a full new review after such a merge, and a harness-evals run lost its granted follow-up review because nothing was logged. Nothing to do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team
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.
A new weekly Mutation report plants small wrong edits in the five
lib/files with the most landings in the last 30 days and lists the edits no test caught.Why: agents write most of our code and tests, and a green suite only means something if the tests reject plausible wrong code; this trial measures where they don't.
Nothing to do: it runs Saturdays on main, is never a required check, and never blocks a merge.
What changed
The testing guide's Mutation report section says what the weekly job does and how to run it locally.
Before/after as text: The testing guide's Mutation report section now describes 30-day landings, file replacement, the baseline-and-message control and the shared 55-minute budget
We had no way to tell whether a passing suite would notice a plausible wrong edit in the code agents touch most. Now a weekly job answers that:
lib/files by first-parent landings on main over the last 30 days. A file no test imports is listed as "no tests", and a data-only file Stryker finds nothing to mutate in is listed as "no mutants"; in both cases the next file takes its place, so five files get scored.timeout --kill-after=60so its whole process group stops at the budget. The tree is restored with git after every file, and the report is rewritten after every file, so a job that hits its own limit still leaves the finished files. The table shows "20 of N" when a file's tests are capped.Why
"A green suite only means something if the tests reject plausible wrong code." This report-only trial shows where gstack's tests miss wrong edits in the files agents change most, and its results decide whether mutation testing earns a permanent place.
Blast radius
Nothing that runs today changes, because the workflow has no pull request trigger and is not a required check, and the only edit to existing code is one entry in the list of workflow files that need only the free tests (
scripts/test-pr-profile.ts:282, read), which the full free test run on this branch passed (run 44981232966 at this commit, 38,792 tests).Test Coverage
The new helpers (churn ranking, the planted throw, scoring, Markdown escaping, the exact version pins), the refusal without
--throwaway-checkoutand the workflow's trigger and permission shape have unit tests. The other refusals (dirty tree, output folder inside the checkout, bad numbers, unknown--onlyfile), test selection and the control and Stryker outcome branches have no unit test; the refusals and the control were checked by hand below, and the Stryker branches by the earlier end-to-end runs.Tests: 1860 → 1860 (+0 new)
Coverage: 44% value-weighted (44% including 0 weakly covered paths)
Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered (weak = ★, gate-failing or unrated).
Tests ran: focused 46
Pre-Landing Review
No blocking issues. A final full review of this commit ran once with no fix round, because the change already had two full review rounds: the specialist, red-team and workflow-gate readers, a native adversarial reader and a second-model review (GPT-6.1 Sol). The second-model review marked two findings as blocking: the positive control can be satisfied by a test that echoes a spawned child's stderr (
scripts/mutation-report.ts:132), and the planted throw above a#!line makes shebang files read as "control survived" (scripts/mutation-report.ts:56). Both are below the blocking floor (a test that would fail, a production break, or lost data or secrets), because the weekly report never runs on pull requests and fails no test; they ship as ruled notes and get fixed in the next mutation report change. The other readers raised the same two issues as non-blocking, and every remaining finding repeats one of the notes below.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/mutation-report.ts:161Ignored static mutants may count, so a data-only file could be scored instead of no mutants (refuted for lib/result-codes-release.ts by the earlier end-to-end run, which reported no mutants)scripts/mutation-report.ts:14314 workers share one GSTACK_HOME; cross-talk failures and Timeout-as-detected could inflate scoresscripts/mutation-report.ts:128Planted throw above a #! line makes a syntax error, so shebang files are misreported as control survivedscripts/mutation-report.ts:132A test that echoes a spawned child's stderr could satisfy the control message checkscripts/mutation-report.ts:152OOM exit 137 reported as budget exhaustion.github/workflows/mutation-report.yml:36Replacement files can push total time to the 330-minute job limit; summary appended only at the end.github/workflows/mutation-report.yml:4Workflow header says 90-day commits; changelog says every edit no test failed on but report lists Survived only, up to 15.github/workflows/mutation-report.yml:51Stryker transitive dependencies are not locked (already documented)scripts/mutation-report.ts:154When Stryker crashes, the row's detail is its last output line, which for a Node crash is the Node version line rather than the errorscripts/mutation-report.ts:208Files reported as "no mutants" still spend both test runs and a Stryker start, with no cap on how many the job triesExploratory QA
Status: pass. Five command runs in a throwaway worktree at this commit, within a 5-minute smoke budget:
--only lib/model-policy-freshness-parser-worker.ts) listed it as "no tests", wrote mutation-report.md and .json outside the checkout, exited 0 and left the tree clean.--throwaway-checkout, an output folder inside the checkout,--files 0and an--onlyfile that hasn't landed in the window were each refused with exit 1 and a message naming the problem.Stryker itself was not run here; the earlier end-to-end runs stand for it (
--only lib/sanitize-echo.ts: 89 mutants, 70 caught, 15 survived, 4 not covered, controls passing). The dirty-tree refusal was not rechecked in this run.Scope Drift
Scope Check: CLEAN
Intent: a weekly, report-only mutation trial over the most-changed lib files (part A of the plan).
Delivered: the workflow, the script and its tests, a docs section, a changelog fragment and the free-tests list entry with its harness pin.
Documentation
Status: blocked, shipped under an exception. One stale workflow comment needs a correction that a read-only audit does not allow.
Scope: docs/, README.md, AGENTS.md, CONTRIBUTING.md and CLAUDE.md against the committed changes from 6484fd5 to cc9b831 (7 files). Nothing staged, unstaged or untracked.
Documentation health:
docs/TESTING_INTERNALS.md: current. The Mutation report section matches the script and the workflow on every checked claim, and the workflow's #mutation-report anchor resolves.changelog.d/mutation-report.md: current..github/workflows/mutation-report.ymlheader comment: stale. It says files are picked by commits in the last 90 days, but the script uses landings in the last 30 days.The exception, accepted by the maintainers on 2026-11-22, is recorded word for word in the Agent notes below.
Tests
Agent notes
Refs GST-3386. Part A, report-only trial. workflow_dispatch works only once the file is on main, so the workflow itself has not run yet; the first scheduled run measures real throughput on the top five files. Lane GSTA-749, /ship run ship-4652-r3: R51 read-only final review at cc9b831 (the PR's third full read, after 1470740 and f94a76a), no fix round.
Approvals
Approved: yes (record r-de0c878cef05). The full approval record stays private.
Plan: approved (record r-4819689303c4)
Plan check: approved (record r-4819689303c4)
REVIEW_LOOP: passes=1 blocking_found=2 deferred=0 noted=7 fixed=0 scope=frozen open=2 dispatches=2 est_input_tokens=16727
Gate edits: 2 listed, 1 read, 0 findings — 0 kept, 0 restored, 0 open
Ruled note: scripts/mutation-report.ts:132:adversarial at cc9b831 ruled by GStack Minder (GSTA-36) (relayed from GSTA-749:2026-11-22T03:53Z) at 2026-11-22T03:53:50.764Z: Below the floor: the weekly mutation report never runs on PRs and fails no test; fix in the next mutation PR (approval a-d31b1938597f)
Ruled note: scripts/mutation-report.ts:56:adversarial at cc9b831 ruled by GStack Minder (GSTA-36) (relayed from GSTA-749:2026-11-22T03:53Z) at 2026-11-22T03:53:50.862Z: Below the floor: the weekly mutation report never runs on PRs and fails no test; fix in the next mutation PR (approval a-42952a43e8b8)
Documentation exception: accepted by Captain GStack Minder (GSTA-36) 2026-11-22 via GSTA-36 relayed by lane GSTA-749, 2026-11-22: Accept: the workflow header's stale 90-day comment ships as a known note; fix it in the next mutation PR.