fix: [nomad-step-2] S2.5 — bin/disinto init --import-env / --import-sops / --age-key wire-up (#883) #907
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#907
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-883-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 #883
Changes
AI Review
Blocker
bug
docs/nomad-migration.md:50/bin/disinto:796-822: The flag table says--empty"skips policies/auth/import/deploy", but_disinto_init_nomadhas no$emptygate around the policies block (line 796), the auth block (line 810), or the import block (line 824). Only a log echo (lines 711-715) branches on$empty. An operator running--backend=nomad --emptyto reach the documented "cluster-only escape hatch" will still invokevault-apply-policies.shandvault-nomad-auth.sh, which contradicts the runbook.Fix: either add
[ "$empty" = "true" ] && { ...; exit 0; }after the cluster-up block to skip policies/auth/import when--emptyis set, or correct the docs to match the real behavior (policies+auth always run; only deploy is skipped via thewith_servicesguard).Signal: confirmed by grep — the only
emptybranch in the function is the echo at lines 711-715; no gate exists before line 796.Non-blocking observation
bin/disinto:687-706: The pre-flight existence comment says "since we unconditionally invoke policies+auth" but the guard (if [ "$import_any" = true ]) only checksvault_policies_shandvault_auth_shwhen an import flag is set. On an import-free run those scripts are still invoked (lines 799, 813) without pre-flight verification — error still surfaces at execution, but as a raw shell "no such file" rather than the cleanError: ... not found or not executablemessage. Consider expanding the guard to cover all three scripts unconditionally, or at least matching the comment's stated rationale.Verdict
REQUEST_CHANGES — --empty docs claim (skip policies/auth/import) contradicts code: no gate exists around those sections
Reviewed at
7081c98| AGENTS.mdAI Review: REQUEST_CHANGES — --empty docs claim (skip policies/auth/import) contradicts code: no gate exists around those sections
7081c98a79toece5d9b6ccAI Re-review (round 2)
Previous Findings\n- blocker
bin/disintono$emptygate around policies/auth/import blocks → FIXED:if [ "$empty" = "true" ]; then exit 0; fiinserted after cluster-up in both the dry-run path (line 736) and the real-run path (line 813). Dry-run plan now matches real execution under--empty.\n- minor pre-flight guard only checked scripts whenimport_any=truedespite unconditional invocation → FIXED: guard widened toif [ "$empty" != "true" ], covering policies+auth on every non-empty path.\n\n### New Issues\nNone. Fixup also adds caller-side rejection of--empty+--import-*(line 1032–1034) and docs/nomad-migration.md entry for that mutual exclusion — both correct. Tests cover the new--emptydry-run short-circuit and the--empty+--import-*error path.Verdict
APPROVE — Previous blocker closed: empty gates added after cluster-up in both dry-run and real-run paths; non-blocking pre-flight guard also expanded; no collateral damage in fixup hunks
Reviewed at
ece5d9b| Previous:7081c98| AGENTS.mdAI Re-review (round 2): APPROVE — Previous blocker closed: empty gates added after cluster-up in both dry-run and real-run paths; non-blocking pre-flight guard also expanded; no collateral damage in fixup hunks