Skip to main content

Module journal

Module journal 

Source
Expand description

Mutable Q42 Session: Checkpoint and Append-Only Transaction Journal (.q42j).

Generalized persistence layer for QualiaDB, supporting:

  • POET NOS workspaces, strata, and lens-time document histories
  • Webizen Studio and Desktop persistent graph workspaces
  • Autonomous multi-agent simulation & RTS world states (e.g. Rolling Commons)
  • Offline-first browser sessions via OPFS / Memory and native filesystem

Conforms to AGENTS.md:

  • Universal 48-byte NQuin semantic atom with 5-field XOR fold parity.
  • Zero heap inside hot frame validation and evaluation loops (Tier 1).
  • 42MB Sentinel budget compliance.
  • Default privacy: PrivacyClass::Sanctuary (restricted; prevents accidental public magnet routing).

Structs§

FrameHeader
32-byte header preceding every frame payload.
JournalHeader
128-byte header stored at offset 0 of every .q42j file.
JournalTransaction
An atomic transaction delta over canonical 48-byte Quins.
MutableQ42Session
Generalized in-memory mutable session providing active state projection, transaction commit boundaries, and checkpoint management.
Q42Journal
Core Journal Engine managing durable appending and atomic replay.

Enums§

JournalApplicationProfile
Application profiles for generalized QualiaDB sessions.
JournalError
JournalFrameType
Types of frames within a .q42j transaction.
JournalPrivacyClass
Privacy classification for the journal (Sanctuary by default).

Constants§

FRAME_HEADER_SIZE
Q42J_HEADER_SIZE
Fixed journal file header size (128 bytes).
Q42J_MAGIC
Magic bytes for a Q42 Journal: Q42J.
Q42J_VERSION
Current .q42j journal format version.

Functions§

crc32c
Compute a fast CRC-32C checksum over data.
quin_from_bytes
Reconstruct an NQuin from 48 bytes with 5-field XOR parity check.
quin_to_bytes
Convert an NQuin into 48 little-endian bytes.