Skip to content

fleet-command container: dispatched nix develop/build commands fail out of the box (3 stacked env defects) #13168

Open

Description

@dezren39

Problem

The runbook (pkgs/fleet/doc/agents/remote-build-and-test.md) advertises dispatching nix build / nix develop commands through fleet queue dispatch (fleet-command.yml, fleet-build:full container). As of 2026-11-23, a plain nix develop command fails out of the box in that container on three stacked environment defects, each hit in sequence while verifying PR #13147 (cargo test -p id-native-shell in the pkgs/id dev shell):

  1. Experimental features off — run 45145807796: error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it. The command context carries no NIX_CONFIG enabling nix-command flakes.
  2. Missing build-users group — run 45146728602: after passing the flags explicitly, evaluation succeeded but the build died with error: the group 'nixbld' specified in 'build-users-group' does not exist. The container's nix.conf names a group the image does not create.
  3. /homeless-shelter shipped in the image — run 45147861730: with build-users-group overridden empty, sandboxing auto-disables in the container and the build then dies with error: home directory "/homeless-shelter" exists; please remove it to assure purity of builds without sandboxing.

Workaround (verified shape, run 45150189636)

rm -rf /homeless-shelter; nix --extra-experimental-features "nix-command flakes" --option build-users-group "" develop --command <cmd>

Ask

Make dispatched nix commands work verbatim in the fleet-build:full environment: bake the equivalent of the workaround into the image/workflow env (NIX_CONFIG with experimental-features = nix-command flakes and an empty or existing build-users-group; no /homeless-shelter in the image, or sandbox = false with the purity check addressed). Acceptance: the runbook's example commands (nix build .#<pkg>, a nix develop --command cargo test ... in pkgs/id) succeed via fleet queue dispatch with no caller-side flags or cleanup.

Found by Lane PJ (archer) during #12817 slice-1 verification, 2026-11-23.

{
  "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-23T09:47:48Z",
    "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

    Update from run 45150189636 (Lane PJ): the rm -rf /homeless-shelter prefix is not a sufficient workaround. The command's own builds proceed for ~2 minutes (askama, basic-toml, rust-std derivations build fine un-sandboxed), then a later derivation fails with the same error at 09:52:02Z — an early builder evidently recreates /homeless-shelter (builders run with HOME=/homeless-shelter; one that creates it poisons every subsequent un-sandboxed build that performs the purity check). So defect 3 needs the image-level fix, not a caller-side cleanup. The verified-working command shape in the issue body should be read as: flags from defects 1–2 work; defect 3 blocks regardless.

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