Before/after view of a change: include_hunks on changed_symbols/review_diff, read_code rev= (zero-fallback) #558
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
h-dv/code-index#558
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the zero-fallback epic (#555). Cause 2: reviewing a change needs
git show.Observed
review_diff/changed_symbolssay WHICH symbols changed (risk, test reach, freshness), but a reviewer needs WHAT changed.read_codeserves only the working tree, so the lead reviewed every worker diff withgit show(2026-11-09; operator: "do you use code-index???").Proposal
changed_symbols/review_difftakeinclude_hunks: true: the unified-diff hunk clipped to each changed symbol's span (base and head side), under the existing token budget, withhunks_truncateddisclosed. A deleted symbol gets its base-side body.read_codetakesrev: "<commit-ish>": serves a path, range or symbol id as of that revision (base-side bytes from git; symbol spans from parsing the base-side file, which changed_symbols already does for classification).review_diff(include_hunks)→find_callerson a finding →read_code(rev=base)for the old caller.Acceptance
read_code(rev=base)returns the deleted symbol.Done on branch
codex-558(de7bfc2a,805492ef), merged intointegration-1109(ecbe801a).read_code rev=<commit-ish>: path and range reads come from git throughgitdiff::base_blob, under the same budget andtotal_linescontract. Refusals are typed:revision_symbol_unsupported,invalid_base_ref,revision_file_unavailable.changed_symbols/review_diff include_hunks: each hunk is owned by the innermost changed symbol. Containers keep only their own lines and gethunk_in_children. The budget is spent leaves-first under the 4000-token cap, and omissions are disclosed. The default reply is byte-identical to before.SourceSymbol.end_linedefaults for old daemons. No new RPC was needed, and both legs are green. Six mutations were run.Merged into #521.
mcp_smoke.rs::review_bytes_hunks_are_clipped_and_defaults_stay_unchanged grades hunks; revision_read_survives_removed_parent grades history.
Remaining: Review classification and hunks, including revision-by-symbol and zero-shell benchmark acceptance.