Skip to content

Stream Lua hot reload session history to and from disk - #1617

Merged
Frotty merged 1 commit into
masterfrom
codex/hotreload-stream-session-history
Nov 6, 2026
Merged

Frotty merged 1 commit into
masterfrom
codex/hotreload-stream-session-history

Conversation

@Frotty

@Frotty Frotty commented Nov 6, 2026

Copy link
Copy Markdown
Member

Change

Stream the Lua hot reload session and pending-payload journal through the same UTF-8 Gson reader and writer as the baseline manifest. Session history can reach several megabytes as it retains the information needed for cumulative payloads. Existing filenames, JSON fields and publication order are preserved. The writer closes before the existing atomic rename.

Measurement

The archived Castle Fight specialization replay accepted commit 2b7e0acb with matching fresh Lua and manifest. Its session file is 5,649,253 bytes. On Windows with Java 27 and Gson 2.10.1, a single-thread allocation probe used the production state type and Gson configuration, with ten warm-ups and nine measured iterations. Median thread allocations:

Operation Previous Streamed
Read 18,845,264 B 13,253,848 B
Write and atomically publish 18,635,848 B 332,632 B
Total 37,481,112 B 13,586,480 B

The source, previous writer output and streamed writer output had identical SHA-256 hashes. The measurement covers session-state I/O, separate from compilation, payload generation and game delivery.

Validation

  • LuaHotReloadTests and LuaHotReloadFuzzTests passed offline on Windows with stock Lua, including the pending journal recovery tests.
  • git diff --check passed. Linux and macOS were not run locally.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T21:37:41.655408Z 5df0571 PR opened
ℹ️ 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.

@Frotty
Frotty merged commit 69606cc into master Nov 6, 2026
2 checks 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.

1 participant