Repository navigation
fix(outbound): prepare cold channel metadata asynchronously - #149304
Conversation
…tbound-bootstrap-metadata-preparation-20260915
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 18, 2026, 8:17 AM ET / 12:17 UTC (Revision 17). ClawSweeper reviewWhat this changesThe PR prepares cold channel metadata asynchronously before outbound delivery and recovery, preserves cancellation reporting, and adds registry-lifetime regression coverage. Merge readiness⛔ Blocked before merge - 1 item remains The improvement remains absent from main and v2026.9.4. No actionable introduced defect was found, and the previous generic migration blocker is not supported by the current diff. Priority: P2 Review scores
Verification
How this fits togetherOutbound delivery selects channel plugins for new messages and queued retries. Metadata preparation feeds that selection before existing admission, queue custody, and transport checks run. flowchart TD
A[New message or queued retry] --> B{Channel already ready?}
B -->|No| C[Prepare metadata through state worker]
B -->|Yes| D[Select channel plugin]
C --> D
D --> E[Check delivery admission and custody]
E --> F[Channel transport and outcome]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +173, Tests +95. Total +268 across 17 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep cold metadata reads with the existing state worker and cache owner while preserving channel selection, queue custody, and final transport fences. Do we have a high-confidence way to reproduce the issue? Yes, at source level: a cold setup-only channel on main reaches synchronous metadata discovery before loading its sender. This review did not execute a runtime reproduction. Is this the best way to solve the issue? Yes. The patch reuses existing worker preparation and one shared selection algorithm, with awaited consumers and preserved delivery fences. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 488ff7c486c6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (16 earlier review cycles; latest 8 shown)
|
…tbound-bootstrap-metadata-publication-refresh-20260915
…tbound-bootstrap-metadata-publication-refresh-20260915
…tbound-bootstrap-metadata-publication-refresh-20260915
(cherry picked from commit 6c28739)
Carry the test-only correction from 2dd0ed9 (#149558). Preserve both idempotent alias setup calls and the yielded-session completion and zero-root cleanup contracts. Adapt only the wrapper fixture hunks to the frozen metadata branch; runtime and dependency inputs remain unchanged. Co-authored-by: Vincent Koc <[email protected]>
Revert the six-file fixture carry in dc3de02. Current main contains newer canonical owners; its clean merge preview retains all six fixture blobs unchanged. Restore the exact qualified metadata tree without changing runtime or dependency inputs.
Compose pinned current main0bb2b6d6b85e072a1c5cacca5852c7caac1d0489, preserving newer send-authority owners. Adapt the existing Discord request-authority fixture to await metadata preparation and invoke its admission closure with the same assertion. 59 selected controls, full changed-file gate, fresh P2 review and normal build passed on the frozen composition tree.
(cherry picked from commit 6fcfa94)
Reuse existing delivery fixture helpers and simplify last-call lookup so metadata preparation does not grow oversized test files. Preserve all assertions and production behavior.
Keep cold metadata preparation and delivery authority checks intact while extracting the existing pure recovery policy and Matrix delivery fixture. Preserve all recovery statements and test assertions; qualify the standalone change against the current main parent.
Preserve current-main delivery authority and fixture changes while carrying the reviewed async cold metadata preparation. Retain the original Matrix Doctor deadline and assertions; the unchanged current-source synthetic case passed without establishing the historical timeout cause.
Compose the approved metadata change with current main, including the canonical Telegram helper/recorder repair and Doctor-owned historical state repair. Preserve the metadata patch, ordinary plugin deferral policy, and original synthetic test deadlines.
Normally compose the accepted shared catalog ancestor with exact main 543e8ce. Preserve the canonical required early-retention callback and both complementary existing regressions unchanged. The only main-relative delta is the retained after-credentials real-worker regression.
|
Merged via squash.
|
…#149304) Prepare cold outbound channel metadata asynchronously through the existing state worker. Preserve the shared plugin cache and selection owner, captured workspace/state context, and currentness checks before loading or queue admission. Cancellation and preparation failures retain one queue-owned terminal audit and message hook. Keep synchronous bootstrap for callers outside this cut. Extract unchanged retry policy and the Matrix test adapter into internal siblings; preserve canonical catalog custody and complementary regression coverage. No new configuration, stored format, or migration. Validation: exact-head CI run 35343214882 passed; focused metadata/worker controls, relevant types, line-cap checks, and fresh P2 review passed. Historical updater proof remains bound to source 7dd / package f66; no new installed-update or live-provider proof is claimed. Related: openclaw#144592. Doctor openclaw#149381 was superseded by canonical openclaw#150978. Co-authored-by: Vincent Koc <[email protected]>
Related: #144592
What Problem This Solves
Cold sends and delivery recovery can read installed plugin metadata on the Gateway thread when a channel has only setup metadata.
User Impact
Channel bootstrap now awaits discovery-mode and installed-index preparation through the existing state worker. Existing plugin selection and loader fallback remain supported. This adds no configuration options, stored formats, or migrations.
Why This Change Was Made
The existing plugin cache and shared selection algorithm remain the owners. Async preparation captures state/workspace locations before awaiting and rechecks caller authority and registry selection before loading the channel. Deferred admission returns a synchronous policy closure so recovery checks its continuation fence first. Cancellation and preparation failures retain one queue-owned terminal audit and message hook before admission.
Current-main handoff and pin authority checks remain intact. Synchronous bootstrap remains available to callers outside this cut. Existing pure retry policy and the Matrix test adapter move into narrow sibling modules to satisfy line limits while preserving behavior and assertions.
Evidence
Candidate
d465c7222a35eb79208de502c822fdc448eeafd1carries canonical main543e8ce3through shared ancestoraf93878c, including the early registry-custody owner in #151651. All three catalog production files match main, and both complementary worker regressions are preserved. All 16 metadata files remain byte-identical to predecessord30e6634, whose full CI passed.The latest composition passed fresh P2 review, core/agents/messaging types, the line-cap guard, one ordinary catalog replacement case, and four metadata-worker controls. Those controls observed zero parent calls across six measured SQLite methods during the measured reads. The unchanged 48 metadata cases passed on
d30e6634. Shared ancestoraf93878cseparately passed 48 cleanup/adoption/worker tests and its own P2/types/lint/format checks; these results retain their source bindings.Earlier
75b22e0passed the normal build, types, the exact canonical #151632 offline Telegram fixture, and the unchanged Matrix Doctor case in 38.535 seconds on macOS arm64/Node 24.21 with its original 120-second deadline. New-head CI and native preparation remain pending.The former Doctor prerequisite #149381 is closed as superseded by #150978. Current policy admits copied config plugins within recognized rehearsals, preserves ordinary-path deferral, and retains state/inspection obligations. Seventeen existing real preflight boundary cases passed. Published 2026.9.4 source supplies the required rehearsal markers and copied paths; this reconciliation adds no production change or updater replay.
Historical combined updater proof remains exclusively attributed to source
7ddc8566and packagef66f97d0: all 13 phases and 12 updater steps passed in Linux arm64 Docker, manual/no-provider mode. Its original failures and limitations remain retained, including emitted hashes being observations and the historical Control UI release-preflight failure.CI on
75b22e0exposed a prepared-registry lifetime failure in the catalog-worker shard. The inspected provider-only fixture does not invoke the changed outbound path. The shared carry now uses canonical main's single construction-custody owner; no competing implementation or fault replay was added.The earlier Linux Matrix timeout remains unexplained. No fresh installed-package/update-cell, managed-service restart, live-provider, full release-validation, or speedup claim is made.