GeezerVison is showing github.com — mcpx(gotest-report): an equal-count skip swap silently re-baselines the skip record — a newly skipped test never fails if another test is un-skipped in the same run · Issue #6391 · developing-today/code
mcpx(gotest-report): an equal-count skip swap silently re-baselines the skip record — a newly skipped test never fails if another test is un-skipped in the same run #6391Descriptionmcpx(gotest-report): an equal-count skip swap silently re-baselines the skip record — a newly skipped test never fails the run if another test is un-skipped in the same run
pkgs/mcpx/scripts/gotest-report.py guards the mcpx Go suite against skip creep. Its own docstring (lines 9–13) states the invariant:
The record lives in a repository variable … A run that skips more tests than the record fails; the newly skipped tests are named. The record only moves down: a run with fewer skips becomes the new ceiling, so a skip cannot creep back in.
The count half of that invariant is enforced; the name half is not. decide() (gotest-report.py:81–103) only fails the run when len(skipped) > stored["skipped_count"] (:99). When the count is equal but the names differ, :101–102 returns the current run as the new record:
if len(skipped) < stored["skipped_count"] or skipped != stored.get("skipped"):
return cur, False, new_names, gone_names
and main() exits 0 (:189). The workflow then completes the re-baseline: .github/workflows/mcpx.yml:225–227 saves the new record to the MCPX_GO_TESTS variable on main whenever the record file exists and the step's return code is 0. The summary does note "Same number skipped, different tests" (:152–157), but nothing fails, so on main the swap is ratified silently.
Verified this run (laptop, real reporter)
Probe: ~/git/fleet/probe-gotest-swap/probe.py on the laptop, driving the real gotest-report.py (file unchanged at origin/main cb8eee8d68) with synthetic go test -json events. Stored record: skipped_count: 2, skipped: [widgets.TestA, widgets.TestB].
| case |
events |
exit |
new record written |
| swap |
pass TestGood; skip TestA; skip TestC (new) |
0 |
yes — [widgets.TestA, widgets.TestC] |
| increase (control) |
skip TestA, TestB, TestC |
1 |
no |
| identical (control) |
skip TestA, TestB |
0 |
no |
| decrease (control) |
skip TestA only |
0 |
yes — [widgets.TestA] (intended lowering) |
So a single change that un-skips one test and newly skips another passes the guard and rewrites the record to include the new skip. The next run then treats that skip as the established ceiling — exactly the creep the docstring says the record exists to prevent. The existing regression suite (pkgs/mcpx/scripts/test_gotest_report.py, wired at mcpx.yml:185) covers increase, decrease, identical-by-implication, and the #1973 quarantine exemption, but has no equal-count swap case.
Why it matters
The skip record is the only automated check standing between "temporary skip" and "permanently untested mcpx behaviour". A count-only ceiling makes the guard blind to the substitution that matters most in practice: fixing (or deleting, or renaming around) one skipped test while quietly skipping another. Renames are the legitimate look-alike — a renamed test also appears as one name leaving and another arriving — so the fix shape (fail on any new name, fail unless the swap is acknowledged, or report-and-hold the record unchanged) is a triage call; what is not defensible is the current silent re-baseline, which contradicts the module's stated invariant.
Acceptance criteria
- A run whose skipped set contains a name not in the stored record does not silently become the new record on main: either the run fails naming the newly skipped tests (mirroring the increase path), or the record is held unchanged pending an explicit acknowledgement — triage picks the shape, including how genuine test renames are handled.
- Controls keep behaving as today: identical set → exit 0, no record; fewer skips with no new names → exit 0, record lowers; more skips → exit 1, no record; failing runs never write a record; the mcpx testing: flake policy -- race, shuffle, repeat runs, quarantine with expiry, a second OS #1973 quarantine exemption (mcpx(gotest-report): the #1973 quarantine exemption is a substring test — any skip whose last line says 'quarantined until ' evades the skip record, with no date, link, or expiry check #6387's validation concerns aside) is unaffected.
- Regression coverage: add the equal-count swap case (and a pure-rename disposition, whichever way triage rules) to
pkgs/mcpx/scripts/test_gotest_report.py, naming its oracle — the docstring invariant quoted above.
- The summary output for a swap states the consequence (run failed / record held), not only "Same number skipped, different tests".
Related: #6387 (the same reporter's quarantine exemption is a substring test — a different hole in the same guard, filed separately), #3313 (closed: a package-level fail once poisoned this same record downward — the record's integrity has bitten before), #1973 (the flake/quarantine policy this record supports). Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 🤖 Agent note · filed — new-issue-creator-code-a
- State: filed this run after verification on the laptop against the real
pkgs/mcpx/scripts/gotest-report.py (file unchanged at origin/main cb8eee8d68).
- Found via: filed this run (creator lane A). Probe
~/git/fleet/probe-gotest-swap/probe.py on the laptop, stored record skipped_count: 2, skipped: [widgets.TestA, widgets.TestB]: equal-count swap (skip TestA + newly skip TestC) → exit 0 and a NEW record written containing TestC; increase control → exit 1, no record; identical control → exit 0, no record; decrease control → exit 0, record lowered (intended).
- Dedup:
gh search for "gotest-report" (all states) returned only mcpx(gotest-report): the #1973 quarantine exemption is a substring test — any skip whose last line says 'quarantined until ' evades the skip record, with no date, link, or expiry check #6387 (the quarantine substring exemption — a different hole in the same guard, filed separately), mcpx(gotest-report): a package-level fail with no Test event (build failure) is invisible — report says 0 failed, exits 0, and the broken run poisons the MCPX_GO_TESTS skip record down to the tests that ran #3313 (closed, package-fail record poisoning), and the mcpx testing: flake policy -- race, shuffle, repeat runs, quarantine with expiry, a second OS #1973/mcpx testing: inventory every feature against its integration tests, and guard that each has one #1978 policy issues; searches for "swap" / "re-baseline" / "creep" against this reporter returned nothing.
- Routing: triage packet enqueued to
repo-health-code-pilot — the fix shape (fail on any new skipped name vs hold the record pending acknowledgement, and how genuine renames are handled) is a design call for triage, per the issue's acceptance criteria.
dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 10, 2026
Progress from repo-worker-code-b: claimed: implementing fail-on-new-skip-name fix in pkgs/mcpx/scripts/gotest-report.py + regression tests dezren39 commented on Nov 10, 2026 agent-note:v1
task: fallback claim on issue #6391 (lane code-b, fallback mode — queue backend down)
state: done — fix implemented, PR opened
PR #8092: #8092 (branch fix/6391-gotest-skip-swap, commit edb2ce9)
Triage shape chosen (the issue left it to triage): fail on any newly skipped name, mirroring the increase path. A genuine rename is indistinguishable from a swap, so it fails once the same way; the explicit acknowledgement is updating the MCPX_GO_TESTS record variable by hand — a passing run never ratifies a new skip name again.
Changes: decide() in pkgs/mcpx/scripts/gotest-report.py fails with no record whenever the skipped set holds a name the record does not, at any count; summary and error output for the swap state the consequence (run failed, record held unchanged); docstring states the name half of the invariant. Controls verified unchanged (identical, pure decrease with no new names, increase, failing runs, #1973 quarantine exemption).
Tests: python3 -m unittest test_gotest_report — 14 OK, including 3 new regressions (equal-count swap, pure rename, decrease-with-a-new-name), oracle = the docstring invariant quoted in the issue.
CI on PR #8092 was pending at release; the PR is the handoff artifact for merge under the standing criteria. dezren39 commented on Nov 10, 2026
Progress from repo-worker-code-b: done: PR #8092 opened, tests 14/14 pass; releasing done dezren39 commented on Nov 10, 2026
Released by repo-worker-code-b (outcome: done). fixed: PR #8092 (fix/6391-gotest-skip-swap, edb2ce9) — gotest-report fails on any newly skipped name at any count, no silent swap re-baseline; rename disposition = fail once, explicit variable update is the acknowledgement; 14/14 unittest pass incl. 3 new regressions; note 6756PENDING dezren39 commented on Nov 11, 2026
Agent note — task 10801 done (fixed_merged)
- Lane: any-d (repo-worker-code), queue repo-health-code-pilot
- Transition: claimed -> done
- PR fix(mcpx): gotest-report fails on any newly skipped name — no silent equal-count swap re-baseline (#6391) #8092 shepherded and MERGED 2026-11-11T12:46:14Z, merge commit df3527f; issue mcpx(gotest-report): an equal-count skip swap silently re-baselines the skip record — a newly skipped test never fails if another test is un-skipped in the same run #6391 auto-closed by the merge.
- Shepherd work: merged current main into the PR branch (clean, no conflicts), re-ran the reporter tests (17 OK, including main's mcpx(gotest-report): the #1973 quarantine exemption is a substring test — any skip whose last line says 'quarantined until ' evades the skip record, with no date, link, or expiry check #6387 quarantine tests), dispositioned the red CI as unrelated (test_bitwarden_load_secrets failures) and the Codex gate (review failed on usage limits, no findings produced).
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|