Skip to content

feat(runtime)!: separate core snapshots from host effect state - #2121

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/fileio-snapshot/support-snapshots-host-provided-file-i-o--cc2fc1b0
Oct 26, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/fileio-snapshot/support-snapshots-host-provided-file-i-o--cc2fc1b0

Conversation

@tignear

@tignear tignear commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Core checkpoints now save HDL execution state independently of effects. File I/O, VPI and component handler state stays with the embedding system; taking or restoring a core checkpoint does not ask those handlers to snapshot or restore themselves.

Add a replaceable Rust FileSystem boundary with the OS filesystem as its default. The host can separately capture descriptor mappings, EOF/lookahead and opaque backend state, prepare a replacement FileIo handler, and compose it with a core checkpoint. No filesystem storage strategy is imposed on Rust callers.

Persist timed core checkpoints in a versioned container, including heap values, live fork activations, lexical cells, event queues and edge baselines. Event IDs are rebound to the receiving instance instead of persisting code pointers. Loading is an unsafe trusted-artifact API with compatibility, layout and corruption checks.

Add passive StateFile capture to native instances and VPI sessions, including timed ReadOnly callbacks and celox_vpi_save_state. These diagnostic captures do not settle HDL or dispatch callbacks. Portable StateFile remains distinct from a host-composed system checkpoint.

Validation: checkpoint roundtrips on interpreter, native, tiered, Cranelift and WASM; fork-control and file-handler regressions; CLI consumer tests; formatting and clippy. The test coverage includes explicit host/core composition, capture with the default OS handler, failed handler preparation, descriptor reuse and separate-instance restoration.

BREAKING CHANGE: SimulatorOptions gains the file_system field. Update explicit options literals or use ..Default::default().

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-26T09:43:03.133272Z d966c72 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 26, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 26, 2026
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-26 08:26 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-26 08:29 UTC · at fc5c5cdaf754885de7526512622933d6f6ac7a62

This pull request spent 3 minutes 4 seconds in the queue, with no time running CI.

Reason

Pull request #2121 has been dequeued

Queue conditions are not satisfied:

  • -conflict

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 26, 2026
Core checkpoints now save HDL execution state independently of effects. File I/O, VPI and component handler state stays with the embedding system; taking or restoring a core checkpoint does not ask those handlers to snapshot or restore themselves.

Add a replaceable Rust FileSystem boundary with the OS filesystem as its default. The host can separately capture descriptor mappings, EOF/lookahead and opaque backend state, prepare a replacement FileIo handler, and compose it with a core checkpoint. No filesystem storage strategy is imposed on Rust callers.

Persist timed core checkpoints in a versioned container, including heap values, live fork activations, lexical cells, event queues and edge baselines. Event IDs are rebound to the receiving instance instead of persisting code pointers. Loading is an unsafe trusted-artifact API with compatibility, layout and corruption checks.

Add passive StateFile capture to native instances and VPI sessions, including timed ReadOnly callbacks and celox_vpi_save_state. These diagnostic captures do not settle HDL or dispatch callbacks. Portable StateFile remains distinct from a host-composed system checkpoint.

Validation: checkpoint roundtrips on interpreter, native, tiered, Cranelift and WASM; fork-control and file-handler regressions; CLI consumer tests; formatting and clippy. The test coverage includes explicit host/core composition, capture with the default OS handler, failed handler preparation, descriptor reuse and separate-instance restoration.

BREAKING CHANGE: SimulatorOptions gains the file_system field. Update explicit options literals or use ..Default::default().

Change-Id: Icc2fc1b000bf2d3742536b5ba735d6332ad109a1
@tignear tignear changed the title feat(runtime)!: support snapshots with host-provided file I/O feat(runtime)!: separate core snapshots from host effect state Oct 26, 2026
@tignear
tignear force-pushed the stack/tignear/feat/fileio-snapshot/support-snapshots-host-provided-file-i-o--cc2fc1b0 branch from fc5c5cd to d966c72 Compare October 26, 2026 09:42
@tignear

tignear commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial fc5c5cd 2026-10-26 09:41 UTC
2 content fc5c5cd → d966c72 Separate core checkpoint state from effect-handler state as requested, and add core checkpoint persistence for host-composed CLI checkpoints. 2026-10-26 09:41 UTC

@tignear

tignear commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(runtime)!: separate core snapshots from host effect state #2121 👈
2 feat(cli): checkpoint SystemVerilog runs on SIGUSR1 #2134

@mergify mergify Bot added queued Mergify queue entry and removed dequeued Mergify stopped this queue entry; investigate before retrying labels Oct 26, 2026
@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-26 10:20 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • ✅ Checks passed · on draft merge queue: checking #2121 on master (902622f) #2137
  • ✅ Merged — 2026-10-26 11:03 UTC · at 56709017db8a5a2bd262f761a4840b32be996236 · merge

This pull request spent 43 minutes 15 seconds in the queue, including 40 minutes 44 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

@mergify mergify Bot mentioned this pull request Oct 26, 2026
40 of 71 tasks
@mergify
mergify Bot merged commit 5670901 into master Oct 26, 2026
26 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/fileio-snapshot/support-snapshots-host-provided-file-i-o--cc2fc1b0 branch October 26, 2026 11:03
@mergify mergify Bot removed the queued Mergify queue entry label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant