Stop continuation when issues leave execution filters - #63
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new post-success tracker refresh in IssueExecutionCoordinator can turn a successful run into a failed/backoff retry on transient refresh exceptions and should be made best-effort (and should use execution eligibility consistently).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Implements spec-aligned “execution eligibility” (active state + label/milestone filters) so that continuation and reconciliation stop when an issue no longer matches configured execution filters, including after a successful run.
Changes:
- Extend
IssueStateSnapshotwith candidate-filter eligibility and anIsExecutionEligible(...)helper, and switch reconciliation/continuation to use it. - Update GitHub ID-based refresh to return label/milestone eligibility using the same matching semantics as candidate dispatch.
- Add/adjust integration + core tests and update SPEC/plan/user docs to reflect the new execution-filter contract.
File summaries
| File | Description |
|---|---|
| tests/Symphony.Integration.Tests/OrchestrationTickServiceTests.cs | Adds SQLite-backed orchestration/coordinator coverage for stopping runs/retries when filters no longer match. |
| tests/Symphony.Integration.Tests/GitHubTrackerClientTests.cs | Adds tests asserting ID-based refresh applies the same label/milestone semantics as candidate dispatch. |
| tests/Symphony.Integration.Tests/CodexAgentRunnerTests.cs | Updates continuation test to stop based on execution eligibility (including label removal). |
| tests/Symphony.Core.Tests/IssueStateSnapshotTests.cs | Adds unit coverage for the new execution eligibility helper. |
| src/Symphony.Infrastructure.Tracker.GitHub/GitHubTrackerClient.cs | Extends ID-based refresh GraphQL selection set and computes MatchesCandidateFilters. |
| src/Symphony.Infrastructure.Agent.Codex/CodexAgentRunner.cs | Switches between-turn continuation stopping to use IsExecutionEligible. |
| src/Symphony.Host/Services/OrchestrationTickService.Reconciliation.cs | Reuses IsExecutionEligible during running-issue reconciliation. |
| src/Symphony.Host/Services/IssueExecutionCoordinator.cs | Adds a post-success eligibility refresh to decide whether to enqueue a continuation retry. |
| src/Symphony.Core/Models/IssueStateSnapshot.cs | Adds MatchesCandidateFilters and IsExecutionEligible(...). |
| SPEC.md | Updates execution-filter contract + conformance checklist for continuation/reconciliation behavior. |
| README.md | Documents new reconciliation/continuation behavior for label/milestone-gated workflows. |
| IMPLEMENTATION_PLAN.md | Records the implementation slice for reusing candidate eligibility in continuation/reconciliation. |
| docs/UserGuide.md | Updates user guidance to reflect eligibility checks between turns and after success. |
Review details
- Files reviewed: 13/13 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Spec: §§8.5, 10, 11, 17.3–17.5. Updates the execution-filter contract and conformance checklist in SPEC.md, with matching implementation-plan and user-guide changes.
Summary
Fixes #62.
When an agent removes a required execution label after opening a PR, an open issue now stops receiving live continuation turns. Running-issue reconciliation uses the same eligibility result, and the coordinator refreshes configured label/milestone filters before scheduling a successful continuation retry. Ineligible successful runs release their claim without queuing another retry or deleting their workspace.
ID-based GitHub refreshes now include label and milestone metadata and reuse the candidate adapter's matching rules: all labels, case-insensitive, and milestone title or number. Existing terminal cleanup and workflows without label/milestone filters retain their behavior. Persisted retries still require a current candidate before redispatch. No issue, label, or PR mutations are added; an open issue and PR can remain available for human review.
Validation
dotnet restore Symphony.slnx: passed.dotnet build Symphony.slnx --configuration Release --no-restore: passed, zero warnings or errors.dotnet test Symphony.slnx --configuration Release --no-build: 155 passed; one opt-in real GitHub test skipped because the real integration profile was not enabled.git diff --check: clean.Operational notes
No migration or new configuration is required. Filtered workflows make one extra tracker refresh after successful worker completion before retry scheduling. Transient refresh failures preserve the successful attempt and normal continuation retry; successful refreshes also check active-state eligibility. Filter removal is agent/workflow driven; PR creation alone does not end execution. Label collection uses the same existing 50-label bound as candidate dispatch.