fix: [nomad-step-5] S5.5 — wire --with edge,staging,chat + vault-runner + full deploy ordering (#992) #1002
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#1002
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-992-2"
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?
Fixes #992
Changes
AI Review
Blocker
high
tools/vault-seed-chat.sh:95-101+lib/hvault.sh:_hvault_seed_key:_hvault_seed_keyreturns 3 distinct codes — 0=created, 1=unchanged, 2=API error — but the caller uses a bareifwhich treats both 1 and 2 as falsy, printing "${key} unchanged" and exiting 0 on an API failure.The failure path is:
hvault_get_or_emptyreturns non-zero (vault sealed, network error, non-200/404 response) →_hvault_seed_keyexecutes|| return 2→if _hvault_seed_key ...→ else branch →log "${key} unchanged". The script exits 0, the key is not seeded, and no error is surfaced to the caller (deploy.sh or CI).Fix: capture the return code explicitly and die on rc=2:
Confirmed correct
edgeconsistently added to validation, deploy ordering, dry-run output, and image-build paths in all four locations that reference the service list.edge(lines ~1197–1209) runs before theIFS=,validation loop, so auto-added deps are themselves validated.deploy.shcalls in the same function.VAULT_KV_MOUNTis initialized tokvby default inhvault.sh(: "${VAULT_KV_MOUNT:=kv}"), consistent withvault-seed-chat.sh'sKV_MOUNT="kv"._hvault_seed_keyread-merge-write preserves sibling keys correctly for KV v2's atomic.datareplacement.if [ -f "$vault_runner_path" ]) so a missing jobspec is a skip, not a crash.Verdict
REQUEST_CHANGES — _hvault_seed_key rc=2 (API error) is silently treated as 'unchanged' in vault-seed-chat.sh, masking seeding failures
Reviewed at
8381f88| AGENTS.mdAI Review: REQUEST_CHANGES — _hvault_seed_key rc=2 (API error) is silently treated as 'unchanged' in vault-seed-chat.sh, masking seeding failures
AI Re-review (round 2)
Previous Findings\n- high
tools/vault-seed-chat.sh:_hvault_seed_keyrc=2 silently treated as 'unchanged' → FIXED: explicitrc=0; ... || rc=$?+casewith*) die ...matches recommended fix exactly; no collateral damage in the fixup hunk.\n\n### Verdict\nAcceptance test passed. Approved.Verdict
APPROVE — Prior blocker fixed: rc=2 from _hvault_seed_key now caught and fatal via explicit capture + case
Reviewed at
3b82f8e| Previous:8381f88| AGENTS.mdAI Re-review (round 2): APPROVE — Prior blocker fixed: rc=2 from _hvault_seed_key now caught and fatal via explicit capture + case