overlays: deselect mcp-nixos 3.0.1's subprocess-timeout checkPhase test (nix-config#857) #1875

Merged
hermes merged 2 commits from kb/NCFG-857-flake-mcp-nixos into main 2026-10-12 10:58:24 -06:00
Collaborator

nix-config#857 — the weekly flake-update gate reds inside nixpkgs' mcp-nixos-3.0.1 checkPhase, not in our code.

Step one (usage check) — mcp-nixos IS used here, so the drop path is out:

  • hosts/vpn/default.nix:2347 — the hermes-agent unit's extraPackages carries mcp-nixos onto the unit PATH.
  • hosts/vpn/default.nix:3052 — the profile declares mcpServers.nixos = { command = "mcp-nixos"; }.
  • Rendered live on vpn (~/.hermes/config.yaml:79-82, ~/.hermes/profiles/coding/config.yaml:83-85) reads nixos: {command: mcp-nixos, enabled: true}, and the mcp__nixos__* tools are exposed to the coding profile in-session.
  • giga declares the same server (hosts/giga/default.nix:71) and package (:273).

Why an overlay, and why one disabledTests entry: tests/test_env_file_safety.py::test_startup_survives_non_utf8_dotenv spawns a FRESH interpreter and imports mcp_nixos.server (fastmcp + pydantic) under a hard subprocess.run(..., timeout=60). On the contended aarch64-under-qemu build host that first import loses a wall-clock race; the failing drv is byte-identical across all three freeze rungs, so the ladder can never clear it.

Measured, same host, two arms (vpn, aarch64 native, nix-store --realise):

arm drv checkPhase
before (nixpkgs as-is) /nix/store/13llkgvx…-mcp-nixos-3.0.1.drv tests/test_env_file_safety.py::test_startup_survives_non_utf8_dotenv PASSED … 415 passed in 6.70s
after (this overlay) /nix/store/p1f9bk5i…-mcp-nixos-3.0.1.drv pytest flags: -m pytest --ignore-glob=tests/test_integration.py -k not\ \(test_startup_survives_non_utf8_dotenv\) / collected 415 items / 1 deselected / 414 selected / 414 passed, 1 deselected in 5.48s

Only the one wall-clock-bound test is deselected; the two sibling fresh-interpreter tests in that file (timeout=30) still run. flake.overlays.default yields the same drv on aarch64-linux (p1f9bk5i…) and x86_64-linux (4smym06d…), i.e. the overlay really reaches every host's pkgs.

Upstream: the timeout literal is https://github.com/utensils/mcp-nixos/blob/v3.0.1/tests/test_env_file_safety.py#L55 (upstream's regression test for utensils/mcp-nixos#144). No upstream issue covers this flake yet (searched 2026-10-12: zero hits for the test name, the file, subprocess, flaky), and there is no GitHub credential on the fleet to file one, so the link is to the exact offending line. Drop this override when upstream relaxes the timeout or quiets the test.

Not in scope: rolling the nixpkgs flake input back.

nix-config#857 — the weekly flake-update gate reds inside nixpkgs' `mcp-nixos-3.0.1` checkPhase, not in our code. **Step one (usage check) — mcp-nixos IS used here, so the drop path is out:** - `hosts/vpn/default.nix:2347` — the hermes-agent unit's `extraPackages` carries `mcp-nixos` onto the unit PATH. - `hosts/vpn/default.nix:3052` — the profile declares `mcpServers.nixos = { command = "mcp-nixos"; }`. - Rendered live on vpn (`~/.hermes/config.yaml:79-82`, `~/.hermes/profiles/coding/config.yaml:83-85`) reads `nixos: {command: mcp-nixos, enabled: true}`, and the `mcp__nixos__*` tools are exposed to the coding profile in-session. - giga declares the same server (`hosts/giga/default.nix:71`) and package (`:273`). **Why an overlay, and why one `disabledTests` entry:** `tests/test_env_file_safety.py::test_startup_survives_non_utf8_dotenv` spawns a FRESH interpreter and imports `mcp_nixos.server` (fastmcp + pydantic) under a hard `subprocess.run(..., timeout=60)`. On the contended aarch64-under-qemu build host that first import loses a wall-clock race; the failing drv is byte-identical across all three freeze rungs, so the ladder can never clear it. **Measured, same host, two arms (vpn, aarch64 native, `nix-store --realise`):** | arm | drv | checkPhase | |---|---|---| | before (nixpkgs as-is) | `/nix/store/13llkgvx…-mcp-nixos-3.0.1.drv` | `tests/test_env_file_safety.py::test_startup_survives_non_utf8_dotenv PASSED` … `415 passed in 6.70s` | | after (this overlay) | `/nix/store/p1f9bk5i…-mcp-nixos-3.0.1.drv` | `pytest flags: -m pytest --ignore-glob=tests/test_integration.py -k not\ \(test_startup_survives_non_utf8_dotenv\)` / `collected 415 items / 1 deselected / 414 selected` / `414 passed, 1 deselected in 5.48s` | Only the one wall-clock-bound test is deselected; the two sibling fresh-interpreter tests in that file (`timeout=30`) still run. `flake.overlays.default` yields the same drv on `aarch64-linux` (`p1f9bk5i…`) and `x86_64-linux` (`4smym06d…`), i.e. the overlay really reaches every host's `pkgs`. **Upstream:** the timeout literal is `https://github.com/utensils/mcp-nixos/blob/v3.0.1/tests/test_env_file_safety.py#L55` (upstream's regression test for utensils/mcp-nixos#144). No upstream issue covers this flake yet (searched 2026-10-12: zero hits for the test name, the file, `subprocess`, `flaky`), and there is no GitHub credential on the fleet to file one, so the link is to the exact offending line. Drop this override when upstream relaxes the timeout or quiets the test. Not in scope: rolling the nixpkgs flake input back.
overlays: deselect mcp-nixos 3.0.1's subprocess-timeout checkPhase test (nix-config#857)
Some checks failed
NixOS Build Check / Scope changed deployable hosts (pull_request) Successful in 9s
PR base guard / Base drift / conflict check (pull_request) Successful in 12s
Secret Scan / gitleaks scan (pull_request) Successful in 11s
foremerge intent (advisory) all 1 changed path(s) covered by a live foremerge intent
NixOS Build Check / Flake input regression guard (pull_request) Successful in 4s
NixOS Build Check / Worker-scope reaper worker signature (mutation-tested) (pull_request) Successful in 5s
NixOS Build Check / Kanban pool capacity knob (runtime override + clamp, mutation-tested) (pull_request) Successful in 4s
NixOS Build Check / Sentinel pass budget contract (prompt forbids the full board walk, mutation-tested) (pull_request) Successful in 4s
NixOS Build Check / CI-scratch reaper class table (mutation-tested) (pull_request) Successful in 5s
NixOS Build Check / .forgejo/tests python suites (hermetic) (pull_request) Failing after 29s
NixOS Build Check / Repo gates (the folded selftest battery) (pull_request) Successful in 4m26s
NixOS Build Check / Hermes dispatcher worktree base (pull_request) Successful in 15s
NixOS Build Check / Hermes decomposed worktree children (pull_request) Successful in 15s
NixOS Build Check / Hermes terminal timeout tree kill (pull_request) Successful in 32s
NixOS Build Check / Hermes cron lost fire claim (pull_request) Successful in 13s
NixOS Build Check / Hermes compression budget backstop (pull_request) Successful in 13s
NixOS Build Check / Hermes worker exit ledger (pull_request) Successful in 25s
NixOS Build Check / Hermes kanban dispatch dry-run (pull_request) Successful in 18s
NixOS Build Check / Hermes LCM externalized payload expansion (pull_request) Successful in 3s
NixOS Build Check / Hermes LCM empty-transcript fallback (pull_request) Successful in 27s
NixOS Build Check / foremerge accept-order contract (real binary) (pull_request) Successful in 5s
NixOS Build Check / Build changed host closures (native, one eval) (pull_request) Successful in 5m11s
81e0ecf661
The weekly flake-update gate compiles four aarch64 closures under qemu on giga
and reds inside nixpkgs' mcp-nixos-3.0.1 checkPhase on
tests/test_env_file_safety.py::test_startup_survives_non_utf8_dotenv, whose
fresh-interpreter import runs under a hard subprocess timeout=60. The same 415
tests pass in ~5-11 s natively on vpn against 271.88 s in the red run (~50x =
emulated-host starvation), and the failing drv is identical across all three
freeze rungs, so loosening the window cannot clear it.

mcp-nixos is used (the vpn Hermes profile renders mcp_servers.nixos enabled and
the hermes-agent unit carries it on PATH), so it is not droppable. Deselect the
one wall-clock-bound test, keep the rest of the suite.
ci: re-trigger (previous run's python-suites job failed on an unrelated fixture byte-count flake)
All checks were successful
foremerge intent (advisory) all 1 changed path(s) covered by a live foremerge intent
PR base guard / Base drift / conflict check (pull_request) Successful in 12s
NixOS Build Check / Scope changed deployable hosts (pull_request) Successful in 28s
Secret Scan / gitleaks scan (pull_request) Successful in 33s
NixOS Build Check / Flake input regression guard (pull_request) Successful in 6s
NixOS Build Check / Worker-scope reaper worker signature (mutation-tested) (pull_request) Successful in 5s
NixOS Build Check / Kanban pool capacity knob (runtime override + clamp, mutation-tested) (pull_request) Successful in 3s
NixOS Build Check / Sentinel pass budget contract (prompt forbids the full board walk, mutation-tested) (pull_request) Successful in 2s
NixOS Build Check / CI-scratch reaper class table (mutation-tested) (pull_request) Successful in 2s
NixOS Build Check / .forgejo/tests python suites (hermetic) (pull_request) Successful in 37s
NixOS Build Check / Repo gates (the folded selftest battery) (pull_request) Successful in 2m54s
NixOS Build Check / Hermes dispatcher worktree base (pull_request) Successful in 14s
NixOS Build Check / Hermes decomposed worktree children (pull_request) Successful in 21s
NixOS Build Check / Hermes terminal timeout tree kill (pull_request) Successful in 42s
NixOS Build Check / Hermes cron lost fire claim (pull_request) Successful in 21s
NixOS Build Check / Hermes compression budget backstop (pull_request) Successful in 19s
NixOS Build Check / Hermes worker exit ledger (pull_request) Successful in 1m8s
NixOS Build Check / Hermes kanban dispatch dry-run (pull_request) Successful in 36s
NixOS Build Check / Hermes LCM externalized payload expansion (pull_request) Successful in 5s
NixOS Build Check / Build changed host closures (native, one eval) (pull_request) Successful in 4m23s
NixOS Build Check / foremerge accept-order contract (real binary) (pull_request) Successful in 5s
NixOS Build Check / Hermes LCM empty-transcript fallback (pull_request) Successful in 2m30s
7f68139584
The failed job was .forgejo/tests/test-scope-base-fetch.py's arm B:
an already-resolvable checkout must fetch nothing, asserted as an exact
.git byte-count equality (38047 -> 38199 in that run). The same test passes
3/3 locally on vpn (32393 -> 32393) and passed on the previous nix-config PR
(run 13950). Unrelated to this PR's one new overlay file.
hermes merged commit dd74774bc7 into main 2026-10-12 10:58:24 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ymrtech/nix-config!1875
No description provided.