Repository navigation
🤖 refactor: route the compaction journal and pending state through SessionFiles - #7314
Merged
ThomasK33 merged 2 commits intoOct 23, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
🟢 e2e stories (Haiku): 14 passed27 agent steps · 7 replayed from cache · 31 model calls · 218.3k tokens (74% cached) All 14 tests in 9 files
e2e 0.20.0 · 2m 57s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.1k tokens (32% cached) All 3 tests in 3 files
e2e 0.20.0 · 20.0s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.3s · 2 targets (web, phone) · run artifacts |
github-merge-queue
Bot
removed this pull request from the merge queue because a pull request earlier in the stack was removed
Oct 23, 2026
…ionFiles Phase 2 PR 9. publishCompactionFile takes a SessionFiles (default nodeSessionFiles), ContinuousCompactionJournalStore gets HistoryService's files, and CompactionPendingState takes the history's files from its two production callers. Cancellation storage passes nodeSessionFiles until it moves. The journal now reaches node:fs/promises instead of the CommonJS fs.promises object, so the twelve test spies that watched the staged cleanup and the generation read move to the namespace, each with a call assertion. Three host-import allow pairs are gone. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
ThomasK33
force-pushed
the
phase2/journal-pending-on-files
branch
from
October 23, 2026 08:59
6f6c610 to
7da08ec
Compare
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
The continuous-compaction journal,
CompactionPendingStateandpublishCompactionFilemake their file calls through the history'sSessionFiles. No behaviour changes.Background
Phase 2 of the agent-loop host-ports refactor puts HistoryService's
node:fscalls behind an Effect service,SessionFiles, with a Node layer for the app and a memfs layer for tests. The change is behaviour-neutral: session files keep their bytes and format, downgrade keeps working, and nothing user-visible changes. This PR is one layer of a GitHub-native stack; each layer keeps the full suite green.Implementation
publishCompactionFile(filePath, contents, isCurrent, files = nodeSessionFiles, …): the staged write,renameSync,fsyncParentDirectoryand the cleanuprmusefiles.filescomes 4th so existing 3-argument calls keep working.ContinuousCompactionJournalStoreandCompactionPendingStatetake the history's files; the production callers (compactionHandler.ts,workspaceService.ts) passhistoryService.files. Cancellation storage passesnodeSessionFilesuntil the next layer moves it.fs.promisesobject, which Bun keeps apart from thenode:fs/promisesnamespace. So the test spies on the staged cleanup and the generation read move to the namespace: 12 in the compaction tests, plus 5 instreamManager.continuousCompaction.test.tsandagentSession.turnCompletion.test.ts. Each moved spy gains a call assertion, so a spy that stops firing fails its test.Validation
make static-check,make test, the loop-test tripwire.src/node/services/sessionLocks/backendKill.test.ts("a SIGKILL in a turn recovers as today") can fail on a race that 🤖 tests: let the kill test wait until the new backend releases its turn #7320 fixes. A failed job gets one rerun.Risks
Low: the publication protocol and its order are unchanged; only the fs object differs.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$30.26