Keep retry dispatch fresh without leaking claims - #110
Merged
Conversation
Summary: - Dispatch retry attempts from the issue fetched by the retry handler. - Add a regression for a retry whose redundant second read disappears. Rationale: - The retry lookup is already a fresh by-id read immediately before dispatch. - Reading again could skip dispatch after the retry entry was popped, leaving the issue claimed with no running task or future retry. Tests: - mise exec -- mix test test/symphony_elixir/core_test.exs:875 - mise exec -- mix test test/symphony_elixir/core_test.exs - mise exec -- mix test test/symphony_elixir/orchestrator_status_test.exs - HEX_HOME=/private/tmp/symphony-hex mise exec -- make -C elixir all Co-authored-by: Codex <codex@openai.com>
Summary: - Preserve dispatch-time issue revalidation for retried work. - Release retry claims when the second refresh is missing or stale. - Reschedule retries when dispatch-time refresh fails. Rationale: - Reusing the first retry poll fixed a claim leak but could dispatch an issue that disappeared or became ineligible before work started. - The retry handler needs the revalidation outcome so it can release or retry instead of silently keeping the claim. Tests: - red/green retry dispatch revalidation regression - mise exec -- mix test test/symphony_elixir/core_test.exs - HEX_HOME=/private/tmp/symphony-hex mise exec -- make -C elixir all Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
A retry performs a fresh by-id lookup, then dispatch revalidates before starting work. If that second read missed or went stale, the popped retry could stay claimed forever; bypassing it instead could dispatch stale work.
TL;DR
Keep dispatch-time freshness and let retries release or reschedule from its outcome.
Summary
Alternatives
Test Plan
HEX_HOME=/private/tmp/symphony-hex mise exec -- make -C elixir allmise exec -- mix test test/symphony_elixir/core_test.exs:875mise exec -- mix test test/symphony_elixir/core_test.exs