| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
🤖 CodeAnt AI — Review Status
|
Sorry, something went wrong.
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sorry, something went wrong.
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: adaab6a0ab
ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Sorry, something went wrong.
| // An Anthropic refusal finish is deterministic - the provider will | ||
| // return the same result for the same request - so it must not enter | ||
| // the retry loop. Content filters remain provider-neutral completions. | ||
| if finish_reason == Some(FinishReason::Refusal) && tool_calls.is_empty() { |
There was a problem hiding this comment.
Stop the orchestration loop on filtered completions
When OpenAI, Google, or Bedrock returns ContentFilter without tool calls, this branch now returns a successful completion, but Orchestrator::run only sets should_yield for FinishReason::Stop or a yielding tool call (crates/forge_app/src/orch.rs:373-381). It therefore appends the empty or partial filtered response and sends another paid model request; with no max_requests_per_turn configured this can continue indefinitely, and otherwise it repeats until the limit interrupt. If content filters are meant to remain successful completions, they also need to be treated as terminal by the orchestrator.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Approve with notes — confirm the open content-filter termination thread before merge Overview
1. SummaryMaps Anthropic stop_reason: "refusal" to a new FinishReason::Refusal instead of ContentFilter, and narrows the non-retryable short-circuit in into_full_streaming to that variant, leaving content_filter as a normal completion. Verified positives:
2. Must FixNone in the changed lines. Assumption stated for transparency: cargo clippy --workspace -- -D warnings, cargo fmt --check, and cargo test --workspace were not executed (read-only review). The changed code is equality-based and the suggested doc edit respects comment_width = 80. 3. Should Fix — open thread, not duplicated here
4. Consider
SUGGESTION
5. Final RecommendationApprove with notes. Nothing in the diff blocks compilation, tests, or security. Both inline items are non-blocking, but the open content-filter termination question should be answered before merge because it can cost real money in a loop. Reply @kilocode-bot fix it on either inline comment to have Kilo Code apply the fix, or use the link below to address everything at once. Fix these issues in Kilo Cloud Previous Review Summaries (3 snapshots, latest commit ecc662e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit ecc662e)Status: 2 Issues Found | Recommendation: Approve with notes — confirm the open content-filter termination thread before merge Overview
1. SummaryMaps Anthropic stop_reason: "refusal" to a new FinishReason::Refusal instead of ContentFilter, and narrows the non-retryable short-circuit in into_full_streaming to that variant, leaving content_filter as a normal completion. Verified positives:
2. Must FixNone in the changed lines. Assumption stated for transparency: cargo clippy --workspace -- -D warnings, cargo fmt --check, and cargo test --workspace were not executed (read-only review). The changed code is equality-based and the suggested doc edit respects comment_width = 80. 3. Should Fix — open thread, not duplicated here
4. Consider
SUGGESTION
5. Final RecommendationApprove with notes. Nothing in the diff blocks compilation, tests, or security. Both inline items are non-blocking, but the open content-filter termination question should be answered before merge because it can cost real money in a loop. Reply @kilocode-bot fix it on either inline comment to have Kilo Code apply the fix, or use the link below to address everything at once. Fix these issues in Kilo Cloud Previous review (commit 5d349e2)Status: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous review (commit adaab6a)Status: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by free · Input: 37.4K · Output: 6.2K · Cached: 298.9K |
Sorry, something went wrong.
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sorry, something went wrong.
🏎️ Performance Benchmark Resultstest drift/observe_exact_match ... bench: 1064 ns/iter (+/- 7) test drift/observe_similar_prompt ... bench: 1345 ns/iter (+/- 15) test drift/observe_disjoint_prompt ... bench: 1222 ns/iter (+/- 10) test eventsource/parse_1000_events_single_chunk ... bench: 548895 ns/iter (+/- 2377) test eventsource/parse_100_events_fragmented ... bench: 21807 ns/iter (+/- 88) test forge_fs/read_64kib ... bench: 35064 ns/iter (+/- 3959) test forge_fs/write_then_read_64kib ... bench: 380238 ns/iter (+/- 81702) test json_repair/small_truncated ... bench: 1155 ns/iter (+/- 6) test json_repair/nested_broken ... bench: 4818 ns/iter (+/- 1839) test json_repair/markdown_wrapped ... bench: 44434 ns/iter (+/- 1000) test similarity/hash_only_compare ... bench: 158 ns/iter (+/- 3) test stream/mpsc_stream/1000_items ... bench: 498445 ns/iter (+/- 6617) test walker/walk_200_files ... bench: 1204228 ns/iter (+/- 12611) Performance regression gate: check above for regressions against baseline. |
Sorry, something went wrong.
🏎️ Performance Benchmark Resultstest drift/observe_exact_match ... bench: 1244 ns/iter (+/- 9) test drift/observe_similar_prompt ... bench: 1589 ns/iter (+/- 7) test drift/observe_disjoint_prompt ... bench: 1439 ns/iter (+/- 21) test eventsource/parse_1000_events_single_chunk ... bench: 640856 ns/iter (+/- 5133) test eventsource/parse_100_events_fragmented ... bench: 25389 ns/iter (+/- 380) test forge_fs/read_64kib ... bench: 32656 ns/iter (+/- 2405) test forge_fs/write_then_read_64kib ... bench: 354482 ns/iter (+/- 109271) test json_repair/small_truncated ... bench: 1338 ns/iter (+/- 13) test json_repair/nested_broken ... bench: 5762 ns/iter (+/- 1918) test json_repair/markdown_wrapped ... bench: 51450 ns/iter (+/- 809) test similarity/hash_only_compare ... bench: 182 ns/iter (+/- 2) test stream/mpsc_stream/1000_items ... bench: 582309 ns/iter (+/- 2386) test walker/walk_200_files ... bench: 1227513 ns/iter (+/- 16296) Performance regression gate: check above for regressions against baseline. |
Sorry, something went wrong.
| /// violated filters. | ||
| #[strum(serialize = "content_filter")] | ||
| ContentFilter, | ||
| /// The Anthropic provider refused to generate a response. |
There was a problem hiding this comment.
SUGGESTION: Doc comment claims Anthropic scope, but this variant is provider-neutral
FinishReason lives in the provider-agnostic forge_domain crate, and Refusal is reachable well beyond Anthropic: every OpenAI-compatible provider parses the raw string through FinishReason::from_str(&s) (crates/forge_app/src/dto/openai/response.rs:345, :356, :421). With the new #[strum(serialize = "refusal")] on the next line, any provider that reports finish_reason: "refusal" (OpenRouter native reasons, Azure, gateways) now short-circuits into the non-retryable crate::Error::Refusal at crates/forge_domain/src/result_stream_ext.rs:265-267. So the PR title's "scope refusal handling to Anthropic" is not what the code does, and a reader relying on this doc will draw the wrong conclusion about which providers can produce it. Keep the doc provider-neutral (rustfmt comment_width = 80 applies).
| /// The Anthropic provider refused to generate a response. | |
| /// The model refused to generate a response (e.g. Anthropic refusal). |
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Sorry, something went wrong.
| ContentFilter, | ||
| /// The Anthropic provider refused to generate a response. | ||
| #[strum(serialize = "refusal")] | ||
| Refusal, |
There was a problem hiding this comment.
SUGGESTION: Adding a variant to this public enum is a source-breaking change for downstream consumers
FinishReason is pub and not #[non_exhaustive], so inserting Refusal breaks any exhaustive match in code that consumes forge_domain as an independent crate. I verified nothing in this workspace matches FinishReason exhaustively today (all call sites use == or from_str), so CI will not fail — but given the polyrepo goal of independently consumable crates, this is a semver-visible API change on a crate still published as 0.1.1 (crates/forge_domain/Cargo.toml:3).
Consider marking the enum #[non_exhaustive] (the idiom is already used at crates/forge_domain/src/node.rs:288) so future finish reasons are additive rather than breaking, and reflect this change in the crate version.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Sorry, something went wrong.
Co-Authored-By: ForgeCode <noreply@forgecode.dev>
🏎️ Performance Benchmark Resultstest drift/observe_exact_match ... bench: 1234 ns/iter (+/- 7) test drift/observe_similar_prompt ... bench: 1553 ns/iter (+/- 9) test drift/observe_disjoint_prompt ... bench: 1430 ns/iter (+/- 18) test eventsource/parse_1000_events_single_chunk ... bench: 643632 ns/iter (+/- 5413) test eventsource/parse_100_events_fragmented ... bench: 25434 ns/iter (+/- 92) test forge_fs/read_64kib ... bench: 34019 ns/iter (+/- 2497) test forge_fs/write_then_read_64kib ... bench: 478174 ns/iter (+/- 184417) test json_repair/small_truncated ... bench: 1347 ns/iter (+/- 37) test json_repair/nested_broken ... bench: 6031 ns/iter (+/- 1706) test json_repair/markdown_wrapped ... bench: 51558 ns/iter (+/- 1077) test similarity/hash_only_compare ... bench: 182 ns/iter (+/- 2) test stream/mpsc_stream/1000_items ... bench: 591481 ns/iter (+/- 17141) test walker/walk_200_files ... bench: 1240779 ns/iter (+/- 34557) Performance regression gate: check above for regressions against baseline. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
User description
Supersedes
Semantically replays the still-valid provider-scoped portion of #162 onto current v2.13.21-sync main (cf3a3ef) without rewriting or deleting the original conflicting branch.
Resolution
Validation
CodeAnt-AI Description
Distinguish Anthropic refusals from content-filtered completions
What Changed
Impact
✅ Fewer pointless retries for Anthropic refusals
💡 Usage Guide✅ Clearer refusal errors
✅ Content-filtered completions remain available
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.