Skip to content

refactor(plugins): keep private work with existing owners - #179727

Closed
steipete wants to merge 10 commits into
mainfrom
deslop/z41-45-plugin-residue-20261015
Closed

steipete wants to merge 10 commits into
mainfrom
deslop/z41-45-plugin-residue-20261015

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugin-private paths repeat work their existing owners already perform: receive budgets, fixed download policies, validated media bounds, digest primitives, cleanup, and internal argument construction.

User Impact

No intended user-visible change. Public SDK/configuration/CLI/protocol/persisted shapes, authorization, external-input validation, ordinary concurrency, and write-capable shutdown settlement remain intact. Phase E standalone session memory and its factory, registry, expiry, federation, and tests are untouched.

Why This Change Was Made

Use existing SDK digest/collection/number helpers; let Discord's audio worker own its existing end-to-end packet budget; keep Browser's unchanged download policy in its capture owner; remove duplicate private bookkeeping, argument copies, empty registration, and checks already implied by retained boundaries. Slack's process-owned membership cache no longer validates its own clocks as external dates.

Production delta against the merge base: 159 net lines removed (+111/-270), 44 production paths across 16 plugins. This is the lane's combined residue, not a LARGE PR. Three test files adapt private download-policy inputs or remove only two synthetic invalid-clock cases; kept behavior assertions remain.

Best-effort tradeoffs accepted

  • Slack cache clock validation (introduced by 8e90a1cad96a89c2fd4934f3397ceb96d8877e10): the sole production caller uses Date.now(), not injected NaN or year-275760 dates. Those synthetic inputs may now cause unnecessary lookups or a best-effort stale projection. Five-minute expiry, client/team/subteam scope, expired-entry removal, and failed-lookup rejection remain.
  • Teams close memoization (refactor(msteams): receive webhooks on Gateway routes #158939; duplicate caller already removed in refactor: consolidate plugin cache and lifecycle owners #178018): the private handler is closed once from the monitor's finally. Unsupported repeated direct calls no longer share one Promise; real request drainage and its 30-second deadline remain.
  • Wiki worker progress assertion (improve(memory-wiki): keep the gateway responsive during large wiki searches #166433): the worker checks yield only after reading a nonempty segment, so successful nonempty replies necessarily advance. A future incorrectly implemented private worker is no longer rechecked for progress; result discrimination, refusals, cancellation, and compute limits remain.
  • Matrix pending-task identity check (fix(matrix): enforce exclusive crypto store ownership #160707): only the owning initializer can replace/clear this private slot; other calls await it. Its finally now clears directly. Initialization serialization, crypto custody, recovery, and key durability remain.
  • Matrix fresh Response.url compatibility catch (transport introduction f62be0ddcf7c27): supported native Response instances permit this own property; no caller can freeze the fresh instance between synchronous statements. An unsupported replacement implementation now fails visibly instead of silently dropping URL metadata.
  • Browser private positive-integer recheck (feat(browser): agent requests/text/emulate + snapshot query, and inline browser-tab thumbnail cards #131592): the sole production route already admits a positive safe integer, and the cap remains. Unsupported direct private callers must supply admitted input; the external rejection boundary is unchanged.
  • QA output-directory recreation (refactor(qa-lab): deslop qa-lab #164643): the run already ensures the directory at entry. An external actor deleting it mid-run now gets an ordinary artifact-write failure instead of recreation. Path containment and symlink checks remain at the owner.
  • QA MCP stream-shape probe (81c1892c9adcf): the maintained SDK returns a Stream or null. A future unsupported non-stream value fails visibly; nullable handling and bounded stderr diagnostics remain.
  • Discord's duplicate main receive cap (fix(discord): keep recording independent of voice conversations #139658) is superseded by the worker cap and acknowledgment credits from fix(voice): keep audio flowing while the Gateway is busy #154119; main's pending queue is a subset. The same packet/byte limits remain, with the real worker/libopus backlog tests unchanged.
  • The other removed predicates are implied by retained validation or synchronous owners: Discord HTTP(S) URL parsing, string base64 decoding plus digit validation, retry eligibility, and canonical Mantis abort checks. No additional failure policy is removed.

The media post-decode checks duplicate the retained preallocation size estimate and canonical base64 validation, whose accepted decoded lengths are identical. Malformed/oversized input, SSRF, credential/approval authority, FIFO, recording receipts, and physical finalization remain protected. No schema, dependency, or configuration change.

Evidence

Every incremental packet received independent P0–P2 review and focused owner/consumer proof, targeted types, lint/format, line/assertion ratchets, scoped zero-runtime/no-new-static cycles, and the suppression audit. Passing evidence was retained for unchanged source rather than repeated for green.

Latest increments: Discord's 11-file batch had 132 passing cases and one own-field-presence failure from a proposed receipt simplification. That entire hunk was restored; the unchanged 51-case send suite passed. Final Discord types/statics/cycles and all 14 suppression tests passed. QA's six-file/48-case batch passed; targeted types then rejected two proposed shorter forms, which were completely restored rather than cast. Final retained QA/Slack types/statics, three Slack cases, 708-module scoped cycles, and all 14 suppression cases passed. Fresh independent final reviews found no actionable P0–P2 issue.

Earlier unchanged packets retain focused Browser/Codex, Matrix startup/transport/IndexedDB, Feishu lifecycle/reaction, Signal/Google Chat, speech/media, wiki, and Teams/Doctor proof. Browser's download tests now use the actual fixed production policy while retaining late-download, ownership, and security assertions. No timeout, retry, skip, suppression, or kept baseline was relaxed.

Local proof used isolated state, serial focused wrappers with one worker, and targeted types only. No broad build, live vendor/channel/Gateway, device/visual, or measured performance claim. Exact-head PR CI is the broad gate.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review October 21, 2026 17:05
@chatgpt-codex-connector

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 🔄 Running since 2026-10-21T17:06:03.273122Z fb1e723 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.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: slack Channel integration: slack channel: whatsapp-web Channel integration: whatsapp-web channel: feishu Channel integration: feishu extensions: qa-lab extensions: memory-wiki extensions: codex extensions: elevenlabs extensions: openrouter extensions: xai extensions: deepgram extensions: browser size: M labels Oct 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

PR CI Sweeper closed this PR to re-fire a dropped CI run but could not reopen it. Please reopen manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: googlechat Channel integration: googlechat channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: slack Channel integration: slack channel: whatsapp-web Channel integration: whatsapp-web extensions: browser extensions: codex extensions: deepgram extensions: elevenlabs extensions: memory-wiki extensions: openrouter extensions: qa-lab extensions: xai size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant