Skip to content

feat(cli): add trace, impact, and Workspace package filter - #201

Merged
avidianity merged 6 commits into
mainfrom
feat/170-import-graph-queries
Nov 23, 2026
Merged

avidianity merged 6 commits into
mainfrom
feat/170-import-graph-queries

Conversation

@avidianity

Copy link
Copy Markdown
Owner

Summary

Adds language-neutral import-graph query commands (codeint trace for shortest runtime import paths and codeint impact for transitive reverse-dependency blast radius including --changed via native gix), exposes matching read-only trace and impact tools on codeint mcp, and adds --package monorepo Workspace package filtering across check, diff, trace, impact, and mcp.

Closes #170
Closes #179
Closes #180
Closes #181

Tier

Tier 2 from the tier check: default tier for application code across crates/config, crates/git, crates/metrics, crates/report, crates/cli, and docs/reference.md.

Task

Spec #170 and sub-issues #179, #180, #181:

Fail-first test

  • Test: crates/cli/tests/trace.rs (trace_finds_shortest_runtime_import_path_in_cli_json_text_and_toon), crates/cli/tests/impact.rs (impact_reports_direct_and_transitive_dependents_separating_production_and_test), and crates/cli/tests/package_filter.rs (check_package_scopes_metrics_findings_budgets_and_preserves_cross_package_imports)
  • Before the change: failed with exit code 2 (error: unrecognized subcommand 'trace', error: unrecognized subcommand 'impact', error: unexpected argument '--package' found)
  • After the change: passed (all workspace unit, integration, reference, and doc tests green)

Checks

Check Result
cargo test --workspace --locked passed
cargo clippy --workspace --all-targets -- -D warnings passed
cargo fmt --check passed
codeint diff 407b0ba passed (0 regressions)
lefthook pre-commit and commit-msg passed
Merged-result check (cargo run --package xtask -- merged-result) passed

Safety proof

  • Safety fact: Existing check, diff, trend, guard, and mcp invocations without --package preserve identical cache keys, measurements, and output formats.
  • Proof: crates/cli/tests/check.rs, crates/cli/tests/diff.rs, crates/cli/tests/mcp.rs, and crates/cli/tests/boundaries.rs all passed after merging main (407b0ba), and CommitMeasurement cache keys omit package when None.
  • interrogate: none run below Tier 3.

Runtime evidence

End-to-end CLI and MCP integration tests executed the compiled codeint binary on revision bb91f2f across TypeScript, Python, and Rust workspace fixtures and temporary Git repositories (trace, impact, package_filter, mcp, boundaries, guard, and reference suites all passed, and codeint diff 407b0ba exited 0 with zero regressions).

Gaps

  • Deferred coverage: none
  • Pre-existing failures: none
  • Environmental failures: none

Add cycle-safe shortest-path BFS over resolved runtime imports in codeint-metrics, structured TraceReport rendering (TOON, JSON, text) in codeint-report, the codeint trace CLI subcommand with --all and --max-paths, and the matching read-only trace tool in codeint mcp.

Closes #179
Compute transitive reverse-dependency blast radius over the full resolved runtime import graph (preserving Test -> Production edges), supporting direct vs. transitive distances, fan-in/fan-out, transitive import weight, Production vs. Test separation, affected Workspace packages, multiple target paths, --depth caps, --changed <base> via native gix, text/JSON/TOON formats, and the matching MCP impact tool.

Closes #180
Scope Metrics, Findings, Budgets, Regressions, and graph queries to a single Workspace package while preserving cross-package runtime import resolution.

Closes #181
@github-actions github-actions Bot added the tier-3 Tier 3 from the tier check label Nov 23, 2026
@avidianity
avidianity merged commit fce5585 into main Nov 23, 2026
13 checks passed
@avidianity
avidianity deleted the feat/170-import-graph-queries branch November 23, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tier-3 Tier 3 from the tier check

Projects

None yet

1 participant