Repository navigation
refactor(state): drop pre-July-2026 state migrations - #163036
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 October 1, 2026, 7:42 PM ET / 23:42 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR replaces migrations for selected pre-July-2026 session and SQLite formats with data-preserving refusals while retaining July-era imports and numbered database upgrades. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 3 items remain Both previous fixture findings are resolved, and no new blocking code defect was found. The change remains distinct from current main; published-updater recovery evidence is still needed for the changed upgrade contract. Priority: P2 Review scores
Verification
How this fits togetherDoctor imports older session files and upgrades shared and per-agent SQLite databases before the Gateway uses them. These checks determine whether existing history becomes usable or remains untouched with recovery guidance. flowchart TD
A[Existing session files] --> C[Doctor support checks]
B[Existing SQLite databases] --> C
C --> D{Supported state shape?}
D -->|Yes| E[Import and numbered upgrades]
E --> F[Gateway uses current state]
D -->|No| G[Preserve data and report recovery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -77, Tests -173, Docs +2. Total -248 across 26 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain supported July upgrades and verify that retired formats stop safely before activation, with a working intermediate-release recovery path. Do we have a high-confidence way to reproduce the issue? Not applicable: this is intentional migration retirement. Source comparison establishes the changed refusals and confirms both previous fixture defects were repaired; no code was executed during this read-only review. Is this the best way to solve the issue? Yes, replacing obsolete conversions with checks at the existing migration owners is a focused approach. Upgrade safety still requires evidence through the installed updater, beyond direct Doctor execution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9e9dd76f74ef. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
a7eee59 to
a8a08fa
Compare
148 upstream commits, including the community invitation refresh (openclaw#163109), which rewrites the help text for gateway.controlUi.communityInvite, and the pre-July-2026 state and plugin migration removals (openclaw#163036, d7eb666). None of them touch extensions/feishu. One generated conflict, docs/.generated/config-baseline.sha256. Main changed the core hash through that help text, and this branch changes the channel hash, so the file was regenerated from this merge rather than hand-merged. build:docker ran in a separate detached checkout of this commit. The counts stay core 2484, channel 3788 and plugin 4468. The core and plugin hashes match upstream/main, the channel hash stays this branch's, as predicted, and the three generated-file checks pass there. No code conflicts. Feishu: 103 files and 1532 tests in the extension project, 17 files and 250 tests in the database-workers project. The forwarder test and the routing guards pass, 444 tests. tsgo:core, tsgo:extensions, tsgo:extensions:test, tsgo:test:root, the line-cap, max-lines and assertion-safety ratchets against upstream/main, oxlint and oxfmt on the 43 changed code files all pass.
Retire January session-field conversions and reverted May registry/runtime-journal schemas under the July 2026 support window. Refuse unsupported inputs without rewriting their source data, and preserve the numbered SQLite upgrades and JSON/JSONL inputs still written by July releases. Preserve canonical session delivery records with harmless stale aliases. Validate source-preserving refusals, exact July SQLite fixtures, built Doctor upgrades, focused owner suites, import cycles and isolated code review. Release-note context and writer history are recorded in the PR.
What Problem This Solves
Retires state migrations that only serve formats predating the supported July 2026 upgrade window.
User Impact
Upgrades from pre-July-2026 versions are no longer migrated for session
provider/lastProvider/roomfields, the single-column agent database registry key, or the reverted ACP and trajectory journal layouts. These inputs now receive an actionable refusal that preserves their data. Back up unsupported state and migrate it with an older compatible release before upgrading.July-era JSON/JSONL imports and the complete numbered SQLite upgrade chain remain supported. Canonical session fields accompanied by harmless stale aliases remain accepted. No schema version, configuration option, or public plugin SDK surface changes.
Why This Change Was Made
The support boundary is based on the last shipped writer, not a migration's name or age:
provider/lastProviderchannel/lastChannelin90342a4f3a5(January 13), shipped inv2026.1.12.roomgroupChannelinbbb71c91989(January 17), shipped inv2026.1.16-2.PRIMARY KEY(agent_id)and reverted runtime journalsf91de52f0d2on May 13 and reverted by694ca50e977that day. The reintroduced May 30 registry writer already uses(agent_id,path); the reintroduced July journal writers use their canonical session keys.July releases still wrote schema 1, so its migrations remain. The old registry kind remains in the public SDK type for its separate compatibility contract, but core no longer emits it. Expired comments suggesting October removal of still-supported upgrades were removed.
Evidence
check-changedpassed, including core/test types, all dead-export scans, core lint, formatting, ratchets and ownership guards. Hosted CI gates the exact pushed head.--maxWorkers=1. State/schema-policy proof: 120 passed, 34.21 seconds wall.doctor --fixupgrade proof passed all 3 cases, including exact July schema-1 agent inputs, session/auth preservation and repeat-run no-op.v2026.7.1-2shared SQLite fixture upgrades through Doctor to the current schema with integrity and retained-data assertions.v2026.7.1-beta.1, published July 2 UTC) has the exact agent-v1 schema fixture bytes used by the built Doctor upgrade test. Session import coverage uses its version-3 transcript and canonical session fields.The first remote test batch exposed a stale generic failure fixture using the retired registry layout. It now uses a malformed audit table so it still tests receipt closure at the intended migration boundary.
Main moved the session normalizer to its Doctor owner while validation ran. The conflict resolution retains that owner import and the new support-window assertion;
git range-diffshows only the changed import context. Rebased candidatea8a08fa544d: 170 relevant session/Doctor tests passed in 149.87 seconds; both cycle checks report zero. The full changed gate above is prior-base evidence; hosted CI checks the rebased head.Hosted CI found two additional fixtures that relied on the retired shapes. The built CLI lifecycle fixture now writes July
groupChannelinstead of Januaryroom; the generic receipt-ordering fixture uses a malformed audit table. All lifecycle/order/source-preservation assertions remain. Remote proof passed 12 receipt tests and the full built Gateway lifecycle test (164.01s test runtime, including import/restart/reset/delete/concurrency). Both cycles remain zero, and isolated review found no actionable P0/P1 issue.The same CI run had a 120-second timeout in
install.managed-npm-authority.e2e.test.ts. Both original cases passed unchanged in the bounded remote replay (26.94s Vitest, 44.26s wrapper). Cause remains unestablished; this is non-reproduction, not a claimed flake fix. No timeout, assertion, or retry policy was changed.