Framework
recoverWAL()
Function: recoverWAL()
function recoverWAL(adapter, config?): Promise<RecoveryResult>Recover from any orphaned WAL entries.
Called during Flashcore.$.init() before model registration.
Recovery strategy:
- If phase > 'pending', replay (authoritative writes started)
- If phase == 'pending' and stale, rollback
- If phase == 'pending' and recent, replay
Parameters
| Parameter | Type | Description |
|---|---|---|
adapter | FlashcoreAdapter<string, unknown> | The storage adapter |
config? | WALConfig | Optional WAL configuration |
Returns
Promise<RecoveryResult>
Recovery result with stats
