Title: feat(id): record world sessions to replayable fixtures by dezren39 · Pull Request #239 · developing-today/code · GitHub
Open Graph Title: feat(id): record world sessions to replayable fixtures by dezren39 · Pull Request #239 · developing-today/code
X Title: feat(id): record world sessions to replayable fixtures by dezren39 · Pull Request #239 · developing-today/code
Description: Summary Record a world's retained event history with a capability (id world record) into a JSON Lines fixture: a header with the module hash, completeness, and the host's published records, then one line per event. Replay a fixture offline against a module (id world replay --module … --fixture … --seed …). It prints a verdict first (records match, records differ, or records not compared) and exits nonzero only on a mismatch. Strict decode: exact key sets, version 1 only, contiguous sequences, no blank lines. Design record: doc/2026-10-17T09-00-00Z_feature_world_fixtures/. Stacked on #234. Behaviour A fixture holds only what the recording capability can already read through events_after and records. It carries no seed and no authority. Replay starts at the last ProgramInstalled event. A window that spans a reinstall is refused. A history trimmed by retention is recorded as incomplete and replayed only with --allow-partial, and then the records are reported as not compared. The --module supplied at replay is the code that runs. A fixture carries inputs and expected records, not code. Known limits (see the design record) Host events are not in the event stream. Presence, capability results and ticks reach the program but are not retained in events_after, so a fixture cannot contain them. Programs that consume them (for example territory) replay to Mismatch. The records check catches this; a fixture cannot repair it. Retention is 1024 events by default, so only shorter worlds produce complete fixtures. Replay uses default sandbox limits. A world that runs with a custom resource profile may trap on replay. Security findings (not changed here) Joiners can read the install seed. events_after and the snapshot serialize ProgramInstalled { seed } to any join capability, and DownloadModule gives joiners the module. A program whose hidden state derives from init(seed) would leak that state. Pre-existing. Decision needed: redact the seed in the client projection (replication would need a separate path), or document seeds as public. Join-only participants read chat. Recorded on the roles PR (#234) in its Known gap section. Validation cargo test --lib --no-default-features --features sandbox,world world_fixture: 15 passed. cargo test --lib --no-default-features --features sandbox,world test_cli_parse_world: 10 passed. cargo test --lib (default features): 1347 passed, 4 ignored (pre-existing). Iroh round trip: recording_over_iroh_replays_to_the_live_records records a live tic-tac-toe over WorldClient and replays it to Match. cargo fmt --check: clean. Clippy via the rustup 1.97.0 cargo exits 0; plain cargo clippy fails for a toolchain mismatch (E0514) that predates this change. Not verified: id world record against a running id serve process. Summary by CodeRabbit New Features Added commands to record a world’s retained history and records to a JSON Lines fixture, then replay it offline with a chosen seed. Replay checks the recorded module and compares results when the fixture is complete and includes expected records. Partial fixtures require an explicit option and are not compared. Documentation Added guidance on fixture recording and replay, including known limitations such as excluded host events and incomplete histories.
Open Graph Description: Summary Record a world's retained event history with a capability (id world record) into a JSON Lines fixture: a header with the module hash, completeness, and the host's published records...
X Description: Summary Record a world's retained event history with a capability (id world record) into a JSON Lines fixture: a header with the module hash, completeness, and the host's published...
Opengraph URL: https://github.com/developing-today/code/pull/239
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:78397968-e49c-14c4-b672-4dbbee3a83ed |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9D76:32E0F9:A0479E:CE593E:6B0633FA |
| html-safe-nonce | 86e465dc3eacd44b0a58d4ca1a43084a16b94e7543df367da09676805c71eb49 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDc2OjMyRTBGOTpBMDQ3OUU6Q0U1OTNFOjZCMDYzM0ZBIiwidmlzaXRvcl9pZCI6IjExMzM0OTI5MzgzNzExMTgwNzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f40e8aae05ba8b9c1e47ddc61597fa45c293e592abcaebb669f83ff4ec4d738d |
| hovercard-subject-tag | pull_request:4899733010 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/developing-today/code/pull/239/files |
| twitter:image | https://avatars.githubusercontent.com/u/11225574?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/11225574?s=400&v=4 |
| og:image:alt | Summary Record a world's retained event history with a capability (id world record) into a JSON Lines fixture: a header with the module hash, completeness, and the host's published records... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width