Skip to content

mcpx testing: policies for agents -- what to run, a test per bug, guards per bug class #1909

Open

Description

@dezren39

Relocated from dezren39/darwin-nix#99 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

Parent: #1900

Purpose

The rules agents follow when they test mcpx. Three from the notes, and one derived from the record:

The reason all of this exists, stated plainly: every serious bug in mcpx so far was found by luck.

Found by What it was
the lead's third full-suite run a flake
CI, and only CI a test reached the real internet (#65)
a Linux run two tests that passed on macOS only (#35)
a human reading --help five flags accepted and silently ignored (#74, fixed by #75)
a human trying it documented capabilities that do not exist (#102, #106)
a human reading a flag a wrong Node flag, accepted and inert (#108)
an agent measuring --typecheck cost two concurrent runs sharing one generated program (#69); its fix broke cross-project runs (#70); the same bug one level down (#73)
an agent's audit 54 of 149 settings declared and never read (#171)
an issue pass reading the code a setting read but inert, which #171's brand-new guard passed (registry.pageSize, #179)

Not one of those was caught by a test that was written to catch it. The point of this tracker is to convert each into a class that cannot recur. The last row is the sharpest: a guard written to close a class let a member of the class through, because it checks that a setting is read and not that reading it matters. #1971 owns the fix (#181 collision 15).

Guard tests are the instrument, and there are already about twenty-five of them -- not three. TestEveryDeclaredRouteAnswersOverTheSocket (internal/e2e/v1ops_test.go:287), TestEveryExecFlagChangesSomething (internal/e2e/e2e_test.go:2877, written after #74/#75), TestNoPackageRedeclaresADefault (internal/defaults/guard_test.go:92), plus route/op parity in internal/api/parity_test.go, several in internal/settings/registry_test.go, #171's internal/settings/consumed_test.go, a documentation-lists-every-setting test, TestNoOrphanProcessesAfterStop, and #182's TestEnvCleanupStopsTheDaemonItStarted. #1971 carries the corrected inventory and, more usefully, shows where the existing ones leak -- TestNoPackageRedeclaresADefault exempts seven whole packages and one file through an allowlist that nothing forces to shrink, consumed_test.go proves a setting is read but not that it matters (#181 collision 15, owned by #1971), and one guard named for reachability actually only checks name shape.

Where the policy lives is a real decision, not a formality. pkgs/mcpx/AGENTS.md is user-facing: 109 lines telling an agent how to use mcpx, loaded into every consuming agent's context, saying nothing about tests. Contributor test policy put there taxes every consumer's context window forever. #1976 owns the answer.

What this tracker does not own: the seed mechanism (#93 -- #1969 references it for the generator-per-bug-shape rule but decides nothing about format, storage or collection), the CI workflow (#95), and the integration/environment coverage (#97).

Children

Child links repaired 2026-11-04 (task 8016): the original children were dezren39/nix numbers 127-131, which resolve to unrelated items in this repo; the code-native children are #1966, #1969, #1971, #1973 and #1976. This tracker stays open until #1971 closes.

Proposed order

  1. mcpx testing: which tests an agent runs, and never the full suite locally #1966 -- the tiers, with real handles (go test ./internal/<pkg>, -run regexes, -short, build tags, a just recipe) rather than prose. It is the rule agents break most often and the one that costs most when broken. Note that the root justfile has no mcpx recipes at all today; pkgs/flake-tidy's tidy-test is the only per-package precedent.
  2. mcpx testing: a contributor test page agents load, kept out of the user-facing AGENTS.md #1976 -- create the page, with mcpx testing: which tests an agent runs, and never the full suite locally #1966's tiers as its first content. Early rather than late, because a policy nothing loads is not a policy; the later issues then extend a file that already exists.
  3. mcpx testing: a failing-first test for every bug, and a review of recent fixes #1969 -- the failing-first rule, plus the audit of recent fixes against it. The audit is what shows whether the rule is being followed, and it is cheap now while the history is short.
  4. mcpx testing: guard tests that close a whole bug class #1971 -- the next guards, chosen by what the escaped-bug table demands. Exception, and it is time-sensitive: mcpx testing: guard tests that close a whole bug class #1971's settings effect guard (Phase 3: sync, blob gate, and relays #181 collision 15: a setting must be able to change an observable outcome, not merely be read) should land before or with Phase 2: membership, delegation, groups, and server config #172 (in flight), which will move up to 44 more variables into the settings registry. That one guard runs in parallel with 1-3 rather than after them.
  5. mcpx testing: flake policy -- race, shuffle, repeat runs, quarantine with expiry, a second OS #1973 -- flake policy. Last, because once Bump golang.org/x/crypto from 0.10.0 to 0.17.0 in /sources/graph #93's seed discipline lands a random failure is reproducible from its seed and the quarantine rules get much simpler. Until then, the integrator's pre-merge repeat runs (mcpx testing: which tests an agent runs, and never the full suite locally #1966 rule 7) are the only flake detection.

#1976 is updated as each of #1969, #1971 and #1973 lands, rather than written once.

Done since this tracker was written: #52 (closed by #182: stop --all cleanup through the info files, a 60 s idle exit in newEnv, a leak test falsified by reverting the fix); the "declared but never read" guard (#171, internal/settings/consumed_test.go). Neither was a child of this tracker. Both change what the children say, and the children have been updated.

Children -- ease and impact

# Title Kind Ease Impact
#1966 which tests an agent runs; never the full suite locally design S for the policy text; M with the selection script high
#1969 a failing-first test per bug, and a review of recent fixes design + review S (policy) / M (review + missing tests) / S (CI check) high
#1971 guard tests that close a whole bug class design M (policy S; each guard S-M) high
#1973 flake policy -- race, shuffle, repeat, quarantine with expiry design M high
#1976 a contributor test page agents load, out of the user-facing AGENTS.md docs + implement S high -- it is what makes the other four reach agents

Warnings carried by this tracker

Related

#1900 (parent), #93 (#121/#124 -- the seed and the generator-per-bug-shape mechanism), #95 (#1966's "CI runs everything so agents do not" depends on CI actually doing so), #97 (#132's feature inventory is the other half of #1971's documented-capability table), #52 (closed, fixed in #182), #171 (merged: the read guard), #172 (in flight: lands with or after #1971's effect guard), #179, #181 (collision 15), #65, #35, #74 (closed, fixed in #75), #75, #78, #101, #102, #106, #108.

Security/auth deferred; see tracker.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#99 (verbatim, oldest first):


    @dezren39 · 2026-09-30T07:20:03Z

    Integration pass. Placed in the DAG rooted at #181.


    @dezren39 · 2026-09-30T12:03:40Z

    Issues pass (2026-09-30, at 05c78b2).


    @dezren39 · 2026-09-30T12:27:16Z

    Issues pass (2026-09-30, architect follow-up). Related: #74 annotated "(closed, fixed in #75)".


    @dezren39 · 2026-10-28T21:39:48Z

    🤖 Agent note · triage — verdict: CONFIRMED as a tracker, but the work no longer lives in this repo — route is re-homing to developing-today/code, not a fix here

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Triage verdict — task 2804 (lane D)

    Verdict: NOT a duplicate. Scope confirmed against current pkgs/mcpx main — the policy is still not written down anywhere an agent loads, and the gaps the body names are still live. This is a tracker; its split already exists as five relocated child issues, each open and queue/queued with its own triage task. No new packet is enqueued for #1909 itself — that would duplicate the children.

    Dedupe

    Searched the code tracker for the policies subject and each child's title. No other issue covers this tracker. It is the policies parent under strategy issue #1892 (triaged, task 2787); its guard child #1971 is also the implementation remainder named by class tracker #1893 (triaged today, task 2801) — a shared child, not a duplicate.

    Children — nix numbers in the body above are historical; here is the code mapping

    nix (historical) code (live) Title State / triage task
    #127 #1966 which tests an agent runs, and never the full suite locally open, queue/queued · task 2866
    #128 #1969 a failing-first test for every bug, and a review of recent fixes open, queue/queued · task 2871
    #129 #1971 guard tests that close a whole bug class open, queue/queued · task 2873
    #130 #1973 flake policy — race, shuffle, repeat runs, quarantine with expiry, a second OS open, queue/queued · task 2878
    #131 #1976 a contributor test page agents load, kept out of the user-facing AGENTS.md open, queue/queued · task 2880

    Proposed order from the body still stands: #1966 first (tiers with real handles), then #1976 (the page, with the tiers as first content), then #1969, then #1971 — with #1971's settings effect guard (a setting must change an observable outcome, not merely be read; the body's collision-15 item) still flagged time-sensitive — note its original reason has partly lapsed: the nix#172 move it was meant to precede was instead closed by nix PR #237 before relocation, so the guard now protects the registry as it stands rather than a pending influx. #1973 last, as the body says.

    Scope confirmation vs current main

    Checked at main = 8124cc0b7005 (2026-10-29T05:56:32Z):

    • The guard pattern the policy generalises is real and present: the body's named examples all exist on main — TestEveryDeclaredRouteAnswersOverTheSocket (internal/e2e/v1ops_test.go), TestEveryExecFlagChangesSomething (internal/e2e/e2e_test.go), TestNoPackageRedeclaresADefault (internal/defaults/guard_test.go), TestNoOrphanProcessesAfterStop (internal/e2e/e2e_test.go), plus internal/settings/consumed_test.go and the TestEvery* parity/dispatch family. The known leaks the body lists (hand-rowed exec-flag guard, shrink-less allowlists, read-vs-effect) are exactly mcpx testing: guard tests that close a whole bug class #1971's scope and are not yet closed.
    • No contributor test page exists yet: pkgs/mcpx contains only AGENTS.md (the user-facing page) — no TESTING/CONTRIBUTING page. mcpx testing: a contributor test page agents load, kept out of the user-facing AGENTS.md #1976's deliverable is still owed, which is why the policy currently lives only in issue bodies like this one.
    • No test-selection handles exist yet: the root justfile still contains zero mcpx recipes (grep at this main) — mcpx testing: which tests an agent runs, and never the full suite locally #1966's "tiers with real handles, not prose" gap is unchanged since the body was written.

    Verification commands for the follow-ups (per the triage packet)

    • In CI, not locally: go test ./... in pkgs/mcpx via .github/workflows/mcpx.yml for guard/policy changes; per this tracker's own first rule, follow-ups should run targeted packages (go test ./internal/<pkg>) during development and let CI run the full suite.

    Outcome

    #1909 stays open as the policies tracker until the children land. This triage task completes; the follow-ups are the children's existing queue tasks named above.

    🤖 Agent note · done

  6. 6 remaining items

  7. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triaged)

    Evidence (fresh, 2026-11-03)

    Fix path (follow-up, in order)

    1. Rewrite mcpx testing: policies for agents -- what to run, a test per bug, guards per bug class #1909's Children section with the code-native numbers above and strike/replace the dead parent ref.
    2. File the two missing children (test-tier policy ex-Update Rust crate tracing to v0.1.40 [SECURITY] #127; flake policy ex-Update Rust crate actix-files to v0.6.10 [SECURITY] #130), or record an explicit fold-in decision into mcpx testing: review all tests, set up the fuzz framework and its policies #1960/mcpx testing: a fast, sharded CI with a time budget, linters and auto-format #1901 on those issues — do not leave them as dead links.
    3. Keep mcpx testing: policies for agents -- what to run, a test per bug, guards per bug class #1909 open until all five code-native children close.
  8. added
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/none). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

  10. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 4, 2026
  11. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

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

Metadata

Metadata

Assignees

Labels

source/creatorFiled by the new-issue-creator jobtask/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