Skip to content

fix: reject shadowed terminal array element calls#88

Merged
luisleo526 merged 1 commit into
mainfrom
fix/direct-terminal-element-shadow
Jul 19, 2026
Merged

fix: reject shadowed terminal array element calls#88
luisleo526 merged 1 commit into
mainfrom
fix/direct-terminal-element-shadow

Conversation

@luisleo526

@luisleo526 luisleo526 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reject direct terminal and adjacent identity-alias temporary-array element calls when the callee is shadowed by a function parameter, immediate local, or tuple binding
  • evaluate lexical bindings at the exact read program point before AST visitation, so producer order cannot leave partial analyzer state
  • keep expired nested-block bindings and self-named alias initializers valid
  • remove the post-body raw-symbol alias guard that could misread expired bindings

This also corrects the alias false rejection exposed after #87. The direct defect and alias program-point defect can mask each other, so they were validated as independent factors.

Exhaustive masking matrix

Complete 2^2 run, no early stop:

Cell Direct factor Alias factor Result
00 off off both defects reproduced
10 on off direct fixed only
01 off on alias fixed only
11 on on both fixed
  • 4 planned / 4 completed / 4 passed / 0 skipped
  • publication gate: true
  • fingerprint: 200465f22a7f47a69e918c0fd1b202266bcb3021b5451f4b8a24ee449db30819
  • 20 fixed-lane negatives produced the exact single analyzer diagnostic with zero analyzer state
  • 32 positive controls compiled and passed all structural assertions
  • the 11 production file is byte-identical to the reviewed candidate: f19ba62022d5bde3241d9bb80d63cb3dcc3c7080d6bb35ade09f0bafa5bea8b5
  • reviewed diff: 1953ee0f27ef640ae2b3905a077234cf814e4a8bd3542ae06a49b419d67919a4

Validation

  • focused generalized cases: 27/27
  • forward-local suite: 52/52
  • terminal-array suite: 163/163
  • full native suite: 1,596 passed / 379 skipped
  • clean engine + private corpus integration: 2,134 passed / 94 skipped
  • standalone corpus compilation: 254/254
  • Pyodide parity: 277/277 (263 expected success, 14 expected error)
  • exact 915-source differential: base 902 success / 13 error, candidate 902 / 13, zero differences
  • release selftest: 8 comparator cases + 10 verdict cases
  • py_compile: 120/120
  • git diff --check: clean

The accepted validation board is unchanged; this is a score-neutral compiler correctness fix.

@luisleo526
luisleo526 merged commit 0f2bfb4 into main Jul 19, 2026
9 checks passed
@luisleo526
luisleo526 deleted the fix/direct-terminal-element-shadow branch July 19, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant