Expand description
Transactional fact-create outbox for device-primary replication.
V37 journal rows are retained as legacy_unverified. V38 introduces an
explicit stream epoch, transaction-owned sequence/head state, and a
domain-separated digest chain. Only exact typed payload bytes are canonical;
derived embeddings and indexes are rebuilt by the replica.
Structs§
- Exported
Batch - Legacy shape retained for current callers. It exports only verified epoch-1 records and does not hide corruption as successful completion.
- Fact
Create Payload V1 - Canonical fact-create authority payload. Field order is fixed by this struct.
- Fact
Create Replica Envelope V1 - Closed receiver-side representation of one verified fact-create record.
- Journal
Entry - A verified outbox entry. V37 rows can still be inspected directly in SQLite but are never returned by the verified export API.
- Verified
Export Batch
Enums§
- Export
Status - Replay
Outcome - Compatibility-only replay result. New remote admission must use the closed typed fact-create dispatcher, not this closure-based adapter.
- Replica
Apply Outcome - Durable receiver decision for a fact-create record.
Constants§
- FACT_
CREATE_ OPERATION - FACT_
CREATE_ PAYLOAD_ SCHEMA - GENESIS_
PREDECESSOR - LEGACY_
RECORD_ STATE - MIGRATION_
V37 - V37 migration retained for compatibility. These rows have no cryptographic
chain and become explicitly
legacy_unverifiedunder V38. - MIGRATION_
V38 - V38 verified stream state. SQLite ALTER defaults are literal constants so existing V37 databases migrate without fabricating verified metadata.
- MIGRATION_
V39 - V39 receiver-side stream, inbox, and durable ACK projection.
- VERIFIED_
RECORD_ STATE
Functions§
- append_
journal_ entry Deprecated - Compatibility helper for fact-create tests and offline tools. It owns a transaction and therefore remains atomic, but callers should use the real MemoryStore fact mutation path instead.
- append_
verified_ in_ tx - Append a verified record while the caller’s semantic mutation transaction is active. The stream row is the allocator; no sequence is derived from journal contents.
- digest_
fields - Domain-separated SHA-256 over length-prefixed exact fields.
- encode_
fact_ create_ payload - envelope_
digest - export_
contiguous Deprecated - export_
verified_ contiguous - Export and verify a contiguous prefix. Legacy V37 rows are never promoted into this API and any stored digest/chain mismatch is typed as corruption.
- mutate_
and_ journal Deprecated - Compatibility mutation wrapper. The semantic mutation and outbox record are committed together, and a failed closure consumes no sequence.
- next_
expected_ sequence Deprecated - next_
expected_ sequence_ for_ epoch - payload_
digest - replay_
journal_ entry Deprecated - validate_
fact_ create_ replica_ envelope - Validate a receiver envelope and decode its strict canonical payload.