Files
apes-sidebar/docs
NolanHo a106e1964e fix(sidechat): keep grouped records atomic and pin them with host-oracle tests (review round 4)
Round 4 (two fresh reviewers, pinned to both 657dcd5 and 196fa11)
could not falsify the core equivalence (2100 generated shapes, 113
trims all passing the real session invariant, Session.create, the real
durable-inbox projection, and node-by-node deriveEventMessage wire
comparison; every non-trim byte-identical to the legacy full copy) but
both votes converged on one root cause: host GROUPED records were
split by record-level dropping. A kept compaction group could lose its
summary to the dropped span and strand a successful compaction/end the
host's compaction invariant companion rejects; a command/done could
outlive its command/run the commands companion rejects — invisible to
all three existing self-checks. The inbox fix from the e2e (196fa11)
was verified: the positional durable-inbox projection is the layer the
host rejects at, and the walk-back plus inboxSplicesValid hold.

v5: bracketsValid mirrors the host's grouped-record rules (a successful
compaction/end requires its compaction/summary; a command/done requires
its prior command/run) so a split group falls back to the full copy;
command/done.sourceEventSeq remaps onto the rebased run;
expectedFirstKeptTurn is derived from the skeleton's actual turn/start
(out-of-turn heads no longer renumber against a phantom turn 1); and
inboxSplicesValid matches the host fold's strictness (known targets,
numeric start/removedCount, array inserts, string ids). The spec's
oracle now uses the host's own deriveEventMessage so a projection bug
cannot hide from the equivalence cases, and two new cases pin the
round-4 shapes (same-turn double compaction, command bracket split and
its both-kept control with a remapped sourceEventSeq).
2026-10-16 16:14:41 +08:00
..