Skip to content

refactor: localize single-consumer implementation frames - #181702

Merged
steipete merged 2 commits into
mainfrom
deslop/z25-136-private-owner-frames-20261015
Oct 23, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/z25-136-private-owner-frames-20261015

Conversation

@steipete

@steipete steipete commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Internal transcription, migration, plugin loading, display metadata, and UI owners still expose implementation details through sole-consumer modules and private forwarding frames.

User Impact

No intended user-visible change. Public Plugin SDK, library, CLI, protocol, configuration, persisted shapes, rendering, and security contracts remain intact. Phase E session memory is untouched. No migration or user action is required.

Why This Change Was Made

Fold the implementation into the existing consumer, retain genuinely shared types and helpers, and localize exact private type annotations. Eight internal donor files disappear. Bundled plugin identity tests now exercise the public live-instance getter with the existing instance fixture instead of a test-only build parameter; the actual scheduled-restart suite remains unchanged.

This continuation removes 137 net production lines across 37 production paths against 135d79502aa57b4c2529d2b2644a7eeb673ad2ca. Tests/support grow by 13 lines across two paths; relocated bodies count on both sides.

Best-effort tradeoffs accepted

  • The sole Discord transcription consumer no longer waits for a private wrapper's additional promise-resolution microtask. The transcription await, no-model classification, post-await currentness checks, and effect authority remain; no caller requires that scheduling hop.
  • Capability-context dependencies remain statically loaded in the same eager closure, but independent static module evaluation order may differ after folding the donor. The model-auth boundary remains dynamically imported. No contract depends on the former independent import ordering.
  • No security, containment, cancellation, resource-bound, durability, settlement, or lifecycle guard is removed. No reported incident protection is discarded.

Evidence

  • All focused owner packets passed targeted native typechecking, typed lint, formatting, and line-cap checks. Public-boundary coverage includes Discord voice (80 cases), Talk ownership (132), Hermes migration (23), execution/schema compatibility (56), package transports/agent behavior (104), plugin loading (38), Code Mode (26 plus one unchanged platform skip), Custodian (51), and focused UI/config/display suites.
  • Bundled plugin identity and actual scheduled restart: 18 passing cases across two existing suites. Tool-display generation's normal snapshot check passed with no generated-file change.
  • Final structural gates passed: formatter parity, assertion safety, lint-suppressions (14 cases), mock exports, wrapper/eager-import closure (four selected cases), runtime cycles (zero), static cycles (zero), line caps, and UI controller guards.
  • Fresh isolated independent P0–P2 review completed scoped-clean with no actionable findings; final source verification passed.
  • The Code Mode raw-template fold preserves generated guest bytes exactly (SHA-256 7d2488f9dcca4a7fa70f1b1dfc2410fda4e18833c6ff47a18cfbf6d53b74d7e0). Its intentional whitespace-only raw-string line is retained by the formatter and is the sole git diff --check diagnostic; trimming it would change data.
  • Exact-head hosted CI supplies broad/Linux/browser/build proof. No local broad suite, build, live provider/channel, real-state, or visual-change proof is claimed. Existing Solid diagnostics in unchanged callbacks remain; no suppressions, weakened assertions, retries, timeout increases, or new skips were added.

CI attribution and narrowed scope

The original head's CI run 39973547555 failed one leaf job, checks-ui (1/3) (120483077089), and its downstream openclaw/ci-gate (120488802183). The unchanged chat-transcript-board-refresh.test.ts:56 expected settled dashboard refreshes to avoid prepareMessageGroupFrame, but observed two calls. The other selected CI and security jobs passed.

One serial focused replay passed on both original head 697ecf6a26f127e8a061f8f210623954623e61c5 and observed main 9542bd725d9f15e5e0e355fae9efdbc62b80c166. That is inconclusive, not a fix or inherited-failure qualification. Following the campaign attribution rule, the five changed paths reachable from that test's runtime import graph were restored byte-for-byte to observed main: MCP resources, MCP context strip, session-row reconciliation, model-picker options, and source previews. The remaining 39 paths are untouched. No assertion or test was changed.

The withdrawn slice is preserved on deslop/z25-parked-board-refresh-20261015 at the original full head, without a PR. Fresh independent P0–P2 review of the five-file withdrawal is scoped-clean; targeted types, lint, formatting and caps passed, as did 59 focused UI cases and all 14 lint-suppression cases. The new exact-head CI remains the broad landing gate; the intermittent failure is not claimed repaired.

@clawsweeper

clawsweeper Bot commented Oct 23, 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 23, 2026 14:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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 🔄 Running since 2026-10-23T15:15:39.083081Z 0e5a2fb 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 app: web-ui App: web-ui gateway Gateway runtime commands Command implementations agents Agent runtime and tooling extensions: volcengine plugin: migrate-hermes size: XL labels Oct 23, 2026
@steipete
steipete enabled auto-merge (squash) October 23, 2026 15:01
@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 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR folds private helpers into their existing consumers and inlines single-use type annotations.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A coherent simplification with no actionable correctness finding; focused validation supports it, but exact-head CI remains unresolved.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied validation describes focused owner suites, while source review verifies preserved behavior rather than claiming a new live run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-directed cleanup reduces private forwarding and exported implementation detail while retaining the existing production owners and public behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-directed simplification preserves the reviewed contracts, with no discrete introduced bug found; the failing UI check still needs attribution before landing.

Priority: P3
Reviewed head: 697ecf6a26f127e8a061f8f210623954623e61c5

Before merge

None.

Findings

None.

Agent review details

How this fits together

Discord transcription, migration planning, plugin loading, agent execution, and Control UI owners consume the same inputs and produce the same results through fewer private forwarding modules.

flowchart LR
  A[Channel and CLI inputs] --> B[Existing runtime owners]
  C[Control UI inputs] --> D[Existing UI owners]
  B --> E[Localized private implementation]
  D --> E
  E --> F[Existing results and effects]
Loading

Technical review

Best possible solution:

Retain the owner-local folds and resolve or independently attribute the exact-head UI check failure before landing.

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

No product bug is claimed; source inspection supports an owner-preserving refactor, 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 shared contracts without adding competing state or architecture.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bundled plugin code identity keeps the original intent (245e575: Allow bundled command schedules to survive restarts only when the same loaded build and contained plugin paths match.)
  • Capability catalog composition keeps the original intent (071f606: Compose provider operations at the native loader boundary without pulling execution-only model-auth preparation into eager registration.)
  • Discord transcription changes intended behavior with a stated reason (c6ef1f2: Keep recording independent of conversation authorization and preserve transcription outcomes and currentness checks.)
  • Talk owner types keeps the original intent (0151e02: The companion types supported the real owner contract and addressed a controller line-cap failure; the fold retains their exact shapes and leaves runtime ownership checks unchanged.)
  • Hermes migration readers and mappings keeps the original intent (c182dda: Import current Hermes credential and provider contracts while retaining safe reauthentication and independent migration planning.)
  • Code Mode console keeps the original intent (ce8fb53: Provide bounded guest-only console output through the existing output channel.)
  • Tool display metadata keeps the original intent (345cfde: Deduplicate display construction while preserving labels, action shapes, field presence, and generated client artifacts.)
  • Agent exec private normalization keeps the original intent (69399b1: Provide a bounded headless execution contract with explicit timeout, model fallback, state isolation, and environment restoration.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c6ef1f2 adds extensions/discord/src/voice/segment.ts:77 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c6ef1f277e8b; files: extensions/discord/src/voice/segment.ts)
  • Jason (Json): Raw commit 245e575 adds src/plugins/plugin-code-identity.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 245e5756466e; files: src/plugins/plugin-code-identity.ts)
  • Vincent Koc: Raw commit 0151e02 adds src/gateway/talk-client-gateway-control.ts:402 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0151e020a76b; files: src/gateway/talk-client-gateway-control.ts)

PR surface

Source -151, Tests +13. Total -138 across 44 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 42 639 790 -151
Tests 2 49 36 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 44 688 826 -138

Review metrics

Metric Value Why it matters
Production versus test delta Production +639/-790; tests/support +49/-36 The production reduction comes from private folds and type localization; the small test growth moves identity coverage through the existing live-instance getter.

Labels

Label changes:

  • add P3: This is internal maintenance with no intended user-visible behavior change or demonstrated 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: This is internal maintenance with no intended user-visible behavior change or demonstrated 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Establish whether the transcript board-refresh failure also occurs without this patch, then address only any demonstrated PR-caused defect.

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 23, 2026, 11:11 AM ET / 15:11 UTC.

@steipete
steipete disabled auto-merge October 23, 2026 15:13
@steipete
steipete merged commit 92085d2 into main Oct 23, 2026
142 of 144 checks passed
@steipete
steipete deleted the deslop/z25-136-private-owner-frames-20261015 branch October 23, 2026 15:30
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 24, 2026
…1702)

* refactor: localize single-consumer implementation frames

* refactor: withdraw transcript-reachable cleanup slice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: discord Channel integration: discord commands Command implementations extensions: volcengine gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: migrate-hermes 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