Skip to content

refactor(plugins): deslop feature plugin helpers - #162992

Merged
steipete merged 2 commits into
mainfrom
deslop/l284-dup-feature-plugins3-shared-helpers
Oct 2, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/l284-dup-feature-plugins3-shared-helpers

Conversation

@steipete

@steipete steipete commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Feature plugins still repeat small validation, parsing, promise, and projection flows after the earlier sibling-duplication sweep. This maintainer-directed continuation removes 293 net production lines by using existing owners and simplifying redundant steps.

User Impact

Plugin tool names, descriptions and schemas, manifests, config keys, persisted formats, URL admission, and rendered UI remain unchanged. Copilot now releases its caller's abort listener when authentication preflight or BYOK proxy startup fails.

Why This Change Was Made

  • Memory Core/Wiki reuse numeric and timestamp owners, remove duplicate normalization, and inline private forwarding helpers while preserving coercion, negative zero, ordering, citations, and diary fingerprints.
  • Browser, Diffs, meeting/tool plugins, and plugin icon lookup use native URL parsing while keeping each caller's protocol, host, credential, path and error policy. Icon lookup shares the existing validator and retains the different caller trimming rules.
  • Copilot shares its abort-error constructor and deferred owner; Voice Call uses the existing FIFO map pruner. Workboard/QA reuse numeric helpers and remove redundant projection and mutation wrappers without moving authority or persistence boundaries.

Cold Google Meet audio construction and larger lifecycle lookalikes remain separate because their import, authority, timeout, and cleanup contracts differ. No new framework, SDK subpath, dependency, config option, schema, or protocol is introduced. The assertion-debt baseline only shrinks.

Fixes found along the way

Copilot installed an abort listener before setup, but auth/proxy failures could exit before reaching its cleanup. Registration now begins inside the existing cleanup scope and preserves cancellation raised during setup. Two real-entrypoint regression rows fail on the base with an extra abortActiveSession listener and pass after the repair; a gated sandbox-preparation control proves cancellation is retained.

Evidence

  • Linux AWS Crabbox: full suites for every touched non-Browser plugin passed: 6,975 tests across 564 files / 14 Vitest shards on the patch-equivalent pre-rebase source. Focused Browser proof passed 167 tests; plugin contracts and affected board registration/HTTP boundary tests passed.
  • Both import-cycle checks report zero. SDK surface/export checks, plugin import boundaries, exported subpaths, and dependency analysis pass.
  • Differential proof preserves 756 numeric/coercion cells, 336 narrative boundaries, 72 complete REM render results, six real diary dedupe/backfill/readback fixtures, 40 actual Diffs screenshot route callbacks, and 80 viewer URL/error cases.
  • The three changed test owners together passed pnpm test ... --maxWorkers=1 in 36 seconds wall; Copilot's complete 85-case file took 10.94 seconds of Vitest wall time. The regression reuses existing fixtures and adds no timers, sleeps, process boots, or production seams.
  • Independent review completed. Its diary-whitespace concern was checked against the preceding per-line trim/filter invariant and the passing real persisted-diary differential; no actionable finding remains.

Known baseline failure: the full Browser suite on clean base 4f0541eb469 had 14 failures in chrome-mcp.ownership.test.ts and server-context.list-profiles.test.ts, from missing mock-facade exports (resetChromeMcpSessionsForTest / ensureChromeMcpAvailable); 3,485 tests passed. The focused changed paths pass. This is recorded as unresolved broad-suite evidence, not a claimed repair or a hosted-CI waiver. Related ownership context is recorded in #162646.

The final candidate passes check-changed, both cycle checks, the full FaceTime suite, the Copilot attempt suite, and all 1,132 plugin contracts. The SDK API comparison reports no API changes. Two type-only corrections fixed the initial test inference and unbound-method lint failures.

Current-head CI run 36928889380 has one failing non-aggregate job: checks-ui-e2e-real-gateway (1/2) / model-catalog-partial-refresh.real-gateway.e2e.test.ts:241, expecting aria-disabled=false but observing true. The identical test/line/assertion fails on unrelated current PR #162844 at head 128189c2ecaaf2126d51cdc8f47a615a8831520f, run 36924844797 / job 110580129447. That PR changes only MCP HTTP transport; the failing test and effort-control renderers are byte-identical. These helper changes do not supply that control state.

The synthetic catalog-icon URI fixture is now qualified by openclaw/clawsweeper#1739 (merged). The exact source-line and native detector identities are bound; altered credentials, source lines and paths remain refused, and native scanning and verification remain enabled.

Stored-data and upgrade compatibility proof

This is a behavior-preserving cutover; existing persisted data is accepted without migration. There is no schema, schema-version, vector/embedding record, field-name, state-path, transaction, retention, recovery, or serialization change. The broad path-based data-model warning is acknowledged; the following completed compatibility proof covers the changed memory normalization owners.

On Linux, exact baseline copies of the changed owners and the candidate ran the same real storage operations in isolated workspaces. For six existing DREAMS.md fixtures (including duplicate entries, whitespace, Unicode, headings and comments), both versions ran dedupeDreamDiaryEntries, writeBackfillDiaryEntries(preserveExisting: true), and readRecentDreamDiaryEntries. Results, deduped bytes, final persisted bytes, and readback context were deeply equal. The fixtures exercise pre-existing data flowing through candidate reads and writes; fingerprints and duplicate decisions are unchanged. No migration or rebuilt state is required.

The same successful run compared 51 actually persisted timestamp rows through staged-key selection; 756 numeric/coercion/fallback cases; 336 narrative-boundary cases; and 72 complete REM results/renderings. Promotion coercion and CLI output are preserved. Full Memory Core, Memory Wiki and Workboard suites also passed, including their existing persistence and lifecycle coverage. The successful final differential receipt is AWS run run_3456208bcd2a645459b21fd65aac7b36; earlier fixture-only failures are excluded from this claim. This is compatibility evidence, not a claim of testing a released updater binary, because no install, migration or updater behavior changes.

Reuse existing numeric, timestamp, collection and URL owners while preserving plugin descriptors, admission policy and persisted formats. Remove redundant forwarding and normalization steps across feature plugins.

Fix Copilot attempts retaining caller abort listeners when authentication preflight or BYOK proxy setup fails; keep registration inside the existing cleanup scope and preserve setup cancellation.
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The exact synthetic fixture qualification has merged in openclaw/clawsweeper#1739. The current body records final passing remote proof and the independently attributed UI CI failure. Please rescan the current input and review this unchanged head.

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 7:43 PM ET / 23:43 UTC (Revision 2).

ClawSweeper review

What this changes

The branch simplifies bundled plugin helpers using existing utilities and prevents Copilot setup failures from retaining caller abort listeners.

Merge readiness

✅ Ready for maintainer review

The prior compatibility blocker is resolved by the new existing-state evidence and source inspection. No actionable introduced defect remains, and current main still needs the Copilot cleanup repair.

Priority: P3
Reviewed head: ed4abfe9935b0a0406f45b2fffac1fe1b434bd8e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A sound simplification with meaningful boundary coverage and resolved existing-state compatibility evidence.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured Linux baseline/candidate observations exercise the changed diary owner through real deduplication, backfill writes, and readback on existing fixtures, with equal results and persisted bytes. Persisted timestamp selection and numeric/REM differentials support unchanged existing-state behavior; source inspection confirms no migration is required. Copilot mock regressions are supplemental, and this maintainer-directed PR has no ordinary external-contributor proof blocker.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured Linux baseline/candidate observations exercise the changed diary owner through real deduplication, backfill writes, and readback on existing fixtures, with equal results and persisted bytes. Persisted timestamp selection and numeric/REM differentials support unchanged existing-state behavior; source inspection confirms no migration is required. Copilot mock regressions are supplemental, and this maintainer-directed PR has no ordinary external-contributor proof blocker.
Evidence reviewed 9 items Pinned introduction reviewed: Reviewed the complete introduced diff from the verified merge base to the exact head, separately from base-branch drift. The stale test merge was not used to infer removals or regressions.
Diary fingerprints remain equivalent: Every retained body line is already trimmed and empty lines are filtered before joining. Removing the subsequent trailing-whitespace replacement and trim therefore preserves the fingerprint used by deduplication and backfill.
Completed existing-state compatibility evidence: The captured body, sourceRevision 78949591df86cda401129b113572d66c6b82244f1c8b6dcc15f28ded2ee5f9fb, records successful Linux baseline/candidate production diary operations on six existing fixtures: deduplication, preserve-existing backfill, persisted-byte comparison, and readback. It also records equivalent staged-key selection for 51 persisted timestamp rows, 756 coercion cases, and 72 complete REM results under AWS receipt run_3456208bcd2a645459b21fd65aac7b36. These are contributor-recorded results; this read-only review did not rerun them.
Findings None None.
Security None None.

How this fits together

Bundled plugins translate tool requests, configuration, stored memory, and service events into plugin operations. Their shared helpers handle input normalization, URL admission, asynchronous coordination, and cleanup.

flowchart TD
  A[Tool requests and configuration] --> C[Bundled plugin helpers]
  B[Existing memory and service events] --> C
  C --> D[Shared normalization and URL checks]
  D --> E[Plugin operations]
  E --> F[Results and stored updates]
  E --> G[Cancellation and cleanup]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -293, Tests +86, Other -3. Total -210 across 71 files.

View PR surface stats
Area Files Added Removed Net
Source 67 335 628 -293
Tests 3 86 0 +86
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 5 -3
Total 71 423 633 -210

Review metrics

Metric Value Why it matters
Production versus regression coverage production −293 lines; tests and test support +86 lines The branch reduces production duplication while adding focused lifecycle and URL-admission coverage.

Stored data model

Persistent data-model change detected: unknown-data-model-change: extensions/memory-core/src/cli-status.runtime.ts, unknown-data-model-change: extensions/memory-core/src/rem-evidence.ts, unknown-data-model-change: extensions/memory-core/src/rem-harness.ts, unknown-data-model-change: extensions/memory-core/src/short-term-promotion-utils.ts, vector/embedding metadata: extensions/memory-core/src/cli-rem.runtime.ts, vector/embedding metadata: extensions/memory-core/src/cli-status.runtime.ts, and 4 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Keep one existing owner for each helper contract while preserving stored bytes, URL admission, and cancellation cleanup.

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

Yes, by source: current main installs the Copilot abort listener before authentication and proxy setup paths that can exit without cleanup. This review did not execute the failure.

Is this the best way to solve the issue?

Yes. Reusing existing helpers and placing listener registration inside its cleanup scope addresses the concrete defects without adding parallel policy or changing persistence contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured Linux baseline/candidate observations exercise the changed diary owner through real deduplication, backfill writes, and readback on existing fixtures, with equal results and persisted bytes. Persisted timestamp selection and numeric/REM differentials support unchanged existing-state behavior; source inspection confirms no migration is required. Copilot mock regressions are supplemental, and this maintainer-directed PR has no ordinary external-contributor proof blocker.

Label justifications:

  • P3: This is primarily behavior-preserving cleanup with a bounded setup-failure listener repair.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured Linux baseline/candidate observations exercise the changed diary owner through real deduplication, backfill writes, and readback on existing fixtures, with equal results and persisted bytes. Persisted timestamp selection and numeric/REM differentials support unchanged existing-state behavior; source inspection confirms no migration is required. Copilot mock regressions are supplemental, and this maintainer-directed PR has no ordinary external-contributor proof blocker.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured Linux baseline/candidate observations exercise the changed diary owner through real deduplication, backfill writes, and readback on existing fixtures, with equal results and persisted bytes. Persisted timestamp selection and numeric/REM differentials support unchanged existing-state behavior; source inspection confirms no migration is required. Copilot mock regressions are supplemental, and this maintainer-directed PR has no ordinary external-contributor proof blocker.

Evidence

What I checked:

  • Pinned introduction reviewed: Reviewed the complete introduced diff from the verified merge base to the exact head, separately from base-branch drift. The stale test merge was not used to infer removals or regressions. (ed4abfe9935b)
  • Diary fingerprints remain equivalent: Every retained body line is already trimmed and empty lines are filtered before joining. Removing the subsequent trailing-whitespace replacement and trim therefore preserves the fingerprint used by deduplication and backfill. (extensions/memory-core/src/dreaming-dreams-file.ts:274, ed4abfe9935b)
  • Completed existing-state compatibility evidence: The captured body, sourceRevision 78949591df86cda401129b113572d66c6b82244f1c8b6dcc15f28ded2ee5f9fb, records successful Linux baseline/candidate production diary operations on six existing fixtures: deduplication, preserve-existing backfill, persisted-byte comparison, and readback. It also records equivalent staged-key selection for 51 persisted timestamp rows, 756 coercion cases, and 72 complete REM results under AWS receipt run_3456208bcd2a645459b21fd65aac7b36. These are contributor-recorded results; this read-only review did not rerun them.
  • No stored-contract migration introduced: The memory and Workboard hunks reuse existing numeric and timestamp helpers, preserve Number coercion where previously present, retain existing serialized fields and versions, and leave storage admission, transactions, retention, and recovery unchanged. Shared helper implementations were inspected directly. (packages/normalization-core/src/number-coercion.ts:231, ed4abfe9935b)
  • Copilot cleanup repair remains necessary: At fetched main, abort-listener registration precedes authentication resolution and proxy startup, whose failures can leave before the cleanup scope. The candidate registers inside that scope and explicitly observes cancellation already raised during preparation. (extensions/copilot/src/attempt-execution.ts:237, aa9fcc5cea6d)
  • Focused lifecycle regressions: The added tests enter through runCopilotAttempt, check listener cleanup after authentication and proxy failures, and preserve preparation-time cancellation without sending a provider turn. They reuse the existing fixture and deferred coordination; the body reports baseline failure and candidate success. Their fake SDK and proxy remain supplemental proof. (extensions/copilot/src/attempt-cleanup.test-support.ts:26, ed4abfe9935b)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Tobias Wirtz: 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 (1 earlier review cycle)
  • reviewed 2026-10-01T23:31:17.059Z sha ed4abfe :: blocked before merge. :: none

@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The body now explicitly records completed stored-data/upgrade compatibility proof: identical real diary reads/writes and persisted bytes across baseline/candidate, 51 persisted timestamp rows, numeric/REM differentials, and full sibling suites. There is no data-model or migration change. Please evaluate this evidence for the automated compatibility requirement; the source head is unchanged and the code review found no actionable defects.

@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 1, 2026
@steipete
steipete merged commit d0f2175 into main Oct 2, 2026
184 of 187 checks passed
@steipete
steipete deleted the deslop/l284-dup-feature-plugins3-shared-helpers branch October 2, 2026 00:48
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
Reuse existing normalization, URL, catalog and lifecycle helpers across feature plugins. Fix retained Copilot abort listeners when pre-session auth or proxy setup fails. Preserve tool descriptors, plugin manifests, persisted state and URL admission policy.

Remote changed checks, non-Browser sibling suites, focused Browser tests, plugin contracts, SDK checks and both zero-cycle gates pass. The independently attributed partial-refresh UI failure is documented in the PR evidence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call extensions: browser extensions: copilot extensions: device-pair extensions: diffs extensions: github GitHub plugin: link previews and reader extensions: memory-core Extension: memory-core extensions: memory-wiki extensions: qa-lab extensions: tokenjuice Changes to the bundled tokenjuice extension P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: beam Beam session sharing plugin plugin: facetime FaceTime plugin plugin: migrate-hermes plugin: slack-huddles plugin: team-reports plugin: teams-meetings Teams Meetings plugin plugin: typesafe plugin: workboard plugin: zoom Zoom plugin proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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