Preserve native import alias identity

This commit is contained in:
2026-10-20 00:20:38 +00:00
parent 01e1b2fc2d
commit 1c79ec3aa1
4 changed files with 120 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
# Import Discovery and Scheduling Review Findings
Status: open; six independently reproduced findings require remediation.
Status: in progress; issue 1 complete, five findings remain.
Reviewed implementation: `aa93aed..15943e2`, ending at
`15943e233ca3cd1286c03c0e7085871db344cd4b`, against the accepted
@@ -14,7 +14,7 @@ and discovery edge cases, not a proposal to change the accepted architecture.
Implement fixes with focused regressions, preserving the selected semantics
and existing resource limits. This review made no implementation changes.
## 1. [ ] P1 — Preserve native source identity and relative import bases
## 1. [x] P1 — Preserve native source identity and relative import bases
Owners: [directory selection](../../internal/engine/import_selection.go),
especially assignment of `target.identity` to a file candidate's `accessPath`
@@ -50,6 +50,13 @@ to native filesystems. Verify path, directory, and glob equivalence for a file
alias and an alias directory, including nested imports, source context, origins,
and existing repeated-source behavior. Keep host canonicalization unchanged.
Completed: native directory and glob discovery retain namespace admission paths,
while traversal cycle identities remain resolved. Added public regressions for
file and directory aliases across all three selectors, helper/resource origins,
source contexts, repeated paths, and distinct alias admission. The regression
failed before the fix. Focused discovery/resource tests and `./scripts/check.sh`
passed with Go 1.26.9 and offline dependency selection.
## 2. [ ] P1 — Scope main-version protection to the actual effective path
Owner: [composePendingItems](../../internal/engine/imports.go), around lines