CodeVetter · Repo Unpack · Contributor handoff
TanStack/query
Tests and CI were inspected, not executed, and this source inventory is bounded rather than exhaustive. Future agents should begin with repository instructions, the owning package, and the relevant core-to-adapter flow. Core edits require attention to cache identity, observer timing, cancellation, mutation callbacks, and external snapshots. Validation commands below are recommendations for a future authorized implementation task, not actions performed during this investigation.
- AGENTS.md requires reading CONTRIBUTING.md before analysis or changes; contribution guidance requires focused changes, understood and verified generated code, and the repository PR template.
- Resolve package-manager drift explicitly: CONTRIBUTING.md mentions pnpm v11, while the pinned root manifest specifies pnpm@12.4.2 and a matching minimum engine.
- Read the runtime owner before adapter changes: useBaseQuery defaults options and owns React subscriptions, QueryObserver decides fetch/result behavior, and QueryClient owns caches and lifecycle listeners.
- Preserve notification-aware writes: setQueryData applies an updater, skips undefined, and writes through Query.setData; direct state-object mutation bypasses QueryCache's documented notifications.
- For authorized validation, run package runtime tests from the root through pnpm nx run @tanstack/{package-name}:test:lib; Nx compiles dependencies first, and package scripts provide separate type and package-export checks.
- Published-package changes require a changeset, while docs, CI, examples, and development-only changes do not; Changesets config places many packages in fixed version groups.
- Reference markdown is generated from source JSDoc, so edit JSDoc rather than generated pages; new documentation pages also require updating docs/config.json.
- Do not assume snapshots preserve executable behavior: dehydrateMutation stores key/state/scope/meta, and the offline example registers a default mutationFn specifically to resume paused mutations after reload.