Skip to content

perf(sqlite): fast schema gates, background integrity verification, and downgrade protection - #110271

Merged
steipete merged 9 commits into
mainfrom
claude/database-versions-migration-7fc998
Jul 18, 2026
Merged

steipete merged 9 commits into
mainfrom
claude/database-versions-migration-7fc998

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

A user running a schema-11 agent DB (main/dev build) had the updater stop their healthy gateway and install v2026.7.2-beta.2, which supports schema 9. Every subsequent health/connect/message retry then ran a full synchronous quick_check + integrity_check + foreign_key_check over the 21 GB database on the gateway main thread (30-45s, 100% CPU), only to fail with "schema 11 > 9" - and nothing latched the failure, so the scan repeated forever. Three separate gaps stacked: the updater has no DB-schema preflight, the expensive integrity scan ran before the cheap version gate (#105179 ordering), and terminal open failures were retried from scratch.

Discussion context: Discord report by Dave Morin, sanity-checked against main; the integrity-on-open series (#104938, #105179, #105222, #106065, #108663) is a defensive response to the still-open corruption incident #101290 (broken schema_meta index).

Why This Change Was Made

Downgrades must be refused instantly and cheaply at every layer, upgrades must stay proven and communicated, and full-file integrity scanning belongs off the hot path while keeping the detection #101290 still needs:

  • Cheap gates first: both open paths now check user_version + schema owner before any scan. A newer-schema DB refuses in microseconds with an error naming the build that owns the DB (schema_meta.app_version is now stamped, previously always null) and linking the new docs page.
  • Scan rescoped: steady-state opens verify only integrity_check('schema_meta') - the observed CLI startup preflight can corrupt the live state DB while a gateway is running — health-check commands caused "database disk image is malformed" (2026.6.6, macOS); vanilla SQLite control does NOT reproduce #101290/fix(sqlite): reject corrupt agent state before startup mutation #105179 corruption class - plus the redundant quick_check pass is gone everywhere (integrity_check is a strict superset per sqlite.org/pragma.html). The full scan still runs where slow is correct: before a pending migration (now with a user-visible log line), in doctor/backup/compact, and in a new gateway background verifier.
  • Background verifier: worker thread, first run 5 min after boot then daily, serial full integrity_check + foreign_key_check per DB, results persisted to a new additive database_verifications table in the state DB. On proven corruption it quarantines the DB: closes any live handle and latches the path so later opens fail fast until doctor repairs it.
  • Terminal-failure latch: newer-schema and corruption failures latch per path (process-local); retries no longer rescan. Transient errors (BUSY, permissions) never latch. Doctor repair paths clear the latch.
  • Gateway boot preflight: header-only version sweep of the state DB + registered agent DBs; refuses startup with one structured error per incompatible DB.
  • Updater preflight: package.json now publishes openclaw.schemaVersions; openclaw update fetches the target's declared support (npm registry / git show <rev>:package.json) and refuses before stopping any service when an on-disk DB is newer than the target supports. Dry-run reports it; targets without metadata skip the check.
  • No new downgrade cliff: deliberately no schema version bumps in this PR. The database_verifications table is additive derived cache (same fold pattern as 0c17cd4), so older builds still open the state DB.
  • Docs: new https://docs.openclaw.ai/reference/database-schemas - layout, versioning contract, per-version history mapped to release tags, integrity-check matrix, and an explicitly unsupported manual downgrade recipe with a worked 11->9 example.

User Impact

  • Beta upgraders from older releases: unchanged proven forward migrations (fixtures at schema 1/7/9/10 all land on current), now with a clear "migration pending, verifying integrity first" log instead of a silent multi-second stall on large DBs.
  • Downgrade attempts: refused before the service is stopped (updater), at gateway boot (preflight), and at every open (version gate) - each refusal instant, actionable, and pointing at the docs page.
  • Steady-state performance: per-open validation on a 756 MB DB drops from 763 ms to 1.6 ms (measured, ~475x); on the reported 21 GB DB that is ~30-45 s -> ~2 ms per open, and CLI one-shots stop paying a full-file scan per process launch.
  • Corruption detection moves off-thread but stays daily and still fails closed before mutations via the schema_meta check, migration-time full scan, and quarantine latch.

Evidence

  • Focused suites (all green, single run): node scripts/run-vitest.mjs src/infra/sqlite-integrity.test.ts src/infra/sqlite-user-version.test.ts src/state/openclaw-agent-db.test.ts src/state/openclaw-state-db.test.ts src/state/openclaw-database-maintenance.test.ts src/state/openclaw-database-preflight.test.ts src/state/openclaw-database-verify.test.ts src/commands/doctor-session-sqlite.test.ts src/commands/doctor-state-sqlite-compact.test.ts src/commands/doctor.test.ts src/infra/update-check.test.ts src/infra/update-runner.test.ts src/cli/update-cli.test.ts src/infra/tsdown-config.test.ts test/release-check.test.ts src/gateway/server-startup.test.ts
  • Contract coverage: newer+corrupt DB fails with SqliteSchemaVersionError (no scan), latch fail-fast + clear-on-repair, quarantine closes a live handle, boot preflight fixtures, updater refusal before service stop (package + git modes, dry-run, missing-metadata skip), package.json/constants drift guard, worker bundle packaging guard.
  • Perf: synthetic 756 MB agent DB - old per-open cost 763.2 ms (quick 171.4 + integrity 591.6 + fk 0.2) vs new 1.6 ms (schema_meta check 0.9 + version gate 0.7).
  • node scripts/generate-kysely-types.mjs --verify clean; git diff --check clean; oxfmt clean on all changed files; docs MDX/link checks green (738 files, 6061 links).
  • node scripts/check-changed.mjs (local fallback; Blacksmith backend timed out): all lanes green except the pre-existing main check:test-types orphans noted below; core pnpm tsgo clean, import cycles 0.
  • Six structured autoreview rounds (Codex gpt-5.6-sol, xhigh): every accepted finding fixed (durable quarantine rows enforced at open, preflight indeterminate fail-closed in the updater, post-stop TOCTOU recheck, git-metadata unreadable refusal, exact-version install pinning, doctor clear-failure surfacing). One consciously rejected finding remains, documented in code comments: when persisting a quarantine row fails (after a bounded retry of terminal rows), the quarantine stays process-local until the next daily verifier pass; the proposed durable out-of-band marker is a new storage surface (dedicated quarantine store) that needs a maintainer decision - flagged as follow-up.
  • Post-rebase note: check:test-types is broken on current origin/main by two orphaned test files (src/shared/deferred-event-buffer.test.ts, src/tools/protocol.test.ts) whose prod modules were deleted by the deadcode refactors; unrelated to this PR and repaired separately on main.

@steipete
steipete requested a review from a team as a code owner July 18, 2026 00:34
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations size: XL maintainer Maintainer-authored PR labels Jul 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e60e31b85c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

agentId: target.agentId,
pathname: sqlitePath,
});
requireQuarantineCleared();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear quarantine only after compact validation succeeds

When doctor --fix calls this path for an agent DB that is already at the current schema, migrateOpenClawAgentDatabaseForMaintenance() is a no-op, but this line still clears the persisted quarantine before compactDoctorSqliteFile() runs its full integrity check. If the later compact/validation fails because the original corruption is still present outside schema_meta, the row and in-process latch have already been removed, so subsequent opens can proceed via the cheap schema_meta check. Clear the quarantine only after the full repair/compact validation has succeeded.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. labels Jul 18, 2026
@clawsweeper

clawsweeper Bot commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 12:27 AM ET / 04:27 UTC.

Summary
The branch replaces synchronous full SQLite checks on ordinary opens with schema-first gates and targeted checks, adds gateway/update downgrade preflight plus delayed background full verification and quarantine, and documents database compatibility.

PR surface: Source +1224, Tests +864, Docs +120, Config +6, Generated +19, Other +111. Total +2344 across 46 files.

Reproducibility: no. high-confidence live reproduction is provided in the reviewed material. The source and supplied tests model schema incompatibility and corruption paths, but there is no inspectable real gateway/update/restart transcript for this head.

Review metrics: 1 noteworthy metric.

  • Persisted verification state: 1 additive table added; 0 state-schema-version increments. The new quarantine cache affects existing state databases while intentionally sharing schema version 3 with older builds.

Stored data model
Persistent data-model change detected: database schema: src/infra/sqlite-user-version.ts, database schema: src/state/openclaw-agent-db.test.ts, database schema: src/state/openclaw-database-preflight.test.ts, database schema: src/state/openclaw-database-verify.test.ts, database schema: src/state/openclaw-state-db.test.ts, database schema: src/state/openclaw-state-schema.generated.ts, and 36 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster
Relationship: partial_overlap
Canonical: #101290
Summary: This PR mitigates expensive repeat scans, downgrade handling, and post-detection quarantine, while the underlying live-state corruption investigation remains independently tracked.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Resolve the durable quarantine/restart behavior and add a focused restart regression test.
  • Post redacted live proof for updater refusal before service stop, gateway boot refusal, and successful post-doctor recovery.

Proof guidance:

  • [P1] Needs real behavior proof before merge: Focused tests and synthetic benchmarks are useful supplemental evidence, but no inspectable after-fix terminal, gateway log, updater, doctor, or restart transcript proves the changed behavior in a real setup. Add redacted evidence; after updating the PR body, request @clawsweeper re-review if a fresh review does not start automatically. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] If writing the durable quarantine record fails, a restart discards the process-local latch and can allow an already-detected corruption outside schema_meta to reopen without another full scan until the delayed verifier runs.
  • [P1] The PR changes persisted state and downgrade behavior while retaining the existing state-schema version, so fresh-install and existing-v3 upgrade paths need explicit evidence before merge.
  • [P1] An incompatible-update refusal is intentionally fail-closed; operators need real updater and managed-service-state-dir proof that refusal occurs before the healthy service is stopped.

Maintainer options:

  1. Close the restart quarantine gap (recommended)
    Before merge, keep corruption fail-closed across restart when database_verifications cannot be written and prove that behavior with a focused regression test.
  2. Accept the bounded restart window
    A maintainer may explicitly accept the process-local quarantine fallback, including its possibility of a cheap reopen before the next daily verifier run.
  3. Split the verifier hardening
    Land only the schema-ordering and update-preflight work after proof, while deferring background quarantine and the full-scan reduction until durable-state semantics are settled.

Next step before merge

  • [P1] This protected maintainer-labeled PR needs an explicit fail-closed persistence decision and contributor-supplied real behavior evidence before it can merge.

Maintainer decision needed

  • Question: When a full verifier proves corruption but cannot persist its quarantine row, should OpenClaw preserve the existing full-open integrity protection until durable state is recorded, or may a restart fall back to the cheaper schema_meta-only gate?
  • Rationale: This is a user-data and fail-closed boundary tradeoff: the branch intentionally removes the previous broad open-time scan, while the remaining durable marker lives in the database whose availability may be the failure condition.
  • Likely owner: steipete — They own the current design and recently merged adjacent SQLite safety work.
  • Options:
    • Keep a fail-closed fallback (recommended): Retain full integrity validation or an equivalent restart-safe guard whenever the quarantine record cannot be persisted, and add a restart regression test.
    • Approve the process-local window: Accept that a restart may use the targeted check until the next daily verifier pass when durable quarantine persistence fails.
    • Defer scan reduction: Keep the previous full open-time validation until maintainers approve a durable quarantine design.

Security
Cleared: The supplied diff adds no dependency, workflow-permission, package-install, or external-code-execution change; the material concern is data-integrity behavior, covered by the functional finding.

Review findings

  • [P1] Preserve fail-closed behavior when quarantine persistence fails — src/state/openclaw-database-verify.impl.ts:1-256
Review details

Best possible solution:

Preserve fail-closed protection across restart when verification persistence fails—either retain full open validation for that path or introduce an approved durable quarantine design—then provide redacted live proof of updater refusal-before-stop, gateway startup refusal, and repaired-database recovery.

Do we have a high-confidence way to reproduce the issue?

No high-confidence live reproduction is provided in the reviewed material. The source and supplied tests model schema incompatibility and corruption paths, but there is no inspectable real gateway/update/restart transcript for this head.

Is this the best way to solve the issue?

No. The cheap-gate and delayed-verifier direction is reasonable, but reducing full open-time validation is not safe until a failed quarantine write has a restart-safe fail-closed behavior.

Full review comments:

  • [P1] Preserve fail-closed behavior when quarantine persistence fails — src/state/openclaw-database-verify.impl.ts:1-256
    If the verifier proves corruption but cannot write database_verifications, the process-local latch disappears on restart while ordinary opens now run only the targeted schema_meta check. Keep full validation (or another restart-safe guard) until durable quarantine succeeds; otherwise a known-bad database outside that table can be reopened before the next daily verifier.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.87

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2a2e97b96057.

Label changes

Label justifications:

  • P1: A known-corrupt database may regain normal open behavior after restart when durable quarantine persistence fails, affecting active gateway and agent state.
  • merge-risk: 🚨 compatibility: The branch changes update refusal, startup behavior, and an existing persisted-state schema without a version increment.
  • merge-risk: 🚨 session-state: State and agent databases contain session and transcript data, and the new quarantine path can change whether they are opened after corruption detection.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Focused tests and synthetic benchmarks are useful supplemental evidence, but no inspectable after-fix terminal, gateway log, updater, doctor, or restart transcript proves the changed behavior in a real setup. Add redacted evidence; after updating the PR body, request @clawsweeper re-review if a fresh review does not start automatically. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +1224, Tests +864, Docs +120, Config +6, Generated +19, Other +111. Total +2344 across 46 files.

View PR surface stats
Area Files Added Removed Net
Source 20 1507 283 +1224
Tests 13 1071 207 +864
Docs 4 120 0 +120
Config 1 6 0 +6
Generated 2 19 0 +19
Other 6 143 32 +111
Total 46 2866 522 +2344

What I checked:

  • Durable quarantine gap: The PR adds persisted verification/quarantine handling, but its own body states that if persisting a quarantine row fails, the quarantine remains process-local until the next daily verifier pass; after a restart that latch is lost while ordinary opens have been reduced to a schema_meta-only integrity check. (src/state/openclaw-database-verify.impl.ts, facfd56bf535)
  • Reduced steady-state validation: The changed state and agent database open paths replace the prior full integrity validation with a schema-version gate and targeted schema_meta integrity validation, making durable quarantine the protection for corruption outside schema_meta after background detection. (src/state/openclaw-state-db.ts, facfd56bf535)
  • Persisted-state surface: The branch adds the additive database_verifications table while retaining state schema version 3, so upgrade behavior for existing state databases and failure handling of the verification store are compatibility-sensitive. (src/state/openclaw-state-schema.sql:953, facfd56bf535)
  • Prior integrity contract: The supplied related history identifies merged SQLite safety work that established fail-closed full integrity checks before writable initialization; this PR changes where that protection is enforced. (src/infra/sqlite-integrity.ts, cf2af03d02b8)
  • Proof remains non-inspectable: The PR body reports focused tests, benchmarks, and CI checks, but the provided PR discussion contains no redacted after-fix gateway, updater, doctor, or restart transcript demonstrating the claimed real behavior. (facfd56bf535)

Likely related people:

  • steipete: Authored this PR and previously merged the broad SQLite safety hardening that this branch extends, so they have demonstrated history on the current state-store contract. (role: recent SQLite safety contributor and current feature owner; confidence: high; commits: 30ae21fca71b, facfd56bf535; files: src/state/openclaw-state-db.ts, src/state/openclaw-agent-db.ts, src/state/openclaw-database-verify.impl.ts)
  • vincentkoc: The merged related SQLite fixes established full integrity and foreign-key checks before mutation, which this PR deliberately restructures. (role: introduced prior integrity-gate behavior; confidence: high; commits: a4cc24d113a4, cf2af03d02b8, 1592d422ee41; files: src/infra/sqlite-integrity.ts, src/state/openclaw-agent-db.ts, src/state/openclaw-state-db.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-07-18T01:20:10.255Z sha e60e31b :: needs real behavior proof before merge. :: [P1] Clear quarantine only after full repair validation succeeds
  • reviewed 2026-07-18T03:45:13.144Z sha facfd56 :: needs real behavior proof before merge. :: [P1] Defer quarantine clearing until compact validation succeeds

@steipete
steipete force-pushed the claude/database-versions-migration-7fc998 branch from e60e31b to 1cd3595 Compare July 18, 2026 03:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cd35959ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1093 to +1097
} catch {
// Accepted tradeoff: a locked/unavailable state DB must not block agent
// opens, or every transient state hiccup takes all agents down. The
// in-process latch still covers this process; a missed cross-process
// quarantine is re-detected by the next daily verifier pass.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fail closed on quarantined state DB before agent opens

When the state DB itself has a durable quarantine row after a restart, readOpenClawDatabaseVerification() throws SqliteIntegrityError; this blanket catch treats it like a transient lock and proceeds to open/migrate the agent DB without enforcing any persisted agent quarantine rows. The later registry write will still fail on the quarantined state DB, but by then ensureAgentSchema() may already have updated schema_meta/indexes in a database the verifier marked bad, so deterministic state quarantine should fail closed here while only transient lock/unavailable errors are skipped.

Useful? React with 👍 / 👎.

Comment on lines +1223 to +1225
? checkTargetDatabaseSchemas(
packageTargetSchemaVersions,
preManagedServiceStop?.serviceEnv ?? process.env,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check managed service state dir before stopping

When a managed gateway service uses its own OPENCLAW_STATE_DIR, the earlier package preflight checks process.env, and this service-env check runs only after stopManagedServiceBeforeMutableUpdate() has already stopped the service. In that setup an incompatible target is still able to interrupt the healthy gateway before being refused; inspect the service env and run this schema preflight before issuing the stop, then keep this post-stop recheck only for TOCTOU.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added the app: ios App: ios label Jul 18, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 18, 2026
@steipete
steipete merged commit a89f01a into main Jul 18, 2026
196 of 201 checks passed
@steipete
steipete deleted the claude/database-versions-migration-7fc998 branch July 18, 2026 04:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Jul 18, 2026
…nd downgrade protection (#110271)

* perf(sqlite): gate schema version before integrity scans and quarantine terminal open failures

* feat(gateway): refuse incompatible database schemas at boot and verify integrity in the background

* feat(update): refuse installing builds that cannot open the current databases

* docs: add database schema reference with version history and downgrade guidance

* test(update): tolerate optional runner options in git-mutation mocks

* refactor(update): split npm package-target metadata out of update-check

* chore: model verifier internals for knip and regenerate docs map

* chore(i18n): resync stale iOS localization catalog

* chore: allowlist read-only preflight and verifier raw SQLite access
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 18, 2026
…nd downgrade protection (openclaw#110271)

* perf(sqlite): gate schema version before integrity scans and quarantine terminal open failures

* feat(gateway): refuse incompatible database schemas at boot and verify integrity in the background

* feat(update): refuse installing builds that cannot open the current databases

* docs: add database schema reference with version history and downgrade guidance

* test(update): tolerate optional runner options in git-mutation mocks

* refactor(update): split npm package-target metadata out of update-check

* chore: model verifier internals for knip and regenerate docs map

* chore(i18n): resync stale iOS localization catalog

* chore: allowlist read-only preflight and verifier raw SQLite access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant