fix(desktop): bound inflight journal persistence (#63047) - #82832
Closed
egilewski wants to merge 2 commits into
Closed
fix(desktop): bound inflight journal persistence (#63047)#82832egilewski wants to merge 2 commits into
egilewski wants to merge 2 commits into
Conversation
Collaborator
1 task
The desktop journal synchronously read, parsed, cloned, and rewrote one aggregate localStorage value while streamed turns were repainting. Large tool results and multi-session state could therefore block the renderer and leave the app unresponsive, while the existing macOS diagnostic path lacked a real native hide/restore regression check. Store bounded recovery projections under per-session keys, migrate legacy v1 data once, isolate quota and storage failures, and preserve the newest recoverable tail without allowing oversized writes to replace valid state. Add a real Electron/CDP macOS-arm64 A/B harness with native visibility control, renderer heartbeat and Settings/composer/transcript checks, plus focused regressions. Keep bulk tool payloads, diagnostics, and the existing recovery merge behavior out of the hot path. Fixes NousResearch#63047
egilewski
force-pushed
the
codex/fix-63047-minimal-journal
branch
from
August 10, 2026 13:49
12b7cd5 to
0664439
Compare
18 tasks
…earch#82832) The inflight journal regression test always spied on Storage.prototype, but Node 26's jsdom setup can provide a plain in-memory localStorage fallback. That left the test unable to observe the setItem call in CI even though the per-session journal write was correct. Select the native window.Storage prototype when available and otherwise spy on the active localStorage object, preserving the assertion across both storage implementations. Refs NousResearch#82832
|
Scope decision noted — for the record: this PR's branch was already tested on Windows 11 (dumps #6 and #7, freeze reproduced on head |
royalaid
pushed a commit
to royalaid/hermes-agent
that referenced
this pull request
Aug 14, 2026
Semantically replay the bounded inflight journal foundation from 0664439 and its NousResearch#82832 follow-up onto the newer journal architecture. Avoid deep-cloning live tool payloads before the bounded preview projection can stop traversal.
royalaid
pushed a commit
to royalaid/hermes-agent
that referenced
this pull request
Aug 14, 2026
Semantically replay the bounded inflight journal foundation from 0664439 and its NousResearch#82832 follow-up onto the newer journal architecture. Avoid deep-cloning live tool payloads before the bounded preview projection can stop traversal.
royalaid
pushed a commit
to royalaid/hermes-agent
that referenced
this pull request
Aug 14, 2026
Semantically replay the bounded inflight journal foundation from 0664439 and its NousResearch#82832 follow-up onto the newer journal architecture. Avoid deep-cloning live tool payloads before the bounded preview projection can stop traversal.
3 tasks
teknium1
pushed a commit
that referenced
this pull request
Aug 15, 2026
The inflight journal regression test always spied on Storage.prototype, but Node 26's jsdom setup can provide a plain in-memory localStorage fallback. That left the test unable to observe the setItem call in CI even though the per-session journal write was correct. Select the native window.Storage prototype when available and otherwise spy on the active localStorage object, preserving the assertion across both storage implementations. Refs #82832
teknium1
pushed a commit
that referenced
this pull request
Aug 15, 2026
The inflight journal regression test always spied on Storage.prototype, but Node 26's jsdom setup can provide a plain in-memory localStorage fallback. That left the test unable to observe the setItem call in CI even though the per-session journal write was correct. Select the native window.Storage prototype when available and otherwise spy on the active localStorage object, preserving the assertion across both storage implementations. Refs #82832
Contributor
|
Thank you for this fix! It was salvaged into #86590 (cherry-picked onto current main with your authorship preserved in the commit history) and is now merged. Closing this PR since the work has landed. |
atirna
pushed a commit
to atirna/hermes-agent
that referenced
this pull request
Aug 17, 2026
…earch#82832) The inflight journal regression test always spied on Storage.prototype, but Node 26's jsdom setup can provide a plain in-memory localStorage fallback. That left the test unable to observe the setItem call in CI even though the per-session journal write was correct. Select the native window.Storage prototype when available and otherwise spy on the active localStorage object, preserving the assertion across both storage implementations. Refs NousResearch#82832
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scope
This is the narrow journal hot-path fix for #63047. It deliberately excludes the broader diagnostics stack and does not include
.circleci/config.yml; the harness can be run locally on macOS arm64 using the command documented in the source package scripts.Validation
Local macOS arm64 run
npm ci npm run --prefix apps/desktop repro:short-session-hang:test npm run --prefix apps/desktop repro:short-session-hang -- \ --baseline 2446c8bb6755ff5e6feff4d26e425661edd4019b \ --candidate 12b7cd542bafc18903de39754d36e73f4700244e \ --repetitions 3 \ --output "$PWD/short-session-hang-artifacts"Fixes #63047
Related #80872