Skip to content

Stop continuation when issues leave execution filters - #63

Merged
nickbeau merged 2 commits into
mainfrom
released/62-stop-ineligible-continuation
Sep 8, 2026
Merged

nickbeau merged 2 commits into
mainfrom
released/62-stop-ineligible-continuation

Conversation

@nickbeau

@nickbeau nickbeau commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • Added core eligibility tests, GitHub response tests for labels and milestone titles/numbers, live app-server continuation coverage, and SQLite-backed tests for running reconciliation, successful completion/claim release, and persisted retry rejection.

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.

Copilot AI lite review requested due to automatic review settings September 8, 2026 02:41

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.

🟡 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 IssueStateSnapshot with candidate-filter eligibility and an IsExecutionEligible(...) 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.

Comment thread src/Symphony.Host/Services/IssueExecutionCoordinator.cs Outdated
Comment thread tests/Symphony.Integration.Tests/OrchestrationTickServiceTests.cs Outdated
@nickbeau
nickbeau merged commit f7f43a4 into main Sep 8, 2026
4 checks passed
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.

Stop continuation when issue leaves execution label filter after PR creation

2 participants