feat: prepare v1.0.0 release#2
Conversation
Greptile SummaryThis PR prepares the v1.0.0 release of srcwalk by overhauling the CLI from legacy flat flags to an intent-first subcommand model (
Confidence Score: 4/5Safe to merge with one fix: the flow-map omission count in change review does not account for budget-truncated maps, which can leave agent consumers believing they have seen all changed functions when they have not. The run_change_review path writes flow maps count in ## omitted based only on the MAX_FLOW_MAPS cap, then apply_review_budget truncates the body independently. An agent reading shown=N omitted=0 in the flow-maps header and flow maps: 0 in ## omitted has no reliable signal that additional flow maps were budget-cut, which could cause it to conclude a code review is complete when it is not. All other new commands are structurally sound and correctly bounded. src/commands/review.rs — specifically the interaction between append_change_omitted (which writes the ## omitted footer) and apply_review_budget (which truncates the flow-maps body independently). Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
CLI["srcwalk CLI"] --> ROOT["Root path read (Mode::Show)"]
CLI --> OVERVIEW["overview (Mode::Overview)"]
CLI --> CONTEXT["context (Mode::Context)"]
CLI --> TRACE["trace callers/callees"]
CLI --> DISCOVER["discover (Search/Text/MatchAll/Files/Access)"]
CLI --> REVIEW["review (Mode::Review)"]
CLI --> DIFF["diff (Mode::Diff)"]
CLI --> COMPARE["compare (Mode::Compare)"]
REVIEW --> LR["run_local_review (single target)"]
REVIEW --> CR["run_change_review (working/staged/range)"]
CR --> DE["collect_diff_evidence"]
CR --> FM["append_change_flow_maps (budget per map)"]
CR --> AO["append_change_omitted (cap-only count)"]
CR --> ARB["apply_review_budget (truncates body)"]
DISCOVER --> TEXTOR["--match any --as text: text-OR rollup"]
DISCOVER --> TEXTAND["--match all: co-occurrence"]
DISCOVER --> ACCESS["--as access: AST field/member search"]
Reviews (3): Last reviewed commit: "feat: prepare v1.0.0 release" | Re-trigger Greptile |
882763d to
0c166c2
Compare
| limit: Option<usize>, | ||
| offset: usize, | ||
| ) { |
There was a problem hiding this comment.
omitted flow-map count is inaccurate after budget truncation
append_change_omitted writes flow maps: {omitted_flow_maps} where omitted_flow_maps = changed_targets.saturating_sub(MAX_FLOW_MAPS) — counting only cap-based omissions. When apply_review_budget subsequently truncates the ## flow maps body, agents read flow maps: 0 (or a small cap-based number) in ## omitted while the ## flow maps section header says shown=N. Because the footer is preserved verbatim and only a ... truncated notice appears in the body, an agent can easily conclude "no flow maps were omitted" when actually N−1 were budget-truncated. A code-review agent acting on this will miss the omitted changed functions.
Summary
Validation
Notes
main