core/sensorium/audio
Shay dd529ad408
feat(adr-0181-p5): audio Delta-CRDT arena + merge kernel (sequential==concurrent proof) (#477)
Wires AudioCompilationUnits into the Delta-CRDT substrate (ADR-0180 §2.1/§2.2)
at the Python layer — audio is the first concrete exerciser of ADR-0180.

- sensorium/audio/arena.py:
  - AudioArena (§2.1): thread-local, share-nothing, lock-free accumulation;
    non-destructive snapshot(); thread_local_audio_arena() accessor.
  - AudioDelta (§2.2): canonical, content-addressed merge_key order + dedup;
    join is commutative/associative/idempotent.
  - merge_audio_deltas (§2.2): the Merge Kernel — folds arena deltas into one
    content-addressed, deduped, totally ordered set.
  - audio_merge_trace_hash: PCM-free, order-invariant trace hash — the
    sequential==concurrent proof anchor (ADR-0181 §4.2 A-3/A-6).

Mirrors the Rust LocalArena/SemilatticeDelta/merge_kernel (core-rs/src/vault.rs,
ADR-0180 §4.1) so the layers stay in parity when the Rust↔Python binding lands
(§1.5.5, deferred — pure-CPU/Python path first).

10 failable proof tests in tests/test_audio_crdt_merge.py covering the
load-bearing hash(Sequential)==hash(Concurrent) gate (real threads), the three
semilattice legs, content-addressed ordering, dedup idempotence, and trace
hygiene. Mutation-verified: disabling the content sort fails 6 of 10 loudly.

Additive only: no core layer touched (ADR-0013). Audio tests 35/35; architectural
invariants 40/40. Zero impact on existing eval lanes (no serving path changed).
2026-05-29 13:22:44 -07:00
..
__init__.py feat(adr-0181-p5): audio Delta-CRDT arena + merge kernel (sequential==concurrent proof) (#477) 2026-05-29 13:22:44 -07:00
arena.py feat(adr-0181-p5): audio Delta-CRDT arena + merge kernel (sequential==concurrent proof) (#477) 2026-05-29 13:22:44 -07:00
canonical.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
checksum.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
compiler.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
frames.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
lexer.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
operators.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
parser.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
resample.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
trace.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00
types.py feat(adr-0181-p2): deterministic audio compiler substrate (sensorium/audio) (#466) 2026-05-29 10:50:28 -07:00