Repository navigation
fix(sqlite): snapshot live databases through the online-backup owner - #175774
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
October 17, 2026 18:46
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 17, 2026
This was referenced Oct 17, 2026
steipete
added a commit
that referenced
this pull request
Oct 17, 2026
Replace the infra/integration name split with the existing weighted allocator over the unchanged target inventory. Commit advisory target weights; new tests still enter the inventory with a default weight. Keep worker limits and the existing aggregate gate. Count all three hosted jobs in admission and restore a 30-minute deadline for every row. Three hourly runs measured 23.28/12.70, 26.22/15.75, and 25.80/24.87 minutes (35.98, 41.97, and 50.67 total job-minutes). Replaying per-file spans, project overhead, and the single runtime-build owner projects: 10.82/11.58/17.57, 12.85/13.98/18.30, and 16.43/18.70/20.16 minutes. For the latest workload, the critical path drops about 5.6 minutes (22%) at a cost of about 4.6 extra job-minutes. The slowest row has 9.84 minutes of deadline margin. These are projections, not post-change CI results; the latest infra run includes eight failed cases and already has #175774. Evidence: all 88 targets occur exactly once in the dry-run partition. The old runner fails the new numeric-shard regression. Focused runner, workflow, admission and allocator tests pass (41 selected tests), as do targeted types, script/test lint, format, syntax and workflow validation with pinned actionlint and zizmor. Final P2 review is scoped-clean. No CI dispatches or reruns were used for proof.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 18, 2026
…penclaw#175774) Read-only state snapshots used for config and plugin metadata (openclaw config validate, plugin update ownership/inventory) copied the database files and compared them until they stopped changing; against a busy live Gateway, WAL/checkpoint churn exhausted all ten attempts and the command failed. When the database's recorded owner is verified live (pid + start time + namespace), metadata reads now take one transactionally consistent snapshot through the existing online-backup owner. Offline, forensic, recovery and unverifiable-owner reads keep the byte-neutral copy path and existing guards. The integrity-and-recovery contract documents the split. Fixes openclaw#160483
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 18, 2026
Replace the infra/integration name split with the existing weighted allocator over the unchanged target inventory. Commit advisory target weights; new tests still enter the inventory with a default weight. Keep worker limits and the existing aggregate gate. Count all three hosted jobs in admission and restore a 30-minute deadline for every row. Three hourly runs measured 23.28/12.70, 26.22/15.75, and 25.80/24.87 minutes (35.98, 41.97, and 50.67 total job-minutes). Replaying per-file spans, project overhead, and the single runtime-build owner projects: 10.82/11.58/17.57, 12.85/13.98/18.30, and 16.43/18.70/20.16 minutes. For the latest workload, the critical path drops about 5.6 minutes (22%) at a cost of about 4.6 extra job-minutes. The slowest row has 9.84 minutes of deadline margin. These are projections, not post-change CI results; the latest infra run includes eight failed cases and already has openclaw#175774. Evidence: all 88 targets occur exactly once in the dry-run partition. The old runner fails the new numeric-shard regression. Focused runner, workflow, admission and allocator tests pass (41 selected tests), as do targeted types, script/test lint, format, syntax and workflow validation with pinned actionlint and zizmor. Final P2 review is scoped-clean. No CI dispatches or reruns were used for proof.
This was referenced Oct 19, 2026
RomneyDa
added a commit
that referenced
this pull request
Oct 28, 2026
Replace the infra/integration name split with the existing weighted allocator over the unchanged target inventory. Commit advisory target weights; new tests still enter the inventory with a default weight. Keep worker limits and the existing aggregate gate. Count all three hosted jobs in admission and restore a 30-minute deadline for every row. Three hourly runs measured 23.28/12.70, 26.22/15.75, and 25.80/24.87 minutes (35.98, 41.97, and 50.67 total job-minutes). Replaying per-file spans, project overhead, and the single runtime-build owner projects: 10.82/11.58/17.57, 12.85/13.98/18.30, and 16.43/18.70/20.16 minutes. For the latest workload, the critical path drops about 5.6 minutes (22%) at a cost of about 4.6 extra job-minutes. The slowest row has 9.84 minutes of deadline margin. These are projections, not post-change CI results; the latest infra run includes eight failed cases and already has #175774. Evidence: all 88 targets occur exactly once in the dry-run partition. The old runner fails the new numeric-shard regression. Focused runner, workflow, admission and allocator tests pass (41 selected tests), as do targeted types, script/test lint, format, syntax and workflow validation with pinned actionlint and zizmor. Final P2 review is scoped-clean. No CI dispatches or reruns were used for proof. Adapted for beta.5 numeric shard API compatibility only. Upstream evidence above describes the donor, not local release qualification. Co-authored-by: RomneyDa <[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.
Fixes #160483
What Problem This Solves
config validateand plugin-update config/inventory reads can exhaust ten private SQLite copy attempts while a live Gateway checkpoints its WAL, even though the database is healthy.User Impact
CLI plugin metadata inspection can read a busy live database without waiting for its files to stop changing. Offline, unverifiable-owner, inherited-snapshot, and schema-maintenance reads retain artifact-preserving behavior. Snapshot errors still fail with their existing diagnostics; unreadable inventory is never treated as empty.
Why This Change Was Made
The shared snapshot worker now checks the exact database's recorded Gateway or embedded-writer owner using the existing process-identity verifier. A verified live owner selects the existing online-backup implementation, which pins one read transaction and permits normal SHM read marks. Other sources retain private copying. Physical identity, admission, and cleanup checks remain in place.
Removed the separate metadata snapshot operation and its extra dispatch; metadata now uses the shared snapshot lifecycle. Native backup runs in a one-shot child, retaining the existing protection against persistent-IPC backup stalls. No schema, stored-data, or user-config changes.
Evidence
integrity_check, preserves equal transaction generations, and keeps the retained snapshot below 34 MiB.pnpm openclaw config validate --jsonreturnedvalid:true,warnings:[];pnpm openclaw plugins update --all --dry-runexited 0 with no tracked installs. Gateway stayed alive through both commands and logged clean shutdown in 131 ms. This was an inventory/preflight smoke, not a package installation. The earlier dirty-tree source launch hit the artifact-publication fence before SQLite; committing the reviewed inputs resolved that launcher-only refusal.test/scripts/vitest-worker-artifacts.test.tstook 185.869 s (30 tests); its slowest case, “builds changed source despite valid stale dist and fails visibly on build errors,” took 38.456 s because it builds full worker graphs and reconstructs the fixture checkout. No timeouts or retries were raised.check:changedSQLite inventory was omitted under the local gate budget. The max-lines checker reports inherited suppressions in untouchedchat-message.test.tsx,config-page-state.ts, andsessions-page-state.ts; these files match the starting HEAD.Production: +92/-188 (net -96). Tests: +250/-8 (net +242). Documentation: +8/-0. Wrapper inventory: -1 obsolete entry.
Focused and live proof commands
All runtime commands used isolated
HOMEandOPENCLAW_STATE_DIRbeneath the worktree’s.artifacts/l1676/; no existing Gateway was used or stopped.