fix(bin): safely repair legacy Herdr endpoint bindings - #2805
mcordovaforus wants to merge 5 commits into
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "no-mistakes: apply CI fixes" | Re-trigger Greptile |
|
Speaking as Kun's firstmate: VISION: aligns. New capability ships as an option: captain must invoke Class: opt-in. Corrective recovery command, not default-on lifecycle. Security: none after review. Fail-closed; atomic metadata rename; no Overlap / HOLD named: Herdr conceptually overlaps open hold-pair #2637 ( CI: HEAD Workflows approved: yes (CI 32601142602, NM 32601142607). Land-eligible: NO this pass. Waiting on CI; matching NM attestation still required from the author. Not waiting on the captain. Captain-flag NOW: no. |
Intent
Recover the legacy retirement path for the completed dpf-monitor-catalogo-permisos-audit work safely. The captain withdrew further catalog and IAM work and wants the obsolete record retired, but fm-teardown correctly refuses because the legacy Herdr metadata lacks an exact task binding. Do not bypass that refusal, use --force, delete state by hand, kill a pane, change GCP IAM, or alter data-platform project material. Provide the narrowest firstmate-only recovery capability that permits binding repair only after positive identity proof, fails closed on every ambiguous legacy binding, and never infers a target from a label, shared workspace, or stale pane identifier. Preserve every report, branch, commit, and captain-held decision; both captain-held decisions are now durably answered and remote archival of the six commits is separately authorized and being handled by another worker, but do not repair or retire the live legacy record until that worker proves the remote archive. This work is limited to validating and shipping the safe mechanism with tests and documentation through a PR; it does not authorize Herdr lifecycle controls or the actual retirement.
What Changed
Risk Assessment
✅ Low: Captain, the change is narrowly scoped to metadata binding, requires concrete live and durable identity evidence, and preserves all lifecycle retirement gates.
Testing
Reviewed the target diff, ran the focused repair regression suite, and captured end-to-end CLI evidence of a successful metadata-only binding repair (with report, captain-held status, commit, and worktree preserved) plus the outside-CWD gate refusal; all targeted validation passed.
Evidence: Successful metadata-only repair transcript
Evidence: Outside-CWD gate-path refusal transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 1 issue found → auto-fixed ✅
bin/fm-repair-legacy-endpoint-binding.sh:71- The no-mistakes Git-path backstop is caller-directory dependent. At line 71, the new command callsfm_refuse_if_gate_agentwithout an anchor, so afterNO_MISTAKES_GATEis removed, running it from the gate worktree exits 3 butcd-ing elsewhere lets it advance past the guard (the probe reaches the later missing-metadata refusal). This violates the required no-bypass/fail-closed boundary. Anchor the check to$FM_ROOTand add a regression case that removes the env marker and invokes the command from outside the gate worktree.git diff --stat 1231b6ae7fd4c5ff7e94d2f5ca2159536c4c41cb 0b93ad587b9077683b184915121338e760a97238and targeted source/test inspectionbin/fm-test-run.sh tests/fm-repair-legacy-endpoint-binding.test.sh --json /var/folders/8q/s7sl96nn6mg9vp5_6t335qqr0000gp/T/no-mistakes-evidence/01M0NPEKCM6RMNZ4AF066RY7R5/focused-test.jsonDirect gate-context probe withNO_MISTAKES_GATEandFM_GATE_REFUSE_BYPASSunset, executed once from the gate worktree and once after changing to the evidence directory🔧 Fix: Anchor legacy repair gate backstop
✅ Re-checked - no issues remain.
tests/fm-repair-legacy-endpoint-binding.test.shManual isolated legacy-record fixture invokingbin/fm-repair-legacy-endpoint-binding.sh legacy-taskwith two exact read-only Herdr pane responsesOutside-CWD gate-path probe withNO_MISTAKES_GATEunset andFM_ROOT_OVERRIDEanchored to this gate worktree✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.