Skip to content

refactor(channels): read pairing allowlists through the shared-state reader - #164476

Merged
steipete merged 10 commits into
mainfrom
dbasync/pairallow
Oct 4, 2026
Merged

steipete merged 10 commits into
mainfrom
dbasync/pairallow

Conversation

@steipete

@steipete steipete commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Per-message channel ingress awaited readChannelAllowFromStore, but that Promise ran synchronous SQLite reads on the Gateway thread, including unrelated pending pairing requests.

User Impact

Pairing allowlists are prepared in the existing shared-state reader worker. Account normalization, persisted-row ordering, DM policy gates, and fail-closed ingress remain unchanged. Missing async reads grant no permission and do not initialize storage; boot and Doctor retain initialization ownership. Inherited account keys retain their native TypeError, including when the store is absent.

The synchronous readChannelAllowFromStoreSync SDK export retains its released signature and behavior until the next Plugin SDK major. No schema, stored-data format, retention, durability, permission policy, or update migration changes.

Why This Change Was Made

Register pairing.allowFrom with the existing read worker and reuse the ordered allow-entry query. Capture the physical store and canonical channel/account before yielding, request current rows outside discovery snapshots, and retain the reader's admission, typed-error, and cleanup ownership. Channel policy remains the authorization owner. Worker errors propagate without replay or host-SQL fallback; real ingress grants no permission and does not dispatch when the worker refuses.

The released synchronous path has a compatibility record, signature test, migration note, and deprecated-export allowance. Its record is in the compiled-wrapper inventory. Both reader signatures and the runtime adapter were inspected directly in v2026.9.8; no public export was removed or added. The record is deprecation metadata, not a database migration. Request/approval mutations, device pairing, and standing grants remain outside this read-only cutover. No host callback or SQL was added inside a worker grant. The diff adds zero new OPENCLAW_* names.

Evidence

Head 0053c28a3ab0dd0b0cc1032cc3e1cbed720f7185 integrates main 1836ae2146443e952337bce1bccb41c524ea0639 without rebasing or conflicts. The pairing production delta is unchanged. The earlier additive registry conflict retains both main's generated-HTML provenance reader and this PR's pairing reader.

  • The complete real Gateway shutdown regression passes with unchanged assertions and timeout: 37.8s test time, 743.37s wrapper wall, one worker. This boundary is necessary to prove that Gateway close joins an accepted pairing read and retains the shared database through reader cleanup; a helper-only test cannot prove that composition.
  • Gateway-server typechecking passes. Fresh independent P2 review of the complete staged candidate is scoped-clean; committed source matches that candidate.
  • Original production-ingress regression: two caller-thread SQL calls before the cutover, zero afterward; plugin-runtime reads also execute no caller-thread SQL.
  • The exact integrated source passed all 21 worker/lifecycle, released-signature, runtime build-graph, and get-reply import-closure tests with one worker. It includes worker-error ingress denial and absent-store inherited-account refusal. Fresh independent P2 review of the integrated source is scoped-clean; hosted build and CI are green, and ClawSweeper completed with no actionable findings.
  • The final-head 0053c28a build-artifacts job passed. The final-head local SDK comparison against v2026.9.8 completed exit 0, including cleanup, with checked evidence digest 27154595960979a119ea6dd9ec553bd2470db9ff28160d1be51c471ae75d1d4e: neither reader export changed, and the pairing entrypoint remains. The exact-head CI run completed successfully: all 103 jobs succeeded or were intentionally skipped; none failed or was cancelled.

Shutdown Timeout Investigation

The aa5 CI run had two root jobs reporting one stale test import after main moved the helper to @openclaw/worker-runtime/lifecycle. The corrected test now uses that canonical helper and the existing public pairing reader.

The subsequent startup timeout was reproduced with the identical test over plain main ca267fa035f8e, without PR production code. Owner tracing showed cold Vitest transformation of the mandatory reloader graph after Gateway readiness, inside the 120s behavior deadline. The import eventually completed; config-health reads/writes, last-known-good promotion, audit readiness, and server-handle publication all settled. This was fixture preparation cost, not a demonstrated pairing or SQLite deadlock. The deferred import predates this work (cbaa21e6e32ba, September 4), as does the shared fixture (b5134de70af88, September 11).

Main repair c4813d6897ec prepares that real module during shared-fixture collection, following the testing guide. Production retains its lazy import; no timeout, sleep, retry, startup operation, or assertion was weakened. A fresh-cache main control completed startup and reached the expected synchronous-pairing baseline failure in 49.5s. The existing port-reservation test passed in 35.4s (470.39s wrapper wall); typechecking and P2 review passed. The complete PR regression now passes after integrating the repair. Temporary diagnostics were removed.

Earlier CI Attribution

The C5 UI failure, board-mcp-app.e2e.test.ts:527, reproduced identically in 5/5 PR-head and 5/5 main merge-base runs with 602px iframe gaps. All eight relevant UI inputs match across the reproduced baseline, CI base, PR head, and tested merge. This PR does not change those inputs or participate in that mocked UI flow. Main frame fix 11515ce5b3da is integrated, and all five UI tests passed locally afterward.

Main Linux test-inventory repair 53eb4193d0ed, the subsequent Knip entry correction bf4fe3ace5702, and orphaned internal-type cleanup c13c48696949 are also integrated. Full dead-code validation, isolated core typechecking, and P2 review passed for those repairs. No admin exception or unexplained rerun-for-green has been used.

Additional CI Repairs

The ddf57da1 CI run exposed two inherited main defects: the unused normalizeProviderId import in model discovery and a deleted Doctor test still registered in the database-worker inventory. The latter test was intentionally removed by 02aa58710dce (#164669). Main fix 1836ae214644 (#164675) removes the import and stale inventory row; this integration incorporates that fix. The repeated production/test-type and lint failures share the same unused-import root. Neither failing source is changed by this PR.

ClawSweeper completed review of ddf57da1 with no introduced correctness or security finding. Its automated stored-data prompt names channel-pairing-record.ts, which only declares SDK deprecation metadata. It performs no migration, backfill, repair, or storage operation. Released behavior is covered by the signature test, sync/async result comparison, and release-tag API comparison. ClawSweeper completed the integrated head 0053c28a3ab0d at 2026-10-04T02:42:08.614Z with no actionable or security findings and explicitly confirmed the prior data-compatibility blocker does not apply. The report still contains an automatic migration checklist for the metadata filename; that checklist is rejected on the inspected source and the review's own compatibility finding.

Main drift inspected through cc740dfaf528f: overlapping shared request/validation edits only remove ACP legacy-metadata fields; wrapper inventory adds an unrelated worktree-template worker. Those hunks do not change pairing capture, validation, or permission policy. No additional integration is required for those disjoint changes.

Move the existing async allowlist API to the shared-state read owner, capture its physical source before yielding, and preserve current reads, account normalization, ordering, and ingress authority. Retain the released synchronous SDK contract as deprecated compatibility. Missing async reads grant no permission without initializing storage; boot and Doctor keep initialization.

Boundary proof observes two caller-thread pairing queries before the cutover and zero afterward. Shared kernels remain T1 for SDK compatibility and pairing mutations; no schema, cache, retention, or durability changes.
Reserve one deprecated channel-pairing export for the required released synchronous allowlist compatibility window. Total public exports remain unchanged.
Apply the native array selection before worker serialization so inherited account keys retain TypeError instead of returning an object or causing a transport failure. Add real-worker regressions for both inherited keys.
@clawsweeper

clawsweeper Bot commented Oct 3, 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 scripts Repository scripts size: M labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 0053c28a3ab0dd0b0cc1032cc3e1cbed720f7185
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/pairing/pairing-store-sqlite.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/pairing/pairing-store.read.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/pairing/pairing-store.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/pairing/pairing-store.types.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added the P2 Normal backlog priority with limited blast radius. label Oct 3, 2026
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 11:27 PM ET / October 4, 2026, 03:27 UTC (Revision 16).

ClawSweeper review

What this changes

Moves asynchronous channel pairing allowlist reads into the shared-state worker while preserving the released synchronous plugin API.

Merge readiness

⛔ Blocked before merge - 1 item remains

The refactor remains useful and has no actionable correctness or security findings. The previous migration-proof blocker does not apply: the compatibility record is SDK metadata, and no stored-data contract changes. Exact-head CI succeeded.

Priority: P2
Reviewed head: 0053c28a3ab0dd0b0cc1032cc3e1cbed720f7185

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, review-clean refactor with meaningful boundary coverage, preserved released APIs, and successful exact-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate is exempt for the verified repository-admin author. Inspected regressions exercise the production ingress/plugin readers with real SQLite workers and the Gateway close boundary; reported successful runs are supplemental evidence. The patch does not materially change principal authority or any stored-data contract, so neither additional authority-chain proof nor migration proof is required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate is exempt for the verified repository-admin author. Inspected regressions exercise the production ingress/plugin readers with real SQLite workers and the Gateway close boundary; reported successful runs are supplemental evidence. The patch does not materially change principal authority or any stored-data contract, so neither additional authority-chain proof nor migration proof is required.
Evidence reviewed 10 items Pinned introduction inspected: Reviewed the introduced delta from the pinned base to the exact original PR head. The supplied test merge is stale and was not used to claim that merging removes current-main behavior.
Existing reader owner reused: The adapter normalizes channel/account inputs, captures the physical store before awaiting, and requests current rows through the existing shared-state reader. Missing storage returns no permission without initialization; errors propagate.
Query and authorization boundaries preserved: The worker and synchronous reader share the existing account normalization and ordered allow-entry query. Ingress still catches reader failures as an empty allowlist and retains the channel admission decision. Shared read-operation ownership rechecks admission at dispatch, result acceptance, and cleanup; the patch adds no persisted authority, authorization bypass, or replay fallback.
Findings None None.
Security None None.

How this fits together

Channel ingress and plugins read approved senders from OpenClaw’s shared SQLite state. The reader prepares account-scoped allowlist entries, which channel policy then uses to decide whether a message may proceed.

flowchart TD
  A[Incoming channel message] --> B[Channel policy preparation]
  B --> C[Shared-state reader worker]
  D[Approved sender rows] --> C
  C --> E[Account-scoped allowlist]
  E --> F[Channel admission decision]
  F --> G[Dispatch or denial]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +80, Tests +339, Docs +27, Other +2. Total +448 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 10 109 29 +80
Tests 7 351 12 +339
Docs 2 27 0 +27
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 1 +2
Total 21 490 42 +448

Review metrics

Metric Value Why it matters
Production versus regression coverage production +80 net lines; tests +338 net lines Production growth is justified by the worker adapter, typed registration, and required SDK compatibility metadata; tests cover separate ingress, lifecycle, shutdown, and released-signature contracts.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/plugins/compat/channel-pairing-record.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Use the existing worker for async preparation, keep channel policy authoritative, and retain the shipped synchronous SDK contract through its documented compatibility window.

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

Not applicable to this refactor as a correctness bug report; current-main source directly confirms that the existing async API performs synchronous SQLite reads.

Is this the best way to solve the issue?

Yes. Reusing the shared-state reader and ordered query is a focused cutover, and preserving the released synchronous SDK API avoids an unnecessary breaking change.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 47206579b8e2.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded runtime improvement that removes synchronous pairing reads from channel ingress without changing admission policy.
  • 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. Not applicable: The ordinary external-contributor proof gate is exempt for the verified repository-admin author. Inspected regressions exercise the production ingress/plugin readers with real SQLite workers and the Gateway close boundary; reported successful runs are supplemental evidence. The patch does not materially change principal authority or any stored-data contract, so neither additional authority-chain proof nor migration proof is required.

Evidence

What I checked:

  • Pinned introduction inspected: Reviewed the introduced delta from the pinned base to the exact original PR head. The supplied test merge is stale and was not used to claim that merging removes current-main behavior. (0053c28a3ab0)
  • Existing reader owner reused: The adapter normalizes channel/account inputs, captures the physical store before awaiting, and requests current rows through the existing shared-state reader. Missing storage returns no permission without initialization; errors propagate. (src/pairing/pairing-store.read.ts:12, 0053c28a3ab0)
  • Query and authorization boundaries preserved: The worker and synchronous reader share the existing account normalization and ordered allow-entry query. Ingress still catches reader failures as an empty allowlist and retains the channel admission decision. Shared read-operation ownership rechecks admission at dispatch, result acceptance, and cleanup; the patch adds no persisted authority, authorization bypass, or replay fallback. (src/pairing/pairing-store-sqlite.ts:75, 0053c28a3ab0)
  • Previous data-compatibility blocker resolved: The complete compatibility record contains deprecation dates, SDK surface names, documentation, tests, and release-note text. It executes no migration, backfill, or storage operation. The introduced production delta changes no schema, serialized format, row identity, retention, or writer behavior, so stored-data migration proof is not applicable. (src/plugins/compat/channel-pairing-record.ts:3, 0053c28a3ab0)
  • Released SDK contract verified: GitHub source for v2026.9.8 exports both readers with the same positional parameters and synchronous/asynchronous return types. The PR retains both exports and the synchronous implementation, with a documented next-major removal gate. The annotated release tag was independently resolved to this commit. (src/pairing/pairing-store.ts:196, fc23bc864e45)
  • Current main still needs the cutover: At fetched main, the async reader still directly calls readChannelAllowFromStoreSync. Neither current main nor the inspected stable release already implements this worker-read cutover. The two provided merged related PRs address separate CLI/Doctor and CI work. (src/pairing/pairing-store.ts:160, 47206579b8e2)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (15 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-03T22:14:07.242Z sha c5dd221 :: blocked before merge. :: none
  • reviewed 2026-10-03T22:50:26.353Z sha c992861 :: blocked before merge. :: none
  • reviewed 2026-10-03T23:29:58.646Z sha 7503b57 :: blocked before merge. :: none
  • reviewed 2026-10-04T00:09:42.489Z sha aa5e0e8 :: blocked before merge. :: none
  • reviewed 2026-10-04T00:46:38.804Z sha aa5e0e8 :: blocked before merge. :: [P2] Import the retained-operation helper from its current package
  • reviewed 2026-10-04T02:18:15.175Z sha ddf57da :: blocked before merge. :: none
  • reviewed 2026-10-04T02:28:08.371Z sha ddf57da :: blocked before merge. :: none
  • reviewed 2026-10-04T02:42:08.614Z sha 0053c28 :: blocked before merge. :: none

Merge main to resolve additive compatibility registry and compiled-wrapper
inventory conflicts, preserving both records.

Keep inherited account-key TypeErrors when the async pairing reader encounters
an absent store, without initializing storage. Extend the existing regression
table to cover both present and absent databases.

Release-note context: channel ingress prepares pairing allowlists in the shared
read worker; released synchronous SDK behavior and fail-closed ingress remain.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Resolve the additive Gateway test inventory conflict by retaining both pairing and ACP diagnostics shutdown tests. The introduced pairing patch is unchanged and fresh P2 review is clean.
@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 3, 2026
…tion

Merge main to include the repaired Plugin SDK API comparison tool and the
pre-existing fullscreen board frame fix. Preserve the pairing implementation
and released synchronous SDK contract.

Extend the real-worker inherited-account tests to require that ingress grants
no permission and does not dispatch after a worker error. Keep absent-store
refusal coverage. Focused worker, SDK, import-closure and wrapper checks pass;
the formerly failing board test now passes, and fresh P2 review is clean.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 4, 2026
steipete added a commit that referenced this pull request Oct 4, 2026
Cold isolated Gateway tests can spend most of their behavior deadline transforming the mandatory managed-reloader module after readiness. Load that real dependency when the shared metadata fixture is collected, as the testing guide requires for mandatory import preparation.

Production lazy loading, the 120-second timeout, startup, last-known-good promotion, audit readiness, and all assertions remain unchanged. Plain-main control timed out before the pairing assertions; a fresh-cache control with this preparation reached its expected synchronous-pairing baseline failure in 49.5 seconds. The existing port-reservation test passes in 35.4 seconds (470.4 seconds wrapper wall), the Gateway-server typecheck passes, and independent P2 review is clean.

Unblocks shutdown-regression validation for #164476.
Merge current main without rebasing, retaining both generated-HTML provenance and pairing read registrations. Follow the retained-operation helper into worker-runtime and exercise the existing public pairing reader in the shutdown regression.

Main contains the separately reviewed fixture-preparation repair c4813d6. The full pairing shutdown regression now passes with its unchanged timeout and assertions (37.8 seconds test time). Gateway-server typechecking and independent P2 review pass.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 4, 2026
Integrate main's unused-import and retired Doctor test-inventory fixes
without rebasing the reviewed pairing allowlist worker change.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Head 0053c28 integrates main's independently fixed unused import and obsolete Doctor test inventory. Pairing production changes are unchanged; fresh P2 review and all 21 security/lifecycle/import/signature tests passed. The compatibility record is SDK deprecation metadata, with no stored-data migration or schema change. Exact-head SDK comparison and CI are in progress.

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit f02d516 into main Oct 4, 2026
177 checks passed
@steipete
steipete deleted the dbasync/pairallow branch October 4, 2026 03:43
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 4, 2026
Restore the dynamic import at the default ingress allowlist reader. The
static import introduced in f02d516 (#164476) made memory-wiki's Doctor
contract reach Kysely through security-runtime and the shared-state reader.

Keep the worker-backed pairing reader and its refusal behavior; defer its
database graph until an actual store read. Leave the closure guard unchanged.

Validation: 69 focused Doctor, ingress, and pairing tests; both import-cycle
checks; core typecheck; targeted formatting and lint.

Full build attempted but stopped during package declarations after 11 minutes
in that stage under host contention; this is not passing full-build evidence.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
Cold isolated Gateway tests can spend most of their behavior deadline transforming the mandatory managed-reloader module after readiness. Load that real dependency when the shared metadata fixture is collected, as the testing guide requires for mandatory import preparation.

Production lazy loading, the 120-second timeout, startup, last-known-good promotion, audit readiness, and all assertions remain unchanged. Plain-main control timed out before the pairing assertions; a fresh-cache control with this preparation reached its expected synchronous-pairing baseline failure in 49.5 seconds. The existing port-reservation test passes in 35.4 seconds (470.4 seconds wrapper wall), the Gateway-server typecheck passes, and independent P2 review is clean.

Unblocks shutdown-regression validation for openclaw#164476.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…reader (openclaw#164476)

* refactor(channels): read pairing allowlists through shared-state reader

Move the existing async allowlist API to the shared-state read owner, capture its physical source before yielding, and preserve current reads, account normalization, ordering, and ingress authority. Retain the released synchronous SDK contract as deprecated compatibility. Missing async reads grant no permission without initializing storage; boot and Doctor keep initialization.

Boundary proof observes two caller-thread pairing queries before the cutover and zero afterward. Shared kernels remain T1 for SDK compatibility and pairing mutations; no schema, cache, retention, or durability changes.

* chore(plugins): record deprecated pairing reader allowance

Reserve one deprecated channel-pairing export for the required released synchronous allowlist compatibility window. Total public exports remain unchanged.

* fix(channels): preserve pairing reader refusal errors

Apply the native array selection before worker serialization so inherited account keys retain TypeError instead of returning an object or causing a transport failure. Add real-worker regressions for both inherited keys.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 5, 2026
Restore the dynamic import at the default ingress allowlist reader. The
static import introduced in 837ad2f (openclaw#164476) made memory-wiki's Doctor
contract reach Kysely through security-runtime and the shared-state reader.

Keep the worker-backed pairing reader and its refusal behavior; defer its
database graph until an actual store read. Leave the closure guard unchanged.

Validation: 69 focused Doctor, ingress, and pairing tests; both import-cycle
checks; core typecheck; targeted formatting and lint.

Full build attempted but stopped during package declarations after 11 minutes
in that stage under host contention; this is not passing full-build evidence.
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: L 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