Skip to content

refactor: keep internal preparation with its single consumer - #180155

Merged
steipete merged 12 commits into
mainfrom
deslop/z25-88-internal-surface-next-20261015
Oct 22, 2026
Merged

steipete merged 12 commits into
mainfrom
deslop/z25-88-internal-surface-next-20261015

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Internal preparation paths carry single-use function signatures, argument/result objects, and module aliases that separate work from its only consumer.

User Impact

No intended user-visible change. CLI commands, provider payloads, channel actions, authorization, storage ordering, and public SDK contracts remain intact.

Why This Change Was Made

Keep private preparation with the operation or existing callback that consumes it. This folds the sole-consumer tagline and Firecrawl configuration leaves, localizes command/request/catalog preparation, removes private channel callback aliases, and eliminates redundant private parameter/result frames in admission, credentials, workspace preparation, pairing, and model reconciliation. Shared algorithms and lazy import boundaries remain named and separate.

Net production reduction: 514 lines across 25 production paths (+1,973 / -2,487), excluding tests, fixtures, support, generated files, and declarations. Tests: +26 net lines across four paths, principally migrating existing coverage to retained production entry points. Relocated bodies are not counted as removed code.

Best-effort tradeoffs accepted

No new failure scenario is accepted and no security, durability, lifecycle, input-validation, or public-contract guard is removed. Private helper identities and extra promise/DTO layers are not retained as contracts. NVIDIA defaults are applied only to fresh, privately owned model rows before publication; cache-owned results are not mutated.

Evidence

  • Independent P0–P2 reviews of each packet found no accepted/actionable findings. The final six-path review was scoped-clean with all source verification complete.
  • Focused owner and sibling tests passed for committed packets, including Slack (100 cases / 8 files), NVIDIA/sandbox/ingress (65 / 9), Firecrawl (72 / 4), and PR-workspace preparation (28 / 3). Targeted native types and format passed for every packet.
  • Final six-path packet: 322 cases / 21 unchanged files passed in 575 seconds across nine serial shards; completed worker generation verified and line caps passed. No extra tests or fixture setup were introduced.
  • Stable tool prefix (5 cases), selected wrapper/eager-import closure (4 cases), assertion safety, line caps, runtime cycles (0), and static cycles (0) passed.
  • Current rebased suppression audit: all 14 cases pass. Before integration, the older audit failed on unlisted suppressions in untouched scripts/perf/diagnostic-profile-measure.ts and scripts/perf/session-pr-subscriptions-measure.ts (101 actual entries / 99 expected); exact clean base 644fe4c9db3eaa844939dc1356e74a5288ae33ff reproduced that identical failure serially. That historical failure is not presented as green evidence.

Local typed-lint gaps are recorded, not called green: imported SDK types produce no-redundant-type-constituents diagnostics in NVIDIA, OpenRouter, and two unchanged Mattermost declarations. Serial clean-donor comparisons reproduce these exact diagnostics with identical preimage files and lint wrapper/config; one additional old Mattermost diagnostic disappears with its private helper signature. No casts, suppressions, baseline exceptions, retries, skips, or timeout increases were added. Hosted CI on the exact PR head remains the broad gate. No paid-provider/live-channel, full build, broad local suite, or whole-graph typecheck claim is made.

Conflict-only integration: rebased onto d131ab9aaf86904ae4ba7d36a7d87dd4012cf235 after GitHub reported CONFLICTING. Main changed only PR workspace preparation among these paths. Its new conversation-owner check and supporting imports remain intact; the conflict removed only the now-unused private-frame type import. Eleven packet patches are identical; the twelfth differs only in import context. Earlier tests and reviews remain evidence for unchanged inputs, not current-head hosted CI.

Rebased proof: conflicted graph native types, owner lint, formatting, suppression audit, runtime cycles (0), static cycles (0), and line caps pass. The first default-Bun focused attempt was operator-stopped after 665 seconds without a completed-file verdict; ten progress dots flushed at termination, but no passing suite is claimed. Its runner and known children were joined before selecting the supported Node runtime for the same focused files. No timeout, retry, skip, assertion, or test fixture was changed.

The Node-focused replay was also operator-stopped after 623 seconds without a completed-file verdict (seven progress dots flushed at termination). Both attempts ran serially with one worker and isolated state; their managed runners were joined before releasing the source. These incomplete local attempts are explicit proof gaps, not passing tests, assertion failures, or inherited-failure claims. Exact-head hosted CI remains the broad landing gate.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: mattermost Channel integration: mattermost channel: slack Channel integration: slack gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: nvidia extensions: firecrawl extensions: openrouter size: XL labels Oct 22, 2026
@steipete
steipete force-pushed the deslop/z25-88-internal-surface-next-20261015 branch from 081fe0d to 60d350b Compare October 22, 2026 02:19
@steipete
steipete marked this pull request as ready for review October 22, 2026 02:19
@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-22T02:51:53.390561Z 60d350b 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.

@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: 60d350bef92be136f79934a3a7149947fc31d7fd
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/sandbox/workspace-authority.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/infra/client-credential-migration-data.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/pairing/pairing-challenge.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@steipete
steipete merged commit 484419f into main Oct 22, 2026
227 of 230 checks passed
@steipete
steipete deleted the deslop/z25-88-internal-surface-next-20261015 branch October 22, 2026 02:46
@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 22, 2026
…w#180155)

* refactor(cli): keep single-use preparation with its commands

* refactor: localize request and token preparation frames

* refactor(cli): fold sole-consumer banner and path frames

* refactor(config): keep MCP commit preparation with its mutation

* refactor(sqlite): localize worker admission and failure preparation

* refactor(sqlite): keep slow-hold diagnostics with settlement

* refactor(infra): keep credential row ordering with its reader

* refactor(firecrawl): localize sole-consumer configuration frames

* refactor(gateway): localize PR workspace preparation frames

* refactor(slack): keep single-use send phases in their callers

* refactor: localize private policy and catalog preparation frames

* refactor: keep single-use adapter and completion frames with their callers
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: mattermost Channel integration: mattermost channel: slack Channel integration: slack cli CLI command changes commands Command implementations extensions: firecrawl extensions: nvidia extensions: openrouter gateway Gateway runtime security-sensitive-changed size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant