Skip to content

fix(effects): fence expired notification retries without a lease sweep (#81, #85) - #109

Merged
LIghtJUNction merged 3 commits into
mainfrom
fix/81-expired-effect-leases
Sep 27, 2026
Merged

LIghtJUNction merged 3 commits into
mainfrom
fix/81-expired-effect-leases

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Member

Refs #81 and #85. This fixes a newly reproduced notification-state gap; it does not close either umbrella.

Failure

_retry/_finish fenced state and attempt number, but did not independently check the stored lease deadline. If no second worker had swept the expired lease yet, an old callback could put the expired external attempt back into pending or mark it done. The existing regression only tested the already-swept case.

Fix

Share one current-attempt/deadline check across completion and retry. A matching expired or missing lease is transactionally recorded as uncertain with expired_execution_lease, preserving attempts/next_at. A superseded attempt or existing terminal state is left untouched. No automatic resend or late completion overwrites this decision. Live retry timing, limits, channel codes and authorization remain unchanged.

Verification

14 new tests cover mail/Webhook, exact/past/missing deadlines, retry/completion before any sweep, repeated callbacks, non-reclaimability and concurrent stale callbacks. Local reproduction with the explicitly test-only transactional SQLite adapter: 14 failed before, 14 passed after. This is not PostgreSQL evidence: the submitted tests use the unchanged real PostgreSQL installed fixture in the complete CI gate. No sender performs network I/O in these state tests.

Publication used a temporary feature-branch-only materializer because direct git connectivity is unavailable. Both input/output SHA-256 hashes were checked, the workflow deleted itself, and the remote effects.py Git blob exactly matches the tested file (1bb4eb3fa8bfdb7a7c0cee91eb116de0a3c936a4). Final diff must contain only source/tests; squash merge keeps staging history out of main. Full exact-head CI required. No production deployment or configuration/authority change.

Copilot AI lite review requested due to automatic review settings September 27, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-27T21:35:27.718322Z a931951 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@LIghtJUNction LIghtJUNction left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the final two-file diff and confirmed no temporary workflow remains. _live_attempt checks current state, attempt and stored deadline within the same metadata transaction as the completion/retry; expired/missing deadlines become uncertain, with no automatic resend, and superseded attempts are untouched. The 14 new tests and unchanged real PostgreSQL fixtures ran in the complete four-shard CI. Exact-head run 36351982270 is now success, including contracts, conformance and build. Scope remains the notification retry/completion paths; this does not claim all worker paths or the whole #81/#85 feature matrix are complete. Squash merge keeps temporary publication history out of main.

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.

2 participants