Skip to content

Stabilize scheduled Agenda worker-loss recovery test - #226

Merged
kinqsradio merged 1 commit into
mainfrom
fix/scheduled-agenda-recovery-test
Oct 22, 2026
Merged

kinqsradio merged 1 commit into
mainfrom
fix/scheduled-agenda-recovery-test

Conversation

@kinqsradio

Copy link
Copy Markdown
Member

Summary

Stabilize the existing scheduled-Agenda worker-loss regression uncovered by main CI while qualifying #222/#223.

The test ran a live worker while expiring its lease, then assumed claimScheduledAgenda(id) === null guaranteed completed recovery. The claim intentionally uses FOR UPDATE SKIP LOCKED: null can also mean the live provider poll briefly holds the row lock. The test then raced the still-running worker and read running rather than failed.

Model the lost worker using the same real queued-envelope setup already used by the neighboring recovery test. No live polling loop survives the simulated loss. Explicitly hold the row lock to prove a null claim leaves the run running; after releasing it, assert completion_unknown failure, rejection of the late signed reply and exactly one model operation. Extract the existing envelope fixture for reuse.

Evidence

  • Full scheduled-Agenda runtime test file: 20/20 passed locally.
  • Revised contention/recovery case: five consecutive runs passed.
  • Scoped Prettier and whitespace checks passed.
  • Only one test file changes. No production behavior, timeout, safety assertion, concurrent skills or policy edit changes.

Prepared in an isolated checkout from main. Full CI will qualify the resulting main revision.

@kinqsradio
kinqsradio merged commit 78f5887 into main Oct 22, 2026
1 of 5 checks passed
@kinqsradio
kinqsradio deleted the fix/scheduled-agenda-recovery-test branch November 2, 2026 07:56
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