Expand description
Strict parsers of every journal record.
What:
Strict parsers of every schema-version-2 journal record.
Why:
Recovery reads records either wrapper wrote;
every missing or mistyped field fails
closed with the record and field named,
exactly as the incumbent’s
commit-transaction-journal-parse.ts and commit-transaction-journal-reader.ts do.
In TS you’d write (pseudocode):
const preparing = parsePreparingRecord(bytes);Structs§
- Record
Reader - What:
A field reader over one untrusted record object,
naming the record in failures.
Why:
The incumbent’s
createRecordReader: each accessor fails closed with “Transaction recordhas a malformed field.”
Functions§
- open_
record - What:
Parse a record’s bytes into its object after checking schema version and state.
Returns the parsed object;
the caller builds a reader over it.
Why:
The incumbent’s
openRecord: fatal UTF-8, a JSON object, version 2, the expected state; anything else fails with the record named. - parse_
index_ lock - What:
Parse
index-lock-<n>.json. Why: The incumbent’sparseIndexLockRecord. - parse_
landing - What:
Parse
landing-<n>.json. Why: The incumbent’sparseLandingRecord: a commit landing must name its new OID. - parse_
prepared - What:
Parse
prepared.json. Why: The incumbent’sparsePreparedRecord. - parse_
preparing - What:
Parse
preparing.json. Why: The incumbent’sparsePreparingRecord. - parse_
ref_ updated - What:
Parse
ref-updated.jsoninto the landed commit. Why: The incumbent’sparseRefUpdatedRecord.