Repository navigation
refactor(runtime): separate review tasks from the shared loop - #1887
Merged
Merged
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 13 selected item(s). |
lizhengfeng101
force-pushed
the
refactor/reviewtask-phase-one
branch
from
November 9, 2026 12:25
98747a3 to
a9c9e55
Compare
css521
approved these changes
Nov 10, 2026
NoamFido
added a commit
to FidoMoney/open-code-review
that referenced
this pull request
Nov 11, 2026
upstream moved the review task out of llmloop into reviewtask (alibaba#1887), so the cost budget is re-applied on the shared loop: Deps.MaxCostBudget/Price, the StopCostBudget stop and the cost check sit in llmloop, and reviewtask passes them through. Also makes the cost gate read a coherent usage snapshot: RecordUsage adds a response's four counters under usageMu and TotalCost reads them under it, so a cache-heavy response is never priced as uncached while it is being recorded. The loop and grace round now record usage through RecordUsage. A regression test pins the interleaving. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
NoamFido
added a commit
to FidoMoney/open-code-review
that referenced
this pull request
Nov 13, 2026
upstream moved the review task out of llmloop into reviewtask (alibaba#1887), so the cost budget is re-applied on the shared loop: Deps.MaxCostBudget/Price, the StopCostBudget stop and the cost check sit in llmloop, and reviewtask passes them through. Also makes the cost gate read a coherent usage snapshot: RecordUsage adds a response's four counters under usageMu and TotalCost reads them under it, so a cache-heavy response is never priced as uncached while it is being recorded. The loop and grace round now record usage through RecordUsage. A regression test pins the interleaving.
1 task done
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.
Description
Extract review-specific behavior from the shared LLM runtime without changing OCR's external behavior. This is phase one only: it prepares a reusable execution kernel but adds no Behavior agent, combined report, new command, or session format.
internal/reviewtask, shared by review and scan.internal/llmloopgeneric task configuration andContinue/Complete/Failtool outcomes. Inject the existing compression, retry guidance, and final-round messages/tools unchanged.34517e30, plus non-review task and asynchronous lifecycle tests.Evaluation gate
Real-model baseline/candidate quality evaluation is still pending. This PR is a phase-one candidate, not acceptance of the second phase. Do not add Behavior analysis or reporting until the maintainer completes that evaluation and explicitly accepts the result.
Type of Change
How Has This Been Tested?
make checkmake test(including the race detector)make coverage: 91.5% overall; 93.7% forllmloop, 97.5% forreviewtaskVerification artifacts ran from a Git-ignored project-local temporary directory to comply with host execution restrictions.
Checklist
AI/LLM Disclosure
Codex CLI with
gpt-6-astrawas used for implementation, tests, documentation, and PR preparation. OpenCodeReview v1.13.6 withgpt-6-astrawas used for automated code review. No AI/LLM attribution or co-author trailers are included in commits. Human-review and CLA items remain unchecked until confirmed by the author. No human reviewers are explicitly requested by this PR.Related Issues
None.