[GH-ISSUE #2725] test(javascript): align shadowed parameter provenance with the current unknown contract #984

Closed
opened 2026-10-15 18:30:06 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2725

Originally assigned to: @N0zoM1z0 on GitHub.

Problem

The JavaScript semantic structure regression still expects a shadowed parameter's module-alias provenance to be local, although current production semantics intentionally classify parameters as unknown because their values depend on caller arguments.

Reproduction

Baseline: clean main 11f1d952e79241b507e47c690eed00e0d5ffda30, Node 24.18.0 / npm 11.16.0.

npm run test:local -- src/domain/javascript/javascriptSemanticAnalysis.structure.test.ts

Observed: 23 pass, 1 fails. resolves imports, require destructuring, aliases, assignments, and shadowing expects {status: "local", origins: [], reason: null} for the ipcRenderer parameter of function local(ipcRenderer). Production returns {status: "unknown", origins: [], reason: "Parameter provenance depends on caller arguments."}.

The same command produces the identical failure on the contributor-skill branch. Hosted run 38368830002, shard 2, reports that single failure (1,745 pass, 32 skipped in that shard). Source/test trees are unchanged by the original skill-only diff, so this is a reproduced baseline drift, not an intermittent timeout or a regression caused by the new skill.

Expected contract and cause

Commit c7a890d12987d9b2d496119c1fbf1a88c0fc298e deliberately preserved unknown parameter/catch provenance. Its production owner provenanceForBindingValue and new javascriptSemanticProvenance.test.ts agree on unknown parameter values. Lexical reference resolution can be local/resolved without establishing the parameter value's module origin. The existing structure test conflates these facts.

Proposed correction

Update only the stale provenance expectation to require unknown status, no imported origins, and a reason tied to caller arguments. Retain every binding identity, reference resolution, import, alias, assignment and shadowing assertion. Do not revert production uncertainty to local, skip the case, or weaken required checks.

Validate the corrected file and nearby semantic families, and demonstrate that restoring a local-parameter regression still makes the corrected assertion fail. The contributor audit skill should retain this concrete drift investigation as executed verification rather than advertise a general CI speedup.

Implemented verification

PR #2692 corrects only the two stale expected fields. The original 24-case structure file now passes; the three-file targeted packet passes 33 cases. A controlled producer mutation restoring local parameter provenance makes precisely the corrected structure case fail (23 pass / 1 fail); the production file was restored byte-for-byte. After rebase, all 26 semantic-family files / 611 cases pass, and check:ci plus docs:check pass. Both commits carry the maintainer-specified anonymous identity and Kaoru0822 co-author trailer. Final head 3a1749f64; hosted validation run 38374062636 is pending.

Resolution

Main commit e05d3399f1 independently corrected the same unknown/caller-dependent parameter expectation. The contributor skill PR drops its redundant test commit and retains that upstream correction. The structure file passes all 24 cases after this rebase. Prior full CI 38374062636 (our exercised equivalent correction) passed all 10,584 active cases with 100 pending/skipped and no failures. Closed as completed because the verified fix is already on main; this is not attributed as a merged test change from PR #2692.

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2725 Originally assigned to: @N0zoM1z0 on GitHub. ## Problem The JavaScript semantic structure regression still expects a shadowed parameter's module-alias provenance to be local, although current production semantics intentionally classify parameters as unknown because their values depend on caller arguments. ## Reproduction Baseline: clean main `11f1d952e79241b507e47c690eed00e0d5ffda30`, Node 24.18.0 / npm 11.16.0. ```sh npm run test:local -- src/domain/javascript/javascriptSemanticAnalysis.structure.test.ts ``` Observed: 23 pass, 1 fails. `resolves imports, require destructuring, aliases, assignments, and shadowing` expects `{status: "local", origins: [], reason: null}` for the `ipcRenderer` parameter of `function local(ipcRenderer)`. Production returns `{status: "unknown", origins: [], reason: "Parameter provenance depends on caller arguments."}`. The same command produces the identical failure on the contributor-skill branch. Hosted run 38368830002, shard 2, reports that single failure (1,745 pass, 32 skipped in that shard). Source/test trees are unchanged by the original skill-only diff, so this is a reproduced baseline drift, not an intermittent timeout or a regression caused by the new skill. ## Expected contract and cause Commit `c7a890d12987d9b2d496119c1fbf1a88c0fc298e` deliberately preserved unknown parameter/catch provenance. Its production owner `provenanceForBindingValue` and new `javascriptSemanticProvenance.test.ts` agree on unknown parameter values. Lexical reference resolution can be local/resolved without establishing the parameter value's module origin. The existing structure test conflates these facts. ## Proposed correction Update only the stale provenance expectation to require unknown status, no imported origins, and a reason tied to caller arguments. Retain every binding identity, reference resolution, import, alias, assignment and shadowing assertion. Do not revert production uncertainty to local, skip the case, or weaken required checks. Validate the corrected file and nearby semantic families, and demonstrate that restoring a local-parameter regression still makes the corrected assertion fail. The contributor audit skill should retain this concrete drift investigation as executed verification rather than advertise a general CI speedup. ## Implemented verification PR #2692 corrects only the two stale expected fields. The original 24-case structure file now passes; the three-file targeted packet passes 33 cases. A controlled producer mutation restoring local parameter provenance makes precisely the corrected structure case fail (23 pass / 1 fail); the production file was restored byte-for-byte. After rebase, all 26 semantic-family files / 611 cases pass, and check:ci plus docs:check pass. Both commits carry the maintainer-specified anonymous identity and Kaoru0822 co-author trailer. Final head 3a1749f64; hosted validation run 38374062636 is pending. ## Resolution Main commit e05d3399f19f25fdf04285a02b293418256b26dc independently corrected the same unknown/caller-dependent parameter expectation. The contributor skill PR drops its redundant test commit and retains that upstream correction. The structure file passes all 24 cases after this rebase. Prior full CI 38374062636 (our exercised equivalent correction) passed all 10,584 active cases with 100 pending/skipped and no failures. Closed as completed because the verified fix is already on main; this is not attributed as a merged test change from PR #2692.
bsakaguchi 2026-10-15 18:30:06 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#984
No description provided.