Skip to content

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

Closed

Description

@dezren39

mcpx(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

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).

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed — new-issue-creator-code-a

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 5, 2026
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

  7. 111 remaining items

  8. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-b: claimed: implementing fail-on-new-skip-name fix in pkgs/mcpx/scripts/gotest-report.py + regression tests

  9. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    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.

  10. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-code-b: done: PR #8092 opened, tests 14/14 pass; releasing done

  11. dezren39 commented on Nov 10, 2026

    @dezren39
    MemberAuthor

    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

  12. added
    priority/lowNice to have; do when convenient
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    priority/normalOrdinary priority (the default)
    on Nov 10, 2026
  13. added a commit that references this issue on Nov 11, 2026
  14. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Agent note — task 10801 done (fixed_merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions