added missing site for recording chunks#126
Conversation
|
@copilot verify The single changed file crates/claudear-engine/src/processing.rs is large; reviewers should verify that all five call-sites (run_single_action Verify/Reply branches and all three run_action_pipeline branches) consistently pass input.attempt_id. |
|
|
Thanks for doing that verification — all five call-sites are confirmed consistent. The coverage is complete. |
@greptile still you verify once more |
There was a problem hiding this comment.
ArnabChatterjee20k has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Greptile Summary
This PR threads
attempt_idfromProcessingInputthrough therun_verifyandrun_replycall sites (five locations) and intobuild_rag_context, enabling the action pipeline to record code-chunk and Discord retrieval usage rows and spawn the opt-in retrieval-quality judge — functionality that already existed in the Q&A and fix pipelines but was previously missing here.build_rag_contextgains anattempt_id: Option<i64>parameter; when set, it recordsRetrievalUsageRecordrows for code chunks, delegates Discord recording todiscord_grounding_context, accumulatesRetrievedItems, and callsspawn_retrieval_judge— exactly mirroring the existing pipelines.run_single_actionandrun_action_pipelineare updated consistently so no code path is missed.Confidence Score: 4/5
The change is additive and opt-in — retrieval recording only fires when
attempt_idis present, so existing code paths without an attempt ID are unaffected.The logic correctly mirrors the already-tested Q&A and fix pipelines. The only issue found is a leftover doc comment that was not cleaned up when the new one was added, leaving two conflicting sentences on
build_rag_context.The single changed file
crates/claudear-engine/src/processing.rsis large; reviewers should verify that all five call-sites (run_single_actionVerify/Reply branches and all threerun_action_pipelinebranches) consistently passinput.attempt_id.Important Files Changed
attempt_idthrough all five call-sites ofrun_verify/run_replyand intobuild_rag_context, enabling retrieval-usage recording and the retrieval-quality judge for the action pipeline. Logic mirrors the existing Q&A and fix pipelines correctly. Minor issue: the old doc comment onbuild_rag_contextwas not removed, leaving two conflicting sentences.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Caller participant run_verify/run_reply participant build_rag_context participant code_search_service participant discord_grounding_context participant tracker participant spawn_retrieval_judge Caller->>run_verify/run_reply: "attempt_id (Option<i64>)" run_verify/run_reply->>build_rag_context: issue, attempt_id build_rag_context->>code_search_service: search(query) code_search_service-->>build_rag_context: results alt attempt_id is Some AND results non-empty build_rag_context->>tracker: record_retrieval_usage(code_chunk rows) build_rag_context->>build_rag_context: push RetrievedItems end build_rag_context->>discord_grounding_context: issue, limit, attempt_id discord_grounding_context->>tracker: record_retrieval_usage(discord_chunk rows) discord_grounding_context-->>build_rag_context: (discord_ctx, discord_items) alt discord_ctx non-empty AND attempt_id is Some build_rag_context->>build_rag_context: extend retrieved_items with discord_items end alt attempt_id is Some build_rag_context->>spawn_retrieval_judge: attempt_id, issue, retrieved_items end build_rag_context-->>run_verify/run_reply: context String%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Caller participant run_verify/run_reply participant build_rag_context participant code_search_service participant discord_grounding_context participant tracker participant spawn_retrieval_judge Caller->>run_verify/run_reply: "attempt_id (Option<i64>)" run_verify/run_reply->>build_rag_context: issue, attempt_id build_rag_context->>code_search_service: search(query) code_search_service-->>build_rag_context: results alt attempt_id is Some AND results non-empty build_rag_context->>tracker: record_retrieval_usage(code_chunk rows) build_rag_context->>build_rag_context: push RetrievedItems end build_rag_context->>discord_grounding_context: issue, limit, attempt_id discord_grounding_context->>tracker: record_retrieval_usage(discord_chunk rows) discord_grounding_context-->>build_rag_context: (discord_ctx, discord_items) alt discord_ctx non-empty AND attempt_id is Some build_rag_context->>build_rag_context: extend retrieved_items with discord_items end alt attempt_id is Some build_rag_context->>spawn_retrieval_judge: attempt_id, issue, retrieved_items end build_rag_context-->>run_verify/run_reply: context StringPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "added missing site for recording chunks" | Re-trigger Greptile