Skip to content

mcpx: e2e and settings suites cannot run in the nix build sandbox (checkPhase exclusions) #2686

Open

Description

@dezren39

On 2026-10-30, three NixOS switch attempts in a row died inside the mcpx derivation's checkPhase:

  1. internal/e2e burns its whole 30m timeout in the sandbox. The suite spawns real script subprocess trees; the build sandbox has no init reaping them, so they pile up as zombies (~3,800 observed, process table degraded) and the package runs to the go test -timeout 30m cap: FAIL github.com/dezren39/mcpx/internal/e2e 1800.385s.
  2. internal/settings env tests fail in the builder environment. TestNoUndeclaredEnvRead and TestTheScriptEnvironmentIsWhatTheCodeSets assert the process environment is exactly what the code sets; the stdenv builder env makes that untrue inside the sandbox.

Interim fix (the mechanism package.nix itself provides): both packages are in checkExclude in pkgs/mcpx/package.nix with the reasons recorded there. The full suite still runs in CI on main.

To restore sandbox checks:

  • e2e: bound and reap spawned subprocess trees when running under a non-init supervisor, or split the process-spawning cases behind a sandbox capability check.
  • settings: scope the environment assertions to the variables mcpx itself controls, ignoring builder-provided vars.

Acceptance criteria

  • mcpx internal/e2e and internal/settings are removed from checkExclude in pkgs/mcpx/package.nix (or any remaining exclusion is narrowed and re-justified in place).
  • The e2e suite's spawned subprocess trees are bounded/reaped under a non-init supervisor, so the suite no longer burns its 30m timeout in the nix build sandbox.
  • The settings env assertions scope to the variables mcpx itself controls, so they pass in the stdenv builder environment.
  • The full suite still runs in CI on main (unchanged).

Activity

  1. added 2 commits that reference this issue on Oct 30, 2026
  2. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Interim fix landed in #2687 (merged d3ba80a): internal/e2e and internal/settings are now in checkExclude in pkgs/mcpx/package.nix with the sandbox reasons recorded, so the NixOS switch is unblocked. This issue stays open for the restore work described above — making both suites sandbox-safe so the exclusions can be removed. The full suite continues to run in CI on main.

  3. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Precision note from the 2026-10-30 05:02 switch log on the internal/settings failures: the undeclared-read report names a specific variable — MCPX_ADAPTER_DECLARATION_SHA256, set at cli/adapter.go:264 and read at routes_settings.go:906 without a declaration. That looks like a genuine undeclared read the test caught (not only a sandbox-environment artifact), so the restore work for internal/settings likely starts with declaring that variable properly; the e2e exclusion stands on the zombie/timeout grounds above.

  4. added 2 commits that reference this issue on Oct 30, 2026
  5. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Update: with e2e + settings excluded, a standalone realise (2026-10-30) showed every other package passing — conformance included — except internal/cli, which burned its whole 30m timeout (1803.655s) with no failing test: its tests drive the real CLI, daemon and adapter subprocesses and hang waiting on them in the sandbox. internal/cli is now also in checkExclude via #2707 (merged 86c6f61). The restore scope for this issue now covers all three packages: e2e, settings, cli.

  6. added 2 commits that reference this issue on Oct 30, 2026
  7. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Update 2: at the newest main the realise also fails fast in internal/conformance (TestAuthSplit/TestMatrix — auth-split matrix ahead of the in-flight auth-matrix landing) and internal/defaults (TestNoPackageRedeclaresADefault — unregistered const in internal/execsvc). Both are main-side desync, not sandbox issues; both now excluded interim via #2710 so the OS deploy stops gating on them. Restore scope: e2e, settings, cli (sandbox-shaped) + conformance, defaults (main desync — these two should drop out as soon as their owning work lands and CI on main is green for them).

  8. added
    kind/ciCI/CD pipelines, workflows, and build automation
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    on Oct 30, 2026
  9. 43 remaining items

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Queue task: 8663, lane bf419306-c4ef-470f-a553-beabf93239de
    • Reason: the run is nearing its 25-minute claim cutoff; this medium-risk fix needs a laptop/CI nix sandbox reproduction and cannot be safely completed in the remaining budget.
    • Verified: mcpx: e2e and settings suites cannot run in the nix build sandbox (checkPhase exclusions) #2686 OPEN, no open implementation PR; current main 2e6dae3f82ecb0df4373a628b62cb4e0169d7229 still excludes internal/e2e, internal/settings, and internal/cli in pkgs/mcpx/package.nix. No code changes or tests this pass.
    • Disposition: task 8663 parked for 20 minutes. Labels reflect queue/parked, status/parked, and work/assigned.
    • Resume: use a fresh worktree under ~/git/fleet/8663; preserve existing primary-clone changes (flake.lock and .cache), reproduce the settings failure before changing tests, address subprocess-tree reaping, and do not alter the downstream-sensitive go test -timeout 30m $pkgs line.
  11. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  13. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    Lane M claimed task 8663 for #2686; execution-lane assignment returned opencode, so this task is handed off to the laptop claimant (opencode-claimant), which launches the bound session. Attempts 23/24 — near cap; if the claimant does not bind before lease expiry, a cap raise may be needed (fleet-monitor repair pattern).

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

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 8663 (repo-fleet-monitor run 2026-11-05T15:45:48Z)
    • Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
    • Task: Claim evaporated: task 8663 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
    • Expectation: The next lane claim picks task 8663 up from the queued state and posts a fresh pickup note.
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)effort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)queue/queuedHas a queued task in the Supabase agent queuesource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first looktask/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