Skip to content

fix(ci): outbox supersede requeue, lost+cancel recovery, policy hook home store (D-1120, D-1121, D-1124) - #472

Merged
acamarata merged 3 commits into
mainfrom
dw1-plugins-2
Oct 25, 2026
Merged

acamarata merged 3 commits into
mainfrom
dw1-plugins-2

Conversation

@acamarata

Copy link
Copy Markdown
Contributor

Rows

D-1120 superseding an expired delivery now re-posts the newest status. OutboxClaim marked a seq whose posting claim had expired as superseded without requeueNewest; a poster that died after its HTTP post landed left the host on the stale (possibly green) status. It now requeues the newest posted/posting status, as OutboxPosted and OutboxRelease already do. Test: TestOutboxSupersedingAnExpiredClaimRequeuesTheNewest (fails without the fix: nothing queued).

D-1121 a lost attempt that gets a cancel intent is now settled. Recovery's lost loop got E605 ("cancel intent won") from lost -> retryable, fell into the error branch, and left the attempt (and run) unsettled on every pass. It now ends the attempt cancelled (also on the needs-operator path for non-idempotent jobs), then CloseDeadRuns closes the run. Test: TestRecoveryCancelsALostAttemptWithACancelIntent, both job kinds (fails without the fix with E605: cancel intent won).
Not changed: the row's impact text also names staleChecker treating an unknown coordinator as stale (recovery.go) while docker discovery is daemon-wide, so another home's live container could be rm -f'd. That needs a design decision (container labels carry no home; the process sweep relies on unknown = stale), so it is left for a follow-up.

D-1124 the policy hook now reads the coordinator's store. PolicyRequest gained Store (the coordinator's state.db, set from Coordinator.storePath()); PolicyHook opens it instead of OpenStore(""). Test: TestPolicyHookReadsTheRequestStore (fails without the fix: pin in the home store not read).

Checks (free/ci, -mod=vendor)

  • go build ./..., go vet ./...: clean
  • go test ./...: all packages pass except two timing flakes under a loaded machine, each passing when run alone with -count=1 and unrelated to the touched files: cmd/agent TestNextStartKillsTheJobOfAKilledAgent, cmd TestRunsWait/the_invoke_deadline_caps_the_wait
  • each new test run against the unfixed code: fails as described above

@acamarata
acamarata merged commit 8de3ec8 into main Oct 25, 2026
31 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