Skip to content

refactor: deslop gateway, channels and UI owner surfaces - #185157

Merged
steipete merged 11 commits into
mainfrom
deslop/z25-186-owner-surface-stack-20261015
Oct 27, 2026
Merged

steipete merged 11 commits into
mainfrom
deslop/z25-186-owner-surface-stack-20261015

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Private single-consumer functions, component input frames and mirrored types add indirection without a separate responsibility. This stack moves that work into its existing owners. No intended user-visible change, migration, config, CLI, protocol or Plugin SDK change.

Independent Cuts

UI presentation frames

Localize private inputs in usage details, browser header, avatar, slash menu, message stream/video, pull-request, attachment, workspace, sidebar and dashboard children. Preserve component positions, keyed identities, live reads, callbacks, DOM and classes.

Best-effort tradeoffs accepted: none; component and reactive lifetimes remain.

Session options, heartbeat and chat projections

Fold the sole-consumer session-options parser into settings, reuse the existing heartbeat predicate, and infer private payload types at their producers. Keep malformed-input handling, session qualification and dispatch.

Best-effort tradeoffs accepted: none; public types and runtime behavior remain.

Channel preparation frames

Inline private preparation in Discord builders, FaceTime preflight, Signal Doctor, iMessage history, Slack inherited-file preparation, Telegram menus and WhatsApp mentions. These are independent local cuts, not a common owner migration.

Best-effort tradeoffs accepted: private call/Promise-adoption turns disappear where wrappers were async; actual awaits, ordering, validation and authorization remain.

Matrix media and duration

Construct media content and optional duration in the send owner. Preserve encryption, relation, voice/image, zero-size, zero-duration and nonmutation behavior. Move all six AIFC fixtures and their independent oracles to the existing public-send suite/support owner.

Best-effort tradeoffs accepted: the duration wrapper's additional Promise settlement turn disappears; the real parser await remains after upload and before delivery preparation. No guard removed.

Usage report and typed columns

Capture operation inputs in the usage report's private evaluator/classifier and keep four distinct numeric column loops directly in their consumer. SQL, cache/calendar/freshness/partial-result behavior, packed transport and comments remain. No performance claim.

Best-effort tradeoffs accepted: none; storage and arithmetic remain unchanged.

MiniMax and ONNX model owners

Keep MiniMax music readers in their operation and ONNX adapters with their model-cache owner. Migrate private adapter proof into public loader tests before deleting obsolete donor files/tests.

Best-effort tradeoffs accepted: no guard removal; load/cache ownership and supported model behavior remain.

Talk meter and MXC preparation

Keep the Talk meter setup under its existing activity lifetime. Remove MXC's private preparation frame while retaining its subprocess/probe/ACL prefix in readiness, including the security scanner's source boundary.

Best-effort tradeoffs accepted: none; cancellation, cleanup, authority and platform checks remain. No Windows/live-device claim.

Reef trust transitions

Move peer/delivery transition operations into their sole trust-state operation owner.

Best-effort tradeoffs accepted: none; schemas, authority, transaction, receipts, durability and realistic concurrency guards remain.

Composer skills menu

Keep skills content in its sole composer-menu owner, retaining the same keyed iteration, memos, loading/error handling, invalidation and lazy route boundary.

Best-effort tradeoffs accepted: none; presentation and loading lifetimes remain.

Browser and Doctor preparation

Inline browser query/graphics parsing and Feishu/LINE Doctor frames in their sole consumers. Preserve warnings, migration order and the LINE access behavior from #146169.

Best-effort tradeoffs accepted: none; every existing validation and permission guard remains.

LLM Task, WhatsApp, Slack and Telegram preparation

Localize request/status frames at their actual consumers. Retain LLM Task's per-registration dynamic loader and WhatsApp's lookup-before-caption/sender ordering.

Best-effort tradeoffs accepted: no guard removal; only private frames/types disappear. Public tool schemas, status text, Doctor predicates and lazy boundaries remain.

Profile identity

Keep the private identity component mounted inside the same ProfilePage Show branch, using its narrowed profile accessor. Retire the prop-copy/type-export seam and direct private-component harness. Move distinct avatar picker, disabled-upload, held name-save, initials and shared-owner assertions into existing public page/preferences flows; they passed against unchanged production first.

Best-effort tradeoffs accepted: none; readonly/focus behavior from #183719, upload/currentness/permission checks, readiness, reconnect and retirement remain. No visual change intended.

CI Repair and Withdrawal

The old head's lifecycle failure reproduced locally, but the serial base control failed later during setup/cleanup and could not settle attribution. Under the campaign's withdrawal rule, restore all 37 changed paths in its conservative runtime import closure plus two consistency companions to protected main 2bfc47bc6038f851066f45dd02c247519f29ebc3. All 39 resulting files were byte-verified; the original full snapshot is retained on deslop/z25-parked-lifecycle-185157-20261015. The independent usage typed-column cut stays. No claim that this fixes the lifecycle failure or makes old CI green.

Retain the Google public-test migration and registry contract rows; withdraw their production changes. Remove the stale Matrix max-lines allowance flagged by old-head CI. The old merge request was natively retired before replacement; its receipt remains intact.

Evidence

Whole diff against the current main merge base 2bfc47bc6038f851066f45dd02c247519f29ebc3: 651 net lines removed, 82 paths, 3,375 additions / 4,026 deletions, including tests. Independent cuts can be withdrawn separately. Phase E session memory is untouched.

Per-cut original/final public-consumer tests, targeted native typechecks, formatting, typed lint and independent P0–P2 reviews passed. Latest combined plugin/Profile review found no actionable findings. Final plugin proof passed 44 public cases, 13 prompt-prefix stability cases and 14 lint-suppression cases. Profile migration passed 47 cases against unchanged production; final page/readiness/reconnect proof passed 50 cases plus 14 suppression cases. Reef passed 31 public trust-store cases before and after; skills passed 28; browser/Doctor passed 33; MXC passed 27 including suppression checks. No kept test was skipped, retried or weakened.

Final repaired stack: runtime value cycles 0, static/madge cycles 0; diff whitespace clean. Local checks ran serially, nice priority, isolated state, one Vitest worker; no broad suite, build or whole-graph typecheck. Reef's Node strip-only loader setup failed; the exact pinned supported Bun passed the original and final public suite. This is not a product repair claim.

Exact-head hosted CI and Security Review remain landing gates. Old-head failures/attribution are retained, not reused as replacement-head clearance. No live-service/device/provider or end-to-end build proof is claimed.

@clawsweeper

clawsweeper Bot commented Oct 26, 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.

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts commands Command implementations agents Agent runtime and tooling plugin: facetime FaceTime plugin size: XL labels Oct 26, 2026
@steipete
steipete force-pushed the deslop/z25-186-owner-surface-stack-20261015 branch from bc5394a to 370da16 Compare October 26, 2026 23:37
@steipete
steipete marked this pull request as ready for review October 26, 2026 23:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-27T01:37:04.719226Z aafe65d 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.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: aafe65d279df0429fe188c0c14d7645bafec2c92

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

@steipete
steipete enabled auto-merge (squash) October 26, 2026 23:48
@steipete
steipete disabled auto-merge October 26, 2026 23:55
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR folds private helpers and copied types into their existing Gateway, channel, provider, and UI consumers.

Example: Send clip.aifc containing 441 Apple IMA4 packets through Matrix.

  • Before: A private media helper produces the 640 ms duration.
  • After: The public send owner produces the same 640 ms duration directly.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful consolidation with focused harness evidence, but a deterministic baseline defect blocks the current patch.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied evidence covers focused consumer tests, with no shipped-entry-point execution claimed.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes
Reason: Maintainer-authored direction removes redundant private interfaces and forwarding code without adding state, configuration, or public contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this maintainer-authored cleanup open; it preserves existing ownership while removing redundant code, but one stale suppression-baseline entry deterministically breaks CI.

Priority: P3
Reviewed head: 370da16a5fa30c1e18764c4bb2aab203b389a557

Before merge

  • Remove the stale Matrix max-lines baseline entry (P2) - This PR deletes the max-lines suppression from extensions/matrix/src/matrix/send.test.ts but leaves this baseline row. scripts/check-max-lines-ratchet.mts compares the baseline with actual suppressions and returns 1 for stale entries, so the required ratchet fails deterministically. Remove this row alongside the suppression; the exact-head baseline check already reports max-lines failure.

Findings

  • [P2] Remove the stale Matrix max-lines baseline entry — config/max-lines-baseline.txt:70
Agent review details

How this fits together

Gateway requests, agent operations, and channel messages enter existing runtime owners; those owners authenticate, prepare, persist, and deliver results that the Control UI presents.

flowchart LR
  Clients --> Gateway
  Gateway --> AgentRuntime
  AgentRuntime --> Providers
  AgentRuntime --> ChannelDelivery
  ChannelDelivery --> Plugins
  Gateway --> ControlUI
Loading

Technical review

Best possible solution:

Prune the obsolete Matrix suppression-baseline entry while retaining the behavior-preserving refactors.

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

The baseline failure is source-reproducible: the suppression is deleted, its baseline row remains, and the ratchet rejects that combination; no target code was executed.

Is this the best way to solve the issue?

The refactors reuse existing owners and retire replaced paths; the smallest remaining repair is removing one obsolete baseline row.

Full review comments:

  • [P2] Remove the stale Matrix max-lines baseline entry — config/max-lines-baseline.txt:70
    This PR deletes the max-lines suppression from extensions/matrix/src/matrix/send.test.ts but leaves this baseline row. scripts/check-max-lines-ratchet.mts compares the baseline with actual suppressions and returns 1 for stale entries, so the required ratchet fails deterministically. Remove this row alongside the suppression; the exact-head baseline check already reports max-lines failure.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Gateway ingress and shared-secret authentication changes intended behavior with a stated reason (fix(gateway): reject unattributable loopback proxy traffic [AI] #119950: Bind authentication and limiter operations to prepared ingress attribution; current producers enforce literal-true successful reset.)
  • Matrix media duration and content keeps the original intent (9922ea0: Preserve accurate Apple IMA4 durations; the parser correction and six independent fixtures survive at the send boundary.)
  • Usage worker aggregation keeps the original intent (858395b: Include all eligible sessions using compact quarter summaries; freshness, invalid-row, boundary, and partial-result decisions remain unchanged.)
  • Usage and retained UI components keeps the original intent (refactor: migrate Usage and Activity pages to Solid #168788: Preserve UI output and existing domain owners during Solid migration; component positions and live reads are retained.)
  • Bundled plugin installation and recovery keeps the original intent (fix(cli): reject invalid plugin installs before lifecycle mutations #115427: Keep source preflight and configuration recovery with installation owners; existing recovery restrictions, schema validation, and persistence arguments remain.)
  • Computer screenshot composition keeps the original intent (refactor: keep private runtime composition with callers #178778: Keep private runtime composition with its consumer while preserving authority, cancellation, and image handling; capture now lives inside the same serialized operation.)
  • Remaining private helper placement keeps the original intent (unknown: Path-history searches identify successive consolidations, but unavailable historical blobs prevent complete introduction attribution through git blame; the reviewed transplants retain the existing algorithms.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:max-lines-ratchet --base f21ed5e
  • git diff --check

What I checked:

  • Pinned introduction inspected: The complete introduced diff contains private helper transplants, inferred internal types, and UI component captures; sampled central owners remain unchanged on fetched main relative to the merge base. (370da16a5fa3)
  • Stale baseline causes a deterministic failure: The PR removes the Matrix send test's final max-lines suppression, but its baseline entry remains; the ratchet returns failure for stale entries. (config/max-lines-baseline.txt:70, 370da16a5fa3)
  • Exact-head CI corroboration: The baseline-ratchet check annotates max-lines failure. Other failing checks were inspected but are not attributed to this diff; downloadable job logs were blocked by the host allowlist. (370da16a5fa3)
  • Auth contract retained: Current ingress attribution types and producers specify literal resetOnSuccess: true; the refactor retains credential comparison, limiter subject/scope, failure delay, origin checks, and successful reset. (src/gateway/ingress-attribution.ts:50, 370da16a5fa3)
  • Maintainer direction and supplied validation: The full PR body records the behavior-preservation goal, accepted private Promise timing changes, focused consumer tests, and explicit absence of device/live-provider claims; the security guard confirms maintainer authorship and no required secops approval. (370da16a5fa3)
  • Separate earlier cleanup: The merged refactor: deslop agent tools, plugin internals and UI owners #185004 owns the earlier PDF and Markdown installer cuts, which this PR explicitly drops; it does not supersede the remaining introduced changes. (ff2c044942f7)

Likely related people:

  • Ayaan Zaidi: Raw commit 858395b adds src/infra/session-cost-usage-worker-overview.ts:193 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 858395bbe034; files: src/infra/session-cost-usage-worker-overview.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +2251/-2932; tests and support +187/-158 Production shrinks by 681 lines; test growth moves duration and metadata assertions to the public Matrix send boundary.

Labels

Label changes:

  • add P3: This is internal cleanup with no intended user-visible behavior change.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is internal cleanup with no intended user-visible behavior change.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 26, 2026, 7:56 PM ET / 23:56 UTC.

@openclaw-barnacle openclaw-barnacle Bot added channel: line Channel integration: line extensions: llm-task Extension: llm-task channel: feishu Channel integration: feishu extensions: minimax plugin: mxc channel: reef Channel integration: reef extensions: browser plugin: onnx and removed gateway Gateway runtime scripts Repository scripts commands Command implementations agents Agent runtime and tooling labels Oct 27, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Exact head aafe65d279df0429fe188c0c14d7645bafec2c92: CI run 40433339615, attempt 1, completed failed, with 77 planned jobs complete and no cancelled CI jobs. Security-fast and exact-head Security Review passed. This invokes the campaign's inherited-failure native admin exception; it does not call failed CI green.

Failed job Attribution and evidence limits
checks-node-changed-extensions-bundle-2 / 121956695772 iMessage rich-link delivery (true), monitor.plugin-payload.test.ts:289: correct first native send followed by chats.list(limit:1000) violates the exactly-once assertion. Retained serial clean head 69b213167ec967094f66794533534bd66935c862 and its actual CI base f1bf17df378a0bf28f916386351b862f158e0416 both failed identically. All 11 determining source blobs match those controls and the current actual merge/main parent/head. Later hooks/SQLite assertions were not reached; no live-device claim.
checks-ui-e2e (3/4) / 121956694823 Four sidebar assertions: RTL right 1184 vs action-left threshold 1164; state lead-right 273 vs title-left 100; two expected 52px text/title paddings read 0px. Upstream main #185264 explicitly moves ordinary state-only indicators trailing and zeroes physical text/title padding while reserving logical link-end space. All nine determining CSS/renderer/test blobs are identical between the actual CI merge and its main parent; none is changed by this cleanup. This is concrete source/property attribution, not an empirical failing-main replay. The RTL logical/physical mismatch may be an upstream layout bug rather than a stale expectation.
openclaw/ci-gate / 121960354050 Aggregate failure downstream of those two leaves. No other failed CI leaf.

Actual checkout 2d9f901cc0fc0f8ab9c15a3c857b30b7c5ac2cc0 has ordered parents 018cdd3feec64552de7e60d2942d687dee9e7af4 and this PR head, and tree 938d84071018f04c9350d59be2feb89f066a4d87, independently reconstructed with git merge-tree.

The shared flake registry and the latest six completed scheduled-main runs were inspected. No matching current UI signature is claimed: all six precede #185264. The supported focused browser replay would build the whole UI, so it was not run under the campaign CPU/no-build budget. Attribution is property-causal, not a claim of zero import reach or complete execution equivalence. Tests, assertions, timeouts, suppressions, and CSS were not weakened or changed for CI.

The repaired stack remains 651 net removed on GitHub's whole-diff numbers. All 39 lifecycle withdrawals remain byte-identical to the protected main snapshot; Phase E is untouched. Per-cut focused public tests, targeted types, format/lint, independent reviews, runtime cycles 0 and Madge cycles 0 are retained in the native preparation packet. The source-only UI limitation and unresolved withdrawn lifecycle diagnosis remain disclosed.

@steipete
steipete merged commit d003cdc into main Oct 27, 2026
140 of 158 checks passed
@steipete
steipete deleted the deslop/z25-186-owner-surface-stack-20261015 branch October 27, 2026 01:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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

* refactor: retain disjoint owner-surface cleanup cuts

* refactor: use the canonical heartbeat display predicate

* refactor: keep MiniMax music readers within their operation

* refactor: keep ONNX adapters with their model cache owner

* refactor: keep Talk meter setup with its activity lifetime

* refactor: prepare MXC host through one internal operation

* refactor: own Reef transitions in its state operation

* refactor: own skills menu content in its composer

* refactor: inline browser and Doctor preparation frames

* refactor: inline plugin request and status preparation

* refactor: own profile identity presentation in its page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: reef Channel integration: reef channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web extensions: browser extensions: llm-task Extension: llm-task extensions: minimax plugin: facetime FaceTime plugin plugin: mxc plugin: onnx size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant