Skip to content

refactor(plugins): trust existing private owners and validated facts - #179748

Merged
steipete merged 11 commits into
mainfrom
deslop/z41-45-plugin-residue-20261015
Oct 21, 2026
Merged

steipete merged 11 commits into
mainfrom
deslop/z41-45-plugin-residue-20261015

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Replaces #179727, which the PR CI Sweeper closed to recover a dropped CI run but could not reopen. The branch's authorized conflict-only rebase was pushed while that PR was closed; the normal manual reopen was also refused. This replacement uses the reviewed rebased head and requires its own exact-head CI; no prior green result is substituted.

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: 158 net lines removed (+111/-269), 43 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.

Initial exact-head CI39643522215 exposed our CLI argument-presence regression in mantis/slack-desktop-smoke.runtime.test.ts:769 (job119373771740; downstream checks-node-changed). The proposed removal of explicit gatewaySetup: undefined was fully withdrawn; the test is unchanged. All 11 owner cases now pass locally, along with targeted types, lint/format, ratchets, 472-module zero-runtime/no-new-static cycles, and all 14 suppression tests. Fresh independent P0–P2 review found no actionable issue in that repair. This failure is ours, not inherited; the repaired head requires its own CI.

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.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

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

chatgpt-codex-connector Bot commented Oct 21, 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-21T17:31:23.732416Z 5b88397 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
@steipete
steipete enabled auto-merge (squash) October 21, 2026 17:52
@steipete
steipete merged commit 73ad32e into main Oct 21, 2026
135 of 137 checks passed
@steipete
steipete deleted the deslop/z41-45-plugin-residue-20261015 branch October 21, 2026 18:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…penclaw#179748)

* refactor(plugins): reuse validated media and digest facts

* refactor(plugins): reuse private cleanup and collection owners

* refactor(browser): own fixed download capture policy

* refactor(qa): trust typed MCP stderr stream

* refactor(plugins): remove redundant private work

* refactor(plugins): reuse existing value and metadata owners

* refactor(plugins): trust private collection and display owners

* refactor(plugins): remove redundant private validation and results

* refactor(discord): keep private bounds and cleanup with owners

* refactor(plugins): trust process clocks and private operation owners

* fix(qa): preserve explicit gateway setup option
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