[GH-ISSUE #4938] [Feature]: Cache unchanged client validation work during repeated local checks #2739

Closed
opened 2026-10-21 05:54:12 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Xelvanis on GitHub (Aug 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4938

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Repeated local pnpm check runs redo expensive client TypeScript and ESLint work even when most or all client files are unchanged. On one Windows development machine, the uncached client TypeScript stage took about 55–57 seconds and client ESLint took about 15 seconds, making rapid validation loops unnecessarily slow.

Proposed solution

Enable the tools' native caches without removing or narrowing validation:

  • use TypeScript incremental build state for the client project;
  • use ESLint's content-based cache under the already ignored client node_modules/.cache tree;
  • preserve both caches during ordinary pnpm check runs;
  • remove both caches during an explicit client/workspace clean so developers can deliberately force a cold validation run.

All existing TypeScript diagnostics, ESLint rules and file selection, shared/server checks, Vite/PWA production builds, low-memory behavior, and failure ordering should remain intact.

Acceptance criteria

  • A cache-cold full pnpm check passes.
  • An immediate unchanged full pnpm check passes and is materially faster on the same machine.
  • Changed client TypeScript and ESLint errors still fail through their normal commands.
  • Explicit client clean removes TypeScript build state and the ESLint cache, while ordinary checks retain them.
  • No validation lane or production build is removed.

Alternatives considered

  • Removing validation or production-build lanes: rejected because those lanes cover distinct supported behavior.
  • Parallelizing check orchestration: rejected because it changes failure ordering and side effects for less benefit.
  • Adding a custom cache/task-runner layer: rejected because TypeScript and ESLint already provide the required invalidation behavior.

Additional context

In an isolated worktree, a cold full check passed in 2m22s, an immediate unchanged run passed in 28s, and a final warm run passed in 28s. These are machine-specific measurements rather than universal performance guarantees. Disposable TypeScript and ESLint errors were detected correctly and then restored exactly.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Aug 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4938 Originally assigned to: @SpicyMarinara on GitHub. <!-- task-id: pnpm-check-native-client-caches --> ## What problem does this solve? Repeated local `pnpm check` runs redo expensive client TypeScript and ESLint work even when most or all client files are unchanged. On one Windows development machine, the uncached client TypeScript stage took about 55–57 seconds and client ESLint took about 15 seconds, making rapid validation loops unnecessarily slow. ## Proposed solution Enable the tools' native caches without removing or narrowing validation: - use TypeScript incremental build state for the client project; - use ESLint's content-based cache under the already ignored client `node_modules/.cache` tree; - preserve both caches during ordinary `pnpm check` runs; - remove both caches during an explicit client/workspace clean so developers can deliberately force a cold validation run. All existing TypeScript diagnostics, ESLint rules and file selection, shared/server checks, Vite/PWA production builds, low-memory behavior, and failure ordering should remain intact. ## Acceptance criteria - A cache-cold full `pnpm check` passes. - An immediate unchanged full `pnpm check` passes and is materially faster on the same machine. - Changed client TypeScript and ESLint errors still fail through their normal commands. - Explicit client clean removes TypeScript build state and the ESLint cache, while ordinary checks retain them. - No validation lane or production build is removed. ## Alternatives considered - Removing validation or production-build lanes: rejected because those lanes cover distinct supported behavior. - Parallelizing check orchestration: rejected because it changes failure ordering and side effects for less benefit. - Adding a custom cache/task-runner layer: rejected because TypeScript and ESLint already provide the required invalidation behavior. ## Additional context In an isolated worktree, a cold full check passed in 2m22s, an immediate unchanged run passed in 28s, and a final warm run passed in 28s. These are machine-specific measurements rather than universal performance guarantees. Disposable TypeScript and ESLint errors were detected correctly and then restored exactly. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:54:12 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2739
No description provided.