Skip to content

refactor(plugins): narrow private inputs and results - #180700

Merged
steipete merged 2 commits into
mainfrom
deslop/z28-77-extension-inputs-20261015
Oct 22, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/z28-77-extension-inputs-20261015

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Private plugin helpers carry optional inputs and result fields that no production caller uses.

User Impact

No user-visible change. Config keys, CLI flags, Plugin SDK exports, protocol messages, persisted formats, and live security checks are unchanged.

Why This Change Was Made

Use the serving defaults directly, call the existing dependency owners, and stop returning unread projections. Tests use module spies or the actual production limits instead of adding production-only fixture controls.

This is the extensions-area slice of a wider private-argument cleanup. The collector exceeded 80 files, so it is split by area under the campaign's explicit wide-family exception: 58 files; 83 net production lines and 10 net test/support lines removed. Core and UI edits are not included.

Best-effort tradeoffs accepted

  • None of the removed inputs has a non-default production supplier. Private fixture customization disappears; supported production behavior does not.
  • Fixed timing and size inputs retain their serving values: IRC and Twitch polling at 1,000 ms; Telegram stopped-poller grace at 5,000 ms; Mattermost REST deadline at 30,000 ms and preview cap at 4,000 UTF-16 units. Generic watchdogs, per-request deadlines, configured chunking, cancellation, retention, and settlement remain.
  • The unused synchronous Codex assignment callback is removed, not the live checks: asynchronous lifecycle validation, current binding comparison, source authority, and write authority remain at their existing boundaries. No real-incident protection is removed.
  • Unread projection fields disappear, while their live owners remain: quarantine telemetry and schema checks, context filtering, token resolution, and routing. IRC server prefixes still cannot be mistaken for nicknames.

Evidence

  • Whole-tree caller and public-barrel search, including src, ui/src, extensions, packages, and scripts; targeted type graph includes serving consumers, aliases, and changed tests.
  • Independent P0–P2 review of the complete candidate: no actionable findings. Author simplification pass retained only the complete private-interface cutover.
  • Focused source proof: 960 selected cases across 53 files pass (repeat executions excluded); 276 pre-existing cases were not selected by the existing name filters. Commands used the repository wrapper, one worker, serial execution, isolated state, and low process priority. Larger multi-file commands took 12–65 seconds including cached-worker preparation; no timeout, retry, or skip was added.
  • The first pass found nine ReferenceErrors from retired assertion helpers in Twitch's outbound test. A serial exact-baseline replay reproduced all nine. The direct-assertion repair landed separately on main as 271329fd32df; all 33 outbound cases then passed with this slice reapplied. No assertion repair is hidden in this PR.
  • Targeted native typecheck (--noEmit on the changed extension graph and actual consumers), typed lint and format pass. Runtime cycles: 0; static cycles: 0; both plugin import-boundary checks pass.
  • Suppression guard: 13 pass, 1 inherited failure (103 entries versus the baseline's 100). Extra entries are in untouched src/cron/store/job-mutations.ts, src/transcripts/library.query-budget.test-support.ts, and ui/src/pages/sessions/view.tsx; those files and the guard are identical to main. No suppression or allowlist changes.
  • No live-service, broad local suite, build, or end-to-end claim. Exact-head PR CI is the broad gate.

Conflict-only rebase: main independently inlined Mattermost's two local helpers. The resolution preserves main's trim precheck and published-offset loop and applies only the unserved preview-cap input removal. Refreshed conflict proof: 30 cases across three files, targeted native graph, typed lint, format, runtime cycles0, static cycles0, and whitespace pass. The suppression guard retains the same inherited103-versus100 failure. Other unchanged-input local proof is reused; prior-head CI is not presented as rebased-head CI. Net production savings fell from91 to83 because main already owns the overlapping simplification.

@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.

@steipete
steipete marked this pull request as ready for review October 22, 2026 14:36
@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-22T14:50:02.521138Z bd060b9 New commits
ℹ️ 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: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: feishu Channel integration: feishu channel: twitch Channel integration: twitch channel: irc extensions: qa-lab extensions: codex extensions: onepassword 1Password plugin extensions: browser size: M labels Oct 22, 2026
@steipete
steipete force-pushed the deslop/z28-77-extension-inputs-20261015 branch from 4e37e35 to bd060b9 Compare October 22, 2026 14:46
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels 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 removes unused private plugin inputs and unread result fields while retaining existing production defaults.

Example: A stopped Telegram poller still holds its bot-token lease.

  • Before: Production cleanup waits up to 5,000 ms through a private helper that also accepts a test-only wait override.
  • After: Production cleanup retains the 5,000 ms grace period, and tests exercise that default with a fake clock.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The source review supports the cleanup, while supplied execution evidence remains focused tests and static checks with exact-head CI pending.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored refactor is outside the ordinary contributor proof gate; supplied validation covers focused production-code tests and static checks, with no live execution claimed.
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 unused private surface without changing supported configuration, public SDK contracts, or serving defaults.

Merge readiness

✅ Ready for maintainer review

Keep this PR open as useful, maintainer-directed cleanup; the reviewed diff introduces no actionable correctness finding, and exact-head CI is still pending.

Priority: P3
Reviewed head: bd060b980394b69d369a1d6490a9fae1ba99c39f

Before merge

None.

Findings

None.

Agent review details

How this fits together

Bundled plugin adapters translate channel events and runtime configuration into provider calls, message delivery, and state-owner operations.

flowchart LR
  A[Channel events] --> C[Private plugin helpers]
  B[Runtime configuration] --> C
  C --> D[Existing authority and state owners]
  D --> E[Provider and channel transports]
  D --> F[Persisted plugin state]
Loading

Technical review

Best possible solution:

Retain the private-interface reductions with existing production defaults, storage owners, and authority checks.

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

This is a behavior-preserving refactor rather than a reported runtime bug; source inspection verifies the relevant serving defaults and caller cutovers.

Is this the best way to solve the issue?

Removing unserved private controls at their existing owners is a proportionate simplification, and the diff adds no competing owner or unnecessary production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Codex auth cache identity keeps the original intent (071f606: Separate lightweight auth identity and credential reads from expensive runtime registration; this PR retains that separation and the production environment source.)
  • Managed Codex binary selection keeps the original intent (cbaa9ab: Allow qualified newer installed Codex binaries while preserving explicit overrides, desktop precedence, and bundled fallback; only an unused injected path-existence implementation is removed.)
  • Native assignment lifecycle and mutation custody keeps the original intent (bc60cd9: Move currentness preparation to workers and carry owner authority to final effects; the serving async lifecycle and write-authority paths remain intact.)
  • iMessage reply-cache ownership keeps the original intent (b9a2019: Move reply-cache work off the Gateway thread while preserving message ownership and authorization; callers continue using the same awaited cache owner.)
  • Mattermost preview lifecycle keeps the original intent (b38988c: Keep one visible preview sink per turn with explicit terminal transitions; removing the unserved preview-cap override preserves that lifecycle and production cap.)
  • Telegram stopped-poller cleanup keeps the original intent (130c2d5: Release aborted same-account polling leases after their shutdown grace while protecting active and replacement leases; the production grace and protection predicates remain.)
  • Matrix replay-marker migration keeps the original intent (f72072b: Preserve inbound identities across restarts through durable ingress ownership; the change substitutes the already-used production clock without changing imported identities or retention.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 275c611 adds extensions/codex/src/app-server/native-subagent-assignment-store.ts:96 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 275c611ead7a; files: extensions/codex/src/app-server/native-subagent-assignment-store.ts)
  • Vincent Koc: Raw commit d4820c4 adds extensions/codex/src/app-server/native-subagent-assignment-store.ts:90 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: d4820c404e00; files: extensions/codex/src/app-server/native-subagent-assignment-store.ts)
  • Josh Avant: Raw commit 130c2d5 adds extensions/telegram/src/polling-lease.ts:202 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 130c2d5044c2; files: extensions/telegram/src/polling-lease.ts)

PR surface

Source -83, Tests -10. Total -93 across 58 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 30 53 136 -83
Tests 28 100 110 -10
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 58 153 246 -93

Review metrics

Metric Value Why it matters
Production versus test/support LOC Production +53/-136; tests/support +100/-110 The reduction removes unused private controls and projections; test changes retain distinct contracts while using dependency spies or production limits.

Labels

Label changes:

  • add P3: This is internal maintenance with no demonstrated change to supported user behavior.
  • 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: This is internal maintenance with no demonstrated change to supported user behavior.
  • 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, 10:54 AM ET / 14:54 UTC.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 14:56
@steipete

Copy link
Copy Markdown
Contributor Author

Coordinator landing evidence for exact head bd060b980394b69d369a1d6490a9fae1ba99c39f:

Merging with the exact-head SHA guard (squash). This works around a misfiring gate publisher; it does not bypass any failing check.

@steipete
steipete merged commit b5a088e into main Oct 22, 2026
142 of 144 checks passed
@steipete
steipete deleted the deslop/z28-77-extension-inputs-20261015 branch October 22, 2026 18:32
@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 23, 2026
* refactor(plugins): remove unused private arguments and projections

* style(mattermost): format the rebased preview cap
gloss-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 23, 2026
Conflicts:
- queue/recent-message-ids.ts was folded into queue/enqueue.ts upstream
  (openclaw#181498). Its recent-source release now goes through
  releaseBeforeTurnAdoptionRetry there, so a cancelled queued turn also
  forgets its recent message id, as on this branch.
- dispatch-from-config.prepare-context.ts imports: keep
  releaseBeforeTurnAdoptionRetry; waitForReplyDispatcherIdle is no longer
  used after upstream's openclaw#181105.

Semantic: upstream dropped createTwitchIngress's pollIntervalMs option
(openclaw#180700), so the aged-cancelled Twitch test stops passing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PiKbtQbHKKfq82arnmwBYp
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: imessage Channel integration: imessage channel: irc channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: twitch Channel integration: twitch extensions: browser extensions: codex extensions: onepassword 1Password plugin extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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