Skip to content

Fix cancelled-run precedence over a later declared pause#727

Closed
CedricKhuaYanHan wants to merge 1 commit into
kunchenguid:mainfrom
CedricKhuaYanHan:fm/fm-pause-vs-cancelled-run-b2
Closed

Fix cancelled-run precedence over a later declared pause#727
CedricKhuaYanHan wants to merge 1 commit into
kunchenguid:mainfrom
CedricKhuaYanHan:fm/fm-pause-vs-cancelled-run-b2

Conversation

@CedricKhuaYanHan

Copy link
Copy Markdown

Summary

  • Fix crew-state reconciler precedence so a terminal cancelled no-mistakes run followed by a later declared paused: status line reports paused (status-log) instead of sticky cancelled/failed.
  • Active runs and other terminal outcomes (passed/failed) keep run-step precedence; cancelled without a later pause still reports failed.
  • Add regression tests covering cancelled+later pause, cancelled alone, active/failed/passed vs pause, and coarse runs-list cancelled+pause.

Why

Captain mid-run delivery redirect cancelled validation; the worker declared paused:; supervision still treated the run as failed and looped stale wakes against a deliberately idle worker (2026-07-16 incident).

Test plan

  • tests/fm-crew-state.test.sh reproduces then passes the cancelled+later-pause case and adjacent precedence cases
  • bin/fm-lint.sh (ShellCheck 0.11.0)
  • Broader suite exercised; unrelated pre-existing OpenCode session-lock flake observed on this host

When a branch-matched no-mistakes run ends cancelled and the worker later
appends paused:, report paused from the status log instead of sticking on
run-step cancelled/failed. Active runs and other terminal outcomes keep
run-step precedence. Regression for the 2026-07-16 redirect stale-wake loop.
@CedricKhuaYanHan

Copy link
Copy Markdown
Author

Closing: opened against the wrong repo (upstream template, not ours).

@CedricKhuaYanHan
CedricKhuaYanHan deleted the fm/fm-pause-vs-cancelled-run-b2 branch July 19, 2026 18:55
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