Repository navigation
Swift: resolve scoped import Mod.Name via per-target declaration index (Part of #3798) - #6718
Conversation
…x (Part of #3798) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…3798) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Waiting on an owner decision (asked privately, 2026-10-26). Nothing is needed from contributors; work resumes once it is answered. |
docs/self_scan/gitgalaxy_master.db-shm and -wal were committed by the self-scan: .gitignore has *.db but not SQLite's side files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvfVvURyJ9zRpgVkace
|
No description provided. |
|
No description provided. |
|
PR #6718 @ 6469e2f: 1 failed check(s) == shepherd (label event) (failure) -- real |
What
Swift
import struct|class|enum|protocol|typealias|func|var|let Mod.Namenow resolves in the engine through a per-target declaration index, as the scorer does. Before, the dotted token went through the generic stem search (Mod/Name) and missed when the declaring file is not named after the type.swift.py:imports_may_name_declarationplus a top-level_declaration_capture(struct/class/enum/protocol/actor/typealias/extension/func/var/let;extension Xcounts as declaring X).network_risk_sensor.py:_resolve_swift_scoped: files declaringNameunder a directory namedMod, else the file namedName.swiftthere; a nested name uses its owner; zero or several hits draw no edge; test files excluded for production importers. Bareimport Modstill draws no edge.test_swift_module_import_3798.py; contract note indocs/import_rule_contract.md.Evidence (import_graph_accuracy, swift, 2 repos, 510 imports)
The 51 FP (the
Basics/URL.swiftshape among them) are gone: they were the dotted token reaching the stem search. Only the swift baseline row moved.Gates
ruff format --check,audit_check.py(ruff/mypy/dead-key/ast-accuracy) clear; goldencrucible_check.py --updatevia golden-lock: no drift on either leg; swift and import-graph tests pass. Not run: pr_gates, tri-comparison, tree-sitter audits (CI after review).Remaining slices / Sibling gaps
Mod; a Package.swiftpath:override can miss. No burned-estate program depends on it.Checklist: partial [c:swift-scoped-import] -- multi-file and path-override cases remain
🤖 Generated with Claude Code