Repository navigation
refactor: remove compaction checkpoints - #154131
Conversation
|
🦞👀 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. Reviewed September 20, 2026, 10:27 PM ET / September 21, 2026, 02:27 UTC (Revision 6). ClawSweeper reviewWhat this changesRemoves compaction checkpoint storage, APIs, and UI controls while preserving ordinary Fork, conversation history, and token reporting, and repairs affected test fixtures. Merge readiness⛔ Blocked before merge - 3 items remain The retirement remains necessary on main, and the prior code findings are addressed. No new blocking patch defect was found; the documented browser-hang investigation remains unresolved. Priority: P2 Review scores
Verification
How this fits togetherCompaction summarizes older conversation context for subsequent model requests. Transcript storage supplies retained history and token measurements to the Gateway and Control UI. flowchart TD
A[Conversation context] --> B[Compaction]
B --> C[Transcript summary and token measurements]
C --> D[Gateway history]
D --> E[Control UI]
F[Legacy checkpoint references] --> G[History cleanup protection]
C --> H[Ordinary Fork and rewind]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the accepted retirement under the existing transcript owners, preserving legacy history protection and ordinary Fork without introducing replacement checkpoint machinery. Do we have a high-confidence way to reproduce the issue? Not applicable to the requested feature retirement. The separate historical browser hang has not been reproduced reliably or causally resolved. Is this the best way to solve the issue? Yes: removing the workflow end to end avoids dormant checkpoint machinery, while the narrow legacy reader preserves existing history and token facts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1d0ac9869727. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Addressed the heartbeat QA cutover in a984bf1. The snapshot helper, scenario assertions, and catalog now use durable transcript compaction markers, counts, session identity, and summaries—not retired checkpoint records. Native rejection, restart, revocation, writer substitution, split-turn content, and successor-turn checks remain intact. Verification completed:
Compatibility: the three shipped checkpoint RPCs are intentionally retired as requested. No user configuration key/default or SQLite schema changes. Existing private legacy references remain retained and protected through storage updates/rewind; malformed references fail closed, old markers remain readable, and obsolete metadata is not copied into new Forks. The separate shared-worker fs-safe configuration leak was repaired at its producer in #154138, merged September 20 at 23:23 UTC and confirmed present on main. No production Claw workaround or weakened assertion was added here. Updated-head CI is running; this is not a claim that the PR is merged. |
|
Merged via squash.
|
* refactor: remove compaction checkpoints Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: d8185b46-c34b-46cb-a7bc-f4992867d3c9 * refactor: remove compaction checkpoints Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: 80da0151-c7d1-4d40-80a6-e4a560bedf53 * refactor: remove compaction checkpoints Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: a7caf11d-e661-4a0f-8363-644cc007693a * refactor: remove compaction checkpoints Worked on by: - @steipete Co-authored-by: steipete <[email protected]> OpenClaw-Publication: e1a860df-02a1-4a99-a3f1-e9889eea119e * test: repair checkpoint retirement CI fixtures Route deferred QA tools through their declared dispatcher, preserve exact successful chronology receipts, and await rendered native accessibility values without weakening assertions. Co-authored-by: steipete <[email protected]> * test(codex): stabilize bounded rollout fixture Reuse steipete's reviewed startup-scan synchronization repair from openclaw#154260 (89f04ee). Preserve preview, workspace, native-call-count and byte-limit assertions. Focused 12-case file passes on the composed candidate. Co-authored-by: steipete <[email protected]> --------- Co-authored-by: steipete <[email protected]>
Closes #154045
What Problem This Solves
Retires the separate compaction-checkpoint management feature and its additional branch/restore workflow.
User Impact
The checkpoint link, history cards, and checkpoint branch/restore actions are removed. The dedicated
sessions.compaction.list,sessions.compaction.branch, andsessions.compaction.restoreRPCs are intentionally retired. Ordinary Fork/rewind, conversation history, compaction, and token-savings reporting remain available.No SQLite tables, columns, indexes, schema-version bump, migration, or live-data purge are introduced. New compactions stop creating checkpoint metadata; optional post-compaction token measurements stay with the ordinary transcript marker. Read-only legacy references continue protecting old history from cleanup.
Why This Change Was Made
This is an end-to-end maintainer-requested removal, not a hidden button: it deletes checkpoint capture/persistence, runtime stores, RPC handlers and schemas, client state, UI rendering/styles, generated protocol models, obsolete helpers, and tests for the retired feature. Adjacent session and compaction paths are simplified without adding a replacement feature.
Net reduction: 2,541 handwritten production lines, 203 generated production lines, and 2,777 test/fixture lines; tooling and docs also shrink.
Evidence
deadcode:fullinventory (including exports), max-lines/line-cap/assertion-safety ratchets, configuration docs, plugin inventory, root-test types, focused lint, and 40 storage tests passed. Obsolete test-only exports were made private and the now-unused assertion baseline entry was removed.OPENCLAW_BUILD_PRIVATE_QA=1 pnpm buildand passed all five deterministicgateway-codex-heartbeat-compactioncases: fresh restricted ownership, native rejection, restart, writer substitution, and revocation. Ordinary transcript identity/count/summary, split-turn content, retained history, and successor usability remain asserted.plugins:assets:checkpassed on the exact published repair head.tokensAfter. The extended existing regression failed before the fix for positive and zero measurements, then the complete 31-test rewrite suite passed. Historical absence, identity, and kept-entry remapping remain covered; owning types, lint, line-cap check, and independent P0/P1 review passed.89f04eec): explicitly join the initial scheduled scan before replacing the rollout. Workspace, preview, native-call-count, and byte-limit assertions are unchanged. The 12-case owner file passes on this composed candidate; the upstream PR records deterministic failure proof and 20 standalone/3 original-shard passes. No competing implementation was introduced.Single-worker test cost
Linux, Node 26.8.2, repository test wrapper with
--maxWorkers=1; wall time includes startup and transforms. These are the materially extended regression suites and the major reduced integration suites. The first seven were measured before the unused-import cleanup; the rewrite suite was measured after adding the token-preservation regression. Hosted job elapsed times for the final exact-head run appear below; these include setup/build/cleanup and are not individual test-file durations.src/agents/sessions/agent-session-compaction.test.tssrc/config/sessions/session-accessor.sqlite-session-row.test.tssrc/config/sessions/session-accessor.sqlite-message-cut.test.tssrc/config/sessions/session-accessor.conformance.test.tssrc/gateway/server-methods/chat-history-pages.test.tssrc/gateway/session-transcript-readers.markers.test.tssrc/gateway/server.sessions.compaction.test.tssrc/agents/embedded-agent-runner/transcript-rewrite.test.tsextensions/qa-lab/src/providers/mock-openai/server.tool-routing.test.tsextensions/qa-lab/src/scenario-terminal-chronology.test.tsextensions/codex/src/session-catalog-index-recovery.test.tsThe catalog recovery suite added no cases or boots; its repaired case took 10 ms, while the cold wrapper compiled dependencies.
The Gateway compaction suite proves authenticated RPC admission, queued-work preservation, archive synchronization, and persisted SQLite trimming—contracts a pure helper test cannot establish. This removal adds no Gateway boots to that suite. Separate opt-in backend proof passed all five existing heartbeat cases in a scenario-reported 69.715 seconds; restart/revocation/native-rejection isolation is retained, with no new cases or Gateway boots.
Final hosted CI job costs
Exact-head CI run 35553628651, source
e861920585e9312b6a8c46def893f8fcd3e35fe2: 179 successful jobs, 5 conditional jobs skipped, no failures. All four QA smoke profiles, native macOS tests/packages, the formerly failing UI shard, and real-Gateway UI checks passed.build-artifactscheck-prod-typescheck-test-typescheck-dependencieschecks-ui-e2e (8/13)checks-ui-e2e-real-gatewaymacos-swift (tests)macos-swift (packages)QA Smoke CI (profile 1/4)QA Smoke CI (profile 2/4)QA Smoke CI (profile 3/4)QA Smoke CI (profile 4/4)These are GitHub job
startedAt→completedAtmeasurements, not per-file test duration. The last mechanical rebase port removed main-retired JavaScriptlanguagearguments; a local HTTP probe was blocked by this host’s egress proxy (HTTP 502), was not called green, and was not retried or bypassed. The final hosted run supplies the current-head execution proof. Earlier bounded investigation of the account-picker read hang did not establish its original renderer cause; this successful current run is not relabeled as a causal repair.Chat
Before
After
Session details before and after
Before
After
Requested by @steipete.
Worked on by
Work sessions
View the OpenClaw team session