#14860·rspack

[Bug]: missing module graph cache entry aborts persistent-cache recovery

Author: hardfistCreated Jul 20, 2026Updated Sep 28, 2026
Labelsbug

Reproduction

Repository: https://github.com/hardfist/rspack-persistent-cache-missing-module-recovery-repro

This is a JavaScript repro using the public compiler API and the published @rspack/[email protected] package:

bash
pnpm install
pnpm repro

The script:

  1. Builds an entry module that imports src/dep.js with filesystem persistent cache enabled.
  2. Removes only the src/dep.js record from occasion_make_module_graph/0.pack.
  3. Recomputes the pack integrity hash, so the storage layer accepts the intentionally incomplete cache.
  4. Starts a fresh Node process against that cache.

Observed output on @rspack/[email protected]:

recover exit: signal SIGABRT
ModuleGraphModule with identifier Identifier(...) not found

The repro exits 0 after detecting this panic.

Expected behavior

An incomplete or partially recovered module-graph cache should be treated as a cache miss (invalidate/rebuild the affected scope, or return a recoverable compilation error). It should not abort the Node process during persistent-cache recovery.

Environment