Validation: Event Log, Checkpoints, Memory and Deterministic Replay
Окружение#
| Параметр | Фактическое значение |
|---|---|
| Дата проверки | 2026-07-25 |
| Commit | Concurrent uncommitted workspace; base HEAD observed as 68582c97cb6b51804532cbd021290f07f4f74fa5 |
| OS и hardware | macOS 26.4 (25E246), arm64 |
| Runtime | Node.js v24.14.0, built-in TypeScript stripping |
| Внешние сервисы | none |
| Входные данные | Shared contract fixtures, seed 20260725, owned short branch fixture and fixed 1,000-event runner |
Результаты по критериям#
| ID | Проверка | Ожидалось | Получено | Evidence | Результат |
|---|---|---|---|---|---|
| AC-01 | Append-only history and correction | Prior bytes unchanged; correction appends author/reason/reference | Stored clones resist mutation, duplicate append throws, original bytes/size unchanged. No correction event contract exists | Test 1, E-004, E-011 |
partial |
| AC-02 | Genesis replay | Complete live/replay equality and identical canonical hash | deepEqual succeeds and SHA-256 hashes match |
Test 2, E-007, E-009 |
pass |
| AC-03 | Verified checkpoint authority | Valid accepted; tampered sequence/hash/state rejected before replay | All three tampered cases fail verification and replayFromCheckpoint throws; valid replay equals live state |
Test 3, E-007, E-009 |
pass |
| AC-04 | Visibility after persistence/replay | Explicit actor allow-lists; zero unauthorized branch facts | Juno/Mara/Pax fact IDs match across live/full/checkpoint; Pax on separate branch cannot see galley branch fact | Test 4, E-009 |
pass |
| AC-05 | 1,000-event long gate | Same hashes, checkpoint evidence, privacy, branch chronology, primary references and measured duration | 1,000/hash/checkpoint/privacy/duration pass; branch chronology and primary-event references are not modeled by this fixture | Test 5, E-008–E-011 |
partial |
Команды проверки#
node --test RnD/technical/2026-07-25-event-log-memory-replay/prototype/event-log.verification.test.ts
npm run typecheck
Fresh isolated scoped result:
tests 5
pass 5
fail 0
todo 0
Fresh root TypeScript result: exit 0.
1,000-event report#
Isolated AC-05 diagnostic:
{
"eventCount": 1000,
"finalStateVersion": 1000,
"finalStateHash": "bff5dbc7db58b470a29b17d68ae6ac61ad89571087bf42e22f1e898b245a5a1e",
"fullReplayStateHash": "bff5dbc7db58b470a29b17d68ae6ac61ad89571087bf42e22f1e898b245a5a1e",
"checkpointReplayStateHash": "bff5dbc7db58b470a29b17d68ae6ac61ad89571087bf42e22f1e898b245a5a1e",
"fullReplayDurationMs": 61.444584,
"checkpointReplayDurationMs": 60.315583,
"checkpoint": {
"sequence": 500,
"stateVersion": 500,
"stateHash": "12e0b00ce5ff0efecb18d49c5ed14ea262d6969c73fa5002381f573693fd9f3e",
"verified": true
},
"privateProjectionLeakage": false
}
Durations are one-machine observations, not acceptance thresholds.
Ошибки и нестабильность#
- An intermediate executable test proved that the old direct checkpoint helper could accept an unverified checkpoint. The shared entry point was changed so verification is mandatory; the adversarial test now passes.
- Replay durations vary between runs and are intentionally non-binding.
- No test flake or failure remained in the final scoped/root checks.
Воспроизводимость#
The 1,000-event fixture uses deterministic seed 20260725, alternating
check/end_turn commands and checkpoint sequence 500. The diagnostic emits
all final hashes and durations. The owned short fixture uses 12 events,
checkpoint 6 and an explicit Pax branch split for the visibility oracle.
Финальный исход#
- Outcome:
partial - Обоснование: deterministic replay, checkpoint enforcement and visibility pass, including the fixed 1,000-event hash proof. Correction-event semantics and the long fixture's branch-chronology/primary-reference requirements remain unimplemented.
- Что результат не доказывает: persistent durability, cross-runtime hashes, correction authorization, retrieval recall, production performance or long-campaign product quality.