Repository navigation
refactor: prepare bundled callers for async SDK removal - #175199
Conversation
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a9490ce4a
ℹ️ 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".
| ) { | ||
| return { text: "No discussion is bound to this session." }; | ||
| } | ||
| const history = await client.latestChannelMessages(binding.channelId, limit); |
There was a problem hiding this comment.
Validate discussion authority before fetching history
When a channel revocation, binding replacement, or session reset is published after the earlier attachment refresh, this still issues the authenticated latestChannelMessages request before checking the retained binding, session, and revocation facts; the checks below only suppress the returned text after private channel contents have already been fetched. Revalidate these prepared facts immediately before the HTTP request, while retaining the existing post-await check for changes during the request.
AGENTS.md reference: AGENTS.md:L71-L71
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. What this changesMoves bundled sandbox and ClickClack callers to prepared async authority checks and completes SDK deprecation notices. Example: A ClickClack session resets while its discussion history request is in flight.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open: it advances the approved async SDK migration, preserves shipped compatibility, and has no definite introduced defect established by this review. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin runtime operations consume session and plugin-state facts from existing storage owners, then authorize sandbox provisioning, ClickClack requests, history disclosure, and binding cleanup. flowchart TD
A[Bundled plugin callers] --> B[Async authority preparation]
C[Session storage owner] --> B
D[Plugin state owner] --> B
B --> E[Current authority checks]
E --> F[Sandbox provisioning]
E --> G[ClickClack effects and history]
Technical reviewBest possible solution: Use the existing async storage owners and receipt-backed effect checks while preserving shipped SDK methods through the approved compatibility window. Do we have a high-confidence way to reproduce the issue? This is a migration refactor rather than a reported current-release bug; source inspection confirms the synchronous caller paths being replaced, and no target code was executed. Is this the best way to solve the issue? The implementation follows existing session and plugin-state owners, retains final-effect assertions, and explains the bookkeeping checks it removes without introducing another state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4a2c8498afcb. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete bypass was established, but the changed authority chain still needs final-effect validation. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +101, Tests +207, Docs +5, Other -1. Total +312 across 58 files. Added test files: 2. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 17, 2026, 2:34 AM ET / 06:34 UTC. |
# Conflicts: # extensions/clickclack/src/discussions/service-state-persistence.test.ts
|
The credentialed-history P1 is fixed: retained authority is checked before the HTTP fetch and again before disclosure. The zero-fetch-after-revocation regression and the in-flight reset/revocation cases pass in final-head CI. ClawSweeper found no remaining discrete defect. Its broader production-owner/final-effect end-to-end proof request remains a follow-up under the maintainer-authorized relaxed landing policy. The current evidence is scoped owner-contract tests plus existing receipt-publication integration tests; it is not a live ClickClack or sandbox provisioning trace. The latest automatic Codex review at The earlier core type failure was repaired upstream and integrated. OAuth, reply admission, and worker-surface failures have qualified main attribution in the PR body. The PostgreSQL watcher-fixture defect is repaired on main by |
…175424) The legacy Memory Core fixture installed its runtime capability without the loaded plugin record needed to resolve memory-core/search-api.js. Include that existing public-surface metadata so the real legacy response path also works when global bundled discovery is disabled. Response and authority assertions are unchanged. PR #175199 explicitly says "No shipped methods are removed" and retains third-party managers' synchronous fallback. PR #175352 defines "live connection rows plus at most one recent offline row per operator identity". These sockets share a signed device. On disconnect, a live sibling intentionally causes the closed row to disappear. Assert that removal in the emitted presence snapshot instead of waiting for an offline row. Preserve the per-connection replace-set, narration isolation, invalid input and presence-version checks, with unchanged deadlines. Both assigned hourly failures were reproduced before the fixture repairs. The full affected-file Node run with bundled discovery disabled passed 40/41 cases, including all memory authority cases and the repaired viewer case. Its unchanged session-scoped chat-delivery case timed out and failed cleanup; that case passed alone in the normal environment (186.24 s). This additional failure is recorded, not treated as a clean full-file run. Both targeted test type graphs and type-aware lint/format pass. P0-P2 autoreview found no findings.
) Migrate bundled sandbox and ClickClack operations to existing async session and plugin-state authority receipts. Retain effect-time authority for provisioning, authenticated HTTP, history disclosure, and destructive cleanup while removing redundant bookkeeping rereads. Complete SDK deprecation wording and warn legacy built-in memory status callers. Preserve all shipped methods through December 31, 2026, with removal eligible for the first January 2027 stable after the deprecation and working replacement ship stable. Keep Telegram migration and the remaining session-share, voice-overlay, discussion-opening, and authentication cutovers separate; the removal checklist records those prerequisites.
…penclaw#175424) The legacy Memory Core fixture installed its runtime capability without the loaded plugin record needed to resolve memory-core/search-api.js. Include that existing public-surface metadata so the real legacy response path also works when global bundled discovery is disabled. Response and authority assertions are unchanged. PR openclaw#175199 explicitly says "No shipped methods are removed" and retains third-party managers' synchronous fallback. PR openclaw#175352 defines "live connection rows plus at most one recent offline row per operator identity". These sockets share a signed device. On disconnect, a live sibling intentionally causes the closed row to disappear. Assert that removal in the emitted presence snapshot instead of waiting for an offline row. Preserve the per-connection replace-set, narration isolation, invalid input and presence-version checks, with unchanged deadlines. Both assigned hourly failures were reproduced before the fixture repairs. The full affected-file Node run with bundled discovery disabled passed 40/41 cases, including all memory authority cases and the repaired viewer case. Its unchanged session-scoped chat-delivery case timed out and failed cleanup; that case passed alone in the normal environment (186.24 s). This additional failure is recorded, not treated as a clean full-file run. Both targeted test type graphs and type-aware lint/format pass. P0-P2 autoreview found no findings.
What Problem This Solves
Bundled sandbox and discussion operations still called deprecated synchronous storage readers, and several SDK declarations lacked the announced removal window.
User Impact
Sandbox and ClickClack operations prepare authority through existing async owners and keep receipt-backed checks at provisioning, channel updates, history disclosure, and destructive cleanup. The built-in memory manager now warns legacy
status()callers to usestatusAsync().No shipped methods are removed. The final compatibility day is December 31, 2026, with removal planned for the first January 2027 stable release after a stable release has shipped the deprecation and working async replacement. Third-party memory managers retain the documented synchronous fallback during that period.
Why This Change Was Made
The existing session and plugin-state owners already publish committed changes. These consumers retain those facts through the operation and release them afterward instead of rereading SQLite at each boundary. Attachment and detached-marker bookkeeping use the existing exact-row CAS. No new schema, authority store, cache, or cross-thread handshake is introduced.
Removed checks and accepted edges:
The remaining synchronous session-share disclosure, realtime voice overlay, and discussion-opening callers need changes in their existing owners. Session-share must preserve batched policy selection, voice needs a lazy prepared-overlay lifetime, and discussion opening deliberately follows resets during HTTP. Shipped synchronous visibility providers and custom adapters remain compatible. Telegram's adapter is deferred: needs Telegram Test Server live proof (coordinator-run, Molty QA Convex broker). This PR does not claim that January removal is already mechanical.
Evidence
Validation is complete at
695483aae431266cabd4ac4ee65eeaf1ae4a4f44, based on1eedd741c6d4a58c12240dcd60b67740efd2386a. No SQL or latency saving is claimed.One unchanged shared-v3 M/C pair passes: all 14 top-level turns succeed in each arm, causal coverage is complete, both shutdowns/restart succeed, and observer errors and remaining fixture children are zero. Calibration passes on MAIN and worker (7 statements / 8 native calls / 2 prepares each). Every turn-caused warm count matches. The candidate first warm window includes 33 background statements (13 MAIN lease-expiry reads and 20 worker plugin-index/config/lease operations); the same SQL/thread cohort occurs during the base first turn. Whole-workload MAIN rises by one cold restart-admission busy-timeout pragma. This is warm non-regression evidence only: the standard harness does not exercise the changed sandbox provisioning or ClickClack channel effects, and the shared host does not support latency claims. New regressions cover sandbox authority after an in-process write, ClickClack plugin-state receipts across awaited effects, withholding history after revocation/reset, and the actual memory-manager warning. The ClickClack session fixture is contract proof; core session-owner integration tests supply receipt-publication proof.
Changed-file formatting, basic lint, and
git diff --checkpassed. Two isolated Codex reviews completed without actionable P0/P1 findings. The subsequent P1 history finding is fixed: retained authority is checked before the credentialed HTTP fetch and before disclosure, and the zero-fetch-after-revocation regression passes.Final-head CI 39013658010 passes production/test typechecks, type-aware lint, source contracts/export guards, architecture/Madge and baseline ratchets. All 154 cases in the ten changed test files pass, plus five cases in the existing changed-export mock consumer. The obsolete sandbox mock baseline entry was pruned; no allowance was added. T1 compatibility entries remain 10 → 10, and all three changed-production dialect groups remain 0 → 0. Canonical SDK comparison finds no added or removed entrypoints and no changed public call signatures. All 193 affected exports are reachable-type changes from the optional
createdActorreceipt field and the newmemory-manager-sync-statuscompatibility record (four unique declaration changes). The SDK surface check passes for 375 entrypoints against the shipped v2026.10.4 surface, and all seven runtime API guardrail tests pass. Knip exits 1 on both exact base and candidate with identical 26 production / 16 full-tree / 0 script unused-export tuples, all three scans complete and no new findings. This is an inherited static failure, not a passing scan.CI remains failed (89 successful jobs, four failed test jobs plus the aggregate gate, 22 skipped). Landing uses the authorized v4 inherited-failure exception; failures are recorded individually:
memory-core/worker-api.jssurface and worker exit match current main run 39013936147, job 117342199582, under Node.90e9222398af: events were injected into a process-local mock after observation moved to a worker. A controlled upstream diagnostic proved the missing subscription, and the test-only fix retains real indexing/retrieval assertions. Upstream run 39015209653 passes all seven memory cases and 728 PostgreSQL tests. The earlier upstream body/path failure reached deletion line 261; this candidate failed replacement line 250, so this is source/fixture attribution, not an identical assertion replay. Candidate infrastructure passes all 291 cases; its original integrations result remains failed.No update/Doctor/schema/plugin-loading/service-lifecycle behavior changes are included, so the update cell is not applicable. LOC: production +410/−309; tests +308/−99; docs +5/−0; baseline −1 (58 files, total +723/−409).