Skip to content

fix(bin): unblock Orca task teardown for absent worktrees and archived decisions - #12

Merged
peterOC26 merged 10 commits into
mainfrom
fm/fm-teardown-remote-orca-hang-t1
Aug 24, 2026
Merged

peterOC26 merged 10 commits into
mainfrom
fm/fm-teardown-remote-orca-hang-t1

Conversation

@peterOC26

@peterOC26 peterOC26 commented Aug 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Make captain-decision hold lookup use the live backlog first and fall back to the configured archive only on an explicit not-found result.
  • Resolve duplicate archived holds by the newest archive block, keep ambiguity fail-closed, and serialize archive repair with tasks-axi's exact backlog lock and path precedence.
  • Distinguish an absent Orca worktree from an unreachable host or indeterminate probe, including nonzero selector_not_found replies, local tasks, and forced secondmate children.
  • Preserve every task artifact when an untracked local checkout directory still exists, even under --force, while allowing forced retirement only when nothing remains at the recorded path.
  • Emit bounded periodic stderr progress for long fetch-class remote Git waits without making short verdict calls chatty or changing their budgets.
  • Retire metadata and merge-poll/check artifacts through one signal-deferred boundary for both main tasks and forced secondmate children.

Forced secondmate child-path audit

  • D1 genuinely does not apply: children are only cleaned through forced secondmate teardown, while the scout decision gate is intentionally limited to non-forced teardown of the task's own record.
  • D2 was fixed: remote and local Orca children use the shared presence classification, proven absence can complete forced retirement only when the recorded checkout is also gone, and an existing local checkout refuses while preserving the child record and every poll/check/trust artifact.
  • D3 genuinely does not apply: the child cleanup path performs no fetch-class remote Git operation, so it never enters the long-network-wait loop that owns progress output.
  • D4 was fixed: forced child cleanup now reuses the shared poll-and-metadata retirement helper, and its regression test deterministically fails under the former ordering.

Verification

  • tests/fm-backend-orca.test.sh: 107 cases passed.
  • tests/fm-decision-hold-lifecycle.test.sh: 24 cases passed.
  • tests/fm-teardown.test.sh: 60 cases passed.
  • Counterfactual and mutation checks established that the new and strengthened regressions discriminate the fixed behavior from the former paths.
  • bin/fm-lint.sh passed unchanged with pinned ShellCheck 0.11.0 and actionlint 1.7.12.
  • D2 was verified end to end against the live Orca CLI and the real stuck task pv-drivetime-live-migration-m1: ordinary teardown produced the accurate absent-worktree refusal and preserved state, while captain-authorized --force retired every state file.
  • D1, D3, and D4 were not reproducible against live stuck tasks in this session; their evidence is the non-vacuous script-interface coverage above.

Delivery note

The no-mistakes review, test, documentation, and lint phases passed on commit 039e7068 with the required opposite-family Claude review.
The automatic PR step opened this PR correctly; an unqualified gh-axi lookup initially resolved the separate upstream repository's unrelated PR #12 and caused the CI monitor run to be cancelled during reconciliation.
This PR's own repository-qualified checks are being monitored directly, and no code changed during that recovery.

Pipeline

Updates from git push no-mistakes

@peterOC26

Copy link
Copy Markdown
Owner Author

The remaining red PR must be raised via no-mistakes mark is a superseded compliance run caused by a Firstmate instruction error that temporarily removed the required marker. The current compliance run and CI pass, and no code changed during the correction.

@peterOC26
peterOC26 merged commit e33a6ba into main Aug 24, 2026
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant