Skip to content

Wave 28: Go invent-free cross-package import edges#26

Merged
fraware merged 4 commits into
mainfrom
wave/28-go-imports
Jul 21, 2026
Merged

Wave 28: Go invent-free cross-package import edges#26
fraware merged 4 commits into
mainfrom
wave/28-go-imports

Conversation

@fraware

@fraware fraware commented Jul 21, 2026

Copy link
Copy Markdown
Member

Merge note

Wave 28 Go cross-package imports — merge after #25 (base pr/5-optional-cleanup).

Summary - Extend the go_ast worker to emit import specs; Python qualifies alias.Func only when the import path uniquely maps under the scan root via nearest go.mod. - Regex path stays same-file-only (no cross-package invent). - Add examples/go_crosspkg/ fixtures and tests/test_wave28.py; document limits in SCHEMA_REFERENCE.md. ## Test plan - [x] ruff check / ruff format on touched Python paths - [x] pyright on cli/ucli/analyzers/go_analyzer.py - [x] pytest tests/test_wave28.py tests/test_wave19.py (AST + regex honesty) - [ ] CI multilang/Go smoke when available

@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 27
Functions removed 0
Functions modified 0
Complexity net change +156
Complexity total (base → head) 5469 → 5625
Side-effect tag adds (heuristic) 0
Policy breaches 11

Complexity increases

  • cli/ucli/analyzers/go_analyzer:_attach_cross_package_import_edges: 0 → 35
  • cli/ucli/analyzers/go_analyzer:_build_import_path_index: 0 → 14
  • cli/ucli/analyzers/go_analyzer:_import_path_for_dir: 0 → 7
  • cli/ucli/analyzers/go_analyzer:_nearest_go_mod: 0 → 10
  • cli/ucli/analyzers/go_analyzer:_package_dir_of: 0 → 1
  • cli/ucli/analyzers/go_analyzer:_read_module_path: 0 → 3
  • cli/ucli/analyzers/go_analyzer:_remap_display_file: 0 → 6
  • cli/ucli/analyzers/go_analyzer:_resolve_scan_path: 0 → 7

Policy breaches

  • cli/ucli/analyzers/go_analyzer:_attach_cross_package_import_edges: 0 → 35 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_build_import_path_index: 0 → 14 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_import_path_for_dir: 0 → 7 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_nearest_go_mod: 0 → 10 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_remap_display_file: 0 → 6 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_resolve_scan_path: 0 → 7 (threshold 5)
  • cli/ucli/analyzers/go_ast/parse_worker:extractImports: 0 → 8 (threshold 5)
  • tests/test_wave28:test_ast_ambiguous_import_path_no_edge: 0 → 10 (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 added 4 commits July 20, 2026 23:34
Link Go packages only when imports resolve inside the module graph (Wave 28).
Exercise alias and direct cross-package imports without invented edges.
Assert invent-free import edges and negative unresolved cases.
Document Wave 28 Go import edge semantics in the schema reference.
@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 27
Functions removed 0
Functions modified 0
Complexity net change +156
Complexity total (base → head) 5469 → 5625
Side-effect tag adds (heuristic) 0
Policy breaches 11

Complexity increases

  • cli/ucli/analyzers/go_analyzer:_attach_cross_package_import_edges: 0 → 35
  • cli/ucli/analyzers/go_analyzer:_build_import_path_index: 0 → 14
  • cli/ucli/analyzers/go_analyzer:_import_path_for_dir: 0 → 7
  • cli/ucli/analyzers/go_analyzer:_nearest_go_mod: 0 → 10
  • cli/ucli/analyzers/go_analyzer:_package_dir_of: 0 → 1
  • cli/ucli/analyzers/go_analyzer:_read_module_path: 0 → 3
  • cli/ucli/analyzers/go_analyzer:_remap_display_file: 0 → 6
  • cli/ucli/analyzers/go_analyzer:_resolve_scan_path: 0 → 7

Policy breaches

  • cli/ucli/analyzers/go_analyzer:_attach_cross_package_import_edges: 0 → 35 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_build_import_path_index: 0 → 14 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_import_path_for_dir: 0 → 7 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_nearest_go_mod: 0 → 10 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_remap_display_file: 0 → 6 (threshold 5)
  • cli/ucli/analyzers/go_analyzer:_resolve_scan_path: 0 → 7 (threshold 5)
  • cli/ucli/analyzers/go_ast/parse_worker:extractImports: 0 → 8 (threshold 5)
  • tests/test_wave28:test_ast_ambiguous_import_path_no_edge: 0 → 10 (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:44
@fraware
fraware merged commit d96247e into main Jul 21, 2026
7 of 18 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.

1 participant