Repository navigation
fix(gateway): start with retained deleted-agent databases - #198145
Merged
Merged
Conversation
Scope historical ACP startup validation to configured physical database targets. Preserve held data and retain schema rejection for configured stores. Co-authored-by: steipete <[email protected]>
Contributor
|
🦞👀 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. |
Collaborator
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 14, 2026
…98145) Scope historical ACP startup validation to configured physical database targets. Preserve held data and retain schema rejection for configured stores. Co-authored-by: steipete <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related #172740.
What Problem This Solves
Gateway startup fails after an upgrade when historical ACP metadata references a deleted or unconfigured agent database that Doctor intentionally leaves at an older schema.
User Impact
Configured agents can start while those retained stores stay unavailable and untouched. Configured databases with older schemas still require offline repair; no schema, config, migration, or retention behavior changes.
Why This Change Was Made
ACP startup validation followed historical row owners before the session maintenance loop applied its configured/deleted-store exclusions. Scope that validation to the existing configured physical database targets and candidate paths, retaining shared-store ownership checks and admission refusals. Historical ACP metadata remains preserved for explicit restoration.
Evidence
startup scopes old-schema ACP stores: on base066c7ecdeccf3f958d356cfdadac7a7146133021, retained-by-deletion and unconfigured schema-41 stores both reject withgateway.maintenance_required(required schema 42); the configured-store rejection control passes. With the fix, all 17 tests instartup-migration.acp.test.tspass, including byte preservation (49.73 s Vitest, 51.85 s wrapper).session-startup-migration.test.tspass through the Gateway preparation and maintenance handoff (30.64 s Vitest, 32.40 s wrapper). These timings include worker preparation; PR CI supplies broad proof.git diff --checkpass. Initial borrowed-dependency setup refusals were resolved with a private frozen install and are excluded from product proof.Contributor credit: @steipete.
Work sessions
Linked for team reference; these sessions aren’t public.