eval-smoke: own-vps-gateway + seed-community drvPath baselines drift (non-deterministic generated cert embedded at eval?) — pre-existing, surfaced by #925 #935
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#935
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Symptom
The
IDSS_EVAL_SMOKE=1gatesTestSeedCommunity_EvalSmoke(private/VM) andTestOwnVPSGateway_EvalSmoke(self-hosted) FAIL at theirassertDrvPathBaselinecheck:The eval itself PASSES (
own-VPS gateway eval smoke passed,#414 closure asserts passed) — only the committed drvPath baseline mismatches.TestRentedGateway_EvalSmokeis unaffected (green).This is pre-existing, not a regression
Found while proving #925 (git+file:// swap). Confirmed on stock main with the #925 changes stashed:
TestOwnVPSGateway_EvalSmokereds with the identicalown-vps-gateway driftedbaseline failure. #925 does not touch committed-rev evals (flakeRef(dir, rev)is byte-identical before/after), so the drift is independent of it.Likely cause (unconfirmed — for this ticket to settle)
The two drifting scopes carry a kanidm-tls generator whose public material (the self-signed CA cert) is generated fresh per
clan vars generateand embedded at eval into the toplevel derivation. A random keypair per run ⇒ different embedded bytes ⇒ different drvPath every run — which would make these two baselines inherently non-deterministic (note the observed drvs differ run-to-run, e.g.z0m98ph3…vsikdislmp5…across two runs of the same test). The rented scope not drifting is consistent with a different (non-embedded) shape.Why a session
Diagnosing needs a real clan run (nix + clan-core,
IDSS_EVAL_SMOKE=1): run the eval-smoke twice and diff the two toplevel closures to confirm the varying input, then decide whether to (a) pin the generated cert deterministically for the smoke, (b) drop the embedded-cert scope from the drvPath baseline while keeping the toplevel eval + closure asserts, or (c) re-baseline against a fixed seed. The test explicitly forbids blindIDSS_EVAL_SMOKE_UPDATE=1re-baselining, so a real fix is owed.Filed from the #925 session under ADR 0174 as an out-of-scope observation.
.git— swappath:<dir>forgit+file://<dir>at the nine call sites (deeper fix behind #923) #925Ruled by agent under ADR 0174 — veto anytime. Two-way door: a revertible test-infra + baseline change, proven by paired eval-smoke runs on this host (nix 2.35.1) and a
nix derivation showdiff.What it was — two causes, not the ticket's one
The ticket's hypothesis (a public kanidm CA minted per run and embedded at eval) is wrong:
kanidm-tls'scais declared secret (vmguest.go:541) — a lazy sops path, neverreadFile'd at eval. The onlyreadFile'd public CA is the private-pathfront-door-tls(frontdoor.go:611), which the drifting publicown-vps-gatewayscope never renders, and which the privateseed-communityscope never generates. So neither drift came from where the ticket looked.What actually happened, proven empirically:
1.
seed-community— deterministic drift (stale baseline). It never runsclan vars generate, so its closure is a pure function of the committed render. Two smoke runs produced identical drvPaths (fleetgw=rymn48…both times;gateway=n26azx…, already matching baseline). Thefleetgwclosure legitimately evolved across ~25 commits since the #473 baseline (IDIP identity stack #771/#778, files/Nextcloud #788/#790, gate-oidc #628/#644, …) while theseIDSS_EVAL_SMOKEtests never run in CI (no Nix sandbox), so nobody re-baselined. → Re-baselinedfleetgwunderIDSS_EVAL_SMOKE_UPDATE=1(a deliberate, diagnosed re-baseline, not a blind one — the social rule is satisfied).2.
own-vps-gateway— inherent non-determinism. It does runclan vars generate, minting fresh random secrets every run. Two runs gavej7ssp44…thenxnkzcm….nix derivation showon both toplevels isolated the delta to exactly six sealed-secret store sources —kanidm-tls_{ca,cert,key},kanidm-admins_{admin,idm_admin},gate-oidc_secret— which ride the machine's/etcactivation manifest intosystem.build.toplevel. Every generation reseals them with new randomness, so no committed drvPath can ever hold, and the baseline signal (a render silently re-deriving a machine) is permanently drowned by secret churn. → Dropped theown-vps-gatewayrow + itsassertDrvPathBaselinecall (ticket option b). The scope keeps a stronger guard for a secret-bearing config anyway: the toplevel eval, the #454 control-plane assertions, and the #414 reachable-closure asserts — all still fire green.What landed
internal/clan/seedcommunity_eval_test.go— removed theown-vps-gatewayassertDrvPathBaselinecall; comment explains the secret-churn reason.internal/clan/testdata/drvpath-baseline.txt—fleetgwrow updated,own-vps-gatewayrow removed; header now records which scopes are baselineable (only secret-free ones).internal/clan/drvpath_baseline_test.go— baseline header const documents the rule.docs/GOTCHAS.md— #112 (avars generatescope can never carry a drvPath baseline).STATUS.md— header.Proof
TestSeedCommunity_EvalSmoke— PASS (baseline: scope "seed-community" matches … (2 machines)).TestOwnVPSGateway_EvalSmoke— PASS (eval + #454 guards + #414 closure asserts all green; no baseline assert).internal/clansuite (CI, no nix) — green, incl. the baseline unit tests.go build ./...clean.Commit
1fc2d968onmain.