Skip to content

Wave 30: Python residual high-confidence imported typing#29

Merged
fraware merged 4 commits into
mainfrom
wave/30-python-residual
Jul 21, 2026
Merged

Wave 30: Python residual high-confidence imported typing#29
fraware merged 4 commits into
mainfrom
wave/30-python-residual

Conversation

@fraware

@fraware fraware commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Tighten Python typed call resolve for residual high-confidence gaps after waves 10-14: quoted annotations ("Foo" / "Foo | None"), Annotated/Final/ClassVar unwraps, from typing import Optional as Opt-style aliases, and if TYPE_CHECKING: imports.
  • Keep invent-free honesty: containers, multi-class unions, and ambiguous imports still omit edges; annotation origins gate cross-file Class.method when unique.
  • Add examples/python_toy fixtures + tests/test_wave30.py; document Wave 30 in SCHEMA_REFERENCE.md.

Test plan

  • pytest tests/test_wave30.py (13 passed)
  • pytest tests/test_wave10.py through test_wave14.py (regression)
  • ruff check on touched paths
  • pyright on python_analyzer.py + test_wave30.py

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

Complexity increases

  • cli/ucli/analyzers/python_analyzer:_parse_file: 8 → 9
  • cli/ucli/analyzers/python_analyzer:_simple_type_name: 13 → 16
  • cli/ucli/analyzers/python_analyzer:_type_ref_with_origin: 16 → 20
  • cli/ucli/analyzers/python_analyzer:_unique_concrete_type.walk: 10 → 11
  • cli/ucli/analyzers/python_analyzer:_ast_from_annotation_string: 0 → 3
  • cli/ucli/analyzers/python_analyzer:_collect_import_aliases.walk_stmts: 0 → 5
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings: 0 → 4
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings._bind: 0 → 3

Policy breaches

  • cli/ucli/analyzers/python_analyzer:_parse_file: 8 → 9 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_simple_type_name: 13 → 16 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_type_ref_with_origin: 16 → 20 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_type_ref_with_origin_for_name.walk: 13 → 12 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_unique_concrete_type.walk: 10 → 11 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings.visit_AnnAssign: 0 → 10 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings.visit_Assign: 0 → 7 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_record_import_node: 0 → 12 (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
Promote only invent-free imported typing edges that meet residual confidence rules (Wave 30).
Add models and typed_client fixtures for Wave 30 coverage.
Assert high-confidence residual typing edges without invention.
Document Wave 30 residual typing edge semantics.
@github-actions

Copy link
Copy Markdown

Understand-First PR map delta

Metric Value
Functions added 32
Functions removed 5
Functions modified 7
Complexity net change +115
Complexity total (base → head) 5469 → 5584
Side-effect tag adds (heuristic) 0
Policy breaches 11

Complexity increases

  • cli/ucli/analyzers/python_analyzer:_parse_file: 8 → 9
  • cli/ucli/analyzers/python_analyzer:_simple_type_name: 13 → 16
  • cli/ucli/analyzers/python_analyzer:_type_ref_with_origin: 16 → 20
  • cli/ucli/analyzers/python_analyzer:_unique_concrete_type.walk: 10 → 11
  • cli/ucli/analyzers/python_analyzer:_ast_from_annotation_string: 0 → 3
  • cli/ucli/analyzers/python_analyzer:_collect_import_aliases.walk_stmts: 0 → 5
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings: 0 → 4
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings._bind: 0 → 3

Policy breaches

  • cli/ucli/analyzers/python_analyzer:_parse_file: 8 → 9 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_simple_type_name: 13 → 16 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_type_ref_with_origin: 16 → 20 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_type_ref_with_origin_for_name.walk: 13 → 12 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_unique_concrete_type.walk: 10 → 11 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings.visit_AnnAssign: 0 → 10 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_collect_local_type_bindings.visit_Assign: 0 → 7 (threshold 5)
  • cli/ucli/analyzers/python_analyzer:_record_import_node: 0 → 12 (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:46
@fraware
fraware merged commit 30fdc26 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