…poch
Master regression from alvinunreal#1369 (which fixed alvinunreal#1368): checkpoint snapshot ids
now carry a per-instance random epoch so ids differ across restarts. The
determinism property test compares two fresh-pipeline renders byte-for-
byte and treats the id envelope as payload, so the deliberate epoch reads
as nondeterminism and the test fails on master (the two Bun checks never
ran on alvinunreal#1369 before merge, so the regression slipped in).
Two-part fix, both test-side:
1. Normalize the epoch segment before comparison — field-delimited: only
the "id" and "snapshotID" fields of board messages are touched, and
only the exact 8-hex epoch segment followed by the sequence. Every
other byte, including all board text, stays pinned; a future random
segment anywhere else still fails this test.
2. Add randomBytes(...) to the cache-safety tripwire VOLATILE_PATTERNS
with a reviewed allowlist entry for board-injection.ts — the exact
blind spot alvinunreal#1369 slipped through. Board text stays deterministic; the
epoch is restart-scoped identity metadata that never reaches provider
bytes (snapshotID is dropped by the host converter, pinned by
board-injection-cache-safety.test.ts).
Coexists with alvinunreal#1369's own test (restart => different ids): different
lifecycles, different files, no overlap.
Fixes #1368.
Checkpoint board snapshot ids were built from the session id and
nextSnapshotSequence, which lives only in memory and restarts at 0 in every process. After an OpenCode restart the same id then named different board text than before, so plugins that key persisted state by id sent stale text and missed the prompt cache. Each snapshot state now carries a random per-instance epoch that is part of the id.Ran the task-session-manager tests on the committed HEAD: 3 failed before the change, all 190 pass after. Lint and typecheck were not run.