CodeVetter · Repo Unpack · Contributor handoff
pmndrs/jotai
This brief is grounded in the pinned checkout, including more than twelve source files and multiple end-to-end source traces. Tests and CI were inspected, not executed, and the investigation did not install, build, benchmark, contact services, or modify files. Future edits should preserve the vanilla/React boundary and verify the specific affected regression suites. Ancillary v2 applications, unstable internals, and documentation drift need explicit consideration.
- Begin core work with atom.ts, store.ts, and the relevant internals building blocks; atom configuration identity and per-store state ownership are separate concerns. Preserve referentially stable atoms when used from React render functions.
- For notification edits, preserve recompute-before-flush behavior in storeSet, storeSub, and unsubscribe; read the #3353 tests before changing the changedAtoms-size optimization or introducing nested notification behavior.
- For hook edits, read both raw subscription implementations and continuablePromise; the ordinary raw hook includes a post-subscription value check, while RawSync uses useSyncExternalStore. Reconcile mount-timing documentation against these sources.
- For storage changes, preserve getOnInit versus onMount loading, promise-update resolution, RESET deletion, and storage-area/key filtering; inspect the adapter tests rather than assuming browser persistence is infallible.
- When execution is authorized, use the existing test:spec script for the smallest affected Vitest suite and test:types for API changes, then applicable lint/format checks. This investigation inspected those tests and CI declarations but did not execute them or establish passing status.
- Keep ESM .js import suffixes, strict/exact optional types, isolated declarations, and seven exported entrypoints consistent; build uses --noCheck, so emitted output alone is insufficient type validation.
- Treat website/example validation separately from root tests: workspace membership is root plus website, inspected applications declare v2 dependencies, and root lint excludes them. benchmarks/run-all.ts shells out to npx tsx and its header describes generated JSON/chart artifacts; it is not a read-only inspection command.
- Contribution guidance requests failing tests for core fixes, focused changes, conventional commit types, and discussion-first submission rather than direct contributor PRs. INTERNAL exports warn of changes without notice; none of these instructions authorize writes or releases during this read-only task.