Skip to content

fix(review-pr): drafter instruction cleanup — resolve read/delegation issues#7

Merged
derekmisler merged 2 commits into
docker:mainfrom
jedp-docker:instruction-cleanup
Jun 23, 2026
Merged

fix(review-pr): drafter instruction cleanup — resolve read/delegation issues#7
derekmisler merged 2 commits into
docker:mainfrom
jedp-docker:instruction-cleanup

Conversation

@jedp-docker

@jedp-docker jedp-docker commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Part of a broader effort to fix review-pr agent timeouts.

Three targeted fixes to review-pr/agents/pr-review.yaml:

  • Correct "Parallel delegation" → "Batch delegation": transfer_task is sequential — the orchestrator batches all calls in one tool-call response and awaits each result in turn. The prior instructions claimed parallel execution, which is wrong.
  • Fix read-per-finding vs per-file conflict: "Verify Before Reporting" said read_file is mandatory for every high-severity finding; "File Reading Guardrails" rule 5 said each source file at most once. With multiple high-severity findings in the same file, these contradicted each other and could drive repeated read attempts. Now explicit: one read per file, not one read per finding.
  • Add empty/non-JSON fallback in step 5: If the drafter returns an empty or malformed response, the orchestrator now treats it as {"findings": [], "summary": "Drafter did not complete", "review_complete": false} rather than crashing. The drafter's summary is surfaced in the posted comment so operators can distinguish a crash/parse-error from genuine context exhaustion.

Test plan

  • Run existing eval suite (review-pr/agents/evals/) — no regressions expected
  • CI smoke on a friendly PR

🤖 Generated with Claude Code

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

The four targeted fixes are correct in intent and well-scoped. Two minor wording inconsistencies introduced by the lines are noted below — neither affects runtime safety or correctness.

Comment thread review-pr/agents/pr-review.yaml Outdated
Comment thread review-pr/agents/pr-review.yaml
@jedp-docker jedp-docker force-pushed the instruction-cleanup branch from 55e9d98 to 57deb79 Compare June 23, 2026 20:04
@jedp-docker jedp-docker marked this pull request as ready for review June 23, 2026 20:07

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟡 NEEDS ATTENTION

One medium-severity finding in the new drafter verification rule.

Comment thread review-pr/agents/pr-review.yaml Outdated
… issues

- Correct "Parallel delegation" to "Batch delegation": transfer_task is
  sequential; the orchestrator batches all calls in one tool-call response
  and awaits each result in turn
- Fix read-per-finding vs per-file conflict: "mandatory verification for
  high-severity" previously implied one read per finding; now explicit
  that it means one read per file regardless of finding count
- Add empty/non-JSON fallback in step 5; surface the drafter's summary
  field in the incomplete-review comment so operators can distinguish a
  crash/parse-error ("Drafter did not complete") from context exhaustion
- Retain drafter schema description in delegation instructions — it is
  for the orchestrator's benefit (describes what format to expect back);
  keep the existing title/body warning which addresses the actual retry-
  loop trigger (wrong field names, not field name descriptions in general)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jedp-docker jedp-docker force-pushed the instruction-cleanup branch from 57deb79 to e63cbaa Compare June 23, 2026 20:22
@derekmisler derekmisler enabled auto-merge (squash) June 23, 2026 20:43
@derekmisler derekmisler disabled auto-merge June 23, 2026 20:47
@derekmisler derekmisler merged commit be36365 into docker:main Jun 23, 2026
9 of 10 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.

3 participants