Skip to content

fix: keep cold sessions visible and verify release recovery - #145462

Merged
steipete merged 10 commits into
mainfrom
codex/cold-storage-release-proof
Sep 12, 2026
Merged

steipete merged 10 commits into
mainfrom
codex/cold-storage-release-proof

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

With transcript cold storage enabled, an uncached archived session could fail the Activity list and startup prewarm when they requested derived titles or last-message previews. Cached titles masked the failure until restart. Full release verification also lacked permanent installed-package coverage of archival, recovery, and live model recall from cold history.

Related: #145172.

Why This Change Was Made

Handle cold transcripts in the shared optional title reader. Keep session metadata visible without restoring payloads, and use the existing unavailable-title cache fence so omitted previews refresh after history restoration. Actual history requests and missing-file errors retain their existing behavior.

Extend the existing session-runtime-context Docker gate with three dated synthetic histories imported through Doctor. Exercise automatic 30-day archival, a live change to seven days, missing-file errors without losing recovery references, exact event restoration, disabled-policy restart, Activity listing without rehydration, and portable SQLite backup recovery after removing the original state.

Extend the existing openai-chat-tools gate with one live OpenAI recall turn whose answer exists only in archived history. Verify the response, restored original event bytes, provider/model, and token usage while preserving the existing HTTP tool-call case. Both lanes already run in full release validation; document their coverage. The shared frozen-target preflight omits only unsupported cold subcases for explicitly authorized older packages, while preserving their original checks and requiring cold coverage for current targets.

User Impact

Cold sessions remain available in Activity without refilling the database merely to render the list. Cached title fields remain usable; otherwise session metadata supplies the title and last-message previews return after history is restored. No schema bump or configuration change is required.

Release verification gains bounded automatic archival and recovery checks plus one additional real-provider call. Large database stress remains a separate campaign.

Evidence

  • Real-worker regression failed with SessionTranscriptColdError before the fix; 72 title-reader, session-list/prewarm, and list-cache tests pass after it.
  • Release planner: 110 tests passed; executable plans include both functional-image lanes. Sixteen focused frozen-target compatibility cases pass, including supported/unsupported, strict/authorized, and corrupt-source cases.
  • Lint-suppression inventory: all four tests pass without a new allowlist entry.
  • Integration validation: 19 targeted admission/cloud tests, full root-test/scripts typechecking, and both unused-file scans passed. Overlapping UI repairs are now on main and are absent from the final PR delta.
  • Independent reviews are clean. Formatting and syntax checks pass.
  • Earlier packaged runs verified scheduled 30/7-day archival and exposed the uncached-title defect. Fixture corrections preserve legacy file modification times and capture CLI JSON failures on stdout.
  • Packaged proof on Testbox at 001b7c51c68ae84eb6a696c41facbb6903a9b625: deterministic lifecycle passed in 95 seconds; live OpenAI HTTP tools plus archived-history recall passed in 17.9 seconds. The recall checks its nonce, unchanged original event prefix, exact provider/model, and positive token usage. Testbox environment.
  • Tested tarball SHA-256: f568a0c0c7b0cab82b8da025701f20528d6c54663152fd34f016bc3af15960b8. Subsequent change is a test-only locator repair; runtime and cold-storage harness bytes are unchanged.
  • The broad remote changed check exposed an inherited undefined screenshot locator. Its repair passes the actual UI E2E typecheck and capture-enabled browser case; full current-head CI remains the landing gate.
  • Core-test typechecking passes after preserving the fixture helper's complete inferred write scope.

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 12, 2026 00:53
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling size: L maintainer Maintainer-authored PR labels Sep 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 11:19 PM ET / September 12, 2026, 03:19 UTC (Revision 9).

ClawSweeper review

What this changes

Keeps archived sessions visible in Activity without restoring their transcripts, adds packaged archival and recovery checks, and repairs a UI proof-capture locator.

Merge readiness

⛔ Blocked before merge - 1 item remains

The fix remains necessary on current main. No actionable introduced defects were found; the earlier frozen-target blocker is resolved, and the requested packaged recall result is now recorded.

Priority: P2
Reviewed head: 3be509434e7d3b2e50c5e36b250c0402b541fe3a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused runtime repair with meaningful packaged validation and resolved prior feedback.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Recorded installed-package Testbox runs exercise the changed title reader through sessions.list after restart, preserve archived payloads, restore exact history from portable backup, and complete a live nonce-recall turn through chat.send. Runtime and harness bytes match the reviewed head; the results are recorded in the PR body rather than independently rerun here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded installed-package Testbox runs exercise the changed title reader through sessions.list after restart, preserve archived payloads, restore exact history from portable backup, and complete a live nonce-recall turn through chat.send. Runtime and harness bytes match the reviewed head; the results are recorded in the PR body rather than independently rerun here.
Evidence reviewed 9 items Introduced runtime repair: The shared title reader catches only projection-unavailable and cold-transcript errors, returns optional empty title fields, and advances the existing cache fence without restoring payloads.
Current-main necessity: The fetched main title reader still rethrows SessionTranscriptColdError. Its batched probe excludes archived transcripts, causing uncached rows to reach the scalar reader; the PR repairs that remaining path.
Restoration and cache coverage: The new regression archives through the real maintenance worker, checks mixed hot/cold title reads without restoration, and verifies titles recover afterward. The packaged client additionally checks Activity after restart, unchanged archive state during listing, and refreshed previews after restoration.
Findings None None.
Security None None.

How this fits together

The Gateway derives Activity titles and previews from session transcripts, some of which may be archived outside SQLite. Optional title reads must preserve session visibility while explicit history requests restore the archived content.

flowchart TD
  A[Activity list request] --> B[Session metadata]
  B --> C[Optional title reader]
  C --> D{Transcript available?}
  D -->|Yes| E[Cached or derived preview]
  D -->|Archived| F[Metadata without preview]
  G[Explicit history request] --> H[Restore archived transcript]
  H --> C
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +5, Tests +199, Docs +17, Other +664. Total +885 across 19 files.

View PR surface stats
Area Files Added Removed Net
Source 1 8 3 +5
Tests 4 207 8 +199
Docs 2 18 1 +17
Config 0 0 0 0
Generated 0 0 0 0
Other 12 668 4 +664
Total 19 901 16 +885

Review metrics

Metric Value Why it matters
Runtime versus validation growth Runtime +5; tooling +43; tests and test support +820 net lines Growth is concentrated in packaged recovery validation while the production repair stays within the existing title reader.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/openai-chat-tools/cold-recall.mjs, serialized state: scripts/e2e/lib/openai-chat-tools/cold-recall.mjs, serialized state: scripts/e2e/lib/openai-chat-tools/write-config.mjs, serialized state: scripts/e2e/lib/session-cold-storage/fixture.mjs, unknown-data-model-change: scripts/e2e/lib/openai-chat-tools/cold-recall.mjs, unknown-data-model-change: scripts/e2e/lib/session-cold-storage/fixture.mjs. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep optional title hydration non-restoring, preserve explicit history errors, and retain packaged recovery coverage in the existing release lanes.

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

Yes, from source: an uncached cold transcript reaches the scalar title reader and throws during Activity listing on current main. The PR records a failing real-worker regression; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Handling the expected cold condition at the shared optional-title boundary preserves archive ownership and uses the existing cache invalidation mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6f1185305def.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. Recorded installed-package Testbox runs exercise the changed title reader through sessions.list after restart, preserve archived payloads, restore exact history from portable backup, and complete a live nonce-recall turn through chat.send. Runtime and harness bytes match the reviewed head; the results are recorded in the PR body rather than independently rerun here.

Label justifications:

  • P2: Repairs Activity listing for opt-in archived transcripts and adds bounded release coverage without evidence of an urgent shipped regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded installed-package Testbox runs exercise the changed title reader through sessions.list after restart, preserve archived payloads, restore exact history from portable backup, and complete a live nonce-recall turn through chat.send. Runtime and harness bytes match the reviewed head; the results are recorded in the PR body rather than independently rerun here.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded installed-package Testbox runs exercise the changed title reader through sessions.list after restart, preserve archived payloads, restore exact history from portable backup, and complete a live nonce-recall turn through chat.send. Runtime and harness bytes match the reviewed head; the results are recorded in the PR body rather than independently rerun here.

Evidence

What I checked:

  • Introduced runtime repair: The shared title reader catches only projection-unavailable and cold-transcript errors, returns optional empty title fields, and advances the existing cache fence without restoring payloads. (src/gateway/session-transcript-title-reader.ts:193, 3be509434e7d)
  • Current-main necessity: The fetched main title reader still rethrows SessionTranscriptColdError. Its batched probe excludes archived transcripts, causing uncached rows to reach the scalar reader; the PR repairs that remaining path. (src/gateway/session-transcript-title-reader.ts:192, 6f1185305def)
  • Restoration and cache coverage: The new regression archives through the real maintenance worker, checks mixed hot/cold title reads without restoration, and verifies titles recover afterward. The packaged client additionally checks Activity after restart, unchanged archive state during listing, and refreshed previews after restoration. (src/gateway/session-transcript-title-reader.test.ts:170, 3be509434e7d)
  • Prior frozen-target finding resolved: Both release lanes now derive cold-storage support through the shared preflight owner. Only explicitly authorized older targets can omit unsupported subcases; current targets remain required, and unknown source shapes fail. Added cases cover strict, authorized, supported, unsupported, and corrupt-source inputs. (scripts/lib/frozen-target-compat.sh:409, 3be509434e7d)
  • Recorded packaged behavior proof: The captured PR body records installed-package lifecycle success in 95 seconds and live OpenAI tool-call plus archived-history recall success in 17.9 seconds at 001b7c5, with tarball SHA-256 f568a0c0c7b0cab82b8da025701f20528d6c54663152fd34f016bc3af15960b8. The inspected harness verifies the hidden nonce, original event prefix, provider/model, and token usage. The linked Testbox run identifies that commit but is marked cancelled; it establishes environment provenance, not an Actions success receipt. These are contributor-recorded results, not reviewer execution. (scripts/e2e/lib/openai-chat-tools/cold-recall.mjs:49, 001b7c51c68a)
  • Proof remains applicable to the head: The sole change after the packaged proof commit is the retained UI test locator; runtime and cold-storage harness files are unchanged. This satisfies the previous review's request to record the final recall result. Downloaded screenshots were inspected and belong to the related storage-settings feature, not this runtime proof. (ui/src/e2e/new-session-page.cloud-dispatch.e2e.test.ts:424, 3be509434e7d)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (8 earlier review cycles)
  • reviewed 2026-09-12T00:59:31.471Z sha 68e7aa4 :: blocked before merge. :: [P2] Gate cold-storage subcases on the selected frozen target
  • reviewed 2026-09-12T01:14:37.779Z sha 7857cca :: blocked before merge. :: [P2] Gate cold-storage subcases on the selected frozen target
  • reviewed 2026-09-12T01:27:20.407Z sha ad0c9a5 :: blocked before merge. :: [P2] Gate cold-storage subcases on the selected frozen target
  • reviewed 2026-09-12T01:45:00.414Z sha 6c856f7 :: blocked before merge. :: [P2] Gate cold-storage subcases on the selected frozen target
  • reviewed 2026-09-12T02:07:11.257Z sha 8ae6968 :: blocked before merge. :: none
  • reviewed 2026-09-12T02:39:44.620Z sha a668baa :: blocked before merge. :: none
  • reviewed 2026-09-12T02:55:27.260Z sha 001b7c5 :: blocked before merge. :: none
  • reviewed 2026-09-12T03:07:40.734Z sha 3be5094 :: needs maintainer review before merge. :: none

Clear baseline CI failures introduced by #145183: reuse the existing picker fixture, test cloud configuration through its production renderer, and remove the unused Connect menu renderer.
Doctor imports filesystem mutation time rather than timestamps inside messages. Date the legacy files before import, and handle CLI failure diagnostics without adding a lint suppression or retaining credential-bearing command arguments.
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Sep 12, 2026
Handle cold transcripts at the optional title-reader boundary without restoring payloads or caching missing previews. Verify real archival, mixed hot/cold listings and cache recovery; extend packaged release proof across restart and portable backup recovery. Preserve JSON CLI errors from stdout in the test harness.
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 12, 2026
Clear the existing cursor-policy failure from #145183 without weakening its regression test.
@steipete steipete changed the title test: verify cold transcript recovery in release Docker lanes fix: keep cold sessions visible and verify release recovery Sep 12, 2026
Share capability resolution with source preflight and omit only unsupported cold subcases under the existing explicit frozen-target policy. Keep current coverage required, isolate ordinary retention in the live fixture, and strengthen fixture typing without suppressions.
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 12, 2026
Register the shell entrypoints for dependency analysis, type the frozen-source fixture cases explicitly, and align existing cloud test callback ordering with the same repair now on main.
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed app: web-ui App: web-ui size: XL labels Sep 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Sep 12, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 12, 2026
@steipete
steipete merged commit 31848a1 into main Sep 12, 2026
197 checks passed
@steipete
steipete deleted the codex/cold-storage-release-proof branch September 12, 2026 03:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…#145462)

* test: cover transcript cold storage in release Docker lanes

* test: remove stale cloud picker test seams

Clear baseline CI failures introduced by openclaw#145183: reuse the existing picker fixture, test cloud configuration through its production renderer, and remove the unused Connect menu renderer.

* test: preserve historical transcript fixture modification times

Doctor imports filesystem mutation time rather than timestamps inside messages. Date the legacy files before import, and handle CLI failure diagnostics without adding a lint suppression or retaining credential-bearing command arguments.

* fix: keep cold sessions available to Activity title probes

Handle cold transcripts at the optional title-reader boundary without restoring payloads or caching missing previews. Verify real archival, mixed hot/cold listings and cache recovery; extend packaged release proof across restart and portable backup recovery. Preserve JSON CLI errors from stdout in the test harness.

* fix(ui): use the action cursor for session details

Clear the existing cursor-policy failure from openclaw#145183 without weakening its regression test.

* test: preserve frozen release targets in cold-storage lanes

Share capability resolution with source preflight and omit only unsupported cold subcases under the existing explicit frozen-target policy. Keep current coverage required, isolate ordinary retention in the live fixture, and strengthen fixture typing without suppressions.

* test: complete cold-storage release entrypoint contracts

Register the shell entrypoints for dependency analysis, type the frozen-source fixture cases explicitly, and align existing cloud test callback ordering with the same repair now on main.

* test: isolate archived recall from external tool policy

* test: retain the cloud machine locator for proof capture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant