fix(retrieve): prioritize retained call source in compact snippets - #750
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughCompact retrieval now prioritizes call-end nodes with available snippets when no explicit snippet limit is provided. Explicit limits and promoted slices retain positional allocation. Tests cover allocation, validation, budgets, and stdio output integrity. ChangesSnippet allocation
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to Compact retrieval changes default snippet selection while preserving explicit limits and existing budgets; no actionable product risk is currently established. Sequence Diagram(s)sequenceDiagram
participant RetrieveCaller
participant CompactRetrieval
participant SnippetAllocator
participant StdioOutput
RetrieveCaller->>CompactRetrieval: request compact retrieval
CompactRetrieval->>SnippetAllocator: select call-endpoint snippets
SnippetAllocator->>CompactRetrieval: return budgeted nodes
CompactRetrieval->>StdioOutput: emit reduced result
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Summary
Compact retrieval could retain both ends of a call while omitting a helper's existing source because that helper fell beyond the first eight snippet slots. With the snippet limit omitted, compact retrieval now prioritizes source-bearing endpoints of retained
callsrelationships, then fills the remaining slots in node order. Node order, the eight-slot default, and the 3,000-token snippet budget are unchanged.Explicit snippet limits remain positional. Missing, blank, duplicate, or source-less endpoint IDs cannot create a preference. Verbose output and promoted execution slices retain their existing allocation. The tool parameter description documents default versus explicit behavior.
Candidate:
1ce26963ebf273c8d337fb4cc2a0c8abe8cb3bfaon base214f70bf4c4edf820a0c7651ccd81dba3ca7ac1e.Testing
tsc --noEmit.tsc -p tsconfig.build.json.1ce26963. All six logs verify the expected synthetic merge checkout and candidate tree. The previous macOS / Node 20 Gemini-hook EPIPE did not recur; its precise cause remains unproven. Original failed run 34097545677 and all failure signatures remain retained; no unchanged-head rerun.GO-740-ALLOCATIONon1ce26963/ tree1078d3cb. The reviewer accepted A1–A8 and the explicit timing/carry-forward classification. This was a packet review; the coordinator executed the tests and hash checks.2f76a8e7, not newly executed. Only the description string changed afterward; the matrix's 67 reachable source files and all 271 external inputs are identical. All exported tool/profile values match except that description, and clean allocation/stdio/schema tests were rerun.The original matrix's additional literal raw-payload equality assertion exited 1. The only raw differences are four measured
recovery.attempts[0].elapsed_msvalues: 5→4, 5→7, 8→6, and 9→8 ms. All other raw values and all direct results match; the timing-owner source is identical at both commits. Original payloads and the failed assertion are retained, and this explicit timing classification is submitted to final review. No performance claim or threshold exception is made.These are exposed synthetic development cases with manually declared graphs. They do not establish extraction quality, agent-answer gains, or resolution of the remaining owner-input and neutral-discovery cases. Issue #740 remains open.
Checklist
Related issues
Refs #740. Follows #747. Allocation contract: #740 (comment)