Skip to content

perf(agents): carry prepared exec policy into delegate tool construction - #165012

Merged
steipete merged 7 commits into
mainfrom
dbasync/delegateexec
Oct 4, 2026
Merged

steipete merged 7 commits into
mainfrom
dbasync/delegateexec

Conversation

@steipete

@steipete steipete commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Delegate tool construction still resolves exec approvals synchronously on the Gateway thread. This performs five approval-related SQL statements per warmed turn, even though the existing owner already has an asynchronous reader.

Why This Change Was Made

Prepare fresh, source-bound exec defaults immediately before each construction and permission-mode refresh, then carry those facts into delegate construction. Reuse the preparation and read-only worker owners from #164648; preserve live host/grant checks after awaited work and before dispatch, and fail closed when the approval read fails.

Add createOpenClawCodingToolsAsync and hostCapabilities.createToolSurfaceAsync, and migrate every bundled runtime caller: embedded turns and refreshes, compaction, Gateway/MCP/HTTP, inventory, placement, skill/cron dispatch, system-prompt inspection, and the Codex, Copilot, and AgentsAPI harnesses. The released synchronous factories retain their signatures and completion timing, with @deprecated guidance, a compatibility record, migration docs, and a signature test. Doctor retains its synchronous one-shot contract (src/flows/doctor-tool-schema-projection.ts:132).

User Impact

No intended user-visible policy change. Each construction still observes a fresh approvals read; there is no run-wide snapshot. Physical store identity is captured before yielding, and prepared facts do not grant execution authority. MCP cancellation remains scoped to construction, while cached tools keep their live invocation checks. Worker execution rechecks its receipt after preparation.

No new service, cache, schema, retention, durability, transport, or database-admission implementation. No new OPENCLAW_* names. Update behavior and existing close/settlement ownership are unchanged, so a published-driver update cell is not required for this lane.

The async SDK addition is explicitly approved; the sync paths remain until the next Plugin SDK major and explicit breaking-release approval. Indirect SDK reachability was checked against v2026.9.8: the released factories remain intact; the changed worker tool callback fields were absent from that release.

Original reviewed candidate production diff: +522 / −211 / net +311 (733 changed lines) in src/ and extensions/, excluding tests/support. The factory shares one assembler between the async runtime and deprecated sync entrypoints.

Evidence

Local sqlmeasure3 workload on Node 24.21.0, pinned baseline 82adb7a49d36 versus the measured implementation in d476ce11c4cd. Both runs completed 13 top-level turns, successful delegated child and cron work, committed compaction, and graceful Gateway exit [0, null].

MAIN-thread successful SQL statements Before After
Selected delegate approval cohort, per warmed turn 5.0 0.0
All delegate-construction SQL, per warmed turn 8.0 0.0
Selected approval cohort, whole workload 78 0
All delegate-construction SQL, whole workload 127 0
Warmed-turn mean, all callers 223.2 221.0
Warmed-turn median, all callers 223 215
Overall MAIN-thread statements 7,913 7,770
Static T1 inventory 895 895

Warmed MAIN counts: before [223,223,227,221,223,223,223,223,223,223]; after [215,212,215,222,243,248,210,215,215,215]. The after run has 58 more non-delegate statements in its warmed windows (including admission, ownership, and recovery work), so the raw mean is reported alongside the exact caller-attributed cohort. Counts exclude prepare and failed executions; multi-statement exec calls are split. The static inventory stays unchanged because the synchronous SDK/Doctor contracts retain the shared kernels.

Removed warmed caller stacks: openclaw-delegate-tool.ts → shared-state admission (3.0/turn), ownership (1.0), and exec-defaults.ts approvals (1.0), plus agent read-version/session-entry/session-participant classification (3.0). All six underlying site groups have zero MAIN statements attributed to delegate construction afterward. Build wall time: 134.1 → 285.8 s; workload wall time: 102.2 → 180.4 s on the loaded shared host. The later lint correction restores a synchronous MCP inventory projection return; the workload does not call tools.effective, and none of its measured construction paths changed afterward.

SDK diff: local committed refs 82adb7a49d36 → d476ce11c4cd, physical private TMPDIR, 588.99 s. 0 entrypoints added/removed, 1 export added, 0 removed; 161 exports affected by reachability, 13 distinct changed declarations. Ack digest: 8102b1bb. Subsequent changes are test routing/fixtures, the exact approved SDK surface budget, and removal of a redundant await from the synchronous MCP inventory projection; public declarations are unchanged.

Focused tests used pnpm test <files> --maxWorkers=1: 56 files, 989 passing cases, one Linux-only SDK-report case skipped on macOS. These are cumulative results across scoped batches, including the exact successful replays described below. No requested focused file remains unrun.

Focused coverage Local wall time
Delegate boundary, legacy semantics, host lifetime, SDK signatures: 57 tests 222.92 s
Broader callers/import gates, with later repaired fixture replays 1,106.62 s + 1,148.62 s + 978.33 s
Inventory policy: 11 tests 325.67 s runner wall time
Bundled harness group: 225 passes and the PDF timeout below 760.85 s
Harness projections/progress cards: 9 tests 281.95 s
Compat registry: 12 tests 12.21 s
Cron: 43 tests 394.38 s
MCP plus archive/personal/question authority: 81 tests 319.32 s runner wall time
Full Telegram loopback fixture 157.50 s
Copilot host surface/catalog lifetime: 3 tests 78.17 s

The three new delegate boundary test bodies total 2.722 s locally. CI seconds are not inferred from local wall time. Shared-registry/runtime/import-closure gates passed 4 files / 30 tests, including runtime-process-build-graph, openclaw-state.worker.imports, get-reply.imports, and all 17 eager-import-closure cases (that shard: 67.86 s). Madge: 0 cycles, 61.04 s. Database-worker ratchet passed against the pinned base. New environment names: 0.

Fixture repairs: broker-backed policy tests now use the existing forked owners; async mocks/callers await construction; MCP's legacy-session assertion accepts the new live-authority callback argument. Full inventory, MCP, cron, and loopback replays passed. The local full changed-file run reached core lint after passing types and export scans; its duplicate type import and unnecessary await were fixed and the exact files passed type-aware lint in 24.29 s. The final root-fixture scoped check passed in 1,117.60 s.

Two timing failures remain disclosed: the full-watch graph hit its existing 120-second subprocess deadline, then passed the same case unchanged in 43.51 s wall time; AgentsAPI PDF steering hit its existing five-second attempt budget, then passed the same case unchanged in 66.17 s. The PDF fixture disables tools. Neither replay is claimed as a code fix, and neither timeout was increased.

Final full node scripts/check-changed.mjs --base 82adb7a49d36e844e4ea1989bc5d865abac916f0 passed through scripts/crabbox-wrapper.mjs on Blacksmith Testbox: command 40m 26.148s, provider run 40m 33.734s, exit 0. The receiver and payload verified the exact candidate tree 1bc7f7ff50b55c6a890d8e4af5d0b317240b1872, all 98 changed-file hashes, and the physical checkout before checks. Final commit 8a3cf3e35d314d has that exact tree. Lease tbx_01m43srz3k4kv5ghe90nk4mrjc stopped automatically after success. Testbox workflow; its backing workflow can show cancellation from the completed lease cleanup, so the wrapper's exit-0 receipt is the gate result.

An earlier Testbox attempt stopped before validation because my probe compared HEAD with the local commit; this transport uses a verified carrier commit. The final probe checks the candidate tree and bytes, retaining the receiver's source guards.

P2 autoreview of the final staged candidate: scoped-clean, no accepted/actionable P0–P2 findings; base pinned to 82adb7a49d36e844e4ea1989bc5d865abac916f0, private TMPDIR, Codex. A preceding pass caught an index-only missing await in a cron fixture. The already typed working-tree correction was staged and the complete candidate was re-reviewed successfully. No additional production/security finding remained.

CI follow-up

Commit dd1b5668c7b176 repairs the eight stale test fixtures exposed by initial CI: six mocked synchronous factory exports and two old embedded-attempt argument assertions. Existing behavior assertions remain intact; seven obsolete mock-baseline entries were removed. The corrected files pass 127 cases in 386.62 s with node scripts/run-vitest.mjs <files> --maxWorkers=1; type-aware lint, formatting, the mock ratchet, and P2 autoreview passed.

The original attribution matrix completed 90 isolated runs on Node 24.21.0: each of nine files ran five times at original head 8a3cf3e35d314 and five times at base 82adb7a49d36. All eight stale-fixture files failed 5/5 on the PR and passed 5/5 on the base. The memory reindex fixture failed 5/5 on both. Main fixed that resource-close/readmission ordering in 83f4c296109bf (#164962); merge fd7686d391d0 incorporated it. Post-merge delegate/memory proof passed 27 cases in 353.19 s and MCP public-catalog readiness passed 7 cases in 263.02 s. CI on that head passed. Full-context P2 review was clean; the proposed stale-MCP-catalog finding was rejected because both public return paths revalidate and retry after construction.

ClawSweeper identified one P3 documentation issue, corrected in 8b003dcec9ba: ordinary exec-approval read errors use conservative deny defaults; migration-required errors and lost admitted authority reject construction. Formatting and P3 review passed. Trusted reviews subsequently completed 8b003dcec9ba and 06a63457328daf with no actionable correctness or security findings. Released v2026.9.8 signatures, the compatibility record/type test, and unchanged storage/update contracts address the generic compatibility checklist.

CI on 8b003dcec9ba finished all 107 jobs with two independently attributed main failures, their downstream aggregate gate, and no cancellations. The transcript-presence fixture intercepted host SQLite after main 0816aa1b57dc (#164989) moved that query to a worker. Its presence result stayed correct; only the obsolete host-spy classification assertion failed. Fifteen causal files were byte-identical between that CI main baseline and tested merge. Five isolated local macOS runs at each revision gave PR 5/5 pass, merge base 5/5 pass, main 5/5 the same failure.

The initial-setup UI case likewise failed on main run 37208571327 at 2851e89750f5, with Session setup-proof-session placement authority changed preceding its expected-two/observed-one launch assertion. Ten isolated Linux browser controls at old PR 8b003dcec9ba and base bca3c49262e58 gave PR 5/5 pass; base 2/5 identical failures and 3/5 pass. Controls used Node 24.21.0 versus CI's 24.19.0. The exact invalidating publication was not identified, and passing repetitions were not claimed as a fix. Main then repaired queued setup runtime reads in 7ecc80a4573660; the current branch includes that fix.

Main advances created real conflicts. Merge 06a63457328daf combined main's auth-profile reader preparation with awaited tool construction: cron uses the internal async factory, and both public factories exclude the private auth-source hint. 220 cases across 12 focused files passed in 988.86 s, along with production types, SDK test types, lint, formatting, both ratchets, and full P2 autoreview. Merge 5d28f9a120f9d159e44da861f534659ec17113ad incorporates main 3071b147cce7, including the UI fix, and retains both worker-flow documentation additions. The code/test patch against main has the same stable patch ID as 06a6345. Additional current-context proof passed: 3 delegate cases in 283.90 s, production types 44.32 s, SDK test types 135.60 s, docs formatting, and fresh full P2 review. Both integrations are merge commits; no rebase or CI rerun was used.

The completed local SDK report for bca3c49262e58 → fd7686d391d0 took 1337.18 s and showed one added export, zero removals, zero entrypoint changes, with 161 reachable affected exports (digest bfd1e383d6e5c72962a3a3f3ec69d8bb9235327e55e1e074fbcb8ecd01f92433). The refreshed local SDK comparison 3071b147cce7 → 5d28f9a120f9 completed exit 0 in 1095.79 s, including native cleanup: one added export, zero removals, zero entrypoint changes, and 161 reachable affected exports. Final report digest: 69e474b2019107034bb87fcb59a553333acc455defe83d9c6386968ace3a347c; acknowledgment 69e474b2. The released synchronous signatures remain supported, and both public factories exclude the private auth-source hint.

Final-head CI, attempt 1, completed 83 successful jobs, 22 skipped jobs, and the one inherited presence-fixture failure plus its downstream gate; zero cancellations. Both real-Gateway UI shards and security-fast passed. The tested merge is 8aa3d2fe49e64d47ba5e2be51c65d79750eb0116, with ordered parents main a0c1b065b5b2 and reviewed head 5d28f9a120f9. Refreshed source comparisons confirm all 15 primary causal files and 13 supporting files match the independently reproduced main implementation; broader main changes were inspected rather than assumed identical. The original controls retain their original refs. The owner has explicitly authorized the native admin route for this independently proven pre-existing failure; the failed fixture is not represented as fixed or green.

Trusted ClawSweeper completed the final head at 2026-10-04 19:45:16 UTC, with no actionable correctness or security finding. Its remaining integrated-SDK checkpoint is now fulfilled by the report above. Configuration and storage contracts remain unchanged, with the additive SDK compatibility boundary documented and type-checked. Reported local wall times are not CI seconds.

Overlaps and follow-up

Related: #138596 (delegated approval-authority repair, same function); this change carries policy preparation and preserves the existing authority semantics. Related: #162433 (ownership design draft); this change keeps focused caller/constructor hunks and does not restructure its design. The current base also overlaps shared docs/test lists/wrapper inventory changed by #164891, #164906, #164846, and #164682. This lane reconciles shared-file conflicts through merge commits. Later overlap with #164992, #165034, and #164922 was integrated the same way.

Unrelated synchronous eligibility reads remain follow-up debt: src/gateway/tool-resolution.ts:247, src/gateway/tool-resolution.ts:479, and src/auto-reply/reply/commands-system-prompt.ts:200. No new host SQL is added inside worker grants. The boundary regression asserts zero caller-thread SQL for the moved delegate preparation, including fresh policy changes, captured-store retention, read failure, and revoked construction authority.

Prepare delegate exec policy through the existing async readers for each construction and permission refresh. Carry the captured source and recheck live authority before publishing tools; unavailable approval policy remains fail-closed.

Migrate bundled harness, Gateway, inventory, skill, cron, compaction, and placement callers. Add awaited SDK factories while retaining deprecated synchronous signatures through the next Plugin SDK major. Schemas, stored bytes, retention, and update behavior are unchanged.
@clawsweeper

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

@github-actions

github-actions Bot commented Oct 4, 2026 •

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

These security sensitive changes were made:

  • src/gateway/tool-resolution-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: codex extensions: copilot extensions: agentsapi size: XL labels Oct 4, 2026
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 4, 2026, 4:10 PM ET / 20:10 UTC (Revision 8).

ClawSweeper review

What this changes

The PR moves delegate approval-policy reads into existing database workers, migrates bundled tool construction to awaited factories, and preserves released synchronous plugin SDK factories.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open with no actionable findings. The integrated-head SDK report resolves the previous checkpoint, and current main still lacks this optimization.

Priority: P2
Reviewed head: 5d28f9a120f9d159e44da861f534659ec17113ad

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent performance refactor with strong production-path measurements, retained SDK compatibility, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The recorded Gateway workload exercises delegate construction through real database workers and reports zero caller-thread construction SQL with successful turns, child work, cron, compaction, and shutdown. Final integrations retain focused qualification; no stored-data contract changes require migration proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The recorded Gateway workload exercises delegate construction through real database workers and reports zero caller-thread construction SQL with successful turns, child work, cron, compaction, and shutdown. Final integrations retain focused qualification; no stored-data contract changes require migration proof.
Evidence reviewed 12 items Pinned introduction and clean checkout: Reviewed the introduced delta from the pinned merge base to the exact original PR head. The checkout remains clean. The supplied test merge is stale relative to the pinned base, so it was not used to infer removal of current-main behavior.
Still necessary on current main: Fetched main still calls resolveExecDefaults synchronously during delegate construction. The merged prerequisite #164648 explicitly excluded this construction path.
Shared construction and preparation owners: Both factory variants use one assembler. The async variant uses existing construction preparation and delegate-policy readers, then checks current authority before resuming assembly.
Findings None None.
Security None None.

How this fits together

Agent tool construction combines session permissions, execution policy, and available capabilities into the tools an agent can call. Delegate tools use those prepared policies while existing runtime owners enforce live execution authority.

flowchart TD
  A[Session and execution settings] --> B[Tool construction]
  B --> C[Existing database readers]
  C --> D[Fresh approval policy]
  D --> E[Live authority check]
  E --> F[Bound agent tools]
  F --> G[Authorized tool dispatch]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus test growth production +518/−204; tests and support +762/−470 Production growth implements shared async assembly and caller migration; tests protect freshness, revocation, and retained SDK contracts.
SDK qualification 1 export added; 0 removed; 0 entrypoint changes The integrated-head comparison closes the prior compatibility checkpoint while preserving released synchronous factories.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/plugins/compat/agent-harness-records.ts, migration/backfill/repair: src/plugins/compat/registry-records.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Use awaited construction for bundled runtimes while retaining released synchronous factories through their documented SDK migration window.

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

Yes: current-main source still resolves delegate policy synchronously, and the captured Gateway workload measures those reads before and after. This read-only review did not execute the workload or tests.

Is this the best way to solve the issue?

Yes: the patch reuses existing worker readers and one shared assembler, while retaining the released synchronous SDK contracts.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded runtime performance improvement with measured caller-thread SQL removal and no intended policy change.
  • merge-risk: 🚨 compatibility: The additive plugin SDK change is compatibility-sensitive, with its approved synchronous retention window documented and qualified.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The recorded Gateway workload exercises delegate construction through real database workers and reports zero caller-thread construction SQL with successful turns, child work, cron, compaction, and shutdown. Final integrations retain focused qualification; no stored-data contract changes require migration proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded Gateway workload exercises delegate construction through real database workers and reports zero caller-thread construction SQL with successful turns, child work, cron, compaction, and shutdown. Final integrations retain focused qualification; no stored-data contract changes require migration proof.

Evidence

What I checked:

  • Pinned introduction and clean checkout: Reviewed the introduced delta from the pinned merge base to the exact original PR head. The checkout remains clean. The supplied test merge is stale relative to the pinned base, so it was not used to infer removal of current-main behavior. (5d28f9a120f9)
  • Still necessary on current main: Fetched main still calls resolveExecDefaults synchronously during delegate construction. The merged prerequisite perf(exec): prepare exec defaults and approvals through the async readers #164648 explicitly excluded this construction path. (src/agents/tools/openclaw-delegate-tool.ts:64, a2697c13548d)
  • Shared construction and preparation owners: Both factory variants use one assembler. The async variant uses existing construction preparation and delegate-policy readers, then checks current authority before resuming assembly. (src/agents/agent-tools.ts:631, 5d28f9a120f9)
  • Freshness and revocation coverage: The delegate boundary tests cover fresh policy changes, captured physical-store routing, conservative approval-read failure, and authority ending during preparation. Host and worker tests additionally reject tool publication after source authority closes. (src/agents/tools/openclaw-delegate-tool.exec-preparation.test.ts:50, 5d28f9a120f9)
  • Invocation authority remains live: Gateway construction separates preparation cancellation from cached-tool invocation lifetime and retains live grant, invocation, and admitted-run assertions. MCP return paths revalidate catalog facts and retry when construction observes stale session facts. (src/gateway/tool-resolution-authority.ts:18, 5d28f9a120f9)
  • Previous SDK checkpoint completed: The complete body matches captured SHA-256 e6fae85cdfae4774a32536662151c982b31d9c8645ca20772d44124c5105ec0f. Its previously omitted tail records the exact base-to-head SDK comparison: exit 0, 1095.79 seconds, one added export, zero removals, zero entrypoint changes, and digest 69e474b2019107034bb87fcb59a553333acc455defe83d9c6386968ace3a347c. This fulfills the prior review's specific rank-up move. (5d28f9a120f9)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-10-04T16:46:20.331Z sha 8a3cf3e :: blocked before merge. :: none
  • reviewed 2026-10-04T16:53:14.871Z sha 8a3cf3e :: blocked before merge. :: [P2] [P2] Migrate the remaining mocks to the awaited factories | [P2] [P2] Update the embedded factory argument assertions | [P3] [P3] Describe approval-read failures as fail-closed policy
  • reviewed 2026-10-04T17:50:04.669Z sha dd1b566 :: blocked before merge. :: [P3] [P3] Describe approval-read failures as fail-closed policy
  • reviewed 2026-10-04T18:19:12.407Z sha fd7686d :: blocked before merge. :: [P3] [P3] Describe approval-read failures as restricted policy
  • reviewed 2026-10-04T18:44:09.626Z sha 8b003dc :: blocked before merge. :: none
  • reviewed 2026-10-04T19:25:07.224Z sha 06a6345 :: blocked before merge. :: none
  • reviewed 2026-10-04T19:45:16.527Z sha 5d28f9a :: blocked before merge. :: none

Fix stale factory mocks and two existing call assertions exposed by CI. Keep the behavior assertions and prune only obsolete mock-baseline entries. Validation: 127 focused cases passed; targeted lint, formatting, mock ratchet, and P2 review are clean.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 4, 2026
Incorporate main bca3c49, including memory lifecycle repair 83f4c29. The merge is conflict-free. Validate 27 delegate and memory cases, seven MCP publication cases, and the complete PR delta with P2 review. Preserve the existing async construction behavior and released synchronous SDK contracts.
Document conservative deny defaults for ordinary approval-read errors while retaining rejection for migration errors and lost authority. Match the existing reader and delegate regression, addressing the ClawSweeper documentation finding.
Merge main at 90c4d9a without rebasing.
Preserve its asynchronous auth-profile source preparation while keeping the
awaited delegate construction paths and live authority checks. Route cron
through the internal async factory and exclude the private auth source hint
from both public SDK factory signatures.
Merge main at 3071b14 without rebasing.
Keep both catalog and delegate worker-flow descriptions, and place delegate
preparation beside the related skill-library flow. The code and test patch
against main is unchanged from the previously reviewed candidate.

This also incorporates the main fix for queued setup inputs in 7ecc80a.
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete
steipete merged commit ddcae51 into main Oct 4, 2026
178 of 181 checks passed
@steipete
steipete deleted the dbasync/delegateexec branch October 4, 2026 20:20
@steipete

steipete commented Oct 4, 2026

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 5, 2026
…ion (openclaw#165012)

* perf(agents): carry prepared exec policy into delegate construction

Prepare delegate exec policy through the existing async readers for each construction and permission refresh. Carry the captured source and recheck live authority before publishing tools; unavailable approval policy remains fail-closed.

Migrate bundled harness, Gateway, inventory, skill, cron, compaction, and placement callers. Add awaited SDK factories while retaining deprecated synchronous signatures through the next Plugin SDK major. Schemas, stored bytes, retention, and update behavior are unchanged.

* test(agents): validate async tool construction callers

* test(agents): finish async tool factory fixture migration

Fix stale factory mocks and two existing call assertions exposed by CI. Keep the behavior assertions and prune only obsolete mock-baseline entries. Validation: 127 focused cases passed; targeted lint, formatting, mock ratchet, and P2 review are clean.

* docs(sdk): clarify failed exec approval reads

Document conservative deny defaults for ordinary approval-read errors while retaining rejection for migration errors and lost authority. Match the existing reader and delegate regression, addressing the ClawSweeper documentation finding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: agentsapi extensions: codex extensions: copilot gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed 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