ci(deploy): the lanes' scratch is per-run, not one /tmp name everyone shares (NCFG#293) #1350
No reviewers
Labels
No labels
backlog
bug
enhancement
in-progress
review
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ymrtech/nix-config!1350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kb/NCFG-293-deploy-scratch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The health-gate baseline is scratch a deploy job WRITES before the switch and READS BACK in its gate step, and it was the fixed
/tmp/fleet-health-gate-baseline.txt— one file per host and user. Two jobs on one runner lane (two runs, a re-dispatch, a manual dispatch) shared it, so one job's switch could overwrite the service set another job's gate was about to compare against: aREQUIRE_BASELINE=1violation and an auto-rollback of a deploy that was fine. Same class as the flake-update gate scratch (#253,ci(flake-update): the gate's scratch is job-private, not bare /tmp).Measured on vpn, 2026-10-01 — the collision surface is real, and
$GITHUB_RUN_IDalready works here:So
-$GITHUB_RUN_IDis the naming this same job already trusts for its implementation checkout.What changes
host-deploy.ymlBASELINE_FILEstep-env, fixed name, on the 3 gate steps only/tmp/fleet-health-gate-baseline-${{ github.run_id }}.txtgiga-deploy.yml/tmp/rollback-nixos-config-stub.nix$STUB=/tmp/rollback-nixos-config-stub-$GITHUB_RUN_ID.nixfleet-deploy.yml/tmp/fanout.json${RUNNER_TEMP:-/tmp}/fanout-$GITHUB_RUN_ID.json(the runner's temp dir is per JOB, so the diagnostic quotes its own dispatch's response)Declared once, workflow-level, on purpose: the switch step is the WRITER and the gate step is the READER, and a drift between them is not a slow leak — it is a missing-baseline violation and an auto-rollback. Before, only the gate steps carried the variable, so a per-run path would have had the writer writing a fixed name nobody read.
Depends on
nix-config-private#351 (
deploy: the health-gate baseline path is the caller's, not a fixed /tmp name), which makesswitch.sh/10-gate-baseline.shhonour$BASELINE_FILEand fall back to the old fixed path. Merge #351 first: with the impl writers still hardcoding the name, this skeleton change would fail every deploy's gate closed.Verification
test-host-fanout.sh51/51,test-dispatch-input-types.sh0 fail,test-logging-standard-check.sh49/49,test-lock-bump-closure-neutral.sh27/27,test-fleet-timezone.sh13/13,test-public-surface.pyall pass — on the rebased head.envpicked up./tmp/fleet-health-gate-baseline.txtkeeps its03:17mtime.914f867732c1dad9bff4