Skip to content

fix(lint): flag crypto.randomUUID() as non-deterministic - #7285

Closed
sx4im wants to merge 1 commit into
heygen-com:mainfrom
sx4im:fix-7276-randomuuid-lint
Closed

sx4im wants to merge 1 commit into
heygen-com:mainfrom
sx4im:fix-7276-randomuuid-lint

Conversation

@sx4im

@sx4im sx4im commented Nov 6, 2026

Copy link
Copy Markdown

The non_deterministic_code rule flagged Math.random and crypto.getRandomValues but not crypto.randomUUID, so a composition using it linted clean. The render shim only seeds getRandomValues, so randomUUID stays random between renders and workers.

Added crypto.randomUUID to the rule pattern list, with a test showing a composition using it now gets the non_deterministic_code error.

Verified: new test failed before the fix and passes after. Full lint package suite passes (1276 tests), typecheck clean, oxlint and oxfmt clean, comment checks pass.

Fixes #7276

Note: this is a fork PR, so the workflows may show as awaiting approval until a maintainer approves the run.

The non_deterministic_code rule flagged Math.random and
crypto.getRandomValues but not crypto.randomUUID, so a composition
using it linted clean even though the render shim only seeds
getRandomValues and randomUUID stays random between renders.

Add the pattern and a test showing the finding fires.
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
Re-verified the nine merged PRs in heygen-com#7266-heygen-com#7288 against fork file:line and
reverse-apply checks; none needs a new port. The six open PRs (heygen-com#7266, heygen-com#7269,
heygen-com#7281, heygen-com#7282, heygen-com#7285, heygen-com#7286) are pinned as monitored with revisit conditions;
monitored 99 -> 105.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
…, record duplicate rule

Review PR heygen-com#7304-heygen-com#7335: 10 merged already adopted or deferred; 10 open or draft PRs
pinned (heygen-com#7304, heygen-com#7308, heygen-com#7311, heygen-com#7315, heygen-com#7321, heygen-com#7330-heygen-com#7334); open duplicates of
pinned heygen-com#7281/heygen-com#7285/heygen-com#7286/heygen-com#7296 are tracked by those pins. strict exit 0;
monitored 110 -> 120.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jrusso1020

Copy link
Copy Markdown
Collaborator

Thanks for contributing this fix. I reviewed the competing submissions and selected #7322, which includes the same runtime fix with a regression test that also pins its seeded-PRNG guidance. Closing this as a duplicate so the issue has one implementation to take through CI and merge: #7322. This is consolidation of overlapping work, not a rejection of your contribution.

@jrusso1020 jrusso1020 closed this Nov 7, 2026
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.

Lint: flag crypto.randomUUID() as non-deterministic

2 participants