Bridge packed event collection through save import

This commit is contained in:
Jan Petykiewicz 2026-04-14 20:01:43 -07:00
commit 83f55fa26e
13 changed files with 653 additions and 35 deletions

View file

@ -66,15 +66,15 @@ Current local tool status:
The atlas milestone is broad enough that the next implementation focus has already shifted downward
into runtime rehosting. The current runtime baseline now includes deterministic stepping, periodic
trigger dispatch, normalized runtime effects, fixture execution, state-diff tooling, and initial
persistence surfaces.
trigger dispatch, normalized runtime effects, staged event-record mutation, fixture execution,
state-diff tooling, and initial persistence surfaces.
The highest-value next passes are now:
- preserve the atlas and function map as the source of subsystem boundaries while continuing to
avoid shell-first implementation bets
- broaden the normalized event-service layer through staged event-record mutation and follow-on
record behavior
- deepen the `.smp` event bridge from collection-level structural summaries toward per-record
packed-body coverage
- deepen captured-runtime and round-trip fixture coverage on top of the existing runtime CLI and
fixture surfaces
- use `rrt-hook` primarily as optional capture or integration tooling, not as the first execution

View file

@ -18,14 +18,15 @@ Implemented today:
- `rrt-runtime` exists with a deterministic calendar model, step commands, runtime summaries, and
normalized runtime state validation
- periodic trigger dispatch exists, including ordered periodic maintenance, dirty rerun `0x0a`, and
a first normalized runtime-effect surface
a normalized runtime-effect surface with staged event-record mutation
- snapshots, state dumps, save-slice projection, and normalized state diffing already exist in the
CLI and fixture layers
- checked-in runtime fixtures already cover deterministic stepping, periodic service, direct trigger
service, snapshot-backed inputs, and normalized state-fragment assertions
That means the next implementation work is breadth, not bootstrap. The recommended next slice is
normalized event-service breadth through staged event-record mutation and follow-on records.
the `.smp` event-collection structural bridge across inspection, save-slice loading, import, and
snapshot-backed fixtures.
## Why This Boundary
@ -189,8 +190,10 @@ Current status:
- periodic trigger ordering is implemented
- normalized trigger-side effects already exist for world flags, company cash/debt, candidate
availability, and special conditions
- one-shot handling and dirty reruns are already covered by synthetic fixtures
- the missing breadth is event-graph mutation and richer trigger-family behavior
- one-shot handling, dirty reruns, and staged append/activate/deactivate/remove behavior are
already covered by synthetic fixtures
- the remaining breadth is richer trigger-family behavior and target resolution, not first-pass
event-graph mutation
### Milestone 3: Persistence Boundary (partially complete)
@ -212,8 +215,10 @@ Current status:
- runtime snapshots and state dumps are implemented
- `.smp` save inspection and partial save-slice projection already feed normalized runtime state
- the remaining gap is broader captured-runtime and round-trip fixture depth, not the first
persistence surface
- the packed event-collection summary now survives into loaded save slices and projected runtime
snapshots, but per-record packed bodies are still deferred
- the remaining gap is broader captured-runtime and round-trip fixture depth plus deeper `.smp`
event-body decoding, not the first persistence surface
### Milestone 4: Domain Expansion
@ -313,6 +318,7 @@ Keep:
- cash, debt, and game-speed-related runtime fields when semantically relevant
- collection contents and semantic counts
- trigger-side effects
- packed event-collection structural summaries when present
## Risks
@ -340,47 +346,47 @@ The currently implemented normalized runtime surface is:
- `runtime validate-fixture`, `runtime summarize-fixture`, `runtime export-fixture-state`,
`runtime summarize-state`, `runtime import-state`, and `runtime diff-state`
- deterministic stepping, periodic trigger dispatch, one-shot event handling, dirty reruns, and a
first normalized runtime-effect vocabulary
- save-side inspection and partial state projection for `.smp` inputs
normalized runtime-effect vocabulary with staged event-record mutation
- save-side inspection and partial state projection for `.smp` inputs, including the structural
packed event-collection summary
Checked-in fixture families already include:
- deterministic minimal-world stepping
- periodic boundary service
- direct trigger-service mutation
- staged event-record lifecycle coverage
- snapshot-backed fixture execution
## Next Slice
The recommended next implementation slice is normalized event-service breadth through staged
event-record mutation.
The recommended next implementation slice is deeper `.smp` event persistence, starting from the
structural bridge that already exists today.
Target behavior:
- allow one serviced record to append a follow-on runtime record
- allow one serviced record to activate, deactivate, or remove another runtime record
- stage those graph mutations during the pass and commit them only after the pass finishes
- commit staged mutations in exact emission order
- allow newly appended `0x0a` records to run in the dirty rerun after commit, but never in the
original pass snapshot
- keep carrying the packed event collection across `inspect-smp`, `load-save-slice`,
`import-save-state`, snapshots, diffs, and fixtures
- deepen that bridge from collection structure into per-record packed-body summaries
- preserve the separation between parity-shaped packed state and executable normalized runtime state
until the packed layout is better decoded
Public-model additions for that slice:
- `RuntimeEventRecordTemplate`
- `RuntimeEffect::AppendEventRecord`
- `RuntimeEffect::ActivateEventRecord`
- `RuntimeEffect::DeactivateEventRecord`
- `RuntimeEffect::RemoveEventRecord`
- packed per-record event summary types on the `.smp` side
- optional runtime-side parity summaries for imported packed event records
- no new executable `RuntimeEffect` variants by default in that slice
Fixture work for that slice:
- one synthetic fixture for append plus dirty rerun behavior
- one synthetic fixture for cross-pass activate/deactivate/remove semantics
- state-fragment assertions that lock final collection contents and per-record counters
- one or more snapshot-backed fixtures that prove imported packed event state survives normalize and
diff paths
- synthetic report/save-slice tests that lock the first per-record packed-body parse shape
- state-fragment assertions that lock imported collection ids, version, and record counts
Do not mix this slice with:
- territory-access or selected-profile parity
- placed-structure batch placement parity
- shell queue/modal behavior
- packed RT3 event-row import/export parity
- direct translation of packed RT3 event rows into executable normalized effects