Skip to content

feat(bridge): add FetchSnapshot command and SnapshotRegistry (#996)#1085

Merged
dotandev merged 4 commits intodotandev:mainfrom
Taofik01:feat/fetch-snapshot-command
Apr 7, 2026
Merged

feat(bridge): add FetchSnapshot command and SnapshotRegistry (#996)#1085
dotandev merged 4 commits intodotandev:mainfrom
Taofik01:feat/fetch-snapshot-command

Conversation

@Taofik01
Copy link
Copy Markdown
Contributor

@Taofik01 Taofik01 commented Mar 28, 2026

Closes #996

What this PR does

Instead of sending all snapshots upfront, snapshots are now fetched lazily — only when the user clicks a specific step in the UI.

Changes

  • internal/bridge/client.go — added FETCH_SNAPSHOT opcode, FetchSnapshot() and FetchSnapshotBatch() functions
  • simulator/src/ipc/mod.rs — added SnapshotRegistry, CommandFrame, handle_stdin_command() handler, and FetchResponse frame type

How it works

  1. Go bridge writes a FETCH_SNAPSHOT command to the simulator's stdin
  2. Simulator looks up the requested snapshot(s) from its in-memory SnapshotRegistry
  3. Simulator writes a fetch_response NDJSON frame back to stdout
  4. Batch fetching supports up to 5 consecutive frames per request

Acceptance criteria met

  • Lazy loading of snapshots works in interactive mode
  • Initial simulation result size is reduced (no snapshots sent upfront)
  • Batch fetch supports next 5 frames

@dotandev
Copy link
Copy Markdown
Owner

fix ci.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@Taofik01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@dotandev dotandev merged commit 5f39727 into dotandev:main Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TIME-TRAVEL] [FEAT] Add 'FetchSnapshot' command to the Go bridge

2 participants