feat: change_impact — transitive blast radius, affected tests, and confidence #22
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.
Dependencies
No dependencies set.
Reference
h-dv/code-index#22
Loading…
Add table
Add a link
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?
Product
One trust-aware call answering “what is affected by this symbol or change-set, and what should I test?”
This supersedes the narrower split between the original blast-radius issue and #23. Both are projections of the same reverse-reachability engine and should share traversal, role classification, confidence accounting, pagination, and limits.
Inputs
changed_symbols)Output
Why one tool
The expensive and correctness-sensitive part is identical: bounded reverse closure over
symbol_edgesplus role-aware classification. Splitting impact and test selection creates duplicated traversal semantics and makes agents compose two answers that may disagree.Direct callers are materially misleading in this repository:
segment_is_test_dirhas 1 direct versus ~195 transitive callers;qualified_name_separator1/~191; migrationrun_impl2/~209. Conversely, seedingapply_resolutionselects 16 of 47 Rust test files, a ~66% suite reduction.Test classification MUST use reference role bit 32 rather than paths: inline
#[cfg(test)] mod testsfunctions live undersrc/.Implementation
changed_symbols, including deletions from the base sideAcceptance
feat: impact / blast_radius tool — transitive reverse closure with prod/test splitto feat: change_impact — transitive blast radius, affected tests, and confidenceShipped in v0.5.20 (I029 Track C) as the
change_impactMCP tool.Per-seed bounded reverse closure over
symbol_edges(depth ≤ 20, 2000-node cap, ≤ 64 seeds — excess rejected with a structured error, never silently dropped). Production/test split viarefs.rolesbit 32 with span containment — pinned by a mutation-killing test where a bit-32 ref in asrc/path must classify test and a ref-less symbol in a test path must hit the (previously dead, review-caught) path fallback. Affected named tests +test_filesrun-set,uncovered_seeds, shortest witness paths to boundary symbols,symbol_edges.weightexposed, and the confidence block (resolution_rate_pct,unresolved_refs_in_scope,stale_edges).Truncation honesty per the spec:
truncated= closure-level cuts only (counts genuinely under-report); a shortened page setsaffected_truncatedwith complete counts;limit=0= count-only (D6 convention).Diff input ships as documented composition (
changed_symbols→ collect ids →symbol_ids) — deterministic, and the 430-line git path stays single-owner; a nativediff_baseparam remains open as a follow-up if composition proves insufficient in practice.Validated on this repository:
segment_is_test_dir→ 206 transitive callers (20 prod / 186 test) vs 1 direct — the ~100× under-report this tool exists to fix;apply_resolutionselects 19 test files with zero uncovered seeds. Per #22's acceptance, #23 is closed as merged here.