Repository navigation
Conversation
Reuse the canonical index owner instead of treating named keys such as 01 as positional slots. Keep unresolved values and static inference limits. Fixes morluto#4242
morluto
added a commit
that referenced
this pull request
Oct 15, 2026
Reuse the semantic array-index parser so leading-zero keys stay unresolved instead of selecting positional arguments. Preserve canonical indices, literal fallback and dynamic-key uncertainty. Refs #4242, #4272 Co-authored-by: Liu Jie <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4242. Preserve named rest-array property identity during lexical substitution instead of treating
"01"as positional index 1.Problem and expected behavior
A returned closure sending
items["01"] ?? "FALLBACK", with rest arguments"FIRST", "SECOND", incorrectly acquired the inferred IPC channelSECOND. Only canonical array indices may select positional values. The noncanonical expression now stays unknown; the"1"control still resolves toSECOND.Change and scope
Reuse the existing
semanticArrayIndexowner in symbolic array lookup. Keep existing unknown reasons and missing-argument behavior. Add one public-CLI four-case regression in the existing wrapped-call-path suite. No new parser, undefined propagation, or fallback inference.Related ownership review found no other digit-only parser in symbolic lookup. Separate ambient-write/data-effect analyses already reject leading-zero aliases and are outside this change.
Contract and boundary impact
Expected effects:
Evidence and regression coverage
6183544e8b42b65feaf4f674f860b1fb3b0c95eb, then after the fix. The new regression failed before the fix because the noncanonical terminal wasSECONDinstead of absent.SECOND; literal fallback remainsFALLBACK; dynamic key remains unresolved.For evidence-bearing changes:
Validation performed
Cloud Linux, pinned Node 24.18.0 / npm 11.16.0, locked
npm ci:npm run build:cached— passed before baseline replay; focused tests rebuilt after the fix.npm run test:focused -- src/domain/javascript/javascriptSymbolicBindings.test.ts src/domain/javascript/electronWrappedCallPaths.test.ts src/domain/javascript/javascriptSemanticAnalysis.dataflow.test.ts tests/boundary/cli/electronWrappedCallPaths.test.ts— 170 passed across 4 files.npm run check:fast— passed.npm run check— passed, including architecture guards.npm run verify:test-discovery— 1376 files discovered exactly once.git diff --checkand normal pre-commit formatting/lint hooks — passed; hooks left the tested diff unchanged.Compatibility, safety, and release
Author readiness
Human owner: @maxazure