Repository navigation
improve(sessions): archive inactive transcripts by default - #199899
Conversation
Keep the 30-day inactivity cutoff and explicit false opt-out. Share cold policy defaults between scheduler admission and extraction, and align Settings and help with the default-on policy. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 05ec025a-c3d8-4b48-afc9-82a95ea9c595
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesEnables cold archival after 30 inactive days when configuration is omitted and aligns Settings, scheduling, and documentation. Example: An installation omits coldStorage and has eligible 60-day-old chat history.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open: the maintainer-directed default change is useful, but it introduces a maintenance-fixture regression that needs repair. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherGateway maintenance resolves session policy, selects eligible inactive history, and moves payloads through the existing archive worker into compressed files while SQLite retains references for restoration. flowchart LR
Config[Session configuration] --> Policy[Maintenance policy]
Settings[Storage Settings] --> Config
Policy --> Scheduler[Gateway scheduler]
Scheduler --> Worker[Existing archive worker]
Worker --> SQLite[SQLite metadata]
Worker --> Archives[Compressed history files]
Archives --> Restore[History restoration]
Technical reviewBest possible solution: Keep the shared policy resolver, explicitly disable unrelated archival in maintenance fixtures, and qualify the default change through a latest-stable upgrade. Do we have a high-confidence way to reproduce the issue? Current-main source confirms that omitted configuration leaves extraction disabled; exact-head CI annotations and the empty maintenance fixture establish the introduced test failure without executing target code. Is this the best way to solve the issue? Sharing defaults through the existing maintenance-policy owner is the smallest complete implementation, and the added regressions exercise distinct extraction, scheduler, and Settings boundaries. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7e48c6be722a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +13, Tests +64, Docs +1, Generated 0. Total +78 across 12 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 15, 2026, 10:02 PM ET / November 16, 2026, 03:02 UTC. |
Use the existing explicit false opt-out in fake-clock timer fixtures so the new production default does not dispatch transcript database work. Preserve the separate default-on integration proof and all maintenance lifecycle assertions. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 8cd5cd62-7f26-478b-a05e-fea5011e7d0e
Integrate current main to resolve the PR conflict and regenerate the canonical config-help hashes. The cold-storage default-on production delta is unchanged. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: daee0a91-3aa1-4af9-9cc6-153e0533bd7d
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…tgres-compaction-watched-prompt-20261116 * commit '9e810f7101557b006d5ff223d955f14dc43329f0': (23 commits) chore(ui): refresh control ui locales (#200164) fix(update): stop reporting unset git config keys as failing checks (#200153) test: consolidate redundant coverage (198793, part 2) (#198936) revert: skills-used full-transcript scan on every chat history page (#200159) refactor(sessions): follow the chat by key for stored delivery references (#200099) fix(update): bridge 2026.11.5-beta.4 updaters (#200152) fix(gateway): avoid filesystem stalls during catalog refresh (#200136) fix(ci): match update refusal probe to selected candidate (#200043) fix(agents): keep read-only steering carriers when publishing suppressed user envelopes (#200156) test: consolidate suites while retaining recovery owners (#198933) test: consolidate redundant coverage (198789, part 2) (#198932) refactor(cli): consolidate camera command tests (#200144) fix(cli): avoid initializing provider runtime during cleanup (#200139) fix(ui): show mobile destinations without the drawer exit delay (#198879) chore(ui): refresh control ui locales (#200146) fix(knowledge): keep historical claims distinct and reject changed retries (#200140) fix(ui): align dropdown arrows on mobile New Session improve(sessions): archive inactive transcripts by default (#199899) refactor(agents): own background commands and yield waits by the chat (#200097) fix(models): guessed non-chat models leave the default picker instead of being refused (#200102) ...
…199899) * improve(sessions): archive inactive transcripts by default Keep the 30-day inactivity cutoff and explicit false opt-out. Share cold policy defaults between scheduler admission and extraction, and align Settings and help with the default-on policy. Co-authored-by: vincentkoc <[email protected]> * improve(sessions): archive inactive transcripts by default Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 05ec025a-c3d8-4b48-afc9-82a95ea9c595 * test(gateway): keep timer fixtures free of cold storage work Use the existing explicit false opt-out in fake-clock timer fixtures so the new production default does not dispatch transcript database work. Preserve the separate default-on integration proof and all maintenance lifecycle assertions. Co-authored-by: vincentkoc <[email protected]> * Publish openclaw/cold-storage-default-enabled Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: 8cd5cd62-7f26-478b-a05e-fea5011e7d0e * Publish openclaw/cold-storage-default-enabled Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: daee0a91-3aa1-4af9-9cc6-153e0533bd7d --------- Co-authored-by: vincentkoc <[email protected]>


What Problem This Solves
Older inactive chat history stays in SQLite unless operators discover and enable cold storage.
User Impact
Eligible inactive transcripts are now compressed automatically after 30 days, including on existing installations that omit this setting. Explicit
session.maintenance.coldStorage.enabled: falsestill disables future extraction, and existing archives remain restorable. Active/admitted work and recovery-owned history remain protected.Cold files are authoritative history: use supported backups or retain the referenced archive files with direct database copies. As before, text search excludes cold transcript contents until restoration. Retention and deletion policies are unchanged.
Why This Change Was Made
The scheduler and extraction worker now share the cold-policy resolver, with defaults of enabled and 30 days. Settings reflects the same omitted-setting behavior instead of showing archival as off and disabling Run now. Help and current configuration docs describe the opt-out; no new configuration field or schema migration is introduced.
Evidence
Before/after Settings screenshots, using synthetic data with
coldStorageomitted in both states. GitHub assets were read back and inspected, and delivered to the original discussion.Published head
63568115fb3865611e7dc880163beba041429c22is a metadata-only child of tested commitaadb2d64d78e77d2517a133175917c76fe8b8bd7. Current main5ed49aa7c35024563fa4cb26ade3efd0b0fa4e15was integrated only to resolve the generated config-help hash conflict; the cold-storage production delta is unchanged.The original 42 backend/schema and all 4 browser E2E cases passed; default scheduler and omitted-setting browser regressions failed on the base. Fresh integrated-main regression runs passed 97 cases covering cold storage, age/default/false selection, active/recovery custody, scheduling, and maintenance. A shared fake-clock fixture now explicitly opts out of unrelated extraction; its reproduced CI failure is fixed (46 cases), and all nine other fixture consumers passed 143 cases.
A built, isolated Gateway with synthetic 60-, 14-, and 1-day histories proved automatic archival with
coldStoragecompletely omitted in warn mode: only 60-day history became cold. Explicit false hot-reloaded without restart;chat.injectrestored exact original history before appending while extraction was disabled.Latest npm stable 2026.11.4 → candidate passed 4/4 real upgrade scenarios: omitted policy adopts 30 days, explicit false remains off, custom 7-day age persists, and stable-generated cold archives restore. The stable tarball integrity was verified; released Doctor/Gateway created the database, then candidate Doctor/Gateway reopened the same isolated state. Original transcript rows remained byte-exact and history readable after restoration/appends. No live server state or external inference was used.
Fresh
pnpm build:ci-artifacts, core/UI typechecks, touched-file type-aware lint, generated config-doc check, formatting, andgit diff --checkpassed. An unchanged Solid tracking warning and advisory UI bundle-budget overages remain. The earlier unrelated catalog lint error is absent on integrated main and passes the exact CI lint selector. Exact-head CI completed; the inherited-only exception is recorded below.Fresh independent local autoreview, P0–P2, completed on committed
aadb2d64d78e77d2517a133175917c76fe8b8bd7against5ed49aa7c35024563fa4cb26ade3efd0b0fa4e15, with no actionable findings. Local ClawSweeper was unavailable (dirty, unbuilt checkout); the documented autoreview/hosted-review fallback was used. The hosted review's fixture and stable-upgrade findings are addressed above.Exact-head CI run 43883576061 has a baseline harness failure in
checks-node-changed-compact-small-19: seven prepared-harness source-delivery cases fail at unchangedrun-loop.ts:501readingproviderOutcomesfrom an absent catalog. Both the PR-head replay and unchanged main baseline5ed49aa7reproduce the same seven failures. The actual CI checkout915362db(mainb58996d6+ this exact head) has identical agent/runtime/plugin sources, dependency locks and test tooling to its main parent. All PostgreSQL conformance jobs and independentsecurity-fastpassed. CI is not claimed green: the supported protected inherited-failure route verified the exact head, terminal jobs, unchanged source inputs, required reviews/security and live writer authority before merging asf8649312873296688d785b5714a1518c2cd06748. Native landing receipt.Focused commands and simplification
No new lifecycle machinery: scheduler and worker share the existing maintenance-policy owner. Existing archival eligibility, recovery protection, write admission, and restoration operations are unchanged. The final delta is 13 files, +111/-30 lines; no release, deployment, retention, or Team-specific configuration changes are included.
Contributor
Requested by @vincentkoc.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by