Skip to content

refactor: deslop browser, policy and internal operation owners - #183584

Merged
steipete merged 51 commits into
mainfrom
deslop/z25-168-internal-owner-stack-20261015
Oct 25, 2026
Merged

steipete merged 51 commits into
mainfrom
deslop/z25-168-internal-owner-stack-20261015

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Private operations and structural descriptions still expose module/function frames used by only one production owner. This stack removes those internal surfaces without changing public SDK, protocol, CLI, configuration, persisted data, or lazy-loading contracts.

User Impact

No user-visible behavior changes. Public contracts, existing features, security/effect authority, durability and lazy-loading boundaries stay intact; no migration or operator action is required.

Why This Change Was Made

The repaired stack removes 535 whole-diff net lines (2,341 additions / 2,876 deletions across 70 paths), including 562 net production lines. Moved bodies are charged at their destinations. Meaningful tests stay; helper assertions move through existing public owners where needed. The standalone session-memory backend and its factory, registry, expiry, federation, and tests are untouched.

Each cut below is independently removable.

Extension and diagnostic private types

Inline single-use private structural descriptions in their existing browser, Buzz, Canvas, ClickClack, file-transfer, Slack, SDK, and diagnostic owners. Preserve explicit fields, optionality, discriminants, and all runtime statements.

Best-effort tradeoffs accepted: none; useful shared names and public contracts remain.

Browser navigation observation

Keep navigation-target observation inside its sole fence owner; retain the fence's public operations and real protocol, detach, stop, pending-work, and interception checks.

Best-effort tradeoffs accepted: a larger bounded fence module replaces a singleton internal module; no guard is removed.

Teams conversation rules

Keep conversation rules in the existing conversation-store owner. Exercise the former helper assertions through the store suite rather than preserving test-only exports.

Best-effort tradeoffs accepted: private helper boundaries disappear; store behavior and meaningful assertions remain.

Setup promotion

Keep the sole promotion-key preparation in its existing promotion owner, retaining all validation, ordering, and public entry points.

Best-effort tradeoffs accepted: none.

Thread-binding artifacts

Inline private artifact projections at their actual consumers. Preserve explicit public contracts and test the same behavior through the existing production boundary.

Best-effort tradeoffs accepted: none; no thread-binding or session authority behavior changes.

Host-hook attachment preparation

Keep the sole attachment helper in the existing host-hook attachment owner, with unchanged admission, write, publication, and cleanup ordering.

Best-effort tradeoffs accepted: a private module API disappears; no effect guard or durability guarantee changes.

Isolated LLM preparation

Keep sole-use input preparation in the existing isolated runtime operation, preserving request capture, authority, cleanup, and provider behavior.

Best-effort tradeoffs accepted: none.

Provider and QA descriptions

Localize private provider, QA, Matrix-hook, and Feishu-event descriptions. Retain all runtime behavior, public names, lazy boundaries, and explicit structural types.

Best-effort tradeoffs accepted: none.

Package private type frames

Inline single-use structural descriptions in worker task, session URL, reasoning-tag, scope-upgrade, and terminal-outcome owners. Keep shared names when expansion grows code.

Best-effort tradeoffs accepted: none; no worker, stream privacy, or terminal-settlement behavior changes.

JSON-schema normalization

Put the two private single-call normalization frames into their existing branches/callback. Keep schema traversal, encoding, defaults, and validation intact.

Best-effort tradeoffs accepted: none; this changes implementation ownership, not schema or configuration contracts.

Anthropic cache-control preparation

Prepare cache markers in the existing public request operation rather than through one private forwarding frame. Capture messages and remaining budget in the original order.

Best-effort tradeoffs accepted: none; marker limits, TTL, compaction, opt-out, and prompt-prefix semantics remain.

Policy evaluation

Fold the sole access/workspace/ingress finding modules into evaluation. Append findings at their original sequence positions; retain reused helpers and the shared metadata validator as private named operations.

Best-effort tradeoffs accepted: the evaluator grows instead of retaining the deliberate readability split from #106313. Validation, diagnostic bytes/order, attestation, and repair boundaries remain unchanged.

Policy data/auth validation

Keep the three named, explicitly typed shape validators with their sole data/auth finding owner. Keep each early-return boundary and the independent secret/auth gates.

Best-effort tradeoffs accepted: a bounded larger owner replaces the #106313 module split; no validation or security check is removed.

Policy evidence production

Prepare the five sole-call evidence facts in the existing public collector, in the same synchronous order. Keep recursive/shared helpers private and preserve MCP credential redaction, source paths, sorting, and all optional sections.

Best-effort tradeoffs accepted: the collector grows instead of retaining the #108210 private scanner split; evidence and attestation contracts are unchanged.

Policy tool-posture findings

Replace three private collector frames and their temporary result arrays with three ordered phases in the existing findings owner. Preserve the typed rule table, scope selection, positive/negative guards, matching, and diagnostics.

Best-effort tradeoffs accepted: the existing public operation contains the complete phases rather than the private parameter/return frames. Prior rule-table and target-traversal cuts are not repeated; no enforcement behavior changes.

Workboard RPC adaptation

Keep the sole Gateway helper bag private to registration. Construct the existing dispatch callback directly from the same stable API/store captures. Preserve scope registration, current authority, workspace canonicalization, upload rechecks, redaction, SQL ownership, FIFO, and settlement.

Best-effort tradeoffs accepted: a larger bounded RPC owner replaces the deliberate #100174 helper split; no guard, transaction, schema, or durability change.

Browser dialog state

Keep dialog observation and timeout preparation in the page-state owner. Retain shared/early-return helpers privately, including all timers, bounds, aborts, close behavior, dialog IDs, and late-response handling.

Best-effort tradeoffs accepted: a larger bounded state owner replaces the #113585 private module split; no dialog or navigation protection is removed.

Catalog auth refresh

Prepare the refreshed auth store in its sole request owner, capturing provider/profile selection before the awaited load. Reuse the already prepared generation scope; its owner constructs the execution frame from the same metadata/registry facts.

Best-effort tradeoffs accepted: none; secret preservation, persisted/external profile filtering, worker/lazy boundaries, live authority, and admitted-write settlement remain intact.

Stream scrub snapshot

Put the two private sole-call cache-operation frames into the existing snapshot callback; inline its private row description. Retain the measured cache, settlement and continuation predicates, grammar/code protection, canonical fallback, privacy, and resource bounds.

Best-effort tradeoffs accepted: none; #174353/#174345 performance and leak-protection mechanisms remain, including the retained named parts-continuation predicate.

Responses continuation

Keep pending-call recording, history comparison, and raw-ID restoration in their existing public record/resolve owners. Preserve rejection/fallback control flow, argument evaluation order, exact ID ownership, JSON/unsafe-integer handling, reasoning replay, and cache/credential/concurrency boundaries. Explicit local readonly unknown[] annotations retain the former inspection-parameter contracts; public types are unchanged.

Best-effort tradeoffs accepted: fewer named private operation frames inside two bounded owners; every pairing/history/fallback guard introduced by #134425 remains. No correctness concession or new assertion is introduced.

Evidence

Original head 2ac72133da62b9234ba11669d0af205908b03427 failed CI run 40194133779. These failures remain unknown, not attributed inherited:

Job Observed failure Repair decision
build-artifacts (121171786946) Root-help render exceeded 120 seconds Restore the five potentially reachable changed source paths and associated inventory entries.
checks-node-changed-8 (121171789478) MCP stress 180-second timeout; shared-sandbox Doctor 30-second timeout Restore the conservative 60-source static/lazy/process union, including the five root-help paths, and dependent test preimages.
checks-ui-e2e 2/7 (121171787257) Memory overview navigation left one generic matching asset link Restore the conservative 10-production-path UI graph and associated test/fixture preimages. Effective UI diff is now empty.

The discarded slices are preserved on deslop/z25-parked-ci168-owner-slices-20261015, without a PR. Auto-merge was confirmed retired before repair. No timeouts, retries, skips, tests for retained behavior, or baselines were weakened. Source reachability supports conservative rollback; it does not prove which lazy branches ran or establish a timeout root cause. No local broad build/E2E replay was attempted under the campaign CPU budget. The exact repaired-head CI is the broad gate.

Focused rollback proof passed: root help 174 cases / 8 files; Node union 304 cases / 14 files (one existing platform skip); UI 105 cases / 6 files. The stronger full-argv daemon-restore assertion remains independently.

Patch-identical saved refill cuts retained their independently completed focused proof and review. Fresh refill proof includes package normalization/types 268 cases / 12 files; Policy evaluation 348 / 5; browser/catalog 80 / 8; Policy evidence/data-auth plus Workboard 365 / 7; operation frames 454 / 9 (including the real loopback Responses transport, stream privacy/cache behavior, registered Doctor, prefix stability, and lint suppressions). Targeted native types, typed lint, formatting, line caps, full moved-body/expanded-type comparisons, and fresh independent P0–P2 reviews passed per cut. The operation trial first found loss of the helpers' unknown-array inspection annotations; explicit local annotations preserve that exact contract without casts or public type changes. Final runtime and static cycle checks passed with zero cycles. Final local repaired head: 474b55e615638b887a7f24ca08ffad320f698902.

No live provider/channel/device behavior, broad local suite, build, E2E, or whole-graph typecheck is claimed. No new suppressions, retries, skips, timeout increases, dependencies, public APIs, configuration keys, or persisted schema changes.

Follow-up exact-head CI attribution and ratchet repair

Run 40198158913 on head 474b55e615638b887a7f24ca08ffad320f698902 identified these leaf failures. Other jobs were still running when this repair was prepared; all final checks remain exact-head gates.

Job Observed failure Attribution / action
checks-node-changed-compact-large-12 (121183875190) session-accessor.sqlite-session-row.test.ts, “records committed owner facts before cancellation observers”: expected clone count ≤3, received 4 Exact same case/assertion on scheduled main run 40194031161 at 9db139fcf842303a2acb091f1eead2a45d0b1cf2, job 121171248450. Failing test and relevant session-entry/clone owners unchanged; inherited.
checks-node-changed-compact-small-9 (121183875226) Two openclaw-agent-execution.close-wedge.test.ts cleanup-cause assertions Exact same titles and actual/expected cause diffs on the same scheduled main, job 121171248530. Failing test and state execution/SQLite-worker owners unchanged; inherited.
checks-fast-baseline-ratchets (121183871060) Relocated promotion assertion exceeds receiver baseline; stale deleted-test mock entry Ours. Remove the unnecessary accounts type assertion, delete the orphan assertion allowance for its retired donor, and shrink the exact obsolete thread-binding test mock row. No new exception, transferred allowance, or weaker test.

The coordinator flake registry and last six completed scheduled main runs were checked. Registry signatures did not match these cases; inheritance is established by actual latest-main failure logs, not guessed from shard names or a false zero-reachability claim. Conservative source closures do intersect several changed type/runtime modules.

The three-file ratchet repair passed targeted native types, lint, formatting, module caps and 45 focused cases in five files, including public setup/Doctor promotion and lint suppressions. Independent P0–P2 review found no actionable issue. Relevant runtime/import statements and cycle topology are unchanged by removing a type assertion and two orphan baseline rows. Both final failed ratchets now pass: assertion safety (2,424 files / 5,519 remaining grandfathered assertions) and mock factories (6,993 remaining grandfathered factories). New signed repair head: 1784da719fd3005bf24c3ec35468baf3f80c98cf. Its exact-head CI remains the broad gate; no failed CI is relabeled green.

Completed exact-head CI and inherited-failure exception

Run 40199296048, attempt 1, completed on the exact repaired head 1784da719fd3005bf24c3ec35468baf3f80c98cf. All 164 CI jobs are terminal. The only failing leaf jobs are:

Exact-head job Failure Scheduled-main proof
121187379218 Session-row case “records committed owner facts before cancellation observers”: clone count 4 exceeds 3 40194031161 / 121171248450, exact case and assertion at main 9db139fcf842303a2acb091f1eead2a45d0b1cf2.
121187379258 Close-wedge cases “surfaces the native cleanup cause while the close still fails, then recovers once it clears” and “keeps unavailable cleanup failures outside retry handling while preserving their primary outcome” 40194031161 / 121171248530, exact titles and actual/expected cleanup-cause differences.
121192125740 Aggregate openclaw/ci-gate Downstream of exactly those two leaves; no additional failing suite.

The automated table labels both leaves unknown because its newer selected main run lacks corresponding jobs. Attribution here uses the actual matching scheduled-main logs instead. Nineteen determining test, session-entry/clone, state-execution and SQLite-worker inputs are byte-identical on that positive baseline, the actual CI base c78aa483ab743df4e41b712d7845cfaf39e6cabf, and the tested merge 03e183856d89cb3aa021034aea8a54fbaee78002. The merge's ordered parents and exact reconstructed tree were verified. Adjacent main changes exist and broader static/lazy/type closures intersect this PR; no claim of zero graph reachability is made.

Current assertion/mock ratchets, lint, production/test types, security-fast, exact-head Security Review, dependency review and security-sensitive review pass. The earlier context failure for a missing literal Evidence heading was repaired through this body only; automatic exact-head replacement 40199614129 passes. No CI rerun or source repush was used for metadata or to chase green.

Standing campaign authority selects the native inherited-failure admin exception, with the exact failed attempt retained as failed and the previously retired intent replaced explicitly. Live enforced review/security/authority remain native gates; they are not waived.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 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 docs Improvements or additions to documentation channel: msteams Channel integration: msteams app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: qa-lab plugin: file-transfer channel: buzz extensions: browser extensions: clickclack extensions: canvas size: XL labels Oct 25, 2026
@steipete steipete changed the title refactor: deslop agent owners, channel dispatch and plugin surfaces refactor: deslop browser, policy and internal operation owners Oct 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix channel: slack Channel integration: slack channel: feishu Channel integration: feishu extensions: minimax extensions: lmstudio extensions: diffs extensions: github-copilot extensions: policy plugin: workboard and removed app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts commands Command implementations labels Oct 25, 2026
@steipete
steipete merged commit b034fbb into main Oct 25, 2026
250 of 268 checks passed
@steipete
steipete deleted the deslop/z25-168-internal-owner-stack-20261015 branch October 25, 2026 14:23
@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 26, 2026
…law#183584)

* refactor: carry reviewed private ingress and agent type frames

* refactor: inline private registry and push type frames

* refactor: inline private lifecycle type frames

* refactor: inline private policy and setup type frames

* refactor: infer private ACP turn statistics

* refactor: fold cron host selection into gateway owner

* refactor: remove delivery and credential relays

* refactor: fold QA waiter and binding lookup owners

* refactor: call canonical heartbeat display predicate

* refactor: keep background handlers in users owner

* refactor: keep skill status in public handler owner

* refactor: fold session retention owner and hook loader relay

* refactor: keep Teams conversation rules in the store owner

* refactor: keep public representation cache in admission owner

* refactor: keep node authority in invocation owner

* refactor: keep file transfer and worker operations in their owners

* refactor: inline private extension type frames at their sole owners

* refactor(sdk): localize private artifact and profile type projections

* refactor(agents): keep workspace snapshot cache private to its store

* refactor: inline private diagnostic retention event arms

* refactor(node): build service arguments in the installer owner

* refactor(browser): keep navigation target observation in its fence owner

* refactor(channels): keep command user turns in native dispatch owner

* refactor(ui): localize sensitive input and remove test-only settings summary

* refactor: localize native relay responses and device token operations

* refactor: localize plugin blob and native credential operations

* refactor(logging): keep support record sanitization in one owner

* test(daemon): exercise launcher through shared CLI argument owner

* refactor: isolate unproven root-help reachable cleanup slices

* refactor: isolate unproven node CI cleanup slices

* refactor: isolate unproven UI CI cleanup slices

* refactor(extensions): keep sole-use type frames at their owners

* refactor(channels): fold promotion keys into their resolver

* refactor(plugins): inline isolated LLM request guard frames

* refactor(channels): keep thread-binding artifacts in conversation owner

* refactor(extensions): inline private browser and Matrix hook types

* refactor(plugins): keep attachment validation at its public owner

* refactor(extensions): inline sole-use provider type frames

* refactor(qa): inline sole-use provider and workspace contracts

* refactor(ai): keep cache breakpoint allocation in request owner

* refactor(packages): keep single-use contracts and schema work at owners

* refactor(policy): keep sole-consumer findings in evaluation owner

* refactor(browser): keep dialog handling in session state owner

* refactor(agents): prepare refreshed catalog auth in request owner

* refactor(policy): keep shape validators with their findings owner

* refactor(policy): prepare evidence in its collection owner

* refactor(workboard): own RPC adaptation in gateway registration

* refactor(tool-call-repair): keep snapshot reuse in its sole callback

* refactor(ai): keep continuation preparation in record and resolve owners

* refactor(policy): accumulate tool posture in its findings owner

* refactor(channels): retire promotion assertion and orphan allowances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: buzz channel: feishu Channel integration: feishu channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: slack Channel integration: slack ci:full Keep ordinary native-locale CI selection on the next PR run. cli CLI command changes docs Improvements or additions to documentation extensions: browser extensions: canvas extensions: clickclack extensions: diffs extensions: github-copilot extensions: lmstudio extensions: minimax extensions: policy extensions: qa-lab plugin: file-transfer plugin: workboard size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant