Repository navigation
refactor(effects): share retry transitions without weakening lease fencing - #98
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Follow-up regression run completed locally: A subsequent combined run of all six proposed changes (#93–#98) passed 100 tests in 68.32s, with zero failures: webhook_identity, webhook_delivery, webhook_domain_events, ssh_process_identity, ssh_rss, tui, tui_recovery, registry_schema_ownership, backup_policy, backup_drill, backup_daemon and effect_retry_state. This verifies the combined local patch set rather than only each change in isolation. The JUnit report was generated at These are targeted Python 3.13 results, not a replacement for each PR's complete Python 3.15 CI. No production deployment was performed; umbrella issues remain open for their missing acceptance items. |
Refs #85 and #81. Small behavior-preserving refactor of duplicated mail/Webhook retry handling; no umbrella issue closure.
Changes
_retrynow owns the transaction, current-state/attempt fence, exponential delay, attempt limit and job-status write. Channel wrappers retain their existing status codes. This removes duplicate transition code rather than moving authority or business operations out of the executor.Characterization evidence
Before changing production code, added 30 real PostgreSQL tests, all passing. After refactoring, the same 30 tests passed again locally (Python 3.13.5, PostgreSQL 16.15).
The matrix covers both channels, attempts 1–9, bounded exponential delay, eight-attempt exhaustion, exact channel status codes, duplicate late completions, already pending/done/failed/uncertain jobs, a newer execution attempt, and expired running leases. Old workers cannot reschedule a new lease or overwrite an existing terminal decision; an expired execution remains uncertain rather than being automatically requeued.
Preserved boundaries
No migration, signature/ACL/credential changes, sender wire changes, network access or production deployment.
_claim,_finish, current-principal authorization and recovery-drill denial retain their original behavior. Full Python 3.15 repository CI and existing Webhook/mail regressions are required before merge. Other #85 transport/Registry/journal/ledger refactors remain separately tracked.