Skip to content

fix: honor request.security offset lifecycles#90

Merged
luisleo526 merged 1 commit into
mainfrom
codex/request-security-variable-lifecycle
Jul 20, 2026
Merged

fix: honor request.security offset lifecycles#90
luisleo526 merged 1 commit into
mainfrom
codex/request-security-variable-lifecycle

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Summary

  • preserve exact analyzer binding provenance for identifier AST nodes so a same-named helper, block local, tuple target, or loop iterator cannot capture a global alias
  • admit only proven immutable input.int history offsets, including global aliases and unique/uniform/keyword UDF callsites; writes, mixed callsites, persistent locals, arithmetic, and series values fail closed
  • split requested TA ownership/storage clocks from the lexical stack used to resolve the offset
  • guard negative runtime offsets with na, while negative literals remain a loud compile-time rejection

This is a generic Pine v6 compiler correctness fix. The exact 915-source differential is score-neutral, so this PR is not expected to move a current public tier by itself.

Preregistered gate

The preregistration assets merged first in pinescript-scrapper #112. From that merged main:

  • exhaustive N=4: 16/16 cells passed, no early stop
  • 38 private lifecycle probes per cell; zero internal or native infrastructure errors
  • all-on production diff: 948caa587eabe16031af02d4df1993c5016944a033be654fe436e6ad1281e04d (40,213 bytes), exactly this PR
  • focused JUnit: 38 tests, 0 failures/errors/skips
  • native k0/k1/k2 dynamic-vs-literal outputs exact
  • two independent post-matrix adjudications returned the identical GO result SHA f8cd110f81b99592ff3c043233a113b19d2b7475042db8051e44178cd0ddf282
  • exact-915: 903 OK / 12 expected errors in base and candidate, zero changed identities

A separate bounded set of 12 from-blank private Pine v6 QA probes found no blocker: 4 accepted and passed native runtime contracts, 8 rejected loudly, zero crashes/native failures/silent admissions. The deterministic candidate evidence file SHA is b71727d6415025c1e9cab21a725586e0f615c5f5b6b0971fa70c1bf255f0818c.

Tests

  • native focused request.security lifecycle suite: 38/38 passed
  • full codegen suite: 2,316 passed, 2 skipped
  • pure-Python lane: 1,668 passed, 397 environment skips
  • Pyodide/release fixture lane: 263 OK, 14 expected errors
  • exact 915-source differential: zero record changes

@luisleo526
luisleo526 marked this pull request as ready for review July 20, 2026 05:59
@luisleo526
luisleo526 merged commit 88f977b into main Jul 20, 2026
9 checks passed
@luisleo526
luisleo526 deleted the codex/request-security-variable-lifecycle branch July 20, 2026 05:59
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