Skip to content

writeEntry

writeEntry(dir, entry): Promise<boolean>

Store one entry, or refuse to.

Two reports are never stored, and the refusal lives HERE rather than in each caller so it cannot be forgotten by the next surface that adds caching:

  • status: "error". Serving an error out of a cache turns a transient failure — a tool mid-upgrade, a lock held for a second — into a sticky one that outlives its cause and that nobody can explain.
  • skippedForExec: true. A report withheld for want of execution is not a probe result at all; nothing was measured, and storing it would let an untrusted run poison the answer a later trusted run should have given.

Returns whether anything was written. A write failure — read-only home, full disk — is also false rather than a throw: failing to cache must never fail the collection the cache was meant to speed up.

ParameterType
dirstring
entryCacheEntry

Promise<boolean>