Skip to content

fix(codegen): check array percentrank indices#70

Merged
luisleo526 merged 1 commit into
mainfrom
fix/ki48c-percentrank-bounds
Jul 17, 2026
Merged

fix(codegen): check array percentrank indices#70
luisleo526 merged 1 commit into
mainfrom
fix/ki48c-percentrank-bounds

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Summary

  • reject negative, out-of-range, na, and non-finite array.percentrank indices for arrays with at least two elements
  • preserve receiver-before-index one-evaluation order and the existing empty/singleton na behavior
  • keep valid formula behavior unchanged and avoid internal-name collisions through nested generic-lambda bindings

This is intentionally bounds-only. PercentRank keyword routing, singleton semantics, return typing, and mixed-na behavior remain separate milestones.

Validation

  • engine-enabled pytest: 1,696 passed / 2 skipped
  • touched checked-array suites: 71/71
  • native/Pyodide differential: 277/277 (263 accepted, 14 expected rejects)
  • frozen source differential: 666/666 same status, exactly one changed generated file (the sole PercentRank consumer)
  • sole consumer replay: 362 trades, candidate/base/accepted tape SHA-256 8f975cc05d67e55e99681263066b9d822f40a8b4cf7bddfa566a7d4ee22e182a
  • representative get/set/remove generated output remains byte-identical to KI-48b
  • independent review: no blockers
  • git diff --check

@luisleo526
luisleo526 marked this pull request as ready for review July 17, 2026 20:16
@luisleo526
luisleo526 merged commit e84cccb into main Jul 17, 2026
9 checks passed
@luisleo526
luisleo526 deleted the fix/ki48c-percentrank-bounds branch July 17, 2026 20:17
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