refactor(review): make strict delegation on demand - #1520
Merged
Conversation
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.
Summary
This change simplifies strict review into a bounded, model-led workflow. The primary strict reviewer now reviews the prepared target directly and decides whether one focused specialist perspective is materially useful. An independent quality check is reserved for high-severity findings, conflicting evidence, or materially low confidence.
The runtime enforces the specialist ceiling even when a weaker model does not follow the prompt. New strict launches no longer pre-generate reviewer work packets, split files across same-role agents, or retry reviewers automatically. Historical manifests retain packet, batch, shard, retry, and recovery compatibility.
The launch confirmation and architecture guidance now distinguish review-agent executions from underlying model requests. They disclose one planned primary execution and at most three review-agent executions, while explicitly avoiding unsupported token or provider-request estimates.
Motivation
The previous design treated strict review as a largely pre-orchestrated multi-agent workflow. That increased prompt size, latency, token use, failure surfaces, and product complexity even when the primary model could complete the review itself. This revision keeps deterministic safety boundaries in the runtime while returning investigative depth and specialist selection to the reviewing model.
Behavior and compatibility
Validation
pnpm run type-check:webpnpm run i18n:auditcargo test -p bitfun-agent-runtime deep_review -- --nocapture: 97 passed plus related contract testscargo test -p bitfun-core deep_review -- --nocapture: 58 passedcargo check --workspace --exclude bitfun-desktopgit diff --checkA full workspace check reached the desktop build script and stopped because the local
src/mobile-web/distprerequisite was absent. The non-desktop workspace check passed. An independent final review found no remaining Critical or Important issues.