Repository navigation
Description
Found while re-verifying PR #5923's fixtures on latest main before landing a follow-up fix (#5985).
Repro
test-files/test_issue_5924_namespace_reexport_origin_name_collision.ts and test-files/test_issue_5927_order_a.ts / test_issue_5927_order_b.ts (already in the repo from PR #5923, merged as 18b90ead4) now MISMATCH against Node on current main:
=== test_issue_5924_namespace_reexport_origin_name_collision.ts: MISMATCH ===
--- node ---
NsA-Service
NsB-Service
--- perry ---
[Function: a]
[Function: Service]
=== test_issue_5927_order_a.ts: MISMATCH ===
--- node ---
plain-omit
namespace-omit
--- perry ---
plain-omit
[Function: omit]
Both were passing (verified MATCH) as of 18b90ead4 (PR #5923's merge commit). They fail identically on main as of 4500b5de4, confirmed on a clean checkout with no other changes — this is not caused by anything in my own in-flight work (PR #5985), which I isolated by testing its parent commit standalone.
Regression window
git log --oneline 18b90ead4..4500b5de4 -- crates/ (9 commits touching codegen/HIR/compile). Two stand out as the most likely cause, though I haven't bisected precisely:
849f297a8"Improve Zod compatibility support (Improve Zod compatibility support #5874)" — a large (156 files, 8025 insertions) external-contributor PR that touches multipletest_namespace_*fixtures directly (test_namespace_default_alias_call.sh,test_namespace_homonymous_class_export.sh,test_namespace_reexport_binding.shmodified,test_namespace_subobject_method_call.sh, ...).645e5f183"fix(hir): static method calls + static field get/set must resolve scope-local class renames (fix(hir): static method calls + static field get/set must resolve scope-local class renames #5969)" — touches static field/method resolution directly, which is exactly the mechanism import_function_origin_names collision for namespace-reexport members (Context.Service resolves to wrong suffix) #5924/import_function_prefixes/origin_names collide between a namespace member and an unrelated plain named import #5927 depend on.
The output shape ([Function: a] / [Function: Service] / [Function: omit] instead of the resolved string/dispatched-call results) suggests something is now returning an unresolved/wrong function reference instead of correctly dispatching through the namespace-member resolution path — consistent with a regression in the same namespace_member_prefixes/namespace_member_origin_names area #5922/#5924/#5927 fixed, or in whatever 645e5f183 changed for "scope-local class renames."
Impact
This currently blocks a clean re-verification of PR #5923's fixtures on top-of-main and would silently reintroduce #5924/#5927's exact symptom for any real program hitting that shape (e.g. sst/opencode's provider.ts, the original repro source for both issues).
Activity
proggeramlug commentedon Jul 13, 2026
Fixed by the #5874 revert (
5afa08fca, PR #6015) — the zod-compat payload that regressed namespace-member resolution is no longer on main.Re-verified on current main: all three fixtures are byte-identical to node —
test_issue_5924_namespace_reexport_origin_name_collisiontest_issue_5927_order_atest_issue_5927_order_bNote for the future: if #5874 is ever re-landed, these three are the canary.