Skip to content

refactor(plugin-sdk): remove synchronous APIs deprecated by stable v2026.10.2 - #169868

Closed
steipete wants to merge 12 commits into
mainfrom
dbasync/sdkmajor
Closed

steipete wants to merge 12 commits into
mainfrom
dbasync/sdkmajor

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Draft: removal timing remains Peter's decision

This refresh keeps the synchronous SQLite SDK removal proposal current with main and limits it to contracts whose deprecations shipped in stable v2026.10.2 or earlier. Keep this PR draft; do not merge until Peter decides the compatibility period is over. Beta releases do not count, and this is a later normal release removal, not a version-policy change.

The previous draft removed several APIs whose deprecations had not shipped in stable. Those contracts and their live dependencies are restored. Eligible removals use the existing awaited owners; synchronous paths used exclusively by removed contracts are deleted. Shared kernels still required by retained APIs, worker execution, offline maintenance, or real authority checks remain explicitly classified.

Stable removal inventory

Owning declarations and public exports were checked in stable tags; compatibility-record dates and introduction dates were not treated as proof. Release links establish deprecation history, not a removal deadline. Supporting migration details are in docs/plugins/sdk-migration/deprecated-sqlite.md.

Deprecated API Replacement First stable deprecation
readAcpSessionEntry, AcpSessionManager.resolveSession Await readAcpSessionEntryAsync and resolveSessionAsync. v2026.9.7
SessionBindingService.touch, resolveByConversation, resolveRuntimeConversationBindingRoute Await touchAsync, resolveByConversationAsync, and resolveRuntimeConversationBindingRouteAsync. v2026.9.6
setIdleTimeoutBySessionKey and setMaxAgeBySessionKey on ChannelConversationBindingSupport and api.runtime.channel.threadBindings Await the corresponding Async setter. v2026.9.6
Discord setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey; Telegram setTelegramThreadBindingIdleTimeoutBySessionKey, setTelegramThreadBindingMaxAgeBySessionKey Await the corresponding Async setter. v2026.9.7
OpenClawPluginNodeHostCommandContext.acquireManagedWorkspace Await acquireManagedWorkspaceAsync; release its lease in finally. v2026.9.7
loadArchivedSessions, resolveMemorySessionTargets Await the corresponding Async reader from memory-core-host-engine-sessions. v2026.10.1
buildWatchedSessionsHarnessContext Await prepareWatchedSessionsHarnessContext with current host authority. v2026.10.1
captureNativeSessionGenerationAuthority, resolveNativeSessionBinding, reclaimNativeSessionGeneration, NativeSessionGenerationOperations Use prepareNativeSessionGenerationAuthority, resolveNativeSessionBindingWithAuthority, and reclaimNativeSessionGenerationWithAuthority. v2026.10.1
SessionManager.open, openBounded, openDetachedBounded, setSessionTarget, reloadPersistedTranscript Await the corresponding Async method. v2026.9.6
SessionManager.appendMessageToTranscript Await appendMessageToTranscriptAsync. v2026.9.7
SessionManager.appendMessage, appendMessageWithTranscriptAnchor, appendCompaction, appendResetBoundary, appendCustomEntry, appendSessionInfo, appendCustomMessageEntry, appendLeafControl, appendLabelChange, branch, branchWithSummary, removeTrailingEntries, persist, prepareTranscriptRewrite, openModelContext Await the corresponding Async method, including completion of a prepared rewrite commit. v2026.10.1
ExtensionAPI.appendEntry, setSessionName, setLabel; AgentSession.setSessionName Await the Async methods; supply ExtensionActionsV2 and ExtensionRuntimeV2 through bindCoreAsync. v2026.10.1
ProviderPlugin.sanitizeReplayHistory, ProviderReplaySessionState, ProviderReplaySessionState.appendCustomEntry, ProviderSanitizeReplayHistoryContext Use sanitizeReplayHistoryAsync, the V2 replay context, and appendCustomEntryAsync. v2026.10.1
sanitizeGoogleGeminiReplayHistory Use provider-local replay hooks; the awaited helper is sanitizeGoogleGeminiReplayHistoryAsync. v2026.5.12
Mention Inbox list, dismiss, recordCommittedInput, invalidate Await the corresponding Async method. v2026.10.1
GitHub publication deferOrphanedRequests Await deferOrphanedRequestsAsync. v2026.10.1
Gateway placement listPendingWorkspaceResults, getWorkspaceResultReconcilingSessionIds Await the corresponding Async method. v2026.10.1
ensureAgentWorkspace.beforePersistentApply Prepare database inputs first; retain SQL-free guard.assertHost at the effect. v2026.10.1
DebugProxyCaptureReader, DebugProxyCaptureStore, getDebugProxyCaptureStore, acquireDebugProxyCaptureStore, closeDebugProxyCaptureStore, createDebugProxyCaptureReader, initializeDebugProxyCapture, captureHttpExchange, captureWsEvent, finalizeDebugProxyCapture, DebugProxyCaptureContext.captureWsEvent Acquire acquireDebugProxyCaptureStoreAsync, await capture operations, and release the lease. v2026.9.7

The original ExtensionActions, ExtensionRuntime, and ExtensionRunner.bindCore remain for retained capabilities: they never shipped a stable deprecation. readAcpSessionMeta was an internal wrapper, never exported by the public ACP facade, and had already disappeared on main; it is not counted as a new removal here.

Retained contracts and shared kernels

  • First stable deprecation TBD: raw SQLite callbacks/helpers; newer authentication/profile/provider/TTS/capability APIs; single-session memory metadata and session context/statistics/catalog/upstream readers; model-account and observer APIs; channel ingress/allowlist/command helpers; transcript and approval callbacks; newer native binding/factory/inspection APIs; Matrix native idle/max-age setters; pending-input and reply-visibility APIs; remaining placement/publication methods. The migration document names the individual families and replacements.
  • Plugin-state synchronous keyed stores and opaque update/deleteIf shipped deprecated in v2026.9.5, but bundled Codex, ClickClack, Discord, Telegram, Matrix, Reef migration, and cache owners still consume them. Several calls enforce current revocation or disclosure authority. Their owner cutovers are prerequisites; deleting exports alone would not retire the kernels.
  • Legacy SessionBindingAdapter.resolveByConversation and touch shipped deprecated in v2026.9.6, but retained registration/factory/inspection contracts still require them. The 11 removed generic and Discord/Telegram wrappers therefore retire zero raw binding T1 calls by themselves.
  • Shared native session and ACP kernels remain where live callers still require them. No worker-only classification is claimed from a filename or an SDK export deletion alone.

Cancellation and check removal

Fast abort calls the cancellation owner immediately instead of performing the retired synchronous ACP existence read. This preserves the owner's synchronous snapshot of accepted turns, so an async pre-read cannot capture a successor. Only fast abort opts into ignoreMissing; other cancellation callers retain the existing error contract. Accepted edge case: a session with no ACP metadata produces a no-op, while stale metadata and runtime failures are still reported. The existing command-authority assertion is passed to the cancellation effect.

The replay cohort fixture no longer attempts a write while it holds the admission that the queued write needs. Accepted case: writes wait for replay consumption under the existing owner; closure/revocation still invalidate consumption, and separate tests reject mutations before model dispatch.

No real credential, approval, tool/command, external-effect, or disclosure guard is removed. Compatibility-only checks disappear with the retired APIs. An external plugin still using a removed API must migrate to the named awaited replacement. No schema, durability, retention, or update-format change is included.

Evidence and current blockers

Main merged: 9c4b1a9b9f610512069069e35399d0b6df531a2c. The final refresh was triggered by GitHub reporting CONFLICTING; its only manual resolution keeps main's paused performance clock and this branch's lifecycle-based prompt delivery wait in the question-refresh fixture. Current candidate: 9c6a8924938bcbe1fd49ed4a9e4dbd5829ab9816. Fixture commit 3547b7fe40d2a repairs test ownership/routing, awaits real async writes, preserves stale-read and lost-update assertions at deterministic async boundaries, and corrects a retired compatibility-test reference. The tested CI comparison has a shrink-only mock baseline change: 9,713 → 9,699 entries.

CI run 38374734058 tests the earlier head 4c3972081c4c7e60c598244f3a1a6c4f035addc6. Production types, source contracts, the SDK API report, and baseline ratchets passed. The final job snapshot has 154 passes, 30 failures, 11 skipped jobs, and eight cancelled jobs. The remaining superseded-head jobs were cancelled after preserving their evidence. These results are not presented as a full pass for the fixture follow-up or final main merge. No new broad run was started while the explicit removal prerequisites below remain unresolved.

Inventory Frozen CI base Tested candidate
T1 453 452
T1-compat 9 9
Dialect mechanical 0 0
Dialect design 0 0
Dialect engine-maintenance 4 4

The ratchet job is 115221281006; its frozen comparison base is fada6e0812ce163dfc39d4ca19dacf0acc3a4c1b. This differs from the merged-main revision, so the aggregate count does not attribute every intervening change to this PR. The one retired T1 site is the prepared-workspace kernel find: after deleting findSync, its only runtime caller is node-worker-journal.worker.ts. The old approximately 199-site census estimate is not achieved: retained SDK contracts and shared live-authority consumers still keep those kernels alive. These are static call-site counts, not executed SQL statements. No warmed-path performance claim is made; no SQL harness was run under compute conservation.

The SDK API report passed in run 38374734058, head 4c3972081c4c7e60c598244f3a1a6c4f035addc6: 0 added/removed entrypoints; 16 removed exports; 1 signature change; 215 reachable-declaration changes. The signature spells out unchanged parameters of prepareWatchedSessionsHarnessContext instead of referencing the removed function. Removed exports are the watched-session builder, conversation-route resolver, two replay types from each of core and plugin-entry, and ten proxy-capture exports. Method removals appear in reachable declarations. Artifact plugin-sdk-api-diff-38374734058-1, digest 5080a410eea9a552e87e833fd175a2bb574a620b545709e7383322e36b4af7a5. This report predates the fixture-only follow-up and final main refresh.

Diff against merged main: 583 files, +7,778 / −12,083 lines (net −4,305).

Scoped lint, formatting, and git diff --check passed on the fixture repairs. After the final main refresh, the normal lint wrapper stopped before lint because plugin-SDK boundary declaration preparation exceeded its 300,000 ms deadline. This is recorded as incomplete preparation, not a passing check; no broad retry was started. The resolved fixture passed formatting and direct syntax lint (one file, 258 rules, zero diagnostics); this does not replace the incomplete declaration preparation. Codex autoreview completed in two rounds; its actionable ACP fixture type finding was fixed. No third round was run. Focused replays passed all five previously failing model-admission cases (Vitest 254.29 s; 577.03 s whole runner) and all six selected hydration cases (Vitest 245.28 s; 515.50 s whole command). Those include cold worker/transform preparation; assertions remain intact. The two selected lifecycle identity-observer cancellation cases also passed (Vitest 89.63 s; 161.78 s whole runner with warm compiled artifacts). The question-refresh rerun produced no result and was stopped when the required main refresh brought a new deadline-clock fix for that same fixture. It is not counted as passing. No broad local suite was run. No update/Doctor/migration/plugin-loading/service-lifecycle behavior changes, so no published-driver update cell is required.

Removal prerequisites

  1. Removal timing: the shipped-SDK surface test requires qualified removal records with a reached removeAfter date. Peter has not approved the timing. Job 115221288427 (test/scripts/plugin-sdk-surface-report.test.ts) confirms the watched-session, replay, and proxy-capture records still fail this gate. No date was invented/backdated and no guard was weakened. This failure is not inherited.
  2. Explicit incognito-path hydration: SessionManager.openAsync fails for an existing incognito sentinel path paired with an ordinary session key. Job 115221288265 reproduces this in session-manager-model-context.test.ts → keeps model reads non-persisting (path). The replaced synchronous opener supported this case. prepareSessionTranscriptHydration recognizes its legacy native route only by session key; the explicit sentinel is consequently sent to a worker as a nonexistent durable file. Recognizing the path in that branch would invoke readInProcess and add a main-thread SQLite path. The fix needs the canonical incognito actor binding, not a synchronous fallback. The regression test remains intact; this call is stopped under the lane's owner-redesign escape hatch.

CI failure attribution

  • Confirmed inherited Knip diagnostic: unused interruptedChatRunId in ui/src/test-helpers/interrupted-chat-history.ts, current job 115221283923; same diagnostic on the prior merged-main run 38365062007, job 115188496004. The final main refresh imports its upstream fix (the helper is no longer exported).
  • Confirmed inherited runtime failure: packages/memory-host-sdk/src/host/session-transcript-corpus.test.ts → reads worker content revisions without claiming an agent database lease, current job 115221288466; same test/error/stack (Runtime config is not prepared) on scheduled-main run 38371740449, head 4dd4b8ef9c8fd0c8dd9286f70f98b0842efca758, job 115210402430.
  • Confirmed inherited screenshot failure: chat-collapsed-reply-reveal.e2e.test.ts times out at page.screenshot after 30 s, current job 115221280966; identical test/error/stack on main run 38359584345, job 115170476315.
  • Follow-up after the two review rounds: abort.test.ts → does not abort the caller source lane for an unbound explicit ACP target, job 115221288373, still expects the old cancellation argument object. The source lane remains active; the assertion rejects the added agentId, effect-authority callback, and ignoreMissing: true. Update the expectation without restoring an awaited ACP existence read. This test failure is not inherited.
  • Repaired, awaiting CI confirmation: worker-project routing for provider auth/session fixtures; Alibaba awaited auth seeding; approval deferred lint; compatibility test reference; hydration positive control and replacement seeding; guarded review-evidence writes; model retarget fixture context; committed initial-message receipt; async context/retry mutation ordering; question-delivery fake-timer polling. The deleted final-read rewrite case attempted a reentrant write inside the reader's own retained admission; independent writers cannot enter that gap. Owner closure/replacement and later-read visibility tests remain.
  • Unclassified runtime failures: first-sign-in (90 s), reconnect/dedup (120 s before listening), Telegram join-intro (120 s), workspace-node-files (180 s), required-native same-session completion, and the Prometheus event-loop metric's missing first sample. No matching main failure is established. Source equality is not treated as inherited proof.
  • Unclassified platform/UI failures: Windows native CLI returned PONG but did not exit before 120 s; position-rail and reply-preview recovery timed out; Incognito draft update recovery timed out waiting for domcontentloaded; sidebar roster restoration expected two groups and observed one. The latest downloaded scheduled-main run passed its mocked UI E2E shards and Swift tests. These failures remain unclassified.

This draft is not green or ready to merge. Removal timing, the incognito actor-binding prerequisite, and unresolved failures remain explicit. No merge or release is authorized by this refresh.

@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 channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: slack Channel integration: slack channel: telegram Channel integration: telegram gateway Gateway runtime extensions: memory-core Extension: memory-core scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: acpx extensions: openai extensions: qa-lab extensions: codex extensions: github-copilot extensions: google extensions: copilot plugin: mxc extensions: comfy extensions: test-support extensions: agentsapi size: XL labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Oct 12, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
Remove five synchronous SDK surfaces that never shipped in stable v2026.10.2, together with their obsolete adapters and tests. Preserve shipped public aliases while replacing the newly named Legacy implementations with private SDK adapters.

Move the active GitHub connection list query into its existing worker and remove its mixed-kernel compatibility registration. Keep stable contracts in the deferred draft removal PR openclaw#169868.

Refs openclaw#121308.
@steipete steipete changed the title refactor(plugin-sdk): remove deprecated synchronous SQLite APIs (deprecated in 2026.10.x) refactor(plugin-sdk): remove synchronous APIs deprecated by stable v2026.10.2 Oct 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes channel: feishu Channel integration: feishu and removed extensions: memory-core Extension: memory-core extensions: anthropic extensions: xai labels Oct 13, 2026
…sdkmajor

# Conflicts:
#	extensions/feishu/src/thread-bindings.test.ts
#	src/acp/runtime/session-meta-doctor.test.ts
…sdkmajor

# Conflicts:
#	docs/plugins/sdk-migration/compatibility-policy.md
#	docs/plugins/sdk-migration/how-to-migrate.md
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui extensions: memory-core Extension: memory-core labels Oct 13, 2026
steipete added a commit that referenced this pull request Oct 13, 2026
… tests

Breaking commit 5041419 (#170632) requires admitted credential
writers. The provider fixtures still used synchronous saves from
unadmitted Vitest threads, so setup failed before exercising auth.

Pull the fixtures and worker routing forward verbatim from #169868
(head 9c6a892). Await the existing auth
writer and database cleanup, and route only these two files through
the existing database-worker project. Production code is unchanged.

Default-runner proof: OpenAI embedding 30/30, Alibaba video 7/7, and
Ollama 51/51. Targeted Oxlint, Oxfmt, and git diff --check passed.
Independent P0-P2 review found no actionable issues.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
… tests

Breaking commit c3b5d0c (openclaw#170632) requires admitted credential
writers. The provider fixtures still used synchronous saves from
unadmitted Vitest threads, so setup failed before exercising auth.

Pull the fixtures and worker routing forward verbatim from openclaw#169868
(head 9c6a892). Await the existing auth
writer and database cleanup, and route only these two files through
the existing database-worker project. Production code is unchanged.

Default-runner proof: OpenAI embedding 30/30, Alibaba video 7/7, and
Ollama 51/51. Targeted Oxlint, Oxfmt, and git diff --check passed.
Independent P0-P2 review found no actionable issues.
@steipete

Copy link
Copy Markdown
Contributor Author

The removal schedule is now established on main: synchronous SQLite SDK compatibility lasts through December 31, with removal in the first January 2027 stable release (#171775, #175199). Closing this earlier removal draft; the scheduled removal should use the current migration inventory and policy.

Closed in a sweep of maintainer PRs open longer than a week. Reopen with a current reproduction if this still matters.

@steipete steipete closed this Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: slack Channel integration: slack channel: telegram Channel integration: telegram cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: acpx extensions: agentsapi extensions: alibaba extensions: codex extensions: comfy extensions: copilot extensions: github-copilot extensions: google extensions: memory-core Extension: memory-core extensions: openai extensions: qa-lab extensions: test-support gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: file-transfer plugin: mxc rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant