Skip to content

fix(mcpx): repair main lint and plugin mirror failures - #13371

Draft
dezren39 wants to merge 4 commits into
mainfrom
agent-next-26-local/13349-main-broken
Draft

dezren39 wants to merge 4 commits into
mainfrom
agent-next-26-local/13349-main-broken

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #13349

Refs #3016 (stress gate: reconnect-test flake fixed in ae506d9; #1992 daemon-state guard still open).

Summary

Evidence

Merge Danger

This draft addresses the lint and dogfood-sync failures. It does not close #13349 because the main workflow's stress failures still need resolution and a green main run. Keep this PR in draft until the focused run passes and the stress gate is cleared.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

oc-code-05 added 2 commits November 23, 2026 10:25
TestEventsReconnectWaitsForTheConfiguredDelay failed on the macOS nightly
stress run (45181183106) with "retry delivered unexpected event kind".
The stub server wrote the SSE response and closed without reading the
client's request; with unread request bytes in the receive buffer the
close sends a reset rather than a FIN, and the peer can drop response
bytes it has not yet read, losing seq 1 so the stream sees seq 2 first.

Read the request head with http.ReadRequest before writing, so the
close is an orderly one and both events arrive on every platform.

Reproduce from #3016: go test ./internal/e2e -run
TestEventsReconnectWaitsForTheConfiguredDelay -race -shuffle=on -count=5
(now ok on linux; failure was darwin-specific timing).

Refs #3016, #13349.
The #1992 guard in the e2e suite fails the stress runs: the daemon and cli
test binaries write daemon records into the caller's real default state
dir while e2e's before/after window is open. `go test ./...` runs the
packages side by side, and WriteInfo mirrors every record written under a
custom state dir into the default one (#278).

Leakers: TestInfoFileNamesBothDigests (the /tmp/sock pid=42 record; one
leak per -count, which is why the stress log shows it 3x after vs 1x
before), the in-process daemons started through the mxh temp-dir helpers
(upgrade, takeover, handoff), and cli client_socket_test, which writes a
record without pinning XDG_STATE_HOME.

Fix, class-wide: internal/stateguard ports the e2e guard to the suites
that write records and pins their state dirs away from the caller.

- GuardCallerDaemons snapshots the caller's real record dirs (the default
  dir and MCPX_STATE_DIR) and fails the run if the set changed. Failing
  first: without the pin it fails on the leaking test. Run with a fresh
  XDG_STATE_HOME, `go test ./internal/daemon -run
  'TestInfoFileNamesBothDigests$'` reports "before=[] after=[/tmp/sock
  pid=42]", and the cli suite reports its socket record the same way.
- PinSuiteStateDirs points XDG_STATE_HOME and MCPX_STATE_DIR at a per-run
  temp dir for the whole test binary, so every writer lands there,
  present and future.
- The daemon and cli TestMain functions guard, pin, run, then check.

stateguard is its own package because daemon's internal tests import
testsupport, so testsupport cannot import daemon.

Verified: go test ./internal/daemon -count=1 and ./internal/cli -count=1
green; the changed tests with -race -shuffle=on -count=5 green.

Refs #1992, #3016
@dezren39

Copy link
Copy Markdown
Member Author

Updates on bf6ef70d8c7 (lane oc-code-08):

  • lint: removed the remaining staticcheck ST1005 (trailing punctuation in internal/stateguard/stateguard.go). nix develop .#mcpx-lint --command 'cd pkgs/mcpx && golangci-lint run' → 0 issues.
  • dogfood sync (the basic: test failure): the .opencode copy had drifted from pkgs/mcpx/plugin.
    • ops.gen.ts: fingerprint line restored to the generated value (da584569…).
    • ops.test.ts: abort-wait loop restored.
    • mcpx-session.ts + session-created.test.ts: the FLEET_SESSION_ID export (fleet session identity, from 22bf6e1) existed only in the dogfood copy; ported into pkgs/mcpx/plugin/opencode and the test into pkgs/mcpx/plugin/opencode/mcpx, then copied across.
  • verification: bun test plugin/core/ plugin/opencode/mcpx/ → 98 pass / 0 fail; go test ./internal/daemon, ./internal/cli and ./internal/api -run TestPluginOpsAreGenerated green locally (daemon/cli run with an isolated XDG_STATE_HOME; an earlier local failure was a neighbouring lane racing the shared real state dir, not this suite).
  • CI: dispatched mcpx workflow on this head — https://github.com/developing-today/code/actions/runs/45258140842

@dezren39

Copy link
Copy Markdown
Member Author

Program tending — stalled PR check-in (tracking: #1352)

  • No activity for 2 day(s); last update 2026-11-23T20:20:51Z.
  • Waiting on: draft — waiting on its author.
  • Next step: mark the PR ready for review, or post what the draft is waiting on.

@developing-today-fleet

Copy link
Copy Markdown
Contributor

🤖 Lane 2022-E (delta PRESS LANDINGS, 2026-11-28 20:22 CST) — verify-then-merge gate: NOT merged, parked.

Fresh gate re-read by this lane via gh api:

  • PR OPEN, draft, head bf6ef70d (exact head checked).
  • Verification: repos/developing-today/code/actions/runs?head_sha=<exact head> returned 0 completed SUCCESS runs on this exact head — the standing merge gate (completed SUCCESS verification run on the exact head, re-readable, plus no CHANGES_REQUESTED) does not pass.
  • No verification run was re-dispatched by this lane (dispatch outcomes from prior lanes are not blindly repeated).

Wake / unblock: a completed SUCCESS verification run on the exact current head (post it on this PR), PR non-draft and CLEAN, and no CHANGES_REQUESTED — then merge under standing authority.

@developing-today-fleet

Copy link
Copy Markdown
Contributor

Premise re-check on current main — NOT superseded, NOT mergeable yet (lane 2237-M, draft-PR shepherd, 2026-11-29)

Wake from lane 2207-P was: linked #13349 now CLOSED → re-check whether the 13 golangci-lint findings / plugin desync still reproduce on current main; close as superseded if not, routine rebase + merge if yes.

Firsthand results (two agreeing reads each):

Disposition: stays OPEN draft. New machine-checkable wake: a fresh focused run (golangci-lint + daemon/reconnect/codegen/runner tests + plugin sync diff) dispatched on head bf6ef70 concludes SUCCESS and #3016 closes → shepherd rebases, re-reads the full diff, marks ready, merges. Note: the rebase step itself is subject to the same checkout-class question currently held on PR #15765 — see that PR for Drew's pending go-ahead.

Key: 2237-M

@dezren39

Copy link
Copy Markdown
Member Author

Half-2 wake check — first live read after the 2026-11-30 seat transport outage (lane 0252-T, queue-truth watch)

Read firsthand 2026-11-30T09:22–09:24Z via gh api:

  • PR state: OPEN, draft, head bf6ef70d8c717f2eb782ddc6924b0034571afe0e (unchanged), base main, updated 2026-11-30T04:52:55Z — no activity during the outage.
  • Half-1 remains FIRED: mcpx nightly stress failure #3016 CLOSED 2026-11-30T07:31:41Z via PR test(mcpx/e2e): retire the state-dir test's daemon and supervisor under its own overrides #17127 MERGED.
  • Actions runs on head bf6ef70d: only the two known runs, both FAILURE — 45289964375 (completed 2026-11-24T01:00:15Z) and 45258140842 (completed 2026-11-23T21:24:38Z). Check-runs on the head: newest completed 2026-11-24T01:00:14Z. No fresh SUCCESS run exists — half-2's success leg was not satisfied.
  • Per the recovery checklist ("none → dispatch the run"): dispatched workflow mcpx (380169946) on ref agent-next-26-local/13349-main-broken at 2026-11-30T09:23:56Z. New run: 46390147605, created 2026-11-30T09:24:03Z, status in_progress, head bf6ef70d.

Wake (machine-checkable): run 46390147605 concludes success on head bf6ef70d (or a successor head with its own fresh success run) → undraft + full-diff verify + merge. If it concludes failure, the failure output is the next diagnosis input — do not re-dispatch blind.

Key: 0252-T

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main-broken: developing-today/code mcpx @5c8e163 — basic: lint

1 participant