Repository navigation
feat(plugins): expose requester-bound native delegation - #175276
fuller-stack-dev merged 13 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesAdds optional requester-bound native child spawning and result collection to the plugin runtime SDK. Example: A reply-dispatch plugin delegates task "Review the implementation" with requestId "review-implementation".
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fills a supported SDK gap, and the prior sandbox finding is repaired with no new actionable defect found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway reply dispatch supplies the requester context to a plugin-scoped facade, which invokes finalized native tools and returns accepted child IDs or collector results. flowchart TD
A[Gateway reply dispatch] --> B[Requester capability scope]
B --> C[Plugin native facade]
C --> D[Finalized tool admission]
D --> E[Native spawn and replay owner]
D --> F[Native collector owner]
E --> F
F --> G[Plugin result]
Technical reviewBest possible solution: Retain the narrow requester-bound facade over existing native owners and complete the draft's normal landing qualification. Do we have a high-confidence way to reproduce the issue? Source confirms the missing supported SDK capability; the prior sandbox defect has supplied before/after regression evidence, but no target code was executed during this review. Is this the best way to solve the issue? The facade fits the existing runtime namespace and preserves native admission, replay and collector ownership instead of introducing a competing scheduler. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 333a06849b0c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +746, Tests +1648, Docs +31. Total +2425 across 24 files. Added test files: 7. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 17, 2026, 4:18 AM ET / 08:18 UTC (Revision 3). |
Apply Peter Steinberger's upstream call-site correction from c711c07 to unblock typechecks and declaration generation.
|
@clawsweeper re-review Updated in fc6e602: the native capability now honors both configured and persisted required-sandbox policy for spawn and collection. Four production-boundary regressions fail with the previous adapter and pass with the fix; the complete affected production suite passes 61 cases. The PR description has the current compiler/build evidence, reused test counts, and remaining CI/baseline limitations. |
|
🦞👀 Re-review progress:
|
Baseline-Refresh: f935c5e9ba42168fbc5e681244339b4f16f1969a
Baseline-Refresh: 027aca937846cdfa3518c69f0692cdf7293f5991
Baseline-Refresh: a025a3be28ed53a5edb960277230c590852cd173
) * feat(plugins): expose requester-bound native delegation * fix(snapshot): match bigint stat helper signature Apply Peter Steinberger's upstream call-site correction from 108185f to unblock typechecks and declaration generation. * fix(plugins): enforce sandbox policy for native delegation * fix(decisions): finalize accepted usage across callers * fix(agents): bind native collector ownership to tool identity * test: remove native spawn fixture import cycle * fix(plugins): keep native hook admission host-owned * fix(plugins): reject shared backing before hook cloning
Related: #175275
What Problem This Solves
Plugins handling normal reply dispatch need a supported way to delegate to native children and collect results without replacing the requester's execution or permission context.
User Impact
Eligible plugins can use optional
api.runtime.subagent.native.spawnandcollectwhile retaining the requester's identity, parent incarnation, model policy, finalized tool admission, and sandbox restrictions. Existing background helpers and ordinary noncollector spawning are unchanged. This capability is limited to normal Gatewayreply_dispatch; detached callbacks, timers, direct ACP dispatch, and unsupported runtimes do not gain it.Why This Change Was Made
The facade reuses native spawning, collector ownership, and replay handling instead of adding a scheduler or privileged plugin identity. Identical in-flight requests join; mismatches fail. Tool hooks still run, with reserved native collector/replay parameters checked before effects. Host-only collector context is bound to its exact invocation so nested ordinary waits retain their own requester.
The sandbox follow-up passes the existing prepared sandbox policy into capability admission. Both configured sandbox restrictions and persisted required-sandbox restrictions now apply to native spawn and collection. Denied operations cannot use the facade to bypass the existing tool policy; allowed sandbox operations and unsandboxed controls still work.
The qualification follow-up also includes Peter Steinberger's upstream snapshot call-site fix from c711c07: remove an unsupported argument to the BigInt-stat helper, clearing the compiler/declaration blocker without changing runtime behavior.
Evidence
Draft: required non-draft CI and integrated-current-base validation remain unproved. This is not merge-ready.
pnpm build, including declarations and UI build. The actual plugin-SDK compiler graph includes the SDK contract test. No additional root/extension-specific compiler graphs are claimed; the separate type-only Vitest execution is not counted as behavioral or compiler proof.Current qualification commands and limitations
Runtime checks used isolated state, configuration, and temporary directories; the resolved update-handoff database was verified private before execution. No live deployment or runtime configuration was changed. Historical failed and cancelled attempts are not counted as passes. No integrated-current-base CI or native landing admission is claimed.