Skip to content

refactor: consolidate single-consumer plugin surfaces - #180713

Merged
steipete merged 9 commits into
mainfrom
deslop/z25-99-plugin-surface-20261015
Oct 22, 2026
Merged

steipete merged 9 commits into
mainfrom
deslop/z25-99-plugin-surface-20261015

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Several internal plugin factories and helper modules exist only to serve one production consumer, unnecessarily widening their internal APIs.

User Impact

No user-visible change or migration. Existing plugin capabilities, request validation, authorization, model selection, credential precedence, network limits, retries, resource cleanup, and lazy loading remain. Public Plugin SDK/configuration/protocol/data contracts and Phase E session memory are untouched.

Why This Change Was Made

Register the ElevenLabs transcription and Together/Runway video implementations directly; build LINE receipts in their actual send owner; colocate private diagnostics and GitHub image helpers. Localize single-use preparation in Canvas, Matrix, DDG, diffs, LLM-task, and Copilot without adding a new shared owner or dependency seam. Tests formerly calling retired factories now exercise the existing registration/send entry points, with their assertions retained.

This is the disjoint plugin area of the 88-path family split under campaign rule 11; the core area is #180711. It removes 151 net production lines (+972/-1123) across 22 production paths (32 paths overall), excluding tests, fixtures, test support, generated files, and declarations. Moved algorithm bodies are not credited as deleted behavior. The Runway documentation link follows the removed private file to its real registration owner.

Best-effort tradeoffs accepted

No protective guard is removed. Private async-return hops disappear where the caller absorbs their body; exact microtask interleavings of those internal frames are not preserved as a contract. Real I/O waits, authorization, cancellation, credential-lineage callbacks, and cleanup remain unchanged. Copilot still snapshots all four environment candidates eagerly, preserves token whitespace/precedence, and retains the existing home-path/profile/session-compatibility rules.

Evidence

Each packet passed focused existing public-consumer suites, targeted native types, typed lint, formatting, line caps, and independent P0–P2 review. Retained examples include 40 Copilot resolver/selected harness cases, 60 Canvas/Matrix cases, 25 search/diffs cases, and the provider registration/request-policy, LINE delivery, diagnostics, GitHub-handler, and LLM-task suites. Existing tests are retained or migrated, without added timeouts, retries, or skips. Selected harness cases are not live vendor/SDK proof; the opt-in ElevenLabs live test was migrated/typechecked, not executed.

All nine commits applied patch-identically without conflicts onto fresh main 88d9566ecabf65356c12b66dce2123ff44b0f9c1; touched plugin trees and root manifests are unchanged from the original tested base. Runtime/static cycles, wrapper/eager-import closure, assertion safety, mock-export ratchet, and line caps pass. Full-area independent P0–P2 review is clean.

Local baseline limitation: suppression inventory reports the same three untouched extras in cron mutation, transcript test support, and the sessions view (103 against 100). The affected files and checker/parser/enumerator are byte-identical to this branch's main base; no baseline was widened. Exact-head hosted CI is the broad gate. No local build, broad typing, E2E, live network/model/channel, or device proof is claimed.

Exact-head CI and landing

Merged as 8f7205dd807634a12c2f2011e698793298962d76; ancestry verified in freshly fetched main. CI run 39800841250 remains failed, not green: the offline attachment outbox browser mock timed out capturing chat.send; the aggregate failed downstream. The full browser/preview/outbox/capture execution path and determining build inputs are unchanged by this plugin-only diff. This is campaign-authorized source-disjoint attribution, not a matching known-flake or baseline reproduction claim. All other selected suites passed; the baseline-ratchet raw log proves all nine checks completed successfully despite stale in_progress API metadata. Security and dependency clearance succeeded.

The native workflow refused twice before dispatch, including fresh current-workflow recovery, because an auxiliary auto-response suite still reported in_progress despite its sole check being completed/cancelled. Campaign rule10's exact-head SHA-guarded REST squash fallback was used after publishing the complete failure and infrastructure evidence. No test suite was cancelled, rerun, skipped, weakened, or made slower; the unresolved UI defect is not claimed repaired.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 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.

@steipete
steipete marked this pull request as ready for review October 22, 2026 15:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T15:03:58.014287Z 77bf4be Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 15:14
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 22, 2026
@clawsweeper clawsweeper Bot added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves private plugin implementations and single-use helpers into their existing registration or operation owners.

Example: Transcribe voice.mp3 with ElevenLabs model scribe_v2.

  • Before: Plugin registration references a separate private media-understanding provider.
  • After: Plugin registration owns the implementation directly, with the same request and transcription result.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Coherent consolidation with no identified defect; confidence is supported by source equivalence and focused test evidence rather than shipped-entry-point execution.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored internal refactor is outside the ordinary contributor live-proof gate; the body reports focused tests and explicitly disclaims live provider, channel, and E2E proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces private API surface while retaining capabilities, defaults, and public contracts.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for normal landing: the maintainer-directed consolidation preserves the inspected behavior, and no actionable introduced defect was found.

Priority: P3
Reviewed head: 77bf4be1da1204ba5cb3ccca353ca88677a8ecfb

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point run is supplied; the available validation consists of reported focused suites and retained registration/transport-mocked coverage.
Agent review details

How this fits together

Bundled plugins register capabilities and handle provider, channel, filesystem, and telemetry operations through existing Plugin SDK contracts.

flowchart TD
  A[CLI and Gateway requests] --> B[Plugin operation owners]
  C[Plugin registration] --> B
  B --> D[Existing Plugin SDK operations]
  D --> E[Providers and local resources]
  E --> F[Results and receipts]
Loading

Technical review

Best possible solution:

Land the consolidation through the existing exact-head CI and repository landing gates.

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

This is a behavior-preserving refactor without a reported failing user scenario; review was source-only and no target code was executed.

Is this the best way to solve the issue?

The change uses existing owners, removes the replaced private paths, and preserves the inspected contracts without new machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 89946acb08fd.

Provenance checked

  • Runway and Together provider registration keeps the original intent (f92ac83: Original video-provider implementations separated registration from factories; subsequent hardening established bounded responses, request policy, model validation, and operation deadlines.)
  • ElevenLabs transcription keeps the original intent (51ed22e: The provider supplies audio transcription alongside speech and realtime transcription; the moved implementation retains shared HTTP handling and response validation.)
  • Canvas CLI and file resolution keeps the original intent (6cfb62d: Asset hardening rejects traversal before fs-safe opening; later CLI work preserves paired-node deadlines and transport grace.)
  • Copilot authentication keeps the original intent (f3cfd75: The adapter owns Copilot overrides, environment fallback, per-agent CLI state, and credential identity for pooled clients.)
  • LINE receipts keeps the original intent (fix(line): preserve provider delivery receipts and completed sends #116879: Receipts must preserve actual provider-assigned IDs, ordered delivery parts, and conversation metadata.)
  • GitHub attachment reader keeps the original intent (fix(ui): display GitHub attachments and hide comment metadata #153004: Display GitHub attachments through an anonymous, bounded, guarded raster-image transport.)
  • Diagnostics constants keeps the original intent (351c069: Telemetry foundations were extracted into private modules; this PR localizes single-consumer constants while retaining shared constants and their values.)
  • Matrix credential writes keeps the original intent (refactor(matrix): run credential and crypto snapshot storage in workers #149548: Credential updates use the existing asynchronous keyed store and observed-row comparison contract without replaying unknown write failures.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the introduced hunks and original provider implementations; the deleted factories and helpers are absorbed by existing owners, with their consumer tests migrated. (77bf4be1da12)
  • Current-main context: The inspected plugin trees have no differences between the pinned base and fetched main, so the existing private surfaces remain present on main. (89946acb08fd)
  • LINE delivery contract retained: The inline receipt retains ordered provider IDs, conversation/thread identity, kind, and message count required by fix(line): preserve provider delivery receipts and completed sends #116879; provider authorization and retry handling are unchanged. (extensions/line/src/send.ts:337, 77bf4be1da12)
  • Verified no-migration case: Matrix still uses the same credential namespace, account key, stored fields, comparison owner, and revocation/backfill checks; only a private forwarding frame disappears. (extensions/matrix/src/matrix/credentials.ts:46, 77bf4be1da12)
  • Security-sensitive behavior preserved: GitHub image loading retains anonymous HTTPS requests, exact hosts, redirect validation, raster detection, byte limits, and finally cleanup; Canvas retains traversal rejection and fs-safe opening. (extensions/github/src/handlers.ts:42, 77bf4be1da12)
  • Direction and accepted tradeoff: The maintainer-authored body approves internal consolidation and explicitly accepts removal of private async-return microtask hops while preserving real I/O, cancellation, authorization, and cleanup. (77bf4be1da12)

Likely related people:

  • Vincent Koc: Raw commit 6cfb62d adds extensions/canvas/src/host/file-resolver.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 6cfb62d5aae2; files: extensions/canvas/src/host/file-resolver.ts)
  • Ramrajprabu: Raw commit f3cfd75 adds extensions/copilot/src/auth-bridge.ts:60 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f3cfd752d330; files: extensions/copilot/src/auth-bridge.ts)

PR surface

Source -151, Tests +62, Docs 0. Total -89 across 32 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 22 967 1118 -151
Tests 9 93 31 +62
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 32 1061 1150 -89

Review metrics

Metric Value Why it matters
Production versus test LOC Production +967/-1118; tests and test support +93/-31 Excluding the documentation link change, production shrinks by 151 lines; test growth migrates existing assertions to registration and send boundaries.

Labels

Label changes:

  • add P3: Internal API cleanup with no intended user-visible behavior change or observed urgent regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Internal API cleanup with no intended user-visible behavior change or observed urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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.

Reviewed October 22, 2026, 11:19 AM ET / 15:19 UTC.

@steipete
steipete disabled auto-merge October 22, 2026 15:26
@steipete

steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head CI on 77bf4be1da1204ba5cb3ccca353ca88677a8ecfb completed with one failed leaf in run 39800841250. This is not a green-CI claim.

Failed job Evidence and attribution
checks-ui-e2e (5/9) (119901575140) The offline attachment outbox case timed out waiting for the browser mock to capture chat.send after reconnect. 414 cases passed; one failed. The complete browser/Vite-preview/IndexedDB/outbox/mock-WebSocket execution path and its build inputs are unchanged by this plugin-only diff. The changed Canvas A2UI filesystem resolver is not used by this preview route; the changed native provider implementations are not evaluated. Plugin metadata scanning reads unchanged manifests, not those runtime modules. Under the campaign's scoped source-disjointness rule, this is inherited by construction. No matching known-flake signature or baseline reproduction is claimed; the underlying UI defect remains unproven.
openclaw/ci-gate (119913180982) Downstream of the UI-E2E leaf above; every other selected summary reports success.

The last six completed scheduled main runs and the main-flake catalog were checked. Two main UI5 failures have different signatures; neither is being presented as matching evidence. The actual tested merge has exactly the recorded main/head parents and the reconstructed merge tree matches.

The direct Actions job-log endpoint now supplies baseline-ratchet proof: all nine checks passed, followed by [ok] baseline-ratchets and normal cleanup. The gh run client had refused to fetch it because job/check-run APIs still report in_progress; that metadata discrepancy remains, but the actual commands are proved complete.

Native landing refused before dispatch twice, including supported freshly qualified --current-workflow recovery, because a separate auto-response suite reports in_progress despite its sole check being completed/cancelled. Both attempts released their operation lock; the confirmed-cancelled original outcome is unchanged and no replacement intent was dispatched. All 16 cancelled checks are metadata workflows, not test suites; successful auto-response replacements and security-fast are present.

Campaign rule 10 authorizes the exact-head REST fallback after those two infrastructure-metadata refusals. Immediately before that request, the full paginated check census still shows only the attributed UI leaf and its aggregate failed; the baseline commands are proved complete by their raw log. Dependency and security-sensitive clearance are successful; the PR is mergeable at the same reviewed head, and merging current main with it is conflict-free. The request is squash-only and guarded with the exact sha. This does not relabel failed CI green or waive an unfinished test. No CI rerun, synthetic push, timeout increase, retry, skip, or test weakening was used.

@steipete
steipete merged commit 8f7205d into main Oct 22, 2026
212 of 231 checks passed
@steipete
steipete deleted the deslop/z25-99-plugin-surface-20261015 branch October 22, 2026 15:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
* refactor(elevenlabs): keep transcription in plugin registration

* refactor(providers): register private video implementations directly

* refactor(line): build send receipts at their sole production call

* refactor(diagnostics): localize single-consumer telemetry constants

* refactor(github): keep image reader private to lazy handlers

* refactor(plugins): localize search and diff normalization frames

* refactor(plugins): localize file and task response preparation

* refactor(plugins): localize canvas and credential call frames

* refactor(copilot): resolve private auth frames at their owner
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 23, 2026
…keyed recorders

Upstream openclaw#180713 and openclaw#180488 (absorbed at jump 3) keyed the diagnostics-otel
recorders by event type and dropped createDiagnosticsEventHandler's
recordLogEvent parameter; service.ts prepares bridge spans with
recorders["model.call.started"] and recorders["tool.execution.started"]. The
fork-only continuation tracer integration harness still passed recordLogEvent and
called recordModelCallStarted / recordToolExecutionStarted. That left
tsgo:extensions:test with 3 errors, and the typed-tool-origin case failing at
runtime ("recorders.recordToolExecutionStarted is not a function"), since jump 3:
the same at 50c3d84, the carry 74065f6 and 2cdbbb0; 0 errors at 7ab6.

The harness now wires the bridge the way service.ts does. No assertion changes:
3/3 green, and tsgo:extensions:test has 0 errors.

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

channel: line Channel integration: line channel: matrix Channel integration: matrix ci:full Keep ordinary native-locale CI selection on the next PR run. docs Improvements or additions to documentation extensions: canvas extensions: copilot extensions: diagnostics-otel Extension: diagnostics-otel extensions: diffs extensions: duckduckgo extensions: elevenlabs extensions: github GitHub plugin: link previews and reader extensions: llm-task Extension: llm-task extensions: runway extensions: together P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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