Skip to content

fix(postgres): qualify support claims by proven surface - #177922

Merged
steipete merged 1 commit into
mainfrom
pgprep/r21-claims
Oct 20, 2026
Merged

steipete merged 1 commit into
mainfrom
pgprep/r21-claims

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

PostgreSQL setup, Doctor, status and configuration help still call proven storage paths experimental and contain stale restore/native-cutover claims.

Related: #174642, #174462, #174912, #174599, #177795.

User Impact

PostgreSQL 17 is documented as a supported alternative for all five configurable families, mixed engines, Gateway/CLI flows and memory/search. Local anchors, credentials, pins and safety journals remain local by design. The matrix keeps missing platform, TLS, exec-provider, server-major and published-stable-upgrade qualification explicit; no new options or storage behavior are introduced.

status --json retains databaseEngines.experimental. It now represents selected experimental engine/search features, so it is false for the currently supported selections, including PostgreSQL and mixed mode. This flag does not certify deployment qualification or physical-store health. Doctor retains its specific mismatch, missing-capability, unknown-state and recovery findings instead of warning merely because PostgreSQL is selected.

Ready for coordinator claims review; do not merge as part of this lane. The macOS app row stays pending signed-app proof. The coordinator owns that proof, any claim update, and landing. iOS/iPad is not claimed without real-device evidence.

Why This Change Was Made

The ledger was written first from the roadmap, current source/test owners and landed PR evidence, then independently audited. R19 did land; its memory transcript ACL candidate window is shared with SQLite and is not a PostgreSQL-specific gap. Search remains engine-local in ranking/tokenization. All four R21 backup gaps landed in #174698 and #174744; archive restore now imports producer-owned capsules and preserves copied user exports.

The smallest implementation removes the obsolete warning branches and changes labels/help. No extra health probes, SecretRef resolution, registry, config switch, schema or compatibility layer was added. pr-simplify retained the existing owners and regression coverage. Production +18/−33 (net −15); tests +33/−18 (net +15); docs/generated +184/−81 against the starting main revision.

Evidence

  • Five touched unit files: 79 tests passed, default pinned Bun runtime, --maxWorkers=1; total runner wall 61.10 s. The changed expectations were first run on the old production code and failed for the intended warning/flag/label/error text differences. Per-suite Vitest wall: protocol 0.12 s; config 30.29 s (mostly compilation); status overview 4.02 s; Doctor/status JSON 18.72 s combined. PR CI timings are pending.
  • pnpm docs:list, MDX, glossary, ordinary link audit, config examples, Markdown lint, changed-file format and git diff --check: passed.
  • Config baseline regenerated with config:docs:gen; config:docs:check and config:schema:check: passed. The base schema is runtime-computed; its generator has no committed file.
  • Anchor-aware link audit: the PostgreSQL guide's stale credential link is repaired. Five pre-existing broken fragments remain in unchanged docs (gateway/config-tools.md, gateway/protocol/rpc-talk-config-and-agents.md, providers/ollama.md, releases/2026.10.1.md, releases/2026.9.2.md); the linked targets are also unchanged. ClawHub fragments were not checked because its separate docs checkout is absent. Ordinary link audit has zero broken links.
  • Independent Codex autoreview: scoped-clean, P0–P2, with the complete diff, registry and evidence ledger; no actionable findings. Source and final snapshot verification passed.
  • Targeted type-aware lint and pnpm tsgo:core through the pinned repository typechecker: passed.
  • This lane reuses the real PG evidence below and does not rerun live/native qualification. Before landing, require PostgreSQL conformance to actually run and pass on the final head (or follow the prescribed local exact-command/base-failure fallback); a skipped job is not proof.

Evidence ledger — 25 Supported / 6 Experimental / 2 Not supported

The qualification baseline is PostgreSQL 17 with UTF8, unaccent, pg_trgm, and pgvector. The CI owner is .github/workflows/ci.yml → PostgreSQL conformance (1/3, 2/3, 3/3) → scripts/test-database-conformance.mjs. There are exactly five configurable families; safety stores have no engine override. A supported row means the named flow has real PostgreSQL proof; it does not promise identical ranking, performance, or every platform/server combination. PR links below are landed prerequisites, not claims that their historic aggregate CI was all green. Their bodies record inherited failures where applicable; the roadmap records subsequent repair and main conformance runs.

Family / surface Status Evidence and limits / next step
state (including Matrix retained account/token roots) Supported R13 #173676, R18 #174315; state-port.postgres.test.ts, matrix-roots.postgres.test.ts, shared-feature conformance.
agent Supported R4 #173462, R15 #174080; agent-port.postgres.test.ts, session-actor and mixed-agent conformance.
workboard Supported extensions/workboard/src/postgres-store.test.ts and port-command.postgres.test.ts; included in five-family mixed/restore proof.
logbook Supported R16 #172842; logbook-port.postgres.test.ts; frame files remain local.
team-reports Supported R17 #172855; team-reports-port.postgres.test.ts; collected scratch is session-local.
Anchors, client credentials, runtime pins, safety journals Supported (local by design) R10 PR1b #174599, R10 PR2 #172703, R11 #174505. Local custody/recovery is independent of the PG application data; not missing PG ports.
CLI setup/onboard Supported CLI parity #175069, 14/14 real CLI checks; cli-oneshot.postgres.test.ts, offline-auth.postgres.test.ts.
Interactive setup/onboard Supported #175655, 8 real PTY cases across PG and SQLite; interactive-setup.integration.test.ts. PG onboard --reset deliberately refuses.
Gateway runtime/turns Supported R20 #174786; real start/status, turns/tools/compaction/restart/child, memory/intents/plugins. Session-actor/startup/post-ready conformance.
CLI parity Supported #175069 and #175655; one-shot/interactive CLI production entry points, explicit reset refusal and missing-secret repair paths.
Doctor, per-store truth Supported R20 part 2 #174912; doctor-database-engine.test.ts, diagnostics/inspection tests and doctor-migration.postgres.test.ts. Unknown evidence is not OK; selected vs observed remain separate.
Update admission, forward migration, exact recovery Supported R14 #173968, R14b #174360; public admission → candidate Doctor → state/agent rollback, allocator restoration and independent-write refusal; update-preflight/update-command conformance.
Upgrade from latest published stable to current Experimental (end-to-end qualification missing) #174786 explicitly excludes published-stable install/service-activation acceptance. The released 2026.10.4 archive restore proves archive compatibility, not a full upgrade. Next: run the actual latest stable package → current candidate → service restart and rollback acceptance.
SQLite ↔ PostgreSQL port, both directions Supported R13/R15/R16/R17 plus mixed #174387/#174623; state/agent/plugin port suites verify canonical data, allocators, search rebuilds and rollback.
Backup / restore / disaster recovery Supported #174698 fixes PG Git secret exclusion; #174744 restores every PG store, distinguishes generated capsules from user copies, scopes Git identities, and avoids verify namespace leaks. archive-restore.postgres.test.ts, git-backup-secrets.postgres.test.ts, git-backup.postgres.test.ts. Released 2026.10.4 SQLite archive → current restore also passed. All four R21 backup gaps landed. Not cluster PITR orchestration.
Mixed engines Supported #173755, #174387, #174623; all four state/agent pairs, family-scoped port and mixed backup/update; mixed-mode.conformance.test.ts, mixed-agent suites.
Multiple Gateways: independent databases on one server Supported #173745; multi-namespace.postgres.test.ts separate-database concurrency/identity/lock proof; R20 live two-installation proof.
Multiple Gateways: distinct namespaces in one database Supported #173745; independent writer locks, search/vector isolation, drift isolation and wrong-anchor refusal. Separate databases recommended.
Multiple active Gateways sharing one store Not supported (single live owner) R0 scope; multi-namespace and live stress same-store refusal. No active-active/failover protocol. Next step would be a separate ownership design, not a config change.
Memory/search, transcripts and standing intents Supported R6 #173625, R7 #174374, R19 #174462; memory-public.postgres.test.ts, session-search-product.postgres.test.ts, extensions/memory-core/src/tools.postgres.test.ts, standing-intents.postgres.test.ts. Real indexing/rebuild/forget/reset, pre-limit vector filters, bounds, missing capabilities. Text scores/tokenization are engine-local, not SQLite FTS5 ranking parity. The memory transcript 200-candidate ACL postfilter also exists on SQLite; R19b was dropped for that reason.
Plugins using SDK stores Supported (registered owners only) shared-feature/plugin-registry conformance, Matrix R18 and standalone plugin port suites. SDK keyed state follows state; separately registered families follow their selection. Arbitrary private plugin databases and memory-lancedb do not inherit PG support.
Performance / warm path Supported (measured, not a latency SLA) Roadmap main proof at f5de32afc6a5: traced 16.67 requests / 68.67 trips / 82.67 SQL; C=64 320/320, 5.04 turns/s, p95 16.86 s. Wave-28 d5aeceb2b89e: traced 72.33 SQL / 59.33 trips vs SQLite 52 SQL (20.33 SQL gap), no causal operation increase. C=64 apparent 4× slowdown reproduced on unchanged control under host load; residual ~5% confounded by optional cost-summary work. No equal latency claim.
PostgreSQL 17 / UTF8 Supported Real Homebrew 17.11 and Linux CI pg17 conformance; version/encoding admission in schema-admission.postgres.test.ts.
PostgreSQL 16 and other admitted unqualified majors Experimental (version qualification missing) >=16 is the enforced compatibility floor, not proof of all majors. CI only runs pg17. Next: full conformance on each claimed major.
DSN / env and file SecretRef Supported config.test.ts tests host resolution, missing/store-backed refusal; CLI/setup conformance uses env SecretRef; no DSN disclosure in reports.
Exec SecretRef Experimental (PG-specific end-to-end qualification missing) Uses the existing external SecretRef resolver; schema permits it, but no PG CLI/Gateway end-to-end exec-provider run was found. Next: qualify an exec-backed DSN through both paths.
TLS DSN Experimental (live TLS qualification missing) bridge.worker.ts passes the DSN to pg.Client; operator guide describes driver TLS options. CI uses plaintext loopback. Next: prove CA/hostname verification and invalid-certificate/hostname refusal through the PG bridge. Do not treat parameter forwarding as a TLS acceptance run.
unaccent, pg_trgm, vector requirements Supported PG17 CI installs all three; memory-public.postgres.test.ts uses separate databases missing each extension and checks actionable refusal/explicit keyword-only mode. Installed by administrator, never auto-installed.
macOS app Experimental (pending signed-app proof) Credentials local (#174599); exec approvals through owner (#177795); runtime pins local (#172703). Coordinator owns combined signed-app proof and fills this row after it completes. No claim from unit or simulator tests.
iOS / iPad app Not supported (no real-device qualification) R0 requires real-device proof; simulator evidence is insufficient. Next: real-device Gateway/auth/approval flow against PG-backed installation.
Headless Linux (including a Linux runtime under WSL2) Supported Linux PG conformance and real CLI/Gateway flows; this describes the Linux runtime, not native Windows qualification.
Headless macOS CLI Supported Homebrew PG real CLI/PTY/R20/stress runs in the roadmap. Separate from the signed macOS app row.
Headless native Windows Experimental (no Windows PostgreSQL proof) No native Windows + PG run found. Next: real CLI/onboard/Gateway/port/backup/update acceptance on Windows; Linux CI cannot establish this.

No configured family or memory/search mode remains experimental on the qualified runtime. The retained status --json key databaseEngines.experimental describes selected engine/search features and is therefore false for current supported selections. It is not a certificate for server-major, TLS, SecretRef-provider, native-device, performance, or published-upgrade qualification. Doctor continues to report real per-store mismatches, missing capabilities, and unknown/unreachable state instead of warning solely because PostgreSQL is selected.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T01:37:51.692301Z 23eaa10 PR opened
ℹ️ About Codex in GitHub

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

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

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations size: S labels Oct 20, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23eaa10688

ℹ️ About Codex in GitHub

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

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

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

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

databaseEngines: {
experimental: databaseFamilies.some((family) => family.effective === "postgres"),
// All selectable engine/search features are supported; deployment qualification is separate.
experimental: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Derive the experimental flag from selected search features

When memory.search.sources includes "sessions" and memory.search.experimental.sessionMemory is enabled, an experimental search feature is selected, but this hard-coded value still reports false. That contradicts the newly documented meaning of databaseEngines.experimental and can cause status consumers to treat such configurations as fully non-experimental; either account for the selectable experimental search setting or narrow the field's documented contract.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit bbc5e3a into main Oct 20, 2026
133 of 135 checks passed
@steipete
steipete deleted the pgprep/r21-claims branch October 20, 2026 01:58
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant