Skip to content

fix(sessions): keep gateway responsive while large transcript archives are built - #112424

Merged
jalehman merged 10 commits into
openclaw:mainfrom
HermanZeng:codex/fix-sqlite-archive-off-main
Aug 4, 2026
Merged

jalehman merged 10 commits into
openclaw:mainfrom
HermanZeng:codex/fix-sqlite-archive-off-main

Conversation

@HermanZeng

@HermanZeng HermanZeng commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Related: #112423

AI-assisted: Codex was used for implementation, testing, and review. The design boundaries and validation evidence are documented below for review.

What Problem This Solves

Fixes an issue where users cleaning up, resetting, deleting, or evicting a SQLite-backed session with a large transcript could temporarily stall the Gateway event loop while the transcript archive was built and published.

Why This Change Was Made

This is the first bounded phase of #112423. It moves lifecycle transcript-archive materialization to a dedicated Worker while preserving the existing archive format and the parent process's authoritative archive-before-delete fence.

Design Boundaries

The Worker opens the exact physical agent database read-only, validates the planned snapshot inside one consistent SQLite read transaction, reads transcript events in sequence order, and uses the existing compression and durable publication path. Lifecycle mutation now has three phases: plan while holding the per-store writer lane, materialize and publish after releasing that lane, then reacquire the lane for final validation and deletion. The final write transaction rereads authoritative references and snapshot state before deleting lifecycle rows. No transcript or lifecycle rows covered by the plan are reclaimed without a verified archive; existing best-effort and captured-cleanup caller behavior is unchanged.

A process-local keyed FIFO permits one lifecycle archive Worker at a time. This avoids multiplying whole-buffer pressure across multiple Worker heaps while allowing unrelated Gateway work to continue. Failed jobs release the queue for later work. This queue covers lifecycle archive materialization through this path; existing manual compaction paths are unchanged.

Automatic lifecycle maintenance for an in-process incognito database now skips transcript archive creation at the canonical planner. Maintenance can still prune the in-memory rows, but it neither sends an unreachable in-memory database to a Worker nor publishes private transcript content to disk.

For source-tree tests and development on supported Node 22 versions, the TypeScript Worker registers the supported tsx ESM API so source .js specifiers resolve to .ts. The built JavaScript Worker does not use this preload and has no runtime dependency on tsx.

User Impact

Large lifecycle archives no longer monopolize the Gateway event loop or hold the per-store writer lane while their transcript is read, serialized, compressed, and durably published. Same-store writes can complete while archive materialization is pending. For durable sessions, existing archive naming, compression compatibility, retention behavior, schema, configuration, shared-database ownership, and final deletion semantics remain unchanged.

This phase deliberately does not stream one archive generation or make final SQLite/FTS row reclamation asynchronous. One generation is still whole-buffered inside the Worker, queued lifecycle archives wait their turn, and final reclamation can still cause a shorter tail stall. Streaming extraction and chunked reclamation remain separate follow-up work under #112423.

Evidence

  • Prepared and pushed head 3018a1de2c3f5793a76eaeded9570b25dc0d4d07, based on 532580fa2b1b13f2ff270cccbb170e543fa49237. GitHub reports the PR mergeable, and fresh exact-head CI is running.
  • Blacksmith Testbox run 30928220888 ran all 316 Vitest shards with two-project concurrency; 314 passed. A serial focused rerun passed the extensions shard with 382 files and 4,948 tests. The remaining three plugin install-persistence failures reproduce on current main, where path is undefined at src/plugins/install-persistence.ts:543; this PR does not change the failing source or tests.
  • Exact-head scoped proof passed git diff --check, all 11 cleanup-race tests, and both built CLI E2E tests. Blacksmith Testbox run 30947263450 also passed the production build and all 80 TUI PTY tests on the rebased head; the built CLI run completed in 92.76 seconds and the TUI suite in 727.50 seconds.
  • The built-Gateway 64 MiB same-store writer proof demonstrates that sessions.patch completes in under 500 ms while sessions.delete remains pending on archive materialization. It then verifies archive integrity and successful deletion. This covers the writer-lane progress gap identified by ClawSweeper.
  • Focused lifecycle coverage includes archive-before-delete durability, planning/materialization/deletion races, empty-transcript first append, session-window/rewrite/transcript/trajectory/ACP snapshot changes, shared physical-database ownership, publication failures, duplicate reuse, queue recovery, automatic incognito maintenance without disk publication, and concurrent same-store writer progress.
  • Packaging and compatibility coverage registers the Worker sidecar in the production build, release-package checks, Knip configuration, changed-scope routing, and Windows CI. There are no dependency, lockfile, or shrinkwrap changes; package.json only adds the Worker test to the existing Windows CI command.
  • Fresh hosted exact-head CI must pass before merge.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XL labels Jul 21, 2026
@HermanZeng
HermanZeng force-pushed the codex/fix-sqlite-archive-off-main branch from 8d8382c to 2a84e32 Compare July 22, 2026 17:15
@HermanZeng HermanZeng changed the title fix(sessions): prevent large transcript cleanup from blocking the gateway fix(sessions): keep gateway responsive while large transcript archives are built Jul 22, 2026
@HermanZeng
HermanZeng force-pushed the codex/fix-sqlite-archive-off-main branch from 2a84e32 to caf995a Compare July 22, 2026 17:34
@HermanZeng
HermanZeng force-pushed the codex/fix-sqlite-archive-off-main branch from caf995a to 822b649 Compare July 22, 2026 19:50
@HermanZeng
HermanZeng marked this pull request as ready for review July 22, 2026 19:52
@HermanZeng
HermanZeng requested a review from a team as a code owner July 22, 2026 19:52
@HermanZeng
HermanZeng force-pushed the codex/fix-sqlite-archive-off-main branch from f6e8f7c to 74566a7 Compare July 25, 2026 07:12
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 25, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 4, 2026, 5:18 PM ET / 21:18 UTC.

ClawSweeper review

What this changes

Moves SQLite lifecycle transcript archive materialization into a queued Worker, adds snapshot fencing, and extends packaging and Gateway responsiveness coverage.

Merge readiness

⛔ Blocked by patch quality or review findings - 6 items remain

Keep this PR open: its direct session-delete path now releases the writer lane, but automatic cleanup, projection, purge, eviction, and historical deletion still await archive Worker work while holding it, so same-store writes can remain blocked.

Priority: P1
Reviewed head: 3018a1de2c3f5793a76eaeded9570b25dc0d4d07

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The direct-delete proof is strong, but a P1 owner-boundary gap leaves the stated responsiveness repair incomplete.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies an exact-head built-Gateway 64 MiB direct-delete run with concurrent writer progress, archive integrity, and successful deletion; it is strong proof for that path, though not for the remaining owners.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies an exact-head built-Gateway 64 MiB direct-delete run with concurrent writer progress, archive integrity, and successful deletion; it is strong proof for that path, though not for the remaining owners.
Evidence reviewed 7 items Current main still has the reported stall shape: Current main materializes archive content synchronously inside the lifecycle owner while it holds the per-store writer lane; the PR’s Worker approach therefore remains necessary and is not implemented on main.
Writer queue contract: The per-store queue awaits the complete callback, so an await inside that callback prevents same-store writes from progressing until archive materialization completes.
Remaining lifecycle-owner gap: The automatic cleanup owner awaits Worker materialization within its writer-lane callback; projection, deleted-agent purge, disk-budget eviction, and historical-generation deletion retain the same shape.
Findings 1 actionable finding [P1] Release the writer lane before every archive build
Security None None.

How this fits together

Gateway session lifecycle operations must durably archive a SQLite transcript before deleting its state. They receive cleanup, deletion, projection, and eviction requests and then update session rows and archive files.

flowchart LR
A[Gateway lifecycle request] --> B[Session cleanup planner]
B --> C[Per-store writer lane]
C --> D[Archive worker queue]
D --> E[Durable transcript archive]
E --> F[Final state validation]
F --> G[Session row deletion]
Loading

Before merge

  • Release the writer lane before every archive build (P1) - runExclusiveSqliteSessionWrite retains the store FIFO until this callback resolves, so awaiting Worker materialization here still queues same-store writes for archive extraction, compression, publication, and readback. The direct-delete path now uses a three-phase flow, but cleanup here plus lifecycle projection, purge, eviction, and historical-generation deletion do not; apply that flow to every owner and add writer-progress coverage for them.
  • Resolve merge risk (P1) - Automatic cleanup, lifecycle projection, deleted-agent purge, disk-budget eviction, and direct deletion of historical generations still serialize same-store writes behind full archive extraction, compression, publication, and readback.
  • Resolve merge risk (P1) - The current built-Gateway proof covers direct deletion only; landing without equivalent progress checks for the remaining owners leaves the central responsiveness claim incomplete.
  • Complete next step (P2) - A mechanical, source-proven repair remains: extend the already-correct three-phase direct-delete pattern across the remaining archive owners.
  • Improve patch quality - Apply the three-phase archive flow to cleanup, projection, purge, eviction, and historical deletion.
  • Improve patch quality - Add same-store writer-progress tests for each repaired lifecycle owner.

Findings

  • [P1] Release the writer lane before every archive build — src/config/sessions/session-accessor.sqlite-lifecycle.ts:139-141
Agent review details

Security

None.

PR surface

Source +422, Tests +1268, Config 0, Other +5. Total +1695 across 26 files.

View PR surface stats
Area Files Added Removed Net
Source 11 550 128 +422
Tests 10 1286 18 +1268
Docs 0 0 0 0
Config 1 1 1 0
Generated 0 0 0 0
Other 4 7 2 +5
Total 26 1844 149 +1695

Review metrics

Metric Value Why it matters
Production vs test LOC production +558/-131, tests +1286/-18 The production growth is justified by the new off-main archive ownership boundary, but its remaining one-sided lifecycle coverage is the merge blocker.

Stored data model

Persistent data-model change detected: persistent cache schema: scripts/ci-changed-scope.mjs, serialized state: src/config/sessions/incognito-session-transcript.test.ts, serialized state: src/config/sessions/session-accessor.sqlite-archive.ts, serialized state: src/config/sessions/session-accessor.sqlite-archive.worker.test.ts, serialized state: src/config/sessions/session-accessor.sqlite-archive.worker.ts, serialized state: src/config/sessions/session-accessor.sqlite-cleanup-race.test.ts, and 18 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #112423
Summary: This PR is a candidate first-phase repair for the SQLite transcript archive responsiveness bug tracked in the canonical issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Finish the owner-boundary refactor (recommended)
    Move all remaining archive owners to plan, release, materialize, reacquire, and revalidate, with writer-progress regression coverage for each affected path.
  2. Pause the partial responsiveness phase
    Do not merge if the remaining owner paths cannot be made consistent without a broader lifecycle redesign.

Technical review

Best possible solution:

Make every archive-capable lifecycle owner use one three-phase flow: plan under the writer lane, archive after release, then reacquire and revalidate before deletion.

Do we have a high-confidence way to reproduce the issue?

Yes—source establishes that the queue awaits its callback and several archive owners await Worker materialization inside it; the provided built-Gateway proof independently demonstrates the direct-delete version of this contention.

Is this the best way to solve the issue?

No—the Worker is the right execution boundary, but applying the three-phase flow only to direct deletion and entry patches leaves equivalent lifecycle owners with the original same-store blocking behavior.

Full review comments:

  • [P1] Release the writer lane before every archive build — src/config/sessions/session-accessor.sqlite-lifecycle.ts:139-141
    runExclusiveSqliteSessionWrite retains the store FIFO until this callback resolves, so awaiting Worker materialization here still queues same-store writes for archive extraction, compression, publication, and readback. The direct-delete path now uses a three-phase flow, but cleanup here plus lifecycle projection, purge, eviction, and historical-generation deletion do not; apply that flow to every owner and add writer-progress coverage for them.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8fc44585931d.

Labels

Label justifications:

  • P1: Large SQLite transcript lifecycle work can still block same-store Gateway writes on several production paths.
  • merge-risk: 🚨 session-state: The PR changes archive-before-delete ordering and snapshot validation across persisted session state.
  • merge-risk: 🚨 availability: Several archive owners still hold the per-store writer lane while waiting for long-running Worker work.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body supplies an exact-head built-Gateway 64 MiB direct-delete run with concurrent writer progress, archive integrity, and successful deletion; it is strong proof for that path, though not for the remaining owners.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies an exact-head built-Gateway 64 MiB direct-delete run with concurrent writer progress, archive integrity, and successful deletion; it is strong proof for that path, though not for the remaining owners.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs src/config/sessions/session-accessor.sqlite-cleanup-race.test.ts src/config/sessions/session-accessor.sqlite-archive.worker.test.ts.
  • [P1] node scripts/run-vitest.mjs --config test/vitest/vitest.e2e.config.ts test/scripts/sqlite-sessions-transcripts-flip-proof.built-cli.e2e.test.ts.
  • [P1] Run the repository’s changed-scope checks and built-Gateway responsiveness proof on the exact repaired head.

What I checked:

Likely related people:

  • steipete: Authored the current accessor-owner split, SQLite restructuring, and transcript-runtime refactor that own the affected lifecycle paths. (role: recent session-lifecycle contributor; confidence: high; commits: 0b9e3e19fa61, c5a2220d3771, 4273ca9dbd9b; files: src/config/sessions/session-accessor.sqlite-lifecycle.ts, src/config/sessions/session-accessor.sqlite-projection.ts, src/config/sessions/session-history-eviction.ts)
  • jalehman: Authored the merged archive durability repair and the current exact-head writer-lane change. (role: archive durability and current-head contributor; confidence: high; commits: 867a2296eb2c, 3018a1de2c3f; files: src/config/sessions/session-accessor.sqlite-archive.ts, src/config/sessions/session-accessor.sqlite-entry.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-30T17:00:55.719Z sha c3f71c167a5c6286ec438ecae1e7f6e0ded09139 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T17:25:54.321Z sha df980e953a570edd0a1ed4719a64399153e2e4b0 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T18:00:42.798Z sha df980e953a570edd0a1ed4719a64399153e2e4b0 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-30T18:07:22.384Z sha df980e953a570edd0a1ed4719a64399153e2e4b0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-02T15:17:23.952Z sha df980e953a570edd0a1ed4719a64399153e2e4b0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-03T23:07:13.648Z sha 31ba3b2d2775f1b8525e2b5b1d195a8ec8dfab87 :: needs real behavior proof before merge. :: [P1] Release the session writer queue before awaiting archive work
  • reviewed 2026-08-04T03:19:52.999Z sha 31ba3b2d2775f1b8525e2b5b1d195a8ec8dfab87 :: needs changes before merge. :: [P1] Release the session writer queue before awaiting archive work
  • reviewed 2026-08-04T18:06:35.793Z sha fa813e70bbd033d50cd36841e1855570f22d1dd7 :: needs changes before merge. :: [P1] Release the writer lane before cleanup archive work

@HermanZeng
HermanZeng force-pushed the codex/fix-sqlite-archive-off-main branch 3 times, most recently from c3f71c1 to df980e9 Compare July 30, 2026 17:20
@HermanZeng
HermanZeng marked this pull request as draft July 30, 2026 17:48
@HermanZeng
HermanZeng marked this pull request as ready for review July 30, 2026 17:48
@HermanZeng
HermanZeng marked this pull request as draft July 30, 2026 17:50
@HermanZeng
HermanZeng marked this pull request as ready for review July 30, 2026 17:50
@HermanZeng

HermanZeng commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Small CI/landing note for exact head df980e953a570edd0a1ed4719a64399153e2e4b0:

  • At workflow completion, this exact head had 89 successful checks. In CI run 30565540160, the only primary job that did not succeed was check-lint; its sole annotation is “The operation was canceled,” with no lint diagnostic. The dependent ci-gate therefore also failed.
  • I do not have permission to rerun upstream Actions. When convenient, would someone with Actions access be willing to use Re-run failed jobs on that existing exact-head run?
  • After the one-time conflict-limited rebase and range-diff review, main advanced again in fix(ci): run exec allowlist Windows coverage #116492 and touched the same high-churn Windows CI registry lines (package.json and scripts/ci-changed-scope.mjs). To avoid repeatedly rebasing against moving main, I will keep this reviewed head unchanged unless a maintainer asks for a one-time conflict resolution while preparing to land it. The current conflict is mechanical: retain upstream's new exec-allowlist-pattern Windows entries alongside this PR's archive-worker entries.

No urgency—thank you for taking a look when bandwidth allows.

@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jalehman jalehman self-assigned this Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 4, 2026
@jalehman
jalehman force-pushed the codex/fix-sqlite-archive-off-main branch 2 times, most recently from fa813e7 to 144f917 Compare August 4, 2026 20:38
@jalehman
jalehman force-pushed the codex/fix-sqlite-archive-off-main branch from 144f917 to 3018a1d Compare August 4, 2026 20:38
@jalehman
jalehman merged commit 9bfe292 into openclaw:main Aug 4, 2026
199 of 202 checks passed
@jalehman

jalehman commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
Punchcard-Session: crisp-lantern-orchard-nv

* origin/main:
  perf(memory): defer session backfill runtime (#119372)
  fix(ci): isolate built TUI PTY fixture (#119339)
  fix(commands): restore tool inventory for dynamic models (#119306)
  fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257)
  docs: add ChromeOS (Crostini) platform install guide (#107663)
  test(msteams): serve JWKS from in-process server in auth coverage (#119354)
  fix(qa): enable OpenAI for stored audio scenario (#119349)
  test(agents): realpath apply-patch temp dir fixture (#119353)
  test(slack): drop redundant .js-suffixed system-event mock (#119352)
  fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
  fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
  fix(tui): restore provider auth in installed local mode (#119283)
vincentkoc added a commit that referenced this pull request Aug 5, 2026
…time

* origin/main: (75 commits)
  fix(commands): restore tool inventory for dynamic models (#119306)
  fix(media): release rejected BytePlus and Runway video downloads under debug capture (#119257)
  docs: add ChromeOS (Crostini) platform install guide (#107663)
  test(msteams): serve JWKS from in-process server in auth coverage (#119354)
  fix(qa): enable OpenAI for stored audio scenario (#119349)
  test(agents): realpath apply-patch temp dir fixture (#119353)
  test(slack): drop redundant .js-suffixed system-event mock (#119352)
  fix(exec): leave safe builtins unrewritten in enforced mode (#119351)
  fix(sessions): keep gateway responsive while large transcript archives are built (#112424)
  fix(tui): restore provider auth in installed local mode (#119283)
  fix(release): accept legacy empty core artifacts (#119337)
  fix(qa): carry selected runtime into flow scenarios (#119324)
  fix(ci): retry interrupted Windows dashboard release checks (#119095)
  fix(release): filter validation ancestry fetch (#119334)
  fix(release): accept trusted extended-stable validation evidence (#119264)
  fix(sessions): preserve recorder-owned user turns (#119307)
  perf(cli): split plugin registry startup timing (#119318)
  fix(qa): align release scenario setup and compaction proof (#119188)
  fix(ci): avoid duplicate Matrix release QA runs (#119171)
  perf(agents): reuse provider policy manifest registry (#119305)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
…s are built (openclaw#112424)

* fix(sessions): keep gateway responsive during transcript archiving

* test(sessions): strengthen archive worker coverage

* fix(sessions): bound archive worker concurrency

* test(sessions): normalize rollback paths on Windows

* fix(sessions): load source archive worker on node 22

* fix(sessions): align archive fencing with session windows

* test(sessions): adapt cleanup race to archive worker

* fix(sessions): harden archive worker lifecycle

* style(sessions): format archive lifecycle tests

* fix(sessions): release writer lane during archive work

---------

Co-authored-by: Josh Lehman <[email protected]>
Kimiyu-186 added a commit that referenced this pull request Aug 25, 2026
…ion generations (#128980)

* fix(sessions): keep gateway responsive while large transcript archives are built (#112424)

* fix(sessions): keep gateway responsive during transcript archiving

* test(sessions): strengthen archive worker coverage

* fix(sessions): bound archive worker concurrency

* test(sessions): normalize rollback paths on Windows

* fix(sessions): load source archive worker on node 22

* fix(sessions): align archive fencing with session windows

* test(sessions): adapt cleanup race to archive worker

* fix(sessions): harden archive worker lifecycle

* style(sessions): format archive lifecycle tests

* fix(sessions): release writer lane during archive work

---------

Co-authored-by: Josh Lehman <[email protected]>
(cherry picked from commit 9bfe292)

* fix(sessions): release writer lane during transcript archival (#119460)

(cherry picked from commit 141a16f)

* fix(gateway): fence background titles during session archival

Backport the session-title admission fix from upstream commit 530b33e (#123608) without its unrelated gateway changes. Keep asynchronous disk-budget scans out of the transcript stat regression fixture.

* test(ui): settle custodian mobile layout assertions (#116613)

(cherry picked from commit 871abad)

---------

Co-authored-by: Heming Zeng <[email protected]>
Co-authored-by: Josh Lehman <[email protected]>
Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants