Skip to content

feat(worker): handle already-resolved tickets as no-op success (AIW-232) - #210

Open
outof-place wants to merge 4 commits into
mainfrom
outof-place/aiw-232-handle-already-resolved-tickets-as-no-op
Open

feat(worker): handle already-resolved tickets as no-op success (AIW-232)#210
outof-place wants to merge 4 commits into
mainfrom
outof-place/aiw-232-handle-already-resolved-tickets-as-no-op

Conversation

@outof-place

Copy link
Copy Markdown
Collaborator

Summary

Fixes AIW-232. A ticket that is already resolved (fix landed in a prior commit or PR, or the ticket carries a "Fixed" comment) now ends the run as a successful no-op instead of failing with "research declared no repository changes; nothing to implement, replan required".

How it works

  • The research agent can now explicitly declare an already-resolved ticket: new optional noChangeNeeded and resolutionEvidence fields on the research output contract (zod + structured-output JSON schema), plus a new "Resolution Check" section in the fixed research protocol footer instructing it to check ticket comments, git history for the ticket key, and PR context before planning, and to only claim resolution with concrete evidence.
  • A new BlockExecutionResult kind terminal_success in both engines (V1 interpreter and V2 scheduler): the node completes with its real output, every outgoing edge resolves inactive so the downstream cone skips through the existing cascade, and the walk drains to the "completed" outcome (run success). Distinct from ended, which parks the run awaiting a human. Output contract validation still applies.
  • The planning_agent case short-circuits when the signal is valid (noChangeNeeded === true, non-empty evidence, empty writeRepositories): posts a Jira comment with the evidence, replays the ticket move configured on the graph's update_ticket_status node (dispatch has no post-success dedup, so leaving the ticket in the AI column would loop redispatches), sends a Slack note with the comment deep link, and returns terminal_success. No write-scope promotion, no branch, no PR, no plan-approval request.
  • The ambiguous case (research completed with an empty write set but no valid resolution signal) keeps failing loudly via researchDeclaredNoWritesGuard, unchanged.

Notes for reviewers

  • All templates get the behavior engine-side, with no definition migration; historical definition snapshots stay valid (no port/edge changes).
  • The evidence comment goes through the engine-level postTicketComment step, which does not apply scrubForPublication, consistent with the existing terminate and PR-links comment precedent.
  • The ticket move uses the status node's authored params.target; a bound target input would originate inside the skipped cone and is unreconstructible by design. All shipped templates use the literal ai_review.
  • Structured-output schema gains two required-but-nullable keys; same class of change as previous field additions. A quick smoke against both CLI providers after deploy is recommended.

Tests

  • Contract: fold round-trip, backward compatibility, no cross-field rejection (a half-filled signal falls through to the normal path instead of failing research).
  • Engines: terminal_success unit tests in both engines, including downstream skip, parallel sibling completion, and output-contract enforcement.
  • Scenarios over the real shipped templates (production v2 scheduler): ticket-workflow, human-approved-plan (asserts send_plan_approval is never invoked for a resolved ticket), reviewed-ticket-workflow; plus a normal-path regression proving implementation still runs when no signal is set.
  • Guard regression: researchDeclaredNoWritesGuard suite untouched and green.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-workflow-app-dashboard Ready Ready Preview Aug 5, 2026 4:58pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@outof-place, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eed17ce1-9bb3-4613-a631-22fcdcbc59f0

📥 Commits

Reviewing files that changed from the base of the PR and between 70d9422 and 3e82dfa.

📒 Files selected for processing (15)
  • apps/worker/src/sandbox/agents/claude.test.ts
  • apps/worker/src/sandbox/agents/types.test.ts
  • apps/worker/src/sandbox/agents/types.ts
  • apps/worker/src/sandbox/context.test.ts
  • apps/worker/src/sandbox/context.ts
  • apps/worker/src/workflow-definition/block-registry.test.ts
  • apps/worker/src/workflow-definition/block-registry.ts
  • apps/worker/src/workflow-definition/interpreter.test.ts
  • apps/worker/src/workflow-definition/interpreter.ts
  • apps/worker/src/workflow-definition/scenarios/harness.ts
  • apps/worker/src/workflow-definition/scenarios/no-change-ticket.scenario.test.ts
  • apps/worker/src/workflow-definition/v2-scheduler.ts
  • apps/worker/src/workflows/agent-no-change.test.ts
  • apps/worker/src/workflows/agent.ts
  • apps/worker/src/workflows/v2-terminal-success.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant