Expand description
GAP-001 (v1.0.82): DAO for the pending_memories table.
Staged persistence with a resumable checkpoint. Lets remember resume
from Stage B (embedding) without re-validating Stage A (parse + validate).
Status transitions: validated → embedding_in_progress → embedding_done → committed ↘ abandoned (manual cleanup) ↘ failed (max attempts reached)
Structs§
- Pending
Memory - Represents an entry in the
pending_memoriestable.
Enums§
- Pending
Status - Status enum of a pending entry. Maps 1:1 to the CHECK constraint
of the
pending_memoriestable.
Functions§
- cleanup_
older_ than - Removes
embedding_in_progressentries older thanolder_than_secs. Returns the number of entries removed. - find_
by_ id - Looks up by
pending_id. - insert_
validated - Inserts a new entry into
pending_memorieswith statusvalidated. - list_
by_ status - Lists entries by status, ordered by
updated_atascending. - mark_
committed - Marks as
committed(called after a successful Stage C). - mark_
failed - Marks as
failedwith an error message. - update_
to_ embedding_ done - Updates the status to
embedding_doneand stores the embedding BLOB. - update_
to_ embedding_ in_ progress - Updates the status to
embedding_in_progressand incrementsattempt_count.