Skip to content

refactor(database): prepare shared-state engine admission (PR2a) - #170266

Merged
steipete merged 4 commits into
mainfrom
pgprep/p33-pr2-state-open
Oct 13, 2026
Merged

steipete merged 4 commits into
mainfrom
pgprep/p33-pr2-state-open

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem and scope

openEngineStore inferred existing SQLite data from table-name prefixes, which could miss partial or legacy stores. The PostgreSQL adapter also granted every main-thread open an admission exemption that outlived boot.

This PR is PR2a: engine prerequisites only. It adds owner-supplied data classification, separately published PostgreSQL catalog facts, a single runtime DDL artifact per state object, and a synchronous admission scope with request-time enforcement. Workboard adopts the contract; its PostgreSQL workload fixtures now run in real workers with host-retained admission. Shared state remains SQLite in production; its physical-open cutover, lazy ensure wiring, state conformance, and type frontier are PR2b.

Builds on #170059, #170017, and #170037. No schema version, durability, configuration, or stored-data migration changes.

Evidence

Raw native SQLite execution captures are byte-identical to the base, without SQL normalization: workboard 35,592 bytes (98 cold-open statements, one write, eight warm-reuse statements, one read); shared state 196,425 bytes (86 cold-open statements, three write-transaction statements, 31 restart statements, one read). The state owner source is unchanged.

Local PostgreSQL 17 proof used a throwaway cluster on port 55440, stopped and removed afterward. Catalog verification matched 134 tables, 1,386 columns, 293 CHECKs, 297 indexes, and 32 foreign keys; the two declared pending ACP indexes remain explicit. Physical-facts tests passed (3 tests; 40.68s Vitest, 555.18s including compilation). The final workboard fixture uses the existing engine worker broker. Its local PostgreSQL conformance passed (15 tests, seven native-only skips; 579.26s Vitest, 706.78s runner including 324.86s worker preparation).

Engine-open tests passed (4); generator tests passed (15; 76.68s); guard/adapters/connection proof passed, including live refusal of post-admission main-thread SQL and successful worker reads/writes. After the final test-helper typing correction, the focused guard rerun passed (2 tests; 7.53s Vitest, 15.50s runner). Runtime build, formatting, Madge (zero cycles), wrapper inventory, and diff checks passed. Two independent Codex review rounds found no actionable P0–P2 defects. Initial source-freshness and SDK-preparation failures were tooling failures; successful frozen-source reruns are the evidence above.

Core typecheck and extension lint passed. The first draft CI PostgreSQL conformance job passed. CI exposed a SQLite dialect-classification bug (PostgreSQL-only JSONB constructors/aggregates were counted as SQLite debt), an extension-test helper bridge, and excessive SDK exports. The classifier now distinguishes the actual dialect functions with a regression; the workboard fixture uses the existing engine worker broker; physical catalog helpers remain engine-internal. The sole new public SDK name is the lexical admission scope; the existing worker-outcome predicate is also available on its narrow private-local worker subpath. The exact SDK budget increase is one export/one callable; no shipped API was removed. The PostgreSQL generator is registered as its actual executable root for dependency analysis. The two maintenance capability exports intentionally await PR2b routing; the production-only Knip exception names that module, while the full-tree test-aware export audit remains enabled.

The final fixture passed the extension typecheck and focused extension-boundary test (one assertion, 470.41s runner including shared build preparation); the direct extension-test-import checker also passed. The dialect regression suite passed (six tests, 72.07s runner), and the dialect ratchet reports no growth. Final targeted core, root-test, script, and revised-fixture lint passed; formatting and diff checks passed. SDK declaration preparation exceeded the default five-minute local budget, then passed with the repository-supported 15-minute budget (12,847 declarations); downstream checks reused the completed outputs. The exact SDK surface check passed at 3,713 public exports/2,168 callables with no shipped removals. The production dependency scan now reports only the inherited outbound re-export below. Prior-head CI: run 38317012886 at 5c593e113b249758f148bd53a9697f30396a0080. PostgreSQL conformance passed (409 tests; 262.43s across three Vitest shards), as did the baseline ratchets, additional boundaries, changed-boundary suite, and test-type job. The dependency job reports only the unchanged outbound re-export described below; its log was checked against the base. Other broad CI jobs may still be completing; this draft is not merged. The inherited unused hasActiveDeliveryOwner re-export in src/infra/outbound/delivery-queue-storage.ts exists unchanged at the base and is outside this PR.

Coordinator correction: removed the superseded wrapped state/fragment DDL and the duplicate .runtime filenames. The manifest now names one unqualified runtime file per state object; catalog equivalence executes those same files. All retained state SQL is byte-identical to its prior runtime counterpart, and agent.postgres.sql remains byte-identical and wrapped. Tracked generated output falls from 87 files / 7,008 lines to 45 files / 4,090 lines. Manual application in a chosen schema is documented. The existing CI path filter already includes every retained generated file. Correction validation passed: pnpm db:postgres:check (15 generator tests, 58.12s Vitest / 139.57s runner, plus canonical/workboard freshness), wrapper inventory (4 assertions, 64.21s Vitest / 75.27s runner), targeted script/test type-aware lint, formatting, and git diff --check. Shared SDK declaration preparation completed successfully (12,847 files). CI for correction head 2d92df3d9f8555ca039477504006f14b4a2464e4: run 38320942163. PostgreSQL conformance was skipped because preflight refused the stale synthetic PR merge head (5c593e113b249758f148bd53a9697f30396a0080 instead of the pushed correction). GitHub reports the PR conflicts with current main. This run did not execute the PostgreSQL tests; the prior-head pass above is not new-head evidence.

Handwritten production growth: 296 net lines, below the 550-line budget; generated SQL and test fixtures are separate. No protected async-owned file changed.

Landing validation

Rebased head: 0fbf8b960806a72dedf53b8e2ca92e52922ef93f. The only conflict was SDK budget arithmetic; main's additions and this PR's one export/callable are preserved. PostgreSQL regeneration produced unchanged outputs, pnpm db:postgres:check passed all 15 generator tests, and current-head PostgreSQL conformance passed in CI run 38322851750.

Maintainer-authorized native CI exception under the causal-path rule:

Job Classification and evidence
checks-node-changed-extensions-bundle-19-2 23 QA Lab runtime-tool fixture failures: runtime config was not prepared. The entire QA Lab tree and runtime-config owner are identical to the tested main parent.
checks-node-changed-extensions-config-119 Repeated-turn child fails before any provider request because runtime config was not prepared. The same QA Lab tree and runtime-config owner are unchanged.
checks-node-changed-extensions-bundle-28 Two Teams poll-cleanup assertions resolve instead of rejecting. The entire Teams tree is unchanged; these SQLite state tests do not use the PR2a engine opener.
checks-node-changed-2 Telegram ingress-coalescing test/hook timeouts exhausted the one-hour deadline. The entire Telegram tree and CI workflow are identical to the tested main parent. This is deadline cancellation, not fail-fast cancellation; the unfinished coverage remains unverified.

CI's automatic classifier reports unknown for the three failed jobs because scheduled main uses different job names. Independent causal inspection and matching tree/blob identities establish that the observed failing paths are disjoint from this PR. The tested merge is 5e8938315beeb2180a4d515a015dd4243bc4b80e, with main parent 0a3231562bb3ddcb44d4ca73a65f9b62dbf46116 and the exact PR head. security-fast passed independently.

Approved design of record — sections 1–4 (PR2a implements the engine prerequisites; state integration is PR2b)

1. Physical-open seam and existing-data contract

Keep openOpenClawStateDatabase → openOpenClawStateDatabaseWithBusyTimeout → its existing acquisition closure → openUnpublishedStateDatabase → openNativeStateDatabase. Insert openEngineStore inside that last function, after the tracked native anchor open, identity check, timeout setup, and native catalog admission; before exposing the selected connection to state ownership/schema callbacks. The native handle is the state file on SQLite and only the identity anchor on PostgreSQL. No alternative state-store facade, cache, or admission owner.
Pass the tracked anchor, state schema id/version, canonical/generated DDL, caller's immutable engine input, owner-derived SQLite classification, and existing setup/admission callbacks. Refactor the rest of the current SQLite acquisition body into the existing openSqlite callback without changing its statement order. Its permissions, integrity, initialization history, failure recording, and cleanup stay owned by state. PostgreSQL state admission runs through a domain callback before the engine publishes successful admission; bootstrap metadata and domain seeds commit atomically.
Extend openEngineStore's local parameter contract with required inspectSqlite(): { hasExistingData: boolean; hasEngineAnchor: boolean }; retire the ${schema.id}_ table-prefix heuristic for every caller. Consume the callback only when resolving an unrecorded physical engine; do not probe on cached reuse. A validated engine anchor remains PostgreSQL even when its file already exists. Refuse mixed anchor/application content, and refuse an unported SQLite store before creating anchor rows or contacting PostgreSQL.
For state, derive classification from #170017's already admitted native catalog/version facts: any application object other than the engine anchor/internal SQLite objects is existing data, including schema_meta, cron_jobs, historical/partial native startup tables, and views. Do not rerun historical migration discovery. params.existingSchema is a no-repair policy, NOT a data-presence flag; initialization.kind includes external deletion history and is NOT a substitute either. Preserve both separately. The current assertStateDatabaseIntegrityBeforeMutation already uses admitted versions plus general application-schema presence; reuse that information rather than inventing an id prefix.
For workboard, its schema owner supplies the same explicit decision from admitted application objects (not just workboard-prefixed names). A recognized anchor is not application data. Update every openEngineStore test fixture to supply classification. On default state SQLite, hasEngineAnchor comes from the catalog already captured by admitStateSchemaFacts, replacing the generic unconditional missing-anchor SELECT with no additional SQL. A present anchor still refuses a SQLite selection with the existing recovery instruction.

2. Engine-neutral admitted facts and capabilities

Add an engine-owned physical-facts API alongside the existing contract (do not edit the overlapping database-engine/contract.ts). Types distinguish SQLite native facts from PostgreSQL facts; never cast a PostgreSQL handle to DatabaseSync, synthesize SqliteSchemaFacts, or implement a fake .location().
The adapter supplies: selected SQL connection; physical identity (admitted anchor generation + store UUID + namespace); actual schema version; catalog capture; capability operations for native-file maintenance versus server transactions; and paired physical close. State decides acceptable version, canonical required/optional objects, initialization policy, and whether admission is complete. Schema identity is a process admission id/revision, not a fabricated PostgreSQL PRAGMA cookie.
PostgreSQL reads openclaw_schema_meta (store/version/store_id), domain schema_meta, and state.schema.contentVersion; disagreements refuse admission. Capture real pg_catalog facts for tables/columns/types/defaults/constraints/indexes in one consistent read, restricted to the admitted namespace. Validate mandatory canonical objects and any present lazy fragment against the generated contract, including FK/check/index semantics and the two declared pending ACP indexes. Absent first-use tables remain valid. Reuse the pure comparison rules from generation instead of a second schema policy.
Publish PostgreSQL facts under a separate engine/schema admission key through the existing anchor admission exchange. Never publish PG catalog entries as the anchor's sqlite-schema fact. Bind state version/runtime facts to that identity and schema revision; data-only commits retain them. Committed DDL publishes replacement facts, rollback restores prior facts, and unknown commit revokes affected facts through existing receipts. Reopen with live admission reuses facts; final close retires them and a new process validates anew. No foreign-writer probes or per-read catalog queries.
Route state admission by capabilities, with dispatch centralized under database-engine: SQLite uses its current native version/shape/integrity path byte-for-byte; PostgreSQL uses server version/catalog admission and state ownership checks. Missing/newer/mismatched metadata refuses with “use the matching OpenClaw version or restore the matching PostgreSQL schema and anchor”; do not run historical SQLite migration/repair SQL on PG. Fresh PG starts at v21; offline SQLite migration/port remains P3-6.
Native integrity/foreign-key PRAGMAs, WAL registration (including cache registration), checkpoint, and page reclamation/VACUUM are skipped for PG runtime lifecycle. They are not reported as successful SQLite verification; server constraints/catalog admission are different evidence. Explicit native-integrity/SQLite-repair requests refuse and direct the operator to PostgreSQL verification/recovery and a matched export+anchor restore.
.location() is used only inside SQLite-capable branches; generic identity consumers use admitted physical identity. Copied-file snapshots, SQLite online backup, and artifact-preserving file readers refuse PG before copying/opening the anchor as data: “PostgreSQL state cannot use a SQLite file snapshot; stop the Gateway and back up/restore the PostgreSQL schema with its matching anchor (P3-6 export support pending).” Ordinary multi-query read snapshots use the adapter's REPEATABLE READ READ ONLY transaction. They do not produce a file or claim backup support.
State's existing cache/resource owner retains both selected connection and anchor, closes the PG connection before the anchor, aggregates failures, and retains failed-close custody. Preserve #169983: accepted lifecycle writes finish before the shared worker is torn down. Do not change shutdown ordering, broker ownership, or state authority checks.

3. Lazy PostgreSQL fragments

PR3 artifacts currently contain BEGIN/COMMIT and hard-coded openclaw_state qualification. They cannot be executed inside the engine's namespace/transaction unchanged. Extend the existing generator to emit runtime DDL from the same parsed objects without transaction/schema wrappers or fixed namespace, following its existing workboard rendering mode. Regenerate; no runtime regex stripping/requalification and no handwritten generated SQL.
Use PR3's declaration/manifest ids, dependencies, and activation. Fresh bootstrap installs eager DDL and version-additive fragments, plus state metadata/content seeds. Existing same-version stores do not eagerly install missing additive features. First-use fragments are installed only when the existing feature ensure runs, dependencies first, in that owner's transaction; tables/indexes/FKs complete before publication. user_background_images installs its declared profile dependency then its FK. An unsuccessful ensure never publishes success.
Wire the shared ensure module, additive-schema owner, and profile owner's two-phase ensure to the adapter operation. Keep the existing SQLite providers, statement bytes, and successful-return timing; do not bypass feature privacy/lifecycle boundaries or edit t1cut-state callers. A generated fragment being available does not make all consumers PostgreSQL-compatible; PR4 remains separate.

4. Worker-only PG and reachability

Extend the conformance preload's existing worker environment transport with a state-specific test key, leaving workboard's key intact. Read it only in the state test seam; production config remains SQLite, registry state support remains disabled, and PR1 broker/read-worker input threading is deferred. Do not load full config or resolve secrets in the opener.
Fix the current unconditional purpose: "admission" in adapters.ts: it presently bypasses the constructor's thread-0 guard on every open. Use a synchronous, lexical boot-admission/migration scope checked at the engine boundary; ordinary connection construction has no exemption. PostgresSyncConnection must also reject SQL requests on thread 0 after that scope exits, so retaining an admitted handle cannot permit warmed main-thread queries. Worker construction/queries remain allowed. Test both refused construction and refused post-admission use, plus a successful worker read/write.
Conformance creates one worker fixture using the real state acquisition/transaction/read owners with isolated state/namespace. Cover cold open + v21/bootstrap seeds, absent lazy tables then first use, retained admission/restart reuse, committed write and read-only snapshot, and paired cleanup. Test final-close/new-process validation separately from live-facts reuse; never require stale facts to survive retired ownership.

@clawsweeper

clawsweeper Bot commented Oct 12, 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 scripts Repository scripts plugin: workboard size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR adds owner-supplied SQLite classification, PostgreSQL catalog facts, runtime DDL, and scoped main-thread admission.

Example: PostgreSQL is selected for a workboard.sqlite file containing a legacy schema_meta table.

  • Before: Prefix-based classification can overlook that existing application data.
  • After: The workboard schema owner detects it and refuses the engine switch.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful approved preparation with production-owner harness coverage, but a definite catalog-validation bypass prevents a correctness pass.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied evidence describes real PostgreSQL worker/catalog and main-thread refusal harnesses, with prior-head CI kept separate from current-head evidence.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Experimental PostgreSQL selection can overlook partial SQLite stores, and retained admission handles can permit main-thread database work after boot.
Reason: The maintainer-authored PR follows the recorded staged design, retains one engine owner, and leaves production shared-state integration to the next stage.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this PR open: the approved engine preparation is useful, but the previously reported P2 catalog-validation defect still blocks merge.

Priority: P2
Reviewed head: 0fbf8b960806a72dedf53b8e2ca92e52922ef93f

Before merge

  • Validate the expected catalog before returning retained facts (P2) - The previously reported defect remains: openEngineStore captures and publishes facts without expected, and a later admitPostgresPhysicalFacts call supplying expected returns here after checking only identity/version. For example, cached workboard facts lacking a required parents table are accepted when the domain contract requires it, whereas an uncached call rejects the same catalog. Apply the existing filtering and assertPostgresCatalog comparison to retained.catalog before returning, without another server query, and cover that retained-facts mismatch.
  • Complete next step - Have the CI owner attribute the Msteams partial-cleanup failures against the base or a head-versus-revert result before landing.

Findings

  • [P2] Validate the expected catalog before returning retained facts — src/infra/database-engine/physical-facts.ts:83

Tests

  • Missing end-to-end proof: No base-failing/head-passing regression covers a retained catalog followed by a stricter expected contract.
Agent review details

How this fits together

The database-engine layer accepts a native anchor, schema contract, and prepared engine input, then returns the selected connection and publishes reusable physical-store facts.

flowchart TD
  A[Workboard schema owner] --> B[Engine store admission]
  B --> C[SQLite anchor]
  B --> D[PostgreSQL connection]
  D --> E[Server catalog capture]
  E --> F[Shared admission facts]
  F --> B
Loading

Technical review

Best possible solution:

Validate the expected contract against retained catalog facts without querying PostgreSQL again, preserving the approved prerequisite scope.

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

Current main shows the prefix-only SQLite classification and unconditional admission exemption; the PR's retained-facts validation bypass is also directly traceable in source, without running target code.

Is this the best way to solve the issue?

The shared-owner placement and lexical scope fit the approved design, but cached and freshly captured catalogs must enforce the same expected contract.

Full review comments:

  • [P2] Validate the expected catalog before returning retained facts — src/infra/database-engine/physical-facts.ts:83
    The previously reported defect remains: openEngineStore captures and publishes facts without expected, and a later admitPostgresPhysicalFacts call supplying expected returns here after checking only identity/version. For example, cached workboard facts lacking a required parents table are accepted when the domain contract requires it, whereas an uncached call rejects the same catalog. Apply the existing filtering and assertPostgresCatalog comparison to retained.catalog before returning, without another server query, and cover that retained-facts mismatch.
    Confidence: 0.99

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 e4f463159d0a.

Provenance checked

  • Engine classification and admission exemption changes intended behavior with a stated reason (9dc6466: Share engine selection and physical-store admission while preserving worker-owned runtime work and explicit admission/migration exceptions.)
  • Generated state and fragment DDL changes intended behavior with a stated reason (050e315: Preserve canonical constraints and lazy feature boundaries in PostgreSQL readiness artifacts; this PR explains why the connection owner must supply namespace and transaction.)
  • Catalog comparison keeps the original intent (4575155: Compare generated PostgreSQL catalogs with canonical SQLite facts; extraction retains the portable comparison contract.)
  • Workboard PostgreSQL fixtures keeps the original intent (5e78ec6: Exercise persistence, receipts, rollback, and connection failures against real PostgreSQL; the revised fixtures retain those contracts through workers.)
  • SQLite dialect classifier keeps the original intent (a1c1610: Maintain a shrink-only inventory of SQLite-specific dialect debt; PostgreSQL-only constructors should not count as that debt.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/infra/database-engine/physical-facts.test.ts --maxWorkers=1
  • node scripts/test-database-conformance.mjs --engine postgres --connection "$POSTGRES_CONFORMANCE_CONNECTION" -- src/infra/database-engine/physical-facts.test.ts --maxWorkers=1
  • node scripts/run-oxlint.mjs --tsconfig tsconfig.json src/infra/database-engine/physical-facts.ts src/infra/database-engine/physical-facts.test.ts src/infra/database-engine/physical-facts-worker.test-support.ts
  • git diff --check

What I checked:

  • Pinned PR introduction: The introduced diff replaces prefix classification, removes the permanent admission-purpose exemption, and adds physical catalog admission; fetched main still contains the earlier behavior. (src/infra/database-engine/open.ts:67, 0fbf8b960806)
  • Unresolved catalog-validation finding: Retained facts undergo identity/version checks and return without validating expected; only newly captured facts reach the catalog comparison. (src/infra/database-engine/physical-facts.ts:83, 0fbf8b960806)
  • Normal opener primes the unchecked cache: openEngineStore calls admitPostgresPhysicalFacts without expected, so a subsequent domain admission supplying its expected contract reaches the unchecked retained-facts branch. (src/infra/database-engine/open.ts:166, 0fbf8b960806)
  • Verified no-migration scope: Canonical SQLite schemas, workboard runtime DDL, and engine registry are unchanged. Comparing generated state SQL after removing only comments, wrappers, blank lines, and fixed namespace qualification produced no definition differences; shared-state PostgreSQL remains disabled. (src/infra/database-engine/registry.ts:13, 0fbf8b960806)
  • Approved direction and complete body: The full REST body, including the previously omitted design sections, was inspected. It records PR2a prerequisites, defers production state integration to PR2b, and accepts the lexical worker/admission contract. The supplied body identity is 164adb801ff0eefcbc042d7266ba190892a95ec9a4c6837c3b0423bb08ce50e0. (0fbf8b960806)
  • Current merge state: GitHub reports mergeable=true and mergeable_state=blocked for the reviewed head; the body's historical conflict statement does not describe its current mergeability. (0fbf8b960806)

Likely related people:

  • Peter Steinberger: Raw commit 9dc6466 adds src/infra/database-engine/open.ts:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9dc64662f16e; files: src/infra/database-engine/open.ts)

PR surface

Source +98, Tests +755, Docs +46, Config 0, Other -56. Total +843 across 77 files. Added test files: 8.

View PR surface stats
Area Files Added Removed Net
Source 51 738 640 +98
Tests 16 952 197 +755
Docs 3 47 1 +46
Config 1 1 1 0
Generated 0 0 0 0
Other 6 50 106 -56
Total 77 1788 945 +843

Review metrics

Metric Value Why it matters
SDK surface budget +1 public export; +1 callable The approved lexical admission scope expands the existing worker-runtime surface; the private-local outcome predicate does not expand the public budget.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is useful experimental-engine preparation with a focused admission-validation defect and limited current production reach.
  • merge-risk: 🚨 compatibility: The worker-runtime opener gains required classification input and main-thread SQL loses its persistent exemption; the maintainer-authored design explicitly accepts these contract changes.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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.

History

Review history (4 earlier review cycles)
  • reviewed 2026-10-12T21:39:44.615Z sha 142208b :: needs changes before merge. :: [P2] Validate the expected catalog before returning retained facts
  • reviewed 2026-10-12T22:36:29.512Z sha 5c593e113b249758f148bd53a9697f30396a0080 :: needs changes before merge. :: [P2] Validate the expected catalog before returning retained facts
  • reviewed 2026-10-12T22:54:21.764Z sha 5c593e113b249758f148bd53a9697f30396a0080 :: needs changes before merge. :: [P2] Validate the expected catalog before returning retained facts
  • reviewed 2026-10-12T23:31:04.626Z sha 2d92df3d9f8555ca039477504006f14b4a2464e4 :: needs changes before merge. :: [P2] Validate the expected catalog before returning retained facts

Reviewed October 12, 2026, 7:52 PM ET / 23:52 UTC (Revision 5).

@steipete
steipete marked this pull request as ready for review October 12, 2026 23:17
@steipete
steipete force-pushed the pgprep/p33-pr2-state-open branch from 2d92df3 to 0fbf8b9 Compare October 12, 2026 23:34
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 12, 2026
@steipete
steipete merged commit 0820bdd into main Oct 13, 2026
249 of 257 checks passed
@steipete
steipete deleted the pgprep/p33-pr2-state-open branch October 13, 2026 00:46
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…nclaw#170266)

* refactor(database): prepare physical engine admission

* fix(database): align worker conformance and CI classification

* refactor(db): keep one PostgreSQL DDL form per state object

* style(database): format rebased SDK budget comments
steipete added a commit that referenced this pull request Oct 13, 2026
* fix(database): preserve agent PostgreSQL schema contracts

Generate owner-scoped agent runtime DDL with faithful relational indexes and checks, ten canonical non-search triggers, and explicit pending search capabilities. Verify the agent catalog and paired SQLite/PostgreSQL behavior in conformance. Keep runtime enablement and schema versions unchanged.

Related: #169254, #170059, #170266

* fix(ci): exclude generated PostgreSQL from SQLite ratchet

The generated PostgreSQL schema uses JSON function and operator names shared with SQLite. Keep the canonical PostgreSQL artifacts outside the SQLite debt inventory while retaining checks on SQLite source.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…71350)

* fix(database): preserve agent PostgreSQL schema contracts

Generate owner-scoped agent runtime DDL with faithful relational indexes and checks, ten canonical non-search triggers, and explicit pending search capabilities. Verify the agent catalog and paired SQLite/PostgreSQL behavior in conformance. Keep runtime enablement and schema versions unchanged.

Related: openclaw#169254, openclaw#170059, openclaw#170266

* fix(ci): exclude generated PostgreSQL from SQLite ratchet

The generated PostgreSQL schema uses JSON function and operator names shared with SQLite. Keep the canonical PostgreSQL artifacts outside the SQLite debt inventory while retaining checks on SQLite source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: workboard rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant