Repository navigation
fix(memory): keep rollbacks compatible after recall metadata upgrade - #116003
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 1:03 PM ET / 17:03 UTC. ClawSweeper reviewWhat this changesThe branch moves recall metadata from the canonical memory chunk table into an additive SQLite child table, migrates existing inline metadata and provenance-trigger state, and updates memory reads, writes, publication, and doctor repair paths. Merge readinessKeep this PR open for maintainer review. It addresses the linked rollback restart-loop regression with a rollback-safe storage shape, has recorded real-database and prior-binary acceptance evidence, and should be revalidated on the refreshed merge result because it changes persistent agent-memory schema behavior. Priority: P1 Review scores
Verification
How this fits togetherMemory Core stores indexed chunks and recall metadata in each agent’s SQLite database. Gateway startup and doctor maintenance validate that database before the agent can run, while memory recall and publication consume the metadata after migration. flowchart LR
A[Existing agent database] --> B[Startup or Doctor]
B --> C[Memory schema migration]
C --> D[Canonical chunk table]
C --> E[Additive recall metadata table]
D --> F[Memory publication]
E --> G[Recall ranking and curation]
F --> H[Gateway startup]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +102, Tests +129, Generated -6, Other +1. Total +226 across 24 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the additive child-table migration only after the current merge result proves that upgraded databases preserve recall/provenance data, validate under current code, and remain accepted by the referenced prior binary. Do we have a high-confidence way to reproduce the issue? Yes, from the supplied current-path evidence: create an agent database with the cited prior binary, initialize recall metadata with the regressing schema, then roll back to the prior schema validator; the linked issue reports the resulting startup rejection and restart loop. Is this the best way to solve the issue? Yes. Moving the optional recall fields into an additive child table is the narrowest compatible repair because it restores the old canonical chunk-table contract while retaining current recall metadata through explicit readers and writers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 814b9f6e36f3. LabelsLabel 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 (1 earlier review cycle)
|
b19b226 to
d2fd182
Compare
|
Maintainer merge decision: accept the additive child-table compatibility contract without a schema-version bump. This follows the repository contract for additive tables and restores rollback compatibility by returning ClawSweeper rank-up moves addressed on refreshed head
The remaining step is completion of the refreshed GitHub merge gates. |
|
Maintainer landing decision after the refreshed ClawSweeper review:
I accept the additive child-table/no-version-bump compatibility contract and the remaining merge-result risk. |
|
Merged via squash.
|
* origin/main: (446 commits) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003) fix(ui): derive cron timezone suggestions (openclaw#115973) fix(scripts): bound dependency pin git lookups (openclaw#110570) fix(skills): preserve configless workshop apply upgrades (openclaw#115982) fix(gateway): cancel unread cron webhook bodies before SSRF release (openclaw#111236) fix(voice-call): pin Twilio webhook verification to the configured public path (openclaw#112800) fix(memory): make legacy session backfill rollback re-applicable (openclaw#116004) fix(security): fence external hook job name in isolated-agent prompts (openclaw#112501) fix(channels): mark durable webhook acceptance on Zalo, Google Chat, SMS, Feishu, Nextcloud Talk, and Synology Chat (openclaw#115586) fix(test): restore stdin TTY descriptors (openclaw#115985) fix(plugins): remove incorrect modifying hook timeout fallback in getClaimingHookTimeoutMs (openclaw#107996) ... # Conflicts: # extensions/openai/realtime-quicksilver-wire.ts
* origin/main: (683 commits) fix(discord): bound webhook send body reads (openclaw#109076) fix(ui): preserve initials for missing user avatars (openclaw#115976) feat(ui): add provider icons to coding catalogs (openclaw#115956) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003) fix(ui): derive cron timezone suggestions (openclaw#115973) fix(scripts): bound dependency pin git lookups (openclaw#110570) fix(skills): preserve configless workshop apply upgrades (openclaw#115982) fix(gateway): cancel unread cron webhook bodies before SSRF release (openclaw#111236) fix(voice-call): pin Twilio webhook verification to the configured public path (openclaw#112800) fix(memory): make legacy session backfill rollback re-applicable (openclaw#116004) fix(security): fence external hook job name in isolated-agent prompts (openclaw#112501) ... # Conflicts: # CHANGELOG.md # src/agents/tool-search-catalog.ts # src/agents/tool-search.test-support.ts # src/agents/tool-search.ts
* commit 'e80fe942c8dae4b264acb2b501466224e842aa61': fix(gateway): stop start-time repair from retargeting managed services (openclaw#115935) fix(plugins): scope Codex relay with tool matchers (openclaw#109603) fix(discord): bound webhook send body reads (openclaw#109076) fix(ui): preserve initials for missing user avatars (openclaw#115976) feat(ui): add provider icons to coding catalogs (openclaw#115956) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003)
…penclaw#116003) * fix(memory): keep agent database rollbacks compatible * fix(memory): satisfy rollback migration guards
Closes #116002
AI-assisted change.
What Problem This Solves
Fixes an issue where users rolling back after the memory recall metadata upgrade could have every registered agent database rejected by the prior binary, leaving the gateway in a persistent restart loop.
Why This Change Was Made
Recall metadata now lives in a new additive child table instead of changing the canonical
memory_index_chunkstable. Provenance writers remain explicit, the legacy chunk trigger is removed, and current-main databases are migrated transactionally without a schema-version bump. Older binaries can ignore the new tables during rollback.User Impact
Operators can upgrade and roll back without manually repairing each agent database. Existing recall metadata, chunk rows, and provenance are preserved.
Evidence
PRAGMA quick_checkreturnedok, foreign-key checks returned zero violations, and the prior deployedf2293566896fschema checker accepted the result.Regression context: the inline metadata columns and provenance trigger landed in #114819.