Skip to content

test: key differential oracle cache by environment - #51

Open
patlux wants to merge 2 commits into
vercel-labs:mainfrom
patlux:test/oracle-cache-environment
Open

test: key differential oracle cache by environment#51
patlux wants to merge 2 commits into
vercel-labs:mainfrom
patlux:test/oracle-cache-environment

Conversation

@patlux

@patlux patlux commented Jul 29, 2026

Copy link
Copy Markdown

Prevent stale Node differential-oracle results when unchanged program bytes observe a different inherited environment.

const production = process.env.NODE_ENV === "production";
const enabled = process.env.SCRIPTC_NEVER === "yes";

Both variables already affect output in existing corpus programs, so an environment allowlist can reuse the wrong cached verdict.

  • Key Oracle results by the complete inherited environment.
  • Sort and length-frame names and values so insertion order, missing entries, empty values, and delimiters remain unambiguous.
  • Cover cache-key invalidation for NODE_ENV and SCRIPTC_NEVER and bump the key namespace.

Focused helper tests and a NODE_ENV differential run, lint, workspace build, and git diff --check pass. A shared-cache probe produced distinct Oracle records for both output variants of each corpus program. The full GitHub Actions matrix is pending maintainer approval for this fork PR.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@patlux is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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