Lint: flag crypto.randomUUID() as non-deterministic
The non_deterministic_code lint rule flags Math.random and crypto.getRandomValues (packages/lint/src/rules/core.ts, pattern list around lines 938-982), but not crypto.randomUUID(). The render shim seeds getRandomValues only (packages/producer/src/services/fileServer.ts), so randomUUID() stays random between renders and workers. A composition that uses it lints clean today.
Scope
- Add
crypto.randomUUIDto the rule's pattern list.
Files: packages/lint/src/rules/core.ts, packages/lint/src/rules/core.test.ts
Done when: a new test shows a composition using crypto.randomUUID() gets the non_deterministic_code finding.
Mentor: @jrusso1020. Comment here before you start so we can avoid duplicate PRs.
I'll take this — planning to add crypto.randomUUID to the non_deterministic_code pattern list in packages/lint/src/rules/core.ts and cover it with a unit test in core.test.ts.
Picking this up — will add crypto.randomUUID to the non_deterministic_code pattern list in packages/lint/src/rules/core.ts with a test in core.test.ts showing a composition using it gets flagged.