Skip to content

docs: align database worker ownership and SDK migration guidance - #169879

Merged
steipete merged 3 commits into
mainfrom
dbasync/docsync
Oct 12, 2026
Merged

steipete merged 3 commits into
mainfrom
dbasync/docsync

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Database and Plugin SDK documentation still described synchronous runtime paths, foreign-commit polling, and pre-v21 transcript layouts after the worker and session-actor cutovers.

User Impact

Plugin authors and maintainers can find the current awaited APIs, worker ownership, and receipt-maintained cache contracts. This is documentation only; runtime behavior, schema versions, and SDK exports are unchanged.

Why This Change Was Made

Cross-checked the database, gateway storage, and SDK guides against current source and the merged dbasync/* campaign PRs. Added a concise worker ownership/cache table; replaced stale host-thread and foreign-polling claims; documented the shared-state v21 predicate columns and async replacements for routing, native bindings, transcript validation/mirror writes, and catalog identity preparation. Retained released compatibility contracts and real effect-time security checks. Clarified that legacy deletion callbacks run after durable Gateway commits, while stopped-owner maintenance and incognito retain native transaction semantics.

The removed documentation claims concerned the old sub-second read-custody expiry, foreign-commit freshness probes, bundled synchronous routing/history readers, and main-thread registry/backup reads. No runtime checks are removed here. Existing ownership rules still require outside writers to use the Gateway or exclusive offline access.

Evidence

  • pnpm install --frozen-lockfile and pnpm docs:list passed.
  • pnpm docs:check-links: 15,284 internal links checked, zero broken links.
  • pnpm docs:check-mdx: all 1,350 files passed.
  • Repository-configured Markdown lint on all 14 changed pages: zero issues; scoped oxfmt and git diff --check passed.
  • Independent Codex review: the original patch passed with no actionable P0–P2 findings; the final deletion-callback correction passed a second scoped review with no actionable P0/P1 findings. Schema and worker details were also checked directly against their current owners.
  • T1 before/after, statements/requests, SQL harness, runtime tests, builds, SDK API diff, and update cell: not applicable to this docs-only change. No runtime or schema code changes.
  • Scope: 14 docs, +182/-92 lines.
  • Integrated current main to resolve overlapping documentation; reran the affected MDX/format checks and all changed-page Markdown lint. Native provisioning stalled for more than 10 minutes; after recovering its operation lock, landing uses the authorized head-pinned REST squash fallback once CI passes.

@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 gateway Gateway runtime plugin: file-transfer size: XS labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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 maintainer review before merge.

What this changes

Updates database and Plugin SDK guides to describe worker ownership, receipt-maintained caches, awaited APIs, and existing compatibility contracts.

Example: A plugin author implements conversation route ownership.

  • Before: The guide recommends synchronous resolveConversationRouteOwner binding inspection.
  • After: The guide recommends awaiting prepareConversationRouteOwnersAsync and reading prepared binding facts inside each resolver.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, source-supported documentation corrections with passing documentation validation and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: Documentation-only corrections were checked against production owners; the exact-head documentation check passes and runtime proof is unnecessary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Plugin authors and maintainers encounter guidance recommending synchronous APIs and cache behavior that no longer match the implementation.
Reason: The maintainer-directed corrections help readers use existing APIs without adding configuration, runtime behavior, or public contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it corrects stale documentation, matches current source, and has no actionable findings; the earlier merge conflict is resolved.

Priority: P3
Reviewed head: 49afcc5e2d5ec5a06ec3a6920de36039a5f56a4c

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway and plugin callers await storage owners, workers execute SQLite operations, and committed receipts update cached facts consumed by readers and effect guards.

flowchart LR
  A[Gateway and plugin callers] --> B[Awaited owner APIs]
  B --> C[Database workers]
  C --> D[SQLite stores]
  C --> E[Committed receipts]
  E --> F[Cached facts and effect guards]
Loading

Technical review

Best possible solution:

Publish the corrected guides while preserving existing compatibility and effect-time authorization contracts.

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

Source inspection confirms stale ownership and API descriptions on current main; runtime reproduction is unnecessary for this documentation correction.

Is this the best way to solve the issue?

Updating the existing guides and linking the generated migration inventory keeps guidance with its established owners and avoids another competing worklist.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6d479f5c893a.

Provenance checked

Security

None.

Evidence

What I checked:

  • Documentation-only introduction: The pinned introduction diff contains only documentation changes, and its whitespace check passes. (49afcc5e2d5e)
  • Current main still needs the correction: Main's gateway-lock guide describes sub-second read-custody expiry, while assertStateDatabaseReadAllowed retains accepting process custody without that expiry. (src/infra/gateway-state-owner.ts:626, 6d479f5c893a)
  • Awaited routing contract: The channel interface exposes prepareConversationRouteOwnersAsync with an awaited binding inspector returning a synchronous reader and marks the older hooks deprecated. (src/channels/plugins/types.core.ts:480, 49afcc5e2d5e)
  • Legacy deletion timing: The durable deletion owner adapts opaque callbacks into postcommit finalizers, warns on cleanup failure, and supplies no rollback effect; incognito retains its native transaction path. (src/config/sessions/session-deletion-worker-participant.ts:10, 49afcc5e2d5e)
  • Existing schema and cache implementation: Schema 21 already backfills transcript source, metadata-agent, and overview columns; session-list reuse already compares database incarnation, sibling-write revision, and session-node generation. (src/state/openclaw-state-db-schema-v21-columns.ts:15, 49afcc5e2d5e)
  • Current mergeability and validation: GitHub reports the reviewed head as mergeable; check-docs, security-fast, and openclaw/ci-gate have completed successfully. (49afcc5e2d5e)

Likely related people:

  • Peter Steinberger: Raw commit 3f4e6a1 adds docs/plugins/sdk-agent-harness/sessions-and-results.md:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3f4e6a1689c3; files: docs/plugins/sdk-agent-harness/sessions-and-results.md)

PR surface

Docs +90. Total +90 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 14 182 92 +90
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 182 92 +90

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: Corrects documentation and migration guidance without changing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 (1 earlier review cycle)
  • reviewed 2026-10-12T12:19:34.550Z sha ff1ce36 :: needs changes before merge. :: none

Reviewed October 12, 2026, 8:48 AM ET / 12:48 UTC (Revision 2).

@steipete
steipete merged commit c6a2ce0 into main Oct 12, 2026
64 checks passed
@steipete
steipete deleted the dbasync/docsync branch October 12, 2026 12:49
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…nclaw#169879)

Document worker SQL ownership, receipt-maintained cache contracts, shared-state v21 layout, and current async Plugin SDK replacements. Correct stale foreign-commit polling, read-custody, and legacy deletion-callback guidance.

Validated internal links, MDX, changed-page Markdown lint, formatting, and two scoped reviews.
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 20, 2026
First-parent upstream f956a18..9d9761d (openclaw#169879 database worker
ownership docs, UI retired render adapters, openclaw#169884 macOS discovery).
No conflicts; the one file both sides touched (agent-schema-history.md,
upstream reworded the snapshot paragraph) keeps our schema-27 rows and
section byte-for-byte. Stops before openclaw#169646 (fp#722),
which is step 69 on its own.

Refs #1475

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: file-transfer rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant