You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcpx: guard tests fail on clean main (settings chapters/scriptenv, defaults redeclaration/doc links) #8720
🤖 Agent note · filed from lane any-c verification work (tasks 14963 / 14975).
Defect (pre-existing on main)
Guard tests in pkgs/mcpx fail on clean main 7c365ad7f0 (verified 2026-11-11):
internal/settings: TestEveryDocumentHasAChapter, TestTheScriptEnvironmentIsWhatTheCodeSets (MCPX_PARENT_SESSION_ID set by internal/daemon/scriptview.go but not listed in ScriptEnv).
internal/defaults: TestNoPackageRedeclaresADefault, TestEveryDocumentationLinkResolves (observed in a full go test ./... run during task 14963; not re-verified individually).
All reproduce on the untouched primary clone, unrelated to any in-flight change. These guards keep docs/settings/defaults honest, so a red main here trains everyone to ignore them.
Fix: reconcile each guard with the code/docs it watches (add the missing compendium chapters or roles, list MCPX_PARENT_SESSION_ID as a setter, and clear the defaults redeclarations / dead documentation links), or record why a guard's expectation is wrong and correct the guard.
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15294 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.
agent-note:v1
event: triaged
task: 15294 (repo-health-code-pilot, lane code-d)
state: triaged — two of three remaining guards FIXED and merged (PR #9986); redeclaration guard routed as task 16870
Fresh reproduction this shift (laptop, main e202485, go test ./internal/settings/ ./internal/defaults/):
The two settings guards named as filed (TestEveryDocumentHasAChapter, TestTheScriptEnvironmentIsWhatTheCodeSets) already PASS — fixed since the 2026-11-11 filing at 7c365ad.
Still failing at claim: settings TestTheEnvironmentDocIsCurrent (docs/environment.md stale) and both defaults guards.
Environment doc regenerated via the guard's own -update mechanism; go test ./internal/settings/ now passes in full.
TestEveryDocumentationLinkResolves: 25 references to plugin/opencode/mcpx/daemon.ts / ops.gen.ts repointed to plugin/core/daemon.ts / plugin/core/ops.gen.ts — the files moved in the plugin-core relocation (9dd72a5, WIP: move shared mcpx daemon files into plugin core #7166) and the docs were never updated; plus one Go symbol in docs/public-client.md reworded so the checker no longer reads it as a path. That test now passes.
Remaining: TestNoPackageRedeclaresADefault — 11 inline constants (cli adapter-import timeouts x2, daemon scriptWaitDelay, mcpauth failover token lifetimes x4, testsupport x4). Each needs a per-site call (move to defaults.json vs allowlist-with-reason); routed as task 16870 with the full inventory and that disposition rule in its packet. This issue stays open until task 16870 lands.
Reproduced on clean main this claim:go test ./internal/defaults/ -run TestNoPackageRedeclaresADefault -count=1 (from pkgs/mcpx) FAILS with exactly the 11 findings in this task's title. Note #8720 itself is CLOSED (PR #9986's keyword) while this remainder is open work — the fix PR should reference #8720 and this task; reopen or re-file if the landing process needs a live issue.
Mechanism (verified in tree): the guard (internal/defaults/guard_test.go) regex-scans packages for inline durations/shifts/limits/octal modes. Constants belong in internal/defaults/defaults.json (sections exist: pool, logging, daemon, secrets, cli, catalog, script, …), consumed via the internal/defaults package (already imported by internal/cli). Deliberate exceptions go in the guard's allowed map (guard_test.go ~line 52), keyed by the exact match, each with a stated reason — an allowlist, deliberately, so widening a pattern can't widen an exemption.
Per-site disposition for the executing claim:
internal/cli/adapter_import.go:685 + adapter_import_parse.go:444 — the same 10s import timeout twice: a product default. Add to defaults.json (cli section), reference via the defaults package at both sites.
internal/mcpauth/failover.go:90 (60s), :273 (−5m refresh skew), :499 (−60s iat backdate), :500 (9m exp): token-lifetime parameters. Judge per value: lifetimes/skews a deployment could conceivably tune belong in defaults.json; values fixed by the token format's semantics belong in allowed with that reason stated. Do not move all four by reflex.
internal/testsupport/eramcp/main.go:226 (2s), internal/testsupport/sweep.go:113 (10s grace), :115 (100ms poll): test-harness timing, not product defaults — allowed with reasons, unless the executing claim prefers defaults; either way the reason must be written.
internal/testsupport/seed/seed.go:89 — (1<<63 - 1) is a non-negative-int64 bitmask, not a tunable default: allowed with that reason (the inlineShift pattern catches it incidentally).
Acceptance for the executing claim: the named test passes; full pkgs/mcpx test suite run (the guard package plus affected packages at minimum); no behaviour change beyond constant sourcing (same values); PR references #8720 + task 16870. Parked from this claim because the remaining lease is minutes and items 3–4 require judgement, not haste.
TestNoPackageRedeclaresADefault now passes in full — verified on the branch and again on merged main (151dc4a5c2, go test ./internal/defaults/ ok). All 11 inventoried sites dispositioned:
Package evidence:go build ./... ok; daemon PASS (120.9s); mcpauth PASS; testsupport/... PASS. internal/settings and internal/cli failure sets are identical to clean main at the same base — pre-existing reds only (settings: TestEveryDocumentHasAChapter on docs/changes/research-and-findings-nix-slice.md, landed without a compendium chapter; cli: six manual/parity reds) — the family already tracked by #9017 / #8900, not regressions from this change and outside this packet's scope.
Activity
developing-today commentedon Nov 11, 2026
CODE-2597
dezren39 commentedon Nov 14, 2026
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15294 moved from blocked/parked to queued in the fleet unblock-all pass (worker
main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.Merge pull request #9986 from developing-today/queue/15294-8720-mcpx-…
dezren39 commentedon Nov 14, 2026
agent-note:v1
event: triaged
task: 15294 (repo-health-code-pilot, lane code-d)
state: triaged — two of three remaining guards FIXED and merged (PR #9986); redeclaration guard routed as task 16870
Fresh reproduction this shift (laptop, main e202485,
go test ./internal/settings/ ./internal/defaults/):Fixed in-session, PR #9986 (merged, 491defc):
-updatemechanism;go test ./internal/settings/now passes in full.plugin/opencode/mcpx/daemon.ts/ops.gen.tsrepointed toplugin/core/daemon.ts/plugin/core/ops.gen.ts— the files moved in the plugin-core relocation (9dd72a5, WIP: move shared mcpx daemon files into plugin core #7166) and the docs were never updated; plus one Go symbol in docs/public-client.md reworded so the checker no longer reads it as a path. That test now passes.Remaining: TestNoPackageRedeclaresADefault — 11 inline constants (cli adapter-import timeouts x2, daemon scriptWaitDelay, mcpauth failover token lifetimes x4, testsupport x4). Each needs a per-site call (move to defaults.json vs allowlist-with-reason); routed as task 16870 with the full inventory and that disposition rule in its packet. This issue stays open until task 16870 lands.
dezren39 commentedon Nov 14, 2026
🤖 Agent note · task 16870 parked with the fix scoped per-site — guard failure reproduced, mechanism identified
Reproduced on clean main this claim:
go test ./internal/defaults/ -run TestNoPackageRedeclaresADefault -count=1(frompkgs/mcpx) FAILS with exactly the 11 findings in this task's title. Note #8720 itself is CLOSED (PR #9986's keyword) while this remainder is open work — the fix PR should reference #8720 and this task; reopen or re-file if the landing process needs a live issue.Mechanism (verified in tree): the guard (
internal/defaults/guard_test.go) regex-scans packages for inline durations/shifts/limits/octal modes. Constants belong ininternal/defaults/defaults.json(sections exist: pool, logging, daemon, secrets, cli, catalog, script, …), consumed via theinternal/defaultspackage (already imported by internal/cli). Deliberate exceptions go in the guard'sallowedmap (guard_test.go ~line 52), keyed by the exact match, each with a stated reason — an allowlist, deliberately, so widening a pattern can't widen an exemption.Per-site disposition for the executing claim:
internal/cli/adapter_import.go:685+adapter_import_parse.go:444— the same 10s import timeout twice: a product default. Add to defaults.json (cli section), reference via the defaults package at both sites.internal/daemon/scriptview.go:29—scriptWaitDelay = 2s: daemon timing; defaults.json daemon section + reference.internal/mcpauth/failover.go:90(60s),:273(−5m refresh skew),:499(−60s iat backdate),:500(9m exp): token-lifetime parameters. Judge per value: lifetimes/skews a deployment could conceivably tune belong in defaults.json; values fixed by the token format's semantics belong inallowedwith that reason stated. Do not move all four by reflex.internal/testsupport/eramcp/main.go:226(2s),internal/testsupport/sweep.go:113(10s grace),:115(100ms poll): test-harness timing, not product defaults —allowedwith reasons, unless the executing claim prefers defaults; either way the reason must be written.internal/testsupport/seed/seed.go:89—(1<<63 - 1)is a non-negative-int64 bitmask, not a tunable default:allowedwith that reason (the inlineShift pattern catches it incidentally).Acceptance for the executing claim: the named test passes; full
pkgs/mcpxtest suite run (the guard package plus affected packages at minimum); no behaviour change beyond constant sourcing (same values); PR references #8720 + task 16870. Parked from this claim because the remaining lease is minutes and items 3–4 require judgement, not haste.Merge pull request #10065 from developing-today/queue/16870-8720-mcpx…
dezren39 commentedon Nov 14, 2026
Agent note — task 16870 remainder COMPLETE (lane any-c, 2026-11-14)
151dc4a5c22e)TestNoPackageRedeclaresADefaultnow passes in full — verified on the branch and again on merged main (151dc4a5c2,go test ./internal/defaults/ok). All 11 inventoried sites dispositioned:Moved to defaults.json (real defaults):
preflight.probeTimeout(defaults.PreflightProbeTimeout)plumbing.scriptWait(defaults.ScriptWait)plumbing.failoverCooldown(defaults.FailoverCooldown)Allowlisted in the guard with reasons (no pattern widened, no outOfScope additions): mcpauth App JWT iat backdate 60s + lifetime 9m + installation-token refresh margin 5m (GitHub platform arithmetic: 10-minute JWT cap, 1-hour token life); testsupport eramcp reply window 2s, sweep leftover grace 10s / poll 100ms (harness timing); seed shuffle
(1<<63 - 1)MaxInt63 mask (definition).Package evidence:
go build ./...ok; daemon PASS (120.9s); mcpauth PASS; testsupport/... PASS.internal/settingsandinternal/clifailure sets are identical to clean main at the same base — pre-existing reds only (settings:TestEveryDocumentHasAChapterondocs/changes/research-and-findings-nix-slice.md, landed without a compendium chapter; cli: six manual/parity reds) — the family already tracked by #9017 / #8900, not regressions from this change and outside this packet's scope.