Skip to content

mcpx: TestNoPackageRedeclaresADefault red on clean main — mcpauth/failover + testsupport constants bypass defaults.json #8270

Closed

Description

@dezren39

Problem

TestNoPackageRedeclaresADefault (pkgs/mcpx/internal/defaults/guard_test.go) is red on clean main — verified 2026-11-10 by lane code-b (task 13050) with all local changes stashed: go test ./internal/defaults/ -run TestNoPackageRedeclaresADefault FAILs identically on the untouched tree.

The guard flags constants that belong in internal/defaults/defaults.json (and, where user-tunable, the settings registry):

  • internal/mcpauth/failover.go:90 — return 60 * time.Second
  • internal/mcpauth/failover.go:273 — mt.expires.Add(-5*time.Minute)
  • internal/mcpauth/failover.go:499 — now.Add(-60 * time.Second)
  • internal/mcpauth/failover.go:500 — now.Add(9 * time.Minute)
  • internal/testsupport/eramcp/main.go:226 — time.After(2 * time.Second)
  • internal/testsupport/seed/seed.go:89 — binary.BigEndian.Uint64(h[:8]) & (1<<63 - 1)

Context

Same bug class as #3085 (closed; that instance was execsvc/progspec constants). This is a new instance in mcpauth/testsupport, not a reopen: the flagged literals are different sites. The mcpx main-broken tracker is #2534.

Fix shape

Move the failover timing constants into defaults.json (+ settings registry if user-tunable), name them for what they bound (minted-token refresh skew, iat backdate, token lifetime, session TTL), and disposition the two testsupport literals per the guard's own rules (move, or record why testsupport is exempt in the guard if that is the ruling).

Activity

  1. added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Nov 10, 2026
  2. developing-today commented on Nov 10, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15293 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.

  4. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — still red on current main; offender set has grown from 6 to 11 sites

    • Agent: queue worker (repo-worker-code), lane code-b
    • Session / ID: task 15293 (triage of mcpx: TestNoPackageRedeclaresADefault red on clean main — mcpauth/failover + testsupport constants bypass defaults.json #8270)
    • Fresh verification (2026-11-14): ran the guard on a clean worktree of current main (e202485e71): go test ./internal/defaults/ -run TestNoPackageRedeclaresADefault FAILS. The flagged set has grown since filing — the four mcpauth/failover.go sites from the issue are all still there, plus new offenders the guard now catches:
      • internal/cli/adapter_import.go:685 and internal/cli/adapter_import_parse.go:444 — context.WithTimeout(..., 10*time.Second) (import timeout)
      • internal/daemon/scriptview.go:29 — const scriptWaitDelay = 2 * time.Second
      • internal/testsupport/sweep.go:113 — leftoverGracePeriod = 10 * time.Second; :115 — leftoverPollInterval = 100 * time.Millisecond
      • plus the issue's original testsupport sites: internal/testsupport/eramcp/main.go:226 (time.After(2 * time.Second)) and internal/testsupport/seed/seed.go:89 (the 1<<63 int64 mask)
    • Fix shape (unchanged, now wider): move the four failover timings into internal/defaults/defaults.json named for what they bound (refresh skew 5m, iat backdate 60s, token lifetime 9m, session TTL 60s) + settings registry if user-tunable; give every other site the same treatment or an allowlist entry in the guard with a written reason, per the guard's own rules (note the allowlist keys on exact matched text, so a bare 10*time.Second exemption would be too broad — the cli/testsweep sites need real defaults or narrowly-reasoned entries). The seed 1<<63 mask is arithmetic (int64 sign mask), the strongest allowlist candidate.
    • Routing: prepared as a small_fix packet scoped to exactly these 11 sites; this triage lane verified the failure but did not start the edit — it spans 6 files in 5 packages and deserves a single uninterrupted pass with the full mcpx suite, not a lane-slice.
    • Links: queue task 15293; main-broken tracker main-broken: developing-today/code mcpx @9f3c829 — basic: test #2534; same-class predecessor mcpx: TestNoPackageRedeclaresADefault red on clean main — execsvc/progspec constants bypass defaults.json #3085 (closed)
  5. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · correction to the triage note above (task 15293)

  6. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Agent note — task 16869 parked with the fix scope verified (lane any-b)

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 14, 2026
  8. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Agent note — task 16869 in progress (lane any-b)

  9. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Agent note — task 16869 done as superseded; #8270 closes (lane any-b)

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

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)epic/mcpx-platformReprioritization program epic (2026-11-12)status:done

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions