eval-smoke tests fail "No SOPS key found" on a fresh session-runner checkout (no bootstrapped sops-age key) #695
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#695
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?
Discovered while proving the #693 fix (
TestRentedGateway_EvalSmoke, a new sibling ofTestOwnVPSGateway_EvalSmoke).What
Both
TestOwnVPSGateway_EvalSmokeand the newTestRentedGateway_EvalSmoke(internal/clan/seedcommunity_eval_test.go, gatedIDSS_EVAL_SMOKE=1) construct theirAdapterwithNew(repo, cli, nil)— noSecretsbootstrap wired, noWithAgeKeyFileoption set.clan vars generatethen fails immediately:Confirmed this is NOT specific to the new test — running
IDSS_EVAL_SMOKE=1 go test ./internal/clan/... -run TestOwnVPSGateway_EvalSmoke -von this session-runner checkout (matou-workstation, a fresh dedicated checkout per #538) fails identically.internal/clan/secrets.go'sSecrets.EnsureOperator(the app-scoped sops-age bootstrap, #313/ADR 0121) exists and is exactly the missing step, but nothing in either eval-smoke test calls it or setsWithAgeKeyFile.Why this matters
These tests are the documented "local guard ahead of the drive's own eval preflight" — but on a clean session-runner checkout (no pre-existing
~/.config/sops/age/keys.txtor equivalent from a prior manualclan secrets key generate), they cannot run to a real verdict at all. They likely only pass on a machine that already carries an operator age key from unrelated prior use (e.g. Ben's own dev machine). That silently narrows "provable by an existing test" (ADR 0174 rule 1(b)) for any agent session working gateway-render tickets on a fresh checkout.Suggested default ruling
Wire
Secrets.EnsureOperator(ctx)(withWithAgeKeyFilepointed at a test-scoped temp path) into both eval-smoke tests beforeclan vars generate, mirroring how production founding actually bootstraps this (wherever that call site is — worth confirming it exists and is exercised elsewhere, since if founding itself never callsEnsureOperatoreither, that would be a live-path gap, not just a test one).Why human
Routed for triage rather than self-fixed here: mechanical (revertible, provable), but touches shared eval-smoke test infrastructure other in-flight sessions may also be relying on, and its blast radius (does production founding actually call
EnsureOperatorbefore generate, or does it have the same latent gap?) needs a quick look before a fix — out of #693's scope to chase down.Ruled by agent under ADR 0174 — veto anytime.
Ruling: this stays a two-way door, not a
ready-for-humangate — routing it toready-for-agentwith the brief below.Why it's a two-way door: the fix is confined to two test functions in
internal/clan/seedcommunity_eval_test.go(adding the missingSecretsbootstrap beforeclan vars generate). It's revertible with a single commit, and provable by re-running the two named tests underIDSS_EVAL_SMOKE=1— they must go from failing "No SOPS key found" to a cleannix evalpass, exactly the guard they exist to be.What resolves the "blast radius" question raised in the issue: I checked whether production founding has the same latent gap. It doesn't —
internal/founding/privatepath.go'sseedCommunityConfig(the shared helperown-VPS, private-VM, and rented founding all call) invokeso.clan.Secrets().EnsureOperator(ctx)before generating vars, andinternal/founding/selfhostedpath.go's self-hosted path does the same independently. All four live founding paths already bootstrap the operator sops-age key. This is a test-scaffolding gap only — the eval-smoke tests construct theirAdapterviaNew(repo, cli, nil)with noWithAgeKeyFileoption and never callEnsureOperator, unlike production wiring (app/helper/cmd/helper/wiring_prod.gopassesclan.WithAgeKeyFile(keyFile)into every real adapter). So there is no live-path defect hiding behind this — safe to fix as pure test infrastructure.The pattern to mirror already exists in
internal/clan/secrets_test.go(e.g.TestSecrets_EnsureOperator_MintsAndRegisters): construct withNew(repo, cli, nil, WithAgeKeyFile(keyPath))wherekeyPathis undert.TempDir(), then calla.Secrets().EnsureOperator(ctx)before the step that needs sealed vars.Agent Brief
Category: bug
Summary: The
IDSS_EVAL_SMOKE=1gateway eval-smoke tests fail "No SOPS key found" on a fresh checkout because they never bootstrap the operator sops-age key before generating vars.Current behavior:
Both gateway eval-smoke tests (the own-VPS full-install guard and its rented/VMMode sibling) construct their
Adapterwith no age-key file wired and never drive the operator sops-admin bootstrap.clan vars generatethen fails immediately with "No SOPS key found. Please generate one withclan secrets key generate." on any checkout that doesn't already carry a pre-existing~/.config/sops/age/keys.txt(or platform equivalent) from unrelated prior use. The tests are meant to be a local red-green guard ahead of the drive's own eval preflight, but on a clean session-runner checkout they cannot reach a real verdict at all.Desired behavior:
Both eval-smoke tests bootstrap an app-scoped operator sops-age key — scoped to the test's own temp directory, never touching a real
~/.config/sops— beforeclan vars generateruns, exactly mirroring how the production founding paths bootstrap the operator key before generating/sealing vars. The tests then proceed tonix evalexactly as they do today. No other behavior of these tests changes.Key interfaces:
Adapter's construction option that points the sops-admin bootstrap at an app-scoped age key file (anAdapterOptionin theclanpackage) — pass a path under the test's own temp directory, not a shared/default location.Secrets.EnsureOperator(ctx context.Context) error— the sops-admin bootstrap method on the adapter'sSecrets()accessor; call it once, before theclan vars generateinvocation, in both eval-smoke tests.clanpackage's secrets test file show the exact wiring pattern (construct-with-age-key-option, then callEnsureOperator) — mirror that shape rather than inventing a new one.Acceptance criteria:
IDSS_EVAL_SMOKE=1 go test ./internal/clan/... -run TestOwnVPSGateway_EvalSmoke -vpasses on a fresh checkout with no pre-existing sops/age key anywhere on the machine.IDSS_EVAL_SMOKE=1 go test ./internal/clan/... -run TestRentedGateway_EvalSmoke -vpasses under the same fresh-checkout condition.~/.config/sopspath — the bootstrapped key is confined to the test's own temp directory (use the isolation helper pattern already established in theclanpackage's secrets tests, or an equivalent per-test isolation).nix evaloutput, the drvPath baseline, or the control-plane guard checks already in place — this is purely adding the missing bootstrap step ahead ofclan vars generate.Out of scope:
EnsureOperatorcall sites (own-VPS/private/rentedseedCommunityConfig, self-hosted's own call) — confirmed already correct, not touched here.Secrets.EnsureOperator's own implementation or its unit tests.swarm-claim host=elitebook-distributed-server-03 run=9211
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #695 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope