Repository navigation
feat: send participant exec approvals to the session creator - #204858
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 changesBinds participant exec approvals to the session creator and scopes resolution, delivery, and reconnect replay to that binding. Example: A run reconnects while approval a is pending.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored stage supplies the approval boundary needed by the Participate stack, with no blocking code defect found in the pinned diff; CI remains pending. Reviewed head: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway receives exec approval requests from admitted agent runs, derives participant authority from host-owned run state, and sends approval cards or waiting status to authorized clients through the existing approval manager and session replay store. flowchart TD
A[Admitted agent run] --> B[Exec approval handler]
B --> C[Host participant binding]
C --> D[Existing approval manager]
D --> E[Creator review clients]
D --> F[Participant waiting status]
D --> G[Session scoped replay]
Technical reviewBest possible solution: Keep this staged boundary in the existing approval manager and replay owners, then activate participant admission through the dependent stack. Do we have a high-confidence way to reproduce the issue? This is a staged feature whose participant admission is not yet available on main; source inspection establishes the missing approval binding, and no target code or tests were executed during this read-only review. Is this the best way to solve the issue? The change uses existing approval ownership, adds a host-only binding shared by resolution and delivery, and preserves session-indexed replay without introducing a competing execution authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9b5cd15f26f1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +607, Tests +735, Docs +7, Other +18. Total +1367 across 37 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel 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 HistoryReview history (6 earlier review cycles)
Reviewed November 25, 2026, 1:57 AM ET / 06:57 UTC (Revision 7). |
47e15a6 to
e4b4032
Compare
84bdf51 to
795ef79
Compare
e4b4032 to
999e2fc
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
d113555 to
d8436d3
Compare
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
d8436d3 to
2814a32
Compare
…ticipant allowlist denials
2814a32 to
390a1f4
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…w#204858) * feat: send participant exec approvals to the session creator * chore: name the test-line allocation after its pull request * test: enforce retained participant allowlist misses on the gateway exec host * fix: scope participant approval replay to its session and explain participant allowlist denials * test: avoid a shadowed replay selection name * fix: apply the creator-only check to approvals resolved by transport reference * chore: describe the transport-reference case in the test-line record * chore: regenerate the worker access inventory on current main
Related: #202552
Part 3 of 6 of the split of #202552 (Participate: let invited people take part in your session).
Stack: #204783 (part 1, merged) → #204847 (part 2, merged) → this PR (part 3) → #204899 (part 4) → #204914 (part 5). Now based on
main, since #204847 has merged.What Problem This Solves
When an invited person takes part in someone else's session, their agent run can ask to execute a command that needs approval. Today an exec approval goes to the configured approvers for the device that asked, which for a participant run can be the participant themselves. A participant must not be able to approve their own command inside someone else's session.
User Impact
No change for anyone yet: nothing can create a participant run until part 4 lands. Once it does, a participant's exec approval goes to the session's creator (or an admin), the participant's session is told it is waiting, and only the creator or an admin can approve or deny it.
Visible to everyone, including people who never opt in:
waiting-approvalandapproval-resolvedlifecycle entries for every run, so a client that reconnects mid-run still sees that the run is waiting for approval.session-approval-recipients-v1capability to every client. Older clients ignore it.Why This Change Was Made
This is a restriction that has to exist before anyone can be admitted. Each piece only acts when the run carries a participation ceiling, which only part 2's admitted-run authority produces and only part 4's admission can grant:
exec-approval-participation.tsbinds a participant run's approval to the session creator, and authorizesexec.approval.resolve/approval.resolve/exec.approval.request/exec.approval.waitDecisionfor that binding.main, and approvals in other sessions don't affect a session's replay. A participant approval is delivered only to the creator's connected approval clients, never to forwarders, mobile or Web Push, channel approval subscribers or the turn-source route, because none of those can resolve it. This matches how cron approvals are already limited to approval clients.approval.resolvenames the approval by its compact transport reference: the check runs again against the canonical approval the store returns, so a participant can't resolve their own request through the reference. Method admission still matches exact IDs only, so a creator withoutoperator.approvalsmust use the canonical ID (what the Control UI sends). Transport references come from channel and device surfaces, which can never resolve a participant approval.participationDenyMisses), and this part makesbash-tools.exec-host-gateway.tsrefuse an allowlist miss withparticipant-allowlist-missinstead of reopening it through a hoston-miss/alwaysapproval. The refusal tells the agent and user that no approval can be requested for that command, and to use an allowed command or ask the session creator to run it. The test for it (core-coding-tools.exec-workdir) moves here from part 2.session-approval-recipients-v1capability constant is defined here, next to the hello that advertises it.GatewayBroadcastOptsgains the host-onlyparticipationApprovalRecipientfilter, andmethod-authorization.tsgains the participation-approval check. Both files otherwise belong to part 4; these are the only hunks this part needs from them.Data-model compatibility: this PR changes no stored format. The participant binding (
ExecApprovalRecord.participation) is process-local and never written to the operator-approval store (the participation suite asserts the stored row has noparticipationfield). The store and pending-view changes only add an in-memory read filter. The schema v44 member-access migration and its upgrade evidence from the published[email protected]belong to #204783 and are unchanged here.Still inert until later parts: participant runs exist only from part 4 (admission), and the Control UI approval notices for participants and creator review controls arrive in part 6.
Evidence
Checked on this branch on current
main(parts 1 and 2 merged):protocol:check(including the Swift and Kotlin contracts), the worker-access inventory and the Vitest inventory ownership tests pass.exec-approval.participation(creator or admin only, ordinary approvals unchanged, direct and child bindings, merged identities),operator-approval-participation-replay,operator-approval-session-events,approval.channel-custody,server-chat-progress-snapshot,exec-auto-reviewerandcore-coding-tools.exec-workdir(retained allowlist misses are not reopened through hoston-miss/always).server.participation-approval-delivery) lands with part 4, because only part 4 can admit a participant.Live proof: this is maintainer-authored work, so ClawSweeper's real-Gateway/model proof gate doesn't apply. The evidence is the focused suites above, which run the real Gateway request handlers, approval managers and stores in-process.
Test-line budget: this part adds 734 net test lines;
config/test-lines-allocations/204858-participate-creator-approvals.txtrecords the 334 lines above the 400-line allowance and explains why.🦞 Made with OpenClaw