Skip to content

fleet dispatch: nix develop commands fail in the fleet-build container (nix config / build-users-group / homeless-shelter purity) #13193

Open

Description

@dezren39

Problem

fleet queue dispatch cannot run a nix develop-based command (the standard pkgs/id oracle shape) inside the fleet-build:full container today. Verified 2026-11-23 by Lane OR (archer) while verifying the #10191 conformance oracle — four dispatches against developing-today/code @ lane-or-10191, each failing at a successive environment layer before any test code ran:

  1. Run 45146910204: error: experimental Nix feature 'nix-command' is disabled — the container's nix config does not enable nix-command/flakes, so plain nix develop fails immediately. (The runbook from PR docs(fleet): dispatch-first guidance for remote builds and tests #13128 shows nix build .#<pkg> as an example command; that hits the same wall.)
  2. Run 45147692449 (with --extra-experimental-features "nix-command flakes"): error: the group 'nixbld' specified in 'build-users-group' does not exist.
  3. Runs 45148497025 / 45151466620 / 45152850260 (with --option build-users-group "" and HOME/passwd workarounds attempted): error: home directory "/homeless-shelter" exists; please remove it to assure purity of builds without sandboxing. Moving the directory aside and rewriting the passwd entry from inside the dispatched command did not clear it — the check appears to run against state the dispatched command cannot change (the build's home is resolved outside the command's environment).

Impact

The dispatch-first guidance (runbook pkgs/fleet/doc/agents/remote-build-and-test.md) works for plain shell/cargo/go commands — proven the same night — but any repo whose checks need its nix dev shell (pkgs/id is the standing example: "pkgs/id work runs in nix develop") cannot be verified through dispatch today and falls back to laptop builds, which is what the guidance exists to avoid.

Ask

Make the fleet-build container able to run nix develop / nix build commands as dispatched, without per-command workarounds. Any of: bake the nix config into the image (experimental features on, a build-users-group that exists or is empty, a home setup that passes the unsandboxed-purity check), or document a supported container entry/wrapper for nix commands in the runbook and have fleet-command.yml use it. Acceptance: a dispatched cd pkgs/id && nix develop --command cargo test --manifest-path Cargo.toml --test conformance (or the documented equivalent) reaches cargo and reports the suite result.

Related: #13122 (dispatch unreachable from sandbox seats — separate, seat-side gap).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T10:32:18Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Picked up by xaltha — working this now. Claim-check 2026-11-23 ~10:55Z: issue OPEN, no live claim in the last 24h, no open PR implementing it. Twin #13168 checked: OPEN, no live claim and no open PR either; this slice will fix the shared container defects and note the overlap rather than duplicate it.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Released by xaltha (outcome: blocked — seat-side execution hold, not an issue defect). This lane's run was stopped by a system execution-risk notice on the worktree step before any code was written: no branch pushed, no files changed, no PR. Claim-check and scoping from the run stand and are recorded here so the next lane starts ahead:

    • Issue OPEN, no live claim in the last 24h, no open PR. Twin fleet-command container: dispatched nix develop/build commands fail out of the box (3 stacked env defects) #13168 also OPEN with no live claim and no open PR — same three defects, found by Lane PJ during id(phase-14): shells v2 slice 1 — second native target on the shared frame layer (#6297) #12817 verification; one fix should cover both, note the overlap on the PR.
    • Fix location: the fleet-build:full image (ghcr.io/developing-today/fleet-build:full) is defined/published outside this repo (fleet host repo owns .github/workflows/fleet-command.yml); the in-repo surface is the dispatcher in pkgs/fleet/crates/fleet-queue/src/placement.rs and the runbook pkgs/fleet/doc/agents/remote-build-and-test.md.
    • Candidate code-repo slice (untested hypothesis, needs dispatch verification): a wrapper the dispatched command calls that sets a writable HOME (not /homeless-shelter), NIX_CONFIG with experimental-features = nix-command flakes, and empty build-users-group before exec'ing nix — Lane PJ showed rm -rf /homeless-shelter alone is NOT sufficient because builders run with HOME=/homeless-shelter and recreate it; the wrapper must change the HOME the builders inherit. If that fails, the fix is image-level in the fleet repo.
    • Acceptance: dispatched cd pkgs/id && nix develop --command cargo test --manifest-path Cargo.toml --test conformance reaches cargo and reports the suite result, with no caller-side flags or cleanup.
  4. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Picked up by xaltha — working this now. Claim-check 2026-11-23 ~10:50Z: issue OPEN, prior xaltha claim released (seat-side hold, no code written), no other live claim in the last 24h, no open PR implementing this slice. Twin #13168 checked: OPEN, no live claim, no open PR — one fix should cover both; will note the overlap on the PR, not take it as a second slice.

  5. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Released by xaltha (outcome: blocked — no landable in-repo slice; the fix is image/runner-level in the fleet repo). Verified live by dispatch — the wrapper hypothesis is falsified, not just suspected:

    Probe 1 — run 45160142982 (https://github.com/developing-today/fleet/actions/runs/45160142982): dispatched cd pkgs/id && nix develop --command true with a wrapper env (HOME=/tmp/fleet-nix-home, XDG_CACHE_HOME/XDG_CONFIG_HOME redirected, NIX_CONFIG with experimental-features = nix-command flakes + empty build-users-group). Result: flake eval succeeded and several derivations BUILT — defects 1 and 2 are fixable from the command side — then error: home directory "/homeless-shelter" exists; please remove it to assure purity of builds without sandboxing. Decisive detail: /homeless-shelter did NOT exist when the command started (checked in the same step); it is created mid-run by nix's own unsandboxed builders (nix assigns builders HOME=/homeless-shelter), and the next build's purity check then fails. No HOME/NIX_CONFIG the dispatcher can set prevents this.

    Probe 2 — run 45162826437 (https://github.com/developing-today/fleet/actions/runs/45162826437): same wrapper plus sandbox = true + sandbox-fallback = false (confirmed effective via nix show-config). Result: error: this system does not support the kernel namespaces that are required for sandboxing. The container kernel cannot sandbox, so the purity check cannot be avoided that way either.

    What the fix needs (fleet repo, outside this repo): the fleet-build:full image / fleet-command.yml runner setup must provide working sandboxing — i.e. the container must run with user namespaces available so sandbox = true works — or otherwise change how the container runs nix. There is no nix setting for the builder-home path (it is the hardcoded /homeless-shelter), and no dispatcher-side env transformation in pkgs/fleet/crates/fleet-queue/src/placement.rs can reach it. Do not re-attempt a dispatcher wrapper; it has now been proven twice (Lane PJ's rm -rf attempts + these two probes).

    Twin #13168 has the same three defects and the same image-level resolution; one fleet-repo fix covers both.

    No code was changed; the empty branch xaltha/13193-fleet-build-nix pushed for the probes has been deleted.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions