destroyStoreArtifacts
destroyStoreArtifacts(
storePath,opts?):Promise<void>
Defined in: packages/client/src/worker/attach-sync-client.ts:352
Destroy every local artifact of a store BY PATH (ADR-0050 stage 2; the public face of the ADR-0049 D8 destruction machinery): the OPFS store directory, the commitment sentinel, the meta record, AND the idb database — backend-agnostic (delete-if-present on both backends), with the bounded VFS-ownership-lag retry.
Precondition: the store is NOT running. This is the companion to SyncClient.destroy (the
supervised destroy of an ATTACHED store — peer-checked, teardown-acknowledged): reach for
destroyStoreArtifacts for a store nobody is attached to — an obsolete path a preference change left
behind, a wipe of known store paths. Called on a path a live engine still holds, the backend delete throws
an ownership error after the bounded retry — loud, and safely RE-RUNNABLE: the destruction sequence is
idempotent and phase-recorded (a store whose meta record says deleting is refused for boot), so a re-run
completes it. No liveness probe is attempted here — it could not be race-free, and the ownership error
already fails hard; callers keep failed paths on their own retry list (e.g. the board’s Obsolete stores).
Parameters
Section titled “Parameters”storePath
Section titled “storePath”string
Returns
Section titled “Returns”Promise<void>