Skip to content

feat(rust): invent-free cross-module mod/use edges (Wave 26)#27

Merged
fraware merged 4 commits into
mainfrom
wave/26-rust-cross-module
Jul 21, 2026
Merged

feat(rust): invent-free cross-module mod/use edges (Wave 26)#27
fraware merged 4 commits into
mainfrom
wave/26-rust-cross-module

Conversation

@fraware

@fraware fraware commented Jul 21, 2026

Copy link
Copy Markdown
Member

Merge note

Wave 26 Rust cross-module edges — merge after #25 (base pr/5-optional-cleanup).

Summary - Extend the Rust analyzer and syn worker to emit mod/use metadata and qualify invent-free cross-module call edges when the target is unique inside the scanned tree. - Keep same-file unique-name edges as the baseline; omit ambiguous or unproven edges (no crate-graph invent). - Add multi-file examples/rust_toy/ fixtures and tests/test_wave26.py; docs honesty for Rust limits only. Stacked on the Phase 0 ship tip (pr/5-optional-cleanup). ## Test plan - [x] ruff check on touched Python files - [x] pytest tests/test_wave26.py tests/test_wave22.py tests/test_wave23.py - [x] pyright on touched analyzer/test files - [ ] CI multilang smoke (Rust) on PR

@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 974
Functions removed 206
Functions modified 152
Complexity net change +5625
Complexity total (base → head) 0 → 5625
Side-effect tag adds (heuristic) 179
Policy breaches 307

Complexity increases

  • cli/ucli/analyzers/python_analyzer:_file_signature: 0 → 1
  • cli/ucli/analyzers/python_analyzer:_is_code_file: 0 → 2
  • cli/ucli/analyzers/python_analyzer:_open_cache: 0 → 1
  • cli/ucli/analyzers/python_analyzer:_parse_file: 0 → 8
  • cli/ucli/analyzers/python_analyzer:build_python_map: 0 → 21
  • cli/ucli/boundaries/scan:scan_boundaries: 0 → 11
  • cli/ucli/config:load_config: 0 → 8
  • cli/ucli/config:load_preset: 0 → 2

Policy breaches

  • cli/ucli/analyzers/python_analyzer:_parse_file: 0 → 8 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:build_python_map: 0 → 21 (threshold 5)
  • cli/ucli/boundaries/scan:scan_boundaries: 0 → 11 (threshold 5)
  • cli/ucli/config:load_config: 0 → 8 (threshold 5)
  • cli/ucli/contracts/contracts:_choose_2xx_response: 0 → 9 (threshold 5)
  • cli/ucli/contracts/contracts:_exists_module_func: 0 → 10 (threshold 5)
  • cli/ucli/contracts/contracts:_strategy_expr: 0 → 24 (threshold 5)
  • cli/ucli/contracts/contracts:check_contracts: 0 → 6 (threshold 5)
    Generated by u scan + u diff --old/--new (Python AST + JS/TS best-effort when present).
    Complexity: McCabe for Python; keyword-heuristic for JS/TS — mixed totals are not uniform McCabe.
    Side effects are Python AST heuristics when present; JS maps typically omit them.
    PR comment step is fail-soft; scan/diff above are fail-closed.

// Exact subpath match with normalized ./foo
for (const key of Object.keys(exportsField)) {
for (const want of keysToTry) {
if (key === want || key === want.replace(/^\.\//, "./")) {
fraware added 4 commits July 20, 2026 23:34
Resolve only proven mod and use relationships so Rust maps stay invent-free (Wave 26).
Add helper/lib fixtures that exercise invent-free Rust module linking.
Prevent regressions in mod/use edge emission and negative cases.
Update usage and schema notes for Wave 26 Rust edge behavior.
@fraware
fraware force-pushed the wave/26-rust-cross-module branch from 307717d to 7b4eb0a Compare July 21, 2026 06:35
@fraware
fraware changed the base branch from master to pr/5-optional-cleanup July 21, 2026 06:35
@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 974
Functions removed 206
Functions modified 152
Complexity net change +5625
Complexity total (base → head) 0 → 5625
Side-effect tag adds (heuristic) 179
Policy breaches 307

Complexity increases

  • cli/ucli/analyzers/python_analyzer:_file_signature: 0 → 1
  • cli/ucli/analyzers/python_analyzer:_is_code_file: 0 → 2
  • cli/ucli/analyzers/python_analyzer:_open_cache: 0 → 1
  • cli/ucli/analyzers/python_analyzer:_parse_file: 0 → 8
  • cli/ucli/analyzers/python_analyzer:build_python_map: 0 → 21
  • cli/ucli/boundaries/scan:scan_boundaries: 0 → 11
  • cli/ucli/config:load_config: 0 → 8
  • cli/ucli/config:load_preset: 0 → 2

Policy breaches

  • cli/ucli/analyzers/python_analyzer:_parse_file: 0 → 8 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:build_python_map: 0 → 21 (threshold 5)
  • cli/ucli/boundaries/scan:scan_boundaries: 0 → 11 (threshold 5)
  • cli/ucli/config:load_config: 0 → 8 (threshold 5)
  • cli/ucli/contracts/contracts:_choose_2xx_response: 0 → 9 (threshold 5)
  • cli/ucli/contracts/contracts:_exists_module_func: 0 → 10 (threshold 5)
  • cli/ucli/contracts/contracts:_strategy_expr: 0 → 24 (threshold 5)
  • cli/ucli/contracts/contracts:check_contracts: 0 → 6 (threshold 5)
    Generated by u scan + u diff --old/--new (Python AST + JS/TS best-effort when present).
    Complexity: McCabe for Python; keyword-heuristic for JS/TS — mixed totals are not uniform McCabe.
    Side effects are Python AST heuristics when present; JS maps typically omit them.
    PR comment step is fail-soft; scan/diff above are fail-closed.

@fraware
fraware changed the base branch from pr/5-optional-cleanup to main July 21, 2026 06:43
@fraware
fraware merged commit 0f2b54f into main Jul 21, 2026
9 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants