Skip to content

refactor: keep private request phases with their owners - #179646

Merged
steipete merged 10 commits into
mainfrom
deslop/z25-80-private-request-receipt-phases-20261015
Oct 21, 2026
Merged

steipete merged 10 commits into
mainfrom
deslop/z25-80-private-request-receipt-phases-20261015

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Internal request phases carry private argument and result frames used only by their owning operation.

User Impact

No intended user-visible change. Public SDK, CLI, configuration, protocol, persisted data, authorization, lazy-loading, and ordinary shutdown/restart contracts remain intact.

Why This Change Was Made

Keep single-consumer preparation, rendering, authorization, and delivery phases beside the operations that already own their facts. Remove the private DTOs, packing calls, result adapters, and orphan imports without replacing their algorithms or introducing another owner.

Production delta: 500 net lines removed (+2,318/-2,818 across 25 paths). Tests, fixtures, generated files, and declarations are unchanged. The standalone session memory backend and its factory, registry, expiry, federation machinery, and tests are untouched.

Best-effort tradeoffs accepted

None newly introduced. No guard or supported failure behavior is removed. In particular, both SMS authorizations, live-effect authority, resource drainage, publication locks/recovery, credential consent, recovery transactions, and ambiguous-send receipt/settlement policies remain.

Evidence

Each packet passed targeted native typechecking, typed lint, formatting, and independent review through P2. Focused public tests cover image/write preparation, Xiaomi/WhatsApp routing, CLI compaction, transcript/directive projection, Mattermost authorization, OpenAI browser sessions, Hermes migration, install/support export, model execution and prompt-prefix stability, setup consent, SMS, xAI polling, managed binary installation, sandbox ownership, voice digests, QR attachment cleanup, terminal recovery, and generated-media completion.

The final packet includes 64 QR cases, the three sandbox ownership/custody cases, five selected terminal-recovery cases, and twelve selected generated-media cases. No assertion, timeout, retry, skip, suppression, or baseline was changed to obtain these results. Local proof used isolated state and one worker; no broad local build, full suite, live provider/channel, actual managed-binary download, or operator-state operation is claimed. Exact-head PR CI is the broad gate.

Three local failures were investigated rather than hidden:

Test Serial baseline evidence and remaining gap
Mattermost: reserves authenticated capacity and bounds each pre-authentication pool at eight Both touched Mattermost owners at their baseline fail identically before handler admission (zero callbacks, expected eight). A direct socket probe returns EADDRNOTAVAIL for 127.0.0.2 on this Mac. The other 33 selected Mattermost cases pass; hosted Linux proof is still required.
Sandbox: uses the SSH backend remote workspace for sandbox workspace info The unchanged baseline owner fails identically: the test expects the default .openclaw/sandbox/skills-workspaces substring, while the isolated proof explicitly sets a custom state directory.
Sandbox: materializes skills for shared writable sandboxes even when roots match Same exact baseline failure under the same custom isolated state layout. The reviewed postimage was restored byte-for-byte; all other sandbox and voice cases in that shard passed. Hosted CI remains the normal-layout proof.

Publication guards passed: assertion safety, mock exports, session accessor boundaries, all 14 lint-suppression tests, four selected wrapper/eager-import closure tests, zero runtime cycles, zero static import cycles, and the line-cap ratchet.

@steipete
steipete marked this pull request as ready for review October 21, 2026 15:38
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: a41cd0309c7abb28f13edacb754052d0294515d2
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/sandbox/context.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

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

@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-21T16:05:14.010215Z a41cd03 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.

@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head landing evidence for a41cd03.

CI run 39627451463 completed successfully. Final paginated exact-head enumeration inspected 226 check runs: zero active checks and zero failures, timeouts, or action-required conclusions. The current openclaw/ci-gate is successful (job 119328173274), as is build-artifacts (119317220929). All six applicable Security High categories and the applicable Critical Quality checks passed. Independent scoped review through P2 is clean; the focused local proof and baseline-only macOS limitations remain documented in the PR body.

The eleven cancelled checks are superseded context/auto-response invocations, not missing test proof: PR context and evidence 119316152690 is replaced by successful 119316315213; the ten cancelled auto-response invocations are replaced by successful 119316820419. The exact-head watcher reports GREEN, pending 0, superseded 97 (including earlier skipped plan placeholders). No CI job was rerun and no push was made to chase green.

Two native review-init provisioning attempts, using the current tooling checkout, independently failed before creating a review worktree or accepting a merge intent:

Client credentials require backed-up migration custody; stop the app and run openclaw doctor --fix.
[pr-worktree-provision] FAILED (exit 1)

Both released their operation lock and joined their child processes. No credentials, operator state, schema, locks, or app lifecycle were repaired or bypassed. Under the campaign's explicit two-infrastructure-failure fallback, submitting the squash directly with the exact-head SHA guard. This bypasses the unavailable native provisioning tool, not CI, security, or review checks. Current head and mergeability were revalidated; the PR is MERGEABLE with no auto-merge request or previously accepted merge intent.

Production reduction: 500 net lines; no test changes. Phase E standalone memory remains untouched.

@steipete
steipete merged commit 78c6294 into main Oct 21, 2026
218 of 229 checks passed
@steipete
steipete deleted the deslop/z25-80-private-request-receipt-phases-20261015 branch October 21, 2026 16:04
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
)

* refactor(agents): localize image and write receipt preparation

* refactor(plugins): localize catalog and WhatsApp preparation

* refactor(agents): localize CLI compaction preparation

* refactor(channels): localize transcript and reset preparation

* refactor(mattermost): localize request authorization phases

* refactor(plugins): localize browser and secret-source preparation

* refactor(cli): localize install and diagnostic preparation

* refactor(cli): keep model and migration request phases local

* refactor(plugins): localize SMS and authorization request phases

* refactor: keep recovery and receipt phases with their owners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant