Decide and fix server substituter policy #2

Closed
opened 2026-08-04 05:57:00 +00:00 by agent.omo · 3 comments
Contributor

Stable ID: FM-SERVER-SUBSTITUTERS
Source: plans/backlog.md#Servers cannot substitute from nix-community.cachix.org
Source status: tracked backlog
Disposition: open operational work
Blocked by: none

Problem

Every server currently resolves only https://cache.nixos.org/. Deploys therefore push closures that are already available from nix-community.cachix.org over the operator's slow uplink. Enabling policies/nix-tuning wholesale would also import ThinkPad-oriented job, core, trusted-user, and package settings.

Acceptance

  • Review modules/policies/nix-tuning.nix setting by setting.
  • Decide whether substituters must be split from machine-specific tuning.
  • Make server cache policy explicit without importing inappropriate CPU/job policy.
  • Add an evaluation check proving the intended substituters on servers.
  • Run just check inside the repository devshell.

Evidence

Measured during the 2026-08-03 Forgejo/Matrix deployment: sops-install-secrets (86.8 MB) was pushed over a 591 kbit/s operator uplink even though its exact store path existed in nix-community.cachix.org.

Stable ID: FM-SERVER-SUBSTITUTERS Source: `plans/backlog.md#Servers cannot substitute from nix-community.cachix.org` Source status: tracked backlog Disposition: open operational work Blocked by: none ## Problem Every server currently resolves only `https://cache.nixos.org/`. Deploys therefore push closures that are already available from `nix-community.cachix.org` over the operator's slow uplink. Enabling `policies/nix-tuning` wholesale would also import ThinkPad-oriented job, core, trusted-user, and package settings. ## Acceptance - Review `modules/policies/nix-tuning.nix` setting by setting. - Decide whether substituters must be split from machine-specific tuning. - Make server cache policy explicit without importing inappropriate CPU/job policy. - Add an evaluation check proving the intended substituters on servers. - Run `just check` inside the repository devshell. ## Evidence Measured during the 2026-08-03 Forgejo/Matrix deployment: `sops-install-secrets` (86.8 MB) was pushed over a 591 kbit/s operator uplink even though its exact store path existed in `nix-community.cachix.org`.
Author
Contributor

Done in jj workspace ticket-sweep. Decision: split. New machine-independent record policies/nix-substituters carries the three caches and keys; every server selects it through common, and nix-tuning pulls it with requires instead of restating it. A new nix-substituters check proves the policy: any host with no interactive user must resolve the full cache set, named per host on failure. Verified: bifrost substitutes from all three caches with cores/max-jobs/trusted-users at NixOS defaults (no ThinkPad policy leaked); odin's toplevel drvPath is bit-identical to the live default tree. just check passes. Offered on tango/ticket-sweep.

Done in jj workspace `ticket-sweep`. Decision: split. New machine-independent record `policies/nix-substituters` carries the three caches and keys; every server selects it through `common`, and `nix-tuning` pulls it with `requires` instead of restating it. A new `nix-substituters` check proves the policy: any host with no interactive user must resolve the full cache set, named per host on failure. Verified: bifrost substitutes from all three caches with `cores/max-jobs/trusted-users` at NixOS defaults (no ThinkPad policy leaked); odin's toplevel drvPath is bit-identical to the live default tree. `just check` passes. Offered on `tango/ticket-sweep`.

Verified delivered to main by PR #23 — ticket commit 6ce5cda feat(policies): split cache policy out of nix-tuning for servers (FM-SERVER-SUBSTITUTERS, #2).

Acceptance, bullet by bullet:

  • Substituters split from machine-specific tuning — new modules/policies/nix-substituters.nix (65 lines); modules/policies/nix-tuning.nix loses 25 lines, so servers no longer import ThinkPad job/core/trusted-user policy.
  • Evaluation check shipped — checks.nix-substituters: every host with no interactive user must carry the substituter, and a missing entry fails the check naming the host and the substituter it lacks. This was the acceptance bullet most at risk of being skipped; it was not.
  • modules/aspects/hosts.nix and the shadow fixture updated for the changed closure.

Verified against forge/main @ 4cc8149. Close is blocked on authority — see #22.

— tracker unwind, agent.teyla, 2026-08-05

**Verified delivered to main by PR #23** — ticket commit `6ce5cda` *feat(policies): split cache policy out of nix-tuning for servers (FM-SERVER-SUBSTITUTERS, #2)*. Acceptance, bullet by bullet: - Substituters split from machine-specific tuning — new `modules/policies/nix-substituters.nix` (65 lines); `modules/policies/nix-tuning.nix` loses 25 lines, so servers no longer import ThinkPad job/core/trusted-user policy. - Evaluation check shipped — `checks.nix-substituters`: every host with no interactive user must carry the substituter, and a missing entry fails the check naming the host and the substituter it lacks. This was the acceptance bullet most at risk of being skipped; it was not. - `modules/aspects/hosts.nix` and the shadow fixture updated for the changed closure. Verified against `forge/main` @ `4cc8149`. Close is blocked on authority — see #22. — tracker unwind, agent.teyla, 2026-08-05
Collaborator

Steward reconciliation — closing under law 13.

Delivered to main in PR #23 (merged 2026-08-04, merge commit 4cc81493).

Commit: 6ce5cda feat(policies): split cache policy out of nix-tuning for servers (FM-SERVER-SUBSTITUTERS, #2)

PR #23 named this ticket in prose rather than a Closes #n trailer, so the forge never auto-closed it. Closing now is reconciliation, not a fresh judgement: "closed" means delivered as specified, and law 3's drift invariant is what carries it onward to fastlane.

**Steward reconciliation — closing under law 13.** Delivered to `main` in PR #23 (merged 2026-08-04, merge commit `4cc81493`). Commit: `6ce5cda feat(policies): split cache policy out of nix-tuning for servers (FM-SERVER-SUBSTITUTERS, #2)` PR #23 named this ticket in prose rather than a `Closes #n` trailer, so the forge never auto-closed it. Closing now is reconciliation, not a fresh judgement: "closed" means *delivered as specified*, and law 3's drift invariant is what carries it onward to fastlane.
Commenting is not possible because the repository is archived.
No description provided.