Parent: https://github.com/aien-dev/omega-mv/issues/607
Code baseline and ownership
- Omega
src/runtime/rx_argus.{h,c}has optimized per-thread event production and consumer. Do not replace ARGUS or its authority observation. src/runtime/rx_cortex.{h,c}is the single canonical memory/evidence writer. A trace archive is NOT Cortex and must never write its journal.src/searchtrace/st_hook.halready has optional read-only hooks; adapter integration is a sibling issue, not part of this storage issue.
Deliverable
- Define a small, versioned canonical Omega trace envelope with run/session ID, event ID, causal parent, source subsystem, sequence, logical/monotonic time (and wall-clock mapping only when known), machine/build identity, event category/status, strongly typed numeric metrics with units and missing-value provenance, and digest-only references to separately stored receipts. Include privacy classification and capture source.
- Implement a LOCAL ONLY append-only segment store and bounded asynchronous writer. Allow caller-supplied or XDG local state root, 0700 directories, 0600 files, refusal of symlinks/path escape, explicit filesystem error reporting. Do not run any network process or collector.
- Separate control/evidence from best-effort diagnostic telemetry. Never stall training on full buffers; count drops per producer/event class and emit a durable loss summary. Critical evidence stays in its pre-existing authoritative ledger, not the trace queue.
- Provide deterministic encoding/decoding with schema-version refusal, size/length bounds, CRC or digest integrity checking, segment rotation, crash/torn-write detection and safe recovery. Keep records append-only and do not alter source receipts. Include retention by configured disk budget/age, safe deletion of complete unpinned segments, and an explicit operator purge command.
- Start with a simple local index or offset table; a database server is not required. Optimize after measurements. Freeze a documented file-format migration policy.
Acceptance / evidence
- Reopen, truncate-last-record, corrupted length, invalid version, disk-full, permission denial, symlink swap and unclean shutdown tests fail safely and report what data was lost.
- Offline/no-network test confirms data is still written and queryable with all outbound network denied; no default listener, outbound socket or analytics SDK.
- Fixed seeded events produce identical canonical payload bytes and stable digests independently of host pointer values.
- Bounded memory under burst load; non-blocking or bounded-cost producer; measured overhead and drop rate vs tracing off on representative CPU and GB10 workloads (mark unrun tests NOT_RUN).
- Explicit quota/retention and owner-triggered purge leave unrelated receipts/Cortex history intact. Encrypted-at-rest option can be a separate future issue; do not claim filesystem permissions alone encrypt data.
- Tests and documentation state observability is not proof, authorization, memory, or a training control channel.
Non-goals
ClickHouse, Postgres, Redis, Kafka, external OTLP collectors, full-token logging, GPU kernel rewrites, a new authority plane, a new Cortex memory store, or automatic publication.
Coordinate schema with aien-train producers and AIEN Trace #398. Implement by focused PR, record pinned source/command/receipts and PASS/FAIL/INCONCLUSIVE/NOT_RUN.