Skip to content

feat: retain repository disk authority through recovery - #189106

Merged
roboclaw-bot merged 23 commits into
mainfrom
openclaw/s5-workspace-disk-authority
Nov 1, 2026
Merged

roboclaw-bot merged 23 commits into
mainfrom
openclaw/s5-workspace-disk-authority

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Repository recovery needs to remember which exact retained disk owns accepted work, rather than treating an older Gateway mirror as the latest workspace after a restart.

Prerequisite #189019 is merged as ff3ab23502010d1437c4afa5d7657a6d5e23111a. GitHub subsequently retargeted this PR to main; the history-preserving integration retains the original 66-file authority/recovery child scope.

User Impact

No disk-mode selector is enabled. Mirrored sessions keep their existing behavior. This is an inactive implementation prerequisite, not delivery of retained-disk workspaces.

Shared-state schema v38 adds nullable repository and pending-result authority fields after v37. Existing pending results remain mirrored, optional repository storage stays lazy, and older binaries refuse the upgraded schema. Rollback uses the existing exact predecessor backup.

Why This Change Was Made

  • The existing repository owner binds one immutable environment/resource receipt. The existing pending-result owner records that authority when accepting custody; retries never infer it from a replacement environment.
  • Recovery settles only the original attached disk after cleanup. A missing/replaced disk, stale placement, failed cleanup, or transfer stays held: no stale-mirror restore, automatic replacement, input replay, or disk destruction.
  • Until explicit disk I/O/export support follows, stored file fallback, new publication fallback, and Gateway materialization refuse disk authority. Previously pinned publication snapshots remain usable.
  • SQLite, PostgreSQL, Doctor, predecessor restore, generated catalogs, and native schema-version metadata move together. No new manager, queue, cache, config switch, or public protocol field.

Simplification retained one repository owner and one pending-result owner, reused existing cleanup/settlement, shared migration registration, and one predecessor-schema transform chain for runtime admission and generated catalogs. Against the prerequisite: production/metadata +615/-131, tests +651/-18, generated catalogs +152/-110. Nullable fields and migration/recovery/consumer proofs account for the growth; activation, provider lifecycle, and explicit I/O/publication remain separate.

Exact candidate and completed qualification

Signed head 4484b72104c5a0440b265edded765e7863214c56, tree e0d308184606aca3f41d4cbfc3bc7e7199e7522c, has parents prior S5 85fd5881e810bb35f9d36ea0389bb7cd9bcc1c50 and landed prerequisite/main ff3ab23502010d1437c4afa5d7657a6d5e23111a. The original native proof-publication receipt remains historical. Required R2 installed-v38 qualification is now complete on this unchanged candidate; correction review is READY for ordinary native qualification. This is not full feature activation or a merge claim.

  • Native integration resolved 26 explicit conflict tuples, mostly replay of the squashed prerequisite. Independent child-only replay isolated one behavior overlap: retain the runtime disk-authority argument and the already-landed fix(workers): recover interrupted stops without a Gateway restart #188805 interrupted-drain recovery/refusal branch. All 66 child paths survive. Generated resolutions retain canonical output blobs; no hand-edited generated bytes or new production mechanism/test scaffold.
  • 45 tests passed in two affected recovery suites, including disk custody and mirrored/interrupted-Stop siblings: Vitest 138.94s, maintained wrapper 150.78s, compiler verification/cleanup completed. Core production types, 13,904 generated SDK declarations, default targeted lint, canonical formatting and whitespace passed.
  • Fresh independent canonical autoreview P0–P3 covered the full ff3ab235… → 4484b721… candidate in four completed passes, with 15 intact owner contracts and default 512,000-byte budget: scoped-clean, zero actionable findings, final source verified.
  • Exact-head CI 41246181517, attempt 1: SUCCESS, native watcher GREEN. Earlier failed runs remain historical nonpasses.
  • R2 installed-v38 PASS: native allocation 41259598834 executed the immutable exact-4484 package through the installed upgrade owner. Inner command and wrapper exited 0/settled. The allocation Actions conclusion is cancelled after owned stop—not a claimed green CI run. Genuine installed/serving stable 8b18b5578f66eab1501cba4cef2310d88bfb9a41 upgraded to exact installed/serving 4484b721…; shared schema 38 and both agent schemas 39, integrity/FKs clean and logical database hashes unchanged. Offline synthetic legacy repository/pending/placement rows survive; both new authority columns are nullable TEXT and remain NULL; mirrored storage survives and the staged result stays unaccepted. Positive stop then new PID/invocation proves cold reopen, exact serving build and HTTP readyz 200. No additional containers/volumes; final service stop terminated and independent lease completed/noIP. Evidence archive SHA256: e2bd85c46d939c47f0af24ceaa8b4108965e83f79ee1a4727c87c11eb9fc68d0.
  • Limits: synthetic legacy data in the real released installation, not a user-row producer or accepted-result settlement. No disk recovery/Move/live provider/model/later-head acceptance. Handshake lacks operator.read and proves build identity only, supplemented by independent readyz. Actual 4 CPUs despite requested 16-class label; no performance claim. Earlier hosted ENOSPC and two cancelled pre-test allocations remain nonpasses. R2 closure does not waive downstream feature, release, or controller gates.

Historical proof and retained nonpasses

  • Prior 85fd5881… integrated exact receipt f4255b1d…; child-only 66 files +1,419/-264. 312 tests in 11 files passed across catalog equivalence, generation, historical layout, recovery, repository/migration/index/update owners. Completed shard walls: 35.90s, 23.70s, 857.18s, 162.68s, 282.68s; final seven-file owner command 507.36s. Canonical generation/freshness, core typing, type-aware lint/format, ratchet and whitespace passed; 136 tables/1,418 columns with two reported SQLite-only columns. Three full P0–P3 review passes were scoped-clean. An earlier 1,800s outer command exhausted its budget after 201 cases; a later command was interrupted after 23 generator cases. Only unfinished lanes resumed; neither interruption is an aggregate pass.
  • Its CI 41235886063, attempt 1, failed: 151 successful jobs, two failed, 19 skipped. Bundle-14 and aggregate gate failed at extensions/memory-core/src/memory/manager-publication-admission.test.ts:349: integrityChecked false versus true, with ftsAvailable: true, schemaRebuilt: false. All ten determining files match receipt f4255b1d…; receipt audit traced the changed contract to upstream 84bfd8a445e9d8090b8f0d4532cd8165729b9bb5. This is source-attributed inherited failure, not an exact-base failing replay or a green run. Attached checks then: 184 success, two failed, 45 skipped. No rerun/assertion relaxation.
  • 69bb05a2… repaired stale context/startup contracts (55 cases) and exact update diagnostic expectations introduced by fix: managed updates refuse a valid runtime after Homebrew Node changes #189061 (40 cases; refusal reproduced red). Types/budget and four refreshed-candidate plus one diagnostic-repair P0–P3 passes succeeded. CI 41195194197 was green for that prior head only. The iOS issue has independent owner fix(ios): stabilize Watch runtime before screenshot capture #189217; old root-help timeout was not declared fixed by replay.
  • 06079b6e… integrated the provider-teardown settlement fix and its two regressions, with clean independent review and exact allocation reduction 633→628. CI 41189473412 failed on target-schema diagnostic suffix, 120s root-help build timeout, and CoreSimulator ending the task-owned session before Booted. The build cause remained unqualified; no failure was waived or rerun.
  • Original implementation 5124af95…: 39 worker/store recovery cases (seven disk, 32 mirrored); seven SQLite runtime/Doctor/legacy/optional-table/rollback/refusal/corruption cases; 11 repository-owner cases. Live disposable PostgreSQL 17 qualified 17 distinct migration/restore cases, including optional storage, v37→38, predecessor backup, partial-DDL rollback and older sources. Final subset seven passed/19 unselected skips. Initial old-version restores exceeded server lock budget; documented CI max_locks_per_transaction=512 supported the successful execution. Catalog conformance: 136 tables/1,416 columns, no unexplained drift. Disposable database/container removed.
  • Original production/test typing, type-aware lint, format, schema guard, Kysely/transaction guards, line budget and whitespace passed. Final consumer/migration execution: 128 tests in eight files (23 historical preflight, 98 publication/materialization/projection/receipt, seven repository migrations). This repaired historical SQLite catalog/admission mismatch by sharing the predecessor transform chain. CI 41176476622 was green only for that implementation head.
  • Earlier CI 41174270463 found package metadata, fixture scope/order, wrapper closure and PostgreSQL predecessor omissions. They were reproduced/repaired: 156 affected tests then 13 PostgreSQL owner tests passed. No skips/catalog guards weakened. Ten implementation P0–P3 passes and one per CI repair completed; the sole old-index finding was resolved by staging already-reviewed content with index/worktree equality.

Allowed control: exact attached disk settles/releases without mirror capture or destruction. Missing/replaced disk, cleanup failure, or placement drained during cleanup retain pending work. Existing pinned publication remains usable; new disk publication refuses the old mirror.

This does not claim real cloud suspend/resume, a live model disk-mode turn, disk-backed file/publication delivery or full feature acceptance. The narrow installed stable-to-v38 rehearsal is qualified above; later lifecycle/consumer/activation proof remains separate. No deployment or merge is claimed here.

The hosted review of older da0ef0c8b0c7 identified metadata, fixture, inventory and ordering defects repaired above. Its transport-level reassignment/revocation request is not established by store tests. Activation remains off; subsequent #189263 supplies real cleanup-transport reassignment/revocation qualification on its own head, not retroactive proof for this narrower prerequisite.

Contributed by @galiniliev.

Work sessions

roboclaw-bot and others added 9 commits October 31, 2026 03:44
Persist immutable provider receipts through the existing environment writer before setup and enrollment. Reuse them for recovery, inspection, and confirmed exact-resource teardown. Retained allocation, pause/resume, and disk-authoritative workspaces remain inactive. Related: #188796.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: 79a28e77-6a76-4cd6-bd81-e44cc99064b5
Resolve the package metadata conflict by preserving this prerequisite state schema 37 and current main agent schema 39. Receipt behavior is unchanged; canonical schema generators and all 10 receipt store/migration tests pass after integration.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: fea66917-e69b-4777-b127-03eb548d7c89
Keep the historical migration expectation values unchanged while satisfying no-shadow.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: 147bd311-a32a-4cc1-a4c2-116b71affb91
Preserve receipt custody through provisioning failure, select the complete placement row, align PostgreSQL additive column positions, and update schema-bound consumers and regression fixtures.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: aa6ef0fc-2c5f-4e21-94bc-6ead8b0adea2
Persist exact repository disk identity and accepted pending-result authority in shared state v38. Keep mirrored results unchanged, hold missing or replaced disks, and refuse stale file, publication, and materialization fallbacks. Disk mode remains inactive until explicit I/O and lifecycle support follows.

Co-authored-by: galiniliev <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: voice-call Channel integration: voice-call gateway Gateway runtime scripts Repository scripts size: XL labels Oct 31, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 31, 2026 05:51
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 31, 2026
Declare shared-state schema 38 in package admission metadata, include the exact migrated tables in historical scope proofs, preserve canonical test ordering, and close the trusted PR wrapper import inventory.

Co-authored-by: galiniliev <[email protected]>
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR persists exact repository disk identity through pending-result recovery and blocks fallback to stale Gateway mirrors.

Example: An internally bound repository records original-disk, but recovery observes replacement-disk.

  • Before: Recovery has no persisted repository disk binding distinguishing the original resource from its replacement.
  • After: Recovery preserves pending work and refuses mirror restoration or settlement against replacement-disk.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The accepted prerequisite has useful store-level coverage, but required authority evidence is mock-only and concrete update and consumer regressions block merge.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦪 silver shellfish (2/6) Security review found an item that needs attention.

Product

Kind: Feature · Worth it: Yes · Fix scope: Partial
User problem: Future retained-disk sessions must not recover an older Gateway mirror as though it contained the latest accepted work.
Reason: The collaborator-authored direction and canonical program explicitly approve a separate inactive authority/recovery prerequisite; complete retained lifecycle and disk-backed consumers remain later slices.

Merge readiness

⛔ Blocked before merge - 11 items remain

Keep this approved, collaborator-authored prerequisite open; the schema change introduces an update-admission regression and leaves several dependent CI consumers broken.

Priority: P2
Reviewed head: da0ef0c8b0c7a3d6b772ec2c910b6c8647e02fbf

Before merge

  • Add real behavior proof - Authority-chain proof required: supplied tests exercise the repository and placement owners, including missing/replacement disks and draining during mocked cleanup, but do not exercise real transport cleanup for the allowed owner, nearest reassigned session, or revocation during cleanup; provide a redacted production-path trace showing rejection before I/O and settlement, without exposing IPs, keys, or non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Advance package schema metadata alongside the runtime schema (P1) - The runtime now writes shared-state schema 38, but package.json still declares openclaw.schemaVersions.state as 37. Candidate admission reads that manifest and refuses a profile already migrated by this build. Exact-head CI reports the corresponding schema-38/target-37 refusal in update admission. Update the package declaration to 38 while preserving agent schema 39.
  • Include the newly reachable imports in the PR wrapper inventory (P1) - The new repository authority/kernel imports expand the runtime closure of code extracted by scripts/pr, but wrapper-components.txt adds only the migration module. The extracted context cannot resolve session-repository-workspaces.authority.js, and CI identifies ten missing transitive files. Complete the inventory for the actual import closure, including the repository authority, kernel, receipts, and their environment dependencies.
  • Extend historical SQLite migration scopes for the new columns (P2) - The v25 head-layout and v26 write-index tests migrate their historical databases all the way to the current schema, but their explicit allowed-table scopes omit session_repository_workspaces and worker_workspace_pending_results. The new v38 migration changes both tables, so runtime and Doctor cases now fail with undeclared-table changes. Add these two narrowly justified tables to both consumer scopes without weakening unrelated preservation assertions.
  • Restore the pending-result table in PostgreSQL predecessor fixtures (P2) - restoreEmptyPredecessorTables starts from a fresh current schema and reconstructs selected old tables before stamping an older version. It does not reconstruct worker_workspace_pending_results, which now retains repository_disk_authority_json even though the registered predecessor excludes it. Historical admission therefore fails before the migration can be exercised; exact-head CI reports this in bootstrap and v25–v28 migration cases. Restore the affected empty table from the registered predecessor, preserving its real column positions and constraints.
  • Register the recovery test in canonical selection order (P3) - The new placement-repository-disk-recovery entry appears after placement-store-terminal instead of before placement-session-read. Canonical selection sorts this path differently from the explicit worker inventory, causing the CLI ownership suite to fail across Gateway selections. Move the entry into its canonical position without changing project membership.
  • Resolve security concern: Qualify authority at cleanup and settlement effects - The new recovery branch consumes persisted disk identity to invoke cleanup and settle retained work. Its real-store tests mock stopTunnel, so they do not establish rejection at the actual transport effect for a replacement session or authority revoked during awaited cleanup.
  • Resolve merge risk - Before merge, the PR owner must qualify that recorded disk custody cannot authorize transport cleanup or settlement after attachment reassignment or placement-authority revocation.
  • Resolve merge risk - Before targeting main, the PR owner must land feat(workers): bind cleanup to recorded cloud resources #189019 and verify that the comparison still contains only this dependent slice.
  • Improve patch quality - Add final-effect proof using real cleanup transport for the original owner, a reassigned session, and revocation during cleanup before I/O or settlement.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P1] Advance package schema metadata alongside the runtime schema — src/state/openclaw-schema-versions.ts:47
  • [P1] Include the newly reachable imports in the PR wrapper inventory — src/gateway/worker-environments/placement-workspace-result.ts:6-10
  • [P2] Extend historical SQLite migration scopes for the new columns — src/state/openclaw-state-db-write-index-migration.test.ts:100-104
  • [medium] Qualify authority at cleanup and settlement effects — src/gateway/worker-environments/workspace-result-settlement.ts:326

Tests

  • Missing end-to-end proof: Supply a production-path recovery trace with real cleanup transport, allowed and reassigned/revoked owners, and a latest-stable upgrade preserving existing settings and data; base-red/head-green regression execution is not shown.
Agent review details

How this fits together

The Gateway repository owner stores workspace identity, while placement recovery consumes pending worker results and either settles their original disk custody or preserves mirrored checkpoints.

flowchart TD
  A[Worker result] --> B[Repository workspace owner]
  B --> C[Pending result owner]
  C --> D[Placement recovery]
  D --> E[Exact attachment and resource checks]
  E --> F[Cleanup and settlement]
  E --> G[Hold pending work]
Loading

Technical review

Best possible solution:

Keep disk authority inactive, repair schema metadata and affected consumers, and qualify original-owner recovery through the existing repository and placement owners.

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

Source and exact-head CI establish the schema-admission mismatch and dependent consumer failures; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The inactive prerequisite fits the accepted staged design and reuses existing owners; the smallest complete implementation needs the accompanying metadata, fixture, inventory, and routing repairs.

Full review comments:

  • [P1] Advance package schema metadata alongside the runtime schema — src/state/openclaw-schema-versions.ts:47
    The runtime now writes shared-state schema 38, but package.json still declares openclaw.schemaVersions.state as 37. Candidate admission reads that manifest and refuses a profile already migrated by this build. Exact-head CI reports the corresponding schema-38/target-37 refusal in update admission. Update the package declaration to 38 while preserving agent schema 39.
    Confidence: 1
  • [P1] Include the newly reachable imports in the PR wrapper inventory — src/gateway/worker-environments/placement-workspace-result.ts:6-10
    The new repository authority/kernel imports expand the runtime closure of code extracted by scripts/pr, but wrapper-components.txt adds only the migration module. The extracted context cannot resolve session-repository-workspaces.authority.js, and CI identifies ten missing transitive files. Complete the inventory for the actual import closure, including the repository authority, kernel, receipts, and their environment dependencies.
    Confidence: 0.99
  • [P2] Extend historical SQLite migration scopes for the new columns — src/state/openclaw-state-db-write-index-migration.test.ts:100-104
    The v25 head-layout and v26 write-index tests migrate their historical databases all the way to the current schema, but their explicit allowed-table scopes omit session_repository_workspaces and worker_workspace_pending_results. The new v38 migration changes both tables, so runtime and Doctor cases now fail with undeclared-table changes. Add these two narrowly justified tables to both consumer scopes without weakening unrelated preservation assertions.
    Confidence: 1
  • [P2] Restore the pending-result table in PostgreSQL predecessor fixtures — src/state/openclaw-state-db.postgres.test.ts:149-151
    restoreEmptyPredecessorTables starts from a fresh current schema and reconstructs selected old tables before stamping an older version. It does not reconstruct worker_workspace_pending_results, which now retains repository_disk_authority_json even though the registered predecessor excludes it. Historical admission therefore fails before the migration can be exercised; exact-head CI reports this in bootstrap and v25–v28 migration cases. Restore the affected empty table from the registered predecessor, preserving its real column positions and constraints.
    Confidence: 0.98
  • [P3] Register the recovery test in canonical selection order — test/vitest/vitest.gateway-server-paths.mjs:427
    The new placement-repository-disk-recovery entry appears after placement-store-terminal instead of before placement-session-read. Canonical selection sorts this path differently from the explicit worker inventory, causing the CLI ownership suite to fail across Gateway selections. Move the entry into its canonical position without changing project membership.
    Confidence: 1

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 19f2ad1939d7.

Merge-risk options

Maintainer options:

  1. Qualify original-owner recovery (recommended)
    The PR owner should demonstrate allowed cleanup and settlement, replacement-session rejection, and revocation during awaited cleanup through the real transport boundary.
  2. Keep the prerequisite stacked
    Keep this branch held until its prerequisite lands and the authority boundary is qualified.

Provenance checked

Testing

Proof path: in-process harness.

Security

Needs attention: No concrete authorization bypass was established, but persisted disk custody needs final transport proof after attachment reassignment and authority revocation.

Evidence

Security concerns:

  • [medium] Qualify authority at cleanup and settlement effects — src/gateway/worker-environments/workspace-result-settlement.ts:326
    The new recovery branch consumes persisted disk identity to invoke cleanup and settle retained work. Its real-store tests mock stopTunnel, so they do not establish rejection at the actual transport effect for a replacement session or authority revoked during awaited cleanup.
    Confidence: 0.95

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 124ddc0 adds src/state/session-repository-workspaces.kernel.ts:129 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 124ddc0a49fe; files: src/state/session-repository-workspaces.kernel.ts)
  • RoboClaw: Raw commit 87ff32d adds src/state/session-repository-workspaces.kernel.ts:159 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 87ff32dbf367; files: src/state/session-repository-workspaces.kernel.ts)

PR surface

Source +492, Tests +621, Docs +30, Other -8. Total +1135 across 62 files. Added test files: 4.

View PR surface stats
Area Files Added Removed Net
Source 35 712 220 +492
Tests 22 626 5 +621
Docs 2 31 1 +30
Config 0 0 0 0
Generated 0 0 0 0
Other 3 10 18 -8
Total 62 1379 244 +1135

Review metrics

Metric Value Why it matters
Persisted schema contract State 37 → 38; two nullable authority columns; agent schema remains 39 Existing state requires migration even though disk-mode activation remains disabled.

Root-cause cluster

Relationship: partial_overlap
Canonical: #188796
Summary: This PR implements the durable repository/result authority slice of the accepted retained-disk program.

Members:

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

Labels

Label changes:

  • add P2: This is an approved, inactive feature prerequisite with concrete repairs needed before it can land.
  • add merge-risk: 🚨 compatibility: Runtime schema 38 conflicts with package metadata declaring support for 37, causing update admission to reject current state.
  • add merge-risk: 🚨 security-boundary: Persisted resource custody now influences cleanup and settlement across restarts, while final transport rejection after reassignment or revocation remains unqualified.
  • add merge-risk: 🚨 automation: New runtime imports are absent from the trusted PR wrapper inventory, breaking extracted wrapper dependency resolution.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: This is an approved, inactive feature prerequisite with concrete repairs needed before it can land.
  • merge-risk: 🚨 compatibility: Runtime schema 38 conflicts with package metadata declaring support for 37, causing update admission to reject current state.
  • merge-risk: 🚨 security-boundary: Persisted resource custody now influences cleanup and settlement across restarts, while final transport rejection after reassignment or revocation remains unqualified.
  • merge-risk: 🚨 automation: New runtime imports are absent from the trusted PR wrapper inventory, breaking extracted wrapper dependency resolution.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 2:11 AM ET / 06:11 UTC.

Rebuild the empty pending-result table alongside worker receipts and preserve incoming foreign keys from installed lazy fragments when restoring historical test schemas.

Co-authored-by: galiniliev <[email protected]>
roboclaw-bot and others added 2 commits October 31, 2026 09:15
Compose legacy schema transformations in canonical order, preserve installed PostgreSQL foreign keys in historical fixtures, and settle confirmed deletion after shutdown aborts new effects.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: 1cb5a42a-b4a8-43a9-8242-1e75244865d8
roboclaw-bot and others added 4 commits October 31, 2026 09:25
Preserve the v38 predecessor schema and installed foreign-key repairs while incorporating confirmed provider teardown settlement from the published prerequisite.

Co-authored-by: galiniliev <[email protected]>
Integrate main 64daa25 to repair the actual provider-lifecycle conflict. Keep the receipt-owned SSH bootstrap extraction and the incoming destructured clock default. Shared-state schema remains 37. Affected receipt, image-intent, teardown-drain, and migration tests: 18 passed; targeted Gateway typing and lifecycle lint passed.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: c1df24cc-0977-428a-bfbc-8ba8a983218b
The published prerequisite now owns five lines previously counted in this child. Reduce the child allocation to its measured 628-line delta.

Co-authored-by: galiniliev <[email protected]>
roboclaw-bot and others added 2 commits October 31, 2026 10:50
Integrate published receipt head8042bdde and canonical startup/context contracts. Preserve shared-state38 disk authority and all accepted-result recovery invariants.

Co-authored-by: galiniliev <[email protected]>
Keep exact update-admission expectations aligned with the canonical updater and PATH diagnostic suffix, without relaxing no-effect assertions.

Co-authored-by: galiniliev <[email protected]>
roboclaw-bot and others added 3 commits October 31, 2026 14:04
Merge main ef60dd0 without rewriting receipt work. Regenerate canonical catalogs while retaining shared-state37.

Independent P0-P3 review: rejected the reported Azure fixed-lease recovery gap as unreachable for receipts: receipt producer/identity parser only accept azure-sandbox; provisioning and destruction reject a differing provider before stop. The azure recovery branch remains receipt-less.

Co-authored-by: galiniliev <[email protected]>
Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: aad1f458-d629-42e3-b44e-a1a2c937d658
Merge the exact receipt prerequisite while preserving S5 disk authority and recovery. Regenerate the conflicting SQLite state catalogs from their combined canonical schema inputs.

Co-authored-by: galiniliev <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot removed the cli CLI command changes label Oct 31, 2026
Base automatically changed from openclaw/s4-retained-session-disk to main October 31, 2026 21:46
Baseline-Refresh: a50e4241367e3e5007909872c59505785f27fb62
Co-authored-by: galiniliev <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit 7faf32d into main Nov 1, 2026
253 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/s5-workspace-disk-authority branch November 1, 2026 01:26
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
)

* feat(workers): bind cleanup to recorded cloud resources

Persist immutable provider receipts through the existing environment writer before setup and enrollment. Reuse them for recovery, inspection, and confirmed exact-resource teardown. Retained allocation, pause/resume, and disk-authoritative workspaces remain inactive. Related: openclaw#188796.

Co-authored-by: galiniliev <[email protected]>

* feat(workers): bind cleanup to recorded cloud resources

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: 79a28e77-6a76-4cd6-bd81-e44cc99064b5

* Publish openclaw/s4-retained-session-disk

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: fea66917-e69b-4777-b127-03eb548d7c89

* test(state): avoid shadowing the migration fixture path import

Keep the historical migration expectation values unchanged while satisfying no-shadow.

Co-authored-by: galiniliev <[email protected]>

* Publish openclaw/s4-retained-session-disk

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: 147bd311-a32a-4cc1-a4c2-116b71affb91

* fix(workers): complete resource receipt consumers and migration parity

Preserve receipt custody through provisioning failure, select the complete placement row, align PostgreSQL additive column positions, and update schema-bound consumers and regression fixtures.

Co-authored-by: galiniliev <[email protected]>

* Publish openclaw/s4-retained-session-disk

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: aa6ef0fc-2c5f-4e21-94bc-6ead8b0adea2

* feat: retain repository disk authority through recovery

Persist exact repository disk identity and accepted pending-result authority in shared state v38. Keep mirrored results unchanged, hold missing or replaced disks, and refuse stale file, publication, and materialization fallbacks. Disk mode remains inactive until explicit I/O and lifecycle support follows.

Co-authored-by: galiniliev <[email protected]>

* fix: complete disk authority migration consumers

Declare shared-state schema 38 in package admission metadata, include the exact migrated tables in historical scope proofs, preserve canonical test ordering, and close the trusted PR wrapper import inventory.

Co-authored-by: galiniliev <[email protected]>

* test: preserve exact PostgreSQL disk authority predecessors

Rebuild the empty pending-result table alongside worker receipts and preserve incoming foreign keys from installed lazy fragments when restoring historical test schemas.

Co-authored-by: galiniliev <[email protected]>

* fix(workers): retain teardown settlement and predecessor contracts

Compose legacy schema transformations in canonical order, preserve installed PostgreSQL foreign keys in historical fixtures, and settle confirmed deletion after shutdown aborts new effects.

Co-authored-by: galiniliev <[email protected]>

* Publish openclaw/s4-retained-session-disk

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: 1cb5a42a-b4a8-43a9-8242-1e75244865d8

* Publish openclaw/s4-retained-session-disk

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: c1df24cc-0977-428a-bfbc-8ba8a983218b

* test: align disk authority allocation with repaired prerequisite

The published prerequisite now owns five lines previously counted in this child. Reduce the child allocation to its measured 628-line delta.

Co-authored-by: galiniliev <[email protected]>

* test: preserve complete runtime refusal diagnostics

Keep exact update-admission expectations aligned with the canonical updater and PATH diagnostic suffix, without relaxing no-effect assertions.

Co-authored-by: galiniliev <[email protected]>

* Publish openclaw/s4-retained-session-disk

Worked on by:
- @galiniliev

Co-authored-by: galiniliev <[email protected]>
OpenClaw-Publication: aad1f458-d629-42e3-b44e-a1a2c937d658

---------

Co-authored-by: galiniliev <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
)

* fix(plugins): portable plugin-state keys for PostgreSQL

Use an exclusive SQL lower bound for Doctor pagination instead of a NUL-suffixed cursor. Reject new NUL keys in test-only plugin-state fixtures while retaining legacy SQLite adoption reads.

Add real PostgreSQL Doctor regression coverage and register it in conformance and database-worker lanes. Refs openclaw#184862 openclaw#188642.

* test: account for rebased plugin-state coverage

* test(clickclack): import legacy revocations before adoption

(cherry picked from commit 395cac7)

Release adaptation: Only exclusive SQL lower bound in kernel and Doctor pagination; preserve legacy SQLite keys and public validation. Regression exercises real Doctor paging and inspected executed SQL bindings; no NUL-key fixture policy, schema or unrelated tests.

Follow-up dispositions: 8253356 fix: preserve child results after source lifecycle changes (openclaw#202708); f3f89c7 fix: show saved child results when completion delivery fails (openclaw#202664); c45faa8 fix: align CI tests with admitted tool calls (openclaw#202655); 5c9389a fix: make channels add report required plugin install failures (openclaw#202091); 52b9188 fix: show hosted model details in `models list` without a Gateway (openclaw#202490); d248a76 fix: show an outcome when kept child chats return no answer (openclaw#202423); 5148804 fix(discord): check a queued message's access again when its turn starts (openclaw#202330); 2470d62 fix: let setup use account models with a fresh catalog (openclaw#202019); 9fa0b92 fix: let PostgreSQL Gateways start with plugin-backed secrets (openclaw#201063); c180824 fix(plugins): Talk and plugin-loading requests fail on PostgreSQL Gateways (openclaw#201976); cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 17c5fb0 fix(state): PostgreSQL state created before Template bootstrap deferral is refused as schema drift (openclaw#197425); b5c1277 fix: let resumed parents collect children stopped by restart (openclaw#201460); f920a7e chore(postgres): qualify cron completion during graceful shutdown (openclaw#201246); 1680f54 fix(openai): new ChatGPT subscription models missing until an OpenClaw release (openclaw#201130); 0d8820a fix(media): image descriptions use the ChatGPT OAuth route when OpenAI has no API key (openclaw#199299); ee3e16e test(agents): trim and fold low-value regression suites (openclaw#198916); b8029b4 test(agents): qualify PostgreSQL simple-completion acquisition (openclaw#200956); 703c82d fix(sessions): record queued input end causes and recover them across crashes (openclaw#200533); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); d565e17 fix(ci): retire deleted session fork test from inventory (openclaw#200611); 4cf12c6 chore(postgres): qualify prompt refresh and rebalance CI (openclaw#200488); d460273 fix(templates): release earlier Template-managed agents (openclaw#200303); ff75829 fix(update): --no-restart update fails when the Gateway restarts itself during Doctor's stop (openclaw#200181); 0b2ad60 chore(postgres): cover compaction watched-session prompts (openclaw#200117); b90c573 test: consolidate redundant coverage (198795 recut) (openclaw#198943); a042363 test: consolidate redundant coverage (198793, part 2) (openclaw#198936); 9bfad2b test: consolidate suites while retaining recovery owners (openclaw#198933); 4e9812c test: consolidate redundant coverage (198789, part 2) (openclaw#198932); 90814f5 fix(subagents): stops a finished sub-agent's chat being deleted before its parent reads the result; 799bc0b fix(ci): stabilize hourly fixtures and retire unused exports (openclaw#199851); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); a4cc2ad fix: undo cold-session compaction CPU and latency regressions (openclaw#199561); 55fec79 fix(agents): stop divergent mid-turn overflow recovery (openclaw#199636); 2c4413a fix: reduce Gateway stalls under filesystem pressure (openclaw#197510); 37d977f fix: output reducers are skipped in headless and Code Mode runs (openclaw#199434); c9ee264 fix(compaction): concurrent sessions wait for each other's summaries during compaction (openclaw#196550); 2471ddc feat: let agents review generated images before delivery (openclaw#198227); 21f7dc6 fix(github): publication fails with PostgreSQL session or state stores (openclaw#193749); 63d9e57 fix(ci): new PostgreSQL suites are omitted from conformance (openclaw#198390); 466a4b6 fix(telegram): steered answers quote the wrong input (openclaw#178124); 87b6f52 fix(delivery): resend routed Telegram finals after an ambiguous network failure (openclaw#192779); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); cff99b2 fix(agents): keep provider history append-only across runs (openclaw#197874); 8a328bf feat: add an opt-in usage-ranked tool index (openclaw#197128); 097e648 fix(ci): plan only executable infra tests (openclaw#197911); 76385fd fix(models): discovered models become "Unknown model" after restart or an ended sign-in (openclaw#197784); 89d4177 fix(plugin-state): guarded calls fail until Gateway restart after an unknown write outcome (openclaw#197790); baca36e fix(sessions): commit selected invitations with original messages (openclaw#184512); 699e538 fix(sessions): drain passive notices on sessions_send resumes; d6ded18 chore(ci): drop retired test-lines allocation records (2/3) (openclaw#197656); e0dd020 fix(agents): collect process results at suspended-run capacity; 4897740 feat(auth): preserve delegated OCE user profiles and permissions (openclaw#196856); 7197ce1 feat(templates): install bundled plugins through native management (openclaw#196349); 9c6ee9b feat: let Template automations start paused for onboarding (openclaw#196323); 79a6214 fix(message): retain local final replies in conversation history (openclaw#187795); caa978c feat(templates): open durable chat before verified setup (openclaw#196392); 78e73aa fix(sessions): cold PostgreSQL conversations fail after idle readers close (openclaw#189991); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682); 1595dd2 feat(plugins): reauthorize accepted session work (openclaw#176886); b43ad0a fix(models): avoid reloading plugins on catalog refresh (openclaw#193903); 0947d02 fix(ci): avoid unrelated PostgreSQL runs and admit owned tests (openclaw#193870); 428ca7d feat(openclaw-id): add Gateway membership authority and publication behind the Labs flag (openclaw#192335); c718583 fix(update): repair refuses forever after a verified update fails a later step (openclaw#193132); 3f64174 fix: deliver background replies after a reload retires the turn registry (openclaw#193130); 982f3b1 fix(imessage): report Automation failures after Gateway updates (openclaw#186117); 31b28e9 fix(agents): wait for a peer OAuth refresh before failing request auth (openclaw#192906); cf50d4a feat(storage): support read-only PostgreSQL standby inspection (openclaw#192645); 82fd4e6 fix(agents): retain stale session target refusal reasons (openclaw#192681); 8ac4e19 fix(worktrees): reserve capacity on PostgreSQL (openclaw#192537); 718b349 fix: reduce session startup stalls under storage contention; 08f4a19 refactor(skills): move Skill Workshop into its bundled plugin (openclaw#192471); 837402a fix(clawrouter): keep upstream credit failures off the shared key (openclaw#192575); f38495f fix(plugins): reject late routing from canceled runs (openclaw#192492); dc5d61a improve(sessions): reduce unnecessary maintenance query rows (openclaw#192023); c4bf0dc fix(sessions): avoid extra maintenance scans for embedded archives (openclaw#184507); e44b3d6 fix(team-reports): recover after database connection loss (openclaw#192020); 991fb33 fix(logbook): recover after database connection loss (openclaw#192011); e6d0d2e fix(test): include omitted PostgreSQL conformance suites (openclaw#191962); da5ff0f fix(codex): reject native hooks from a previous run (openclaw#191788); 09f0b0b feat(plugins): add skill usage runtime for plugins (openclaw#191661); 00b2ff4 fix: parent sessions miss child approvals with a custom session store (openclaw#189827); be44b10 fix: stop completed session writes retaining request data (openclaw#191197); d40aa7c fix(sessions): replay creation requests across Gateway restarts (openclaw#190862); d894035 fix: await Doctor shared-state repair preparation (openclaw#190875); b515cc7 feat: fork threaded conversations with Telegram support (openclaw#190783); def6349 feat(plugins): plugins can run a hidden forked turn of a session with their own tools (openclaw#190950); d983e34 feat(plugins): plugin commands can continue the agent with a replacement prompt, on every channel (openclaw#190908); ea3f0b8 fix(ci): provision Node test prerequisites and retain Baseten routing (openclaw#191050); 29503e1 fix(update): Gateway stays stopped after the updater process dies mid-update (openclaw#188497); fc8c2d0 fix(update): preserve unfinished handoff artifacts (openclaw#190571); 7c26e8c fix(ci): cover PostgreSQL managed update handoffs (openclaw#190336); 4913d41 fix(ci): prevent truncated PostgreSQL target listings (openclaw#189509); 8925f62 fix(gateway): start restored PostgreSQL homes on the first attempt (openclaw#190291); 177fe32 feat(models): preserve inference capabilities in opt-in catalog v3 (openclaw#189678); 7faf32d feat: retain repository disk authority through recovery (openclaw#189106); a658df3 feat(database): capture externally quiesced SQLite migrations; 0f9e7f7 feat(database): capture exact SQLite migration capsules; 4fb684e feat(backup): add PostgreSQL local companion checkpoints; c89a101 fix(doctor): migrate auth profiles on PostgreSQL stores (openclaw#189639); 799de09 fix(ci): split oversized workspace and setup files (openclaw#189356); 21ee847 fix(acp): keep completed run conversations resumable (openclaw#189273); fce0e56 perf(sessions): open cold history without restoring archives (schema 39) (openclaw#188397)

Validation: Baseline1 NUL-binding assertion failure/21passing; candidate22/22passes (188693-green.log). Real SQLite Doctor path and generated SQL proved; no native PostgreSQL server execution claimed.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 0895146d8c1493146f5c6461eee0b10c329bdd1e)
(cherry picked from commit f8ccaa70bc9773d6bbb569bc0e275eee0c544ead)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. 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