Skip to content

revert: system-started turn principal authority (#187105) - #187126

Merged
steipete merged 1 commit into
mainfrom
revert/system-turn-authority-187105
Oct 29, 2026
Merged

steipete merged 1 commit into
mainfrom
revert/system-turn-authority-187105

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

#187105 merged while exact-head CI had six failed jobs. My merge step did not gate on the failed-check list. At least one failure is a privilege-boundary regression: a guest-started background exec completion now continues with the session principal's authority instead of the original guest caller, and loses the guest's AutoReview policy (src/agents/bash-tools.exec-background-followup.test.ts: "background completion keeps AutoReview", expected undefined to be 'original-guest'). Other failures include src/auto-reply/reply/reply-run-registry.preparation.test.ts (refusal text) and src/gateway/server.chat-goal.test.ts (goal continuation admission).

Changes

A pure git revert of d821a7f. Main returns to the pre-#187105 behavior: system-started turns have no person authority, and person-scoped tools refuse with "User is not a participant of this turn". The fix will be redone so that system turns started by a guest's own work keep that guest's authority and policy.

Evidence

On this revert head, locally: reply-run-registry.preparation.test.ts, server.chat-goal.test.ts, bash-tools.exec-background-followup.test.ts and session-event-config-readmission.test.ts all pass (99 tests, 2 shards).

@clawsweeper

clawsweeper Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete merged commit 5be92b4 into main Oct 29, 2026
16 checks passed
@steipete
steipete deleted the revert/system-turn-authority-187105 branch October 29, 2026 00:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-29T00:32:23.776117Z 3252e3e PR opened
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: L labels Oct 29, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 29, 2026
Reverts openclaw#187105 (60e218e). It merged over six failed CI jobs, including a privilege-boundary regression: a guest-started background exec completion continued with the session principal's authority and lost the guest's AutoReview policy. The four failing test files pass locally on this revert head (99 tests).
steipete added a commit that referenced this pull request Oct 29, 2026
#187346)

System-started turns now continue with the current authority of whoever started the work they continue. Before, they had no person authority: person-scoped tools like sessions_spawn refused with "User is not a participant of this turn" (8 Team-server refusals since 10-02; 4 in real-model stress on main), and the agent silently stopped work as soon as it continued from an event.

- A guest's background exec, subagent or goal continues as that guest, keeping the guest's current policy (AutoReview etc.), revalidated at the point of effect.
- Only system work with no originating caller (restart resume, unattributed events) falls back to the session principal's current authority. An explicit non-human assignment never falls back to a former human creator; no-principal turns get no person authority and an honest refusal.
- Node exec completions keep the captured logical target and agent; the prefixed queue key is used only for storage and cleanup.
- Cron keeps its own authority model.

This redoes #187105, which was reverted in #187126 after it continued a guest-started background completion with owner authority (lost the guest's AutoReview).

Proof at exact head b16e958:
- The exec-completion sessions_spawn regression is red on base; guest-continuation, revocation and delayed-node custody tests pass; the node-owner regression is red on dc07bd4 and green here.
- Locally, 21 files (430 tests) and ten static checks pass, including zero-cycle guards.
- Exact-head CI: 93 jobs passed. The single failed job, checks-node-changed-compact-large-23, is sessions-create-thinking-claim.test.ts "...at the same timestamp (delivered-event)". It passed on both previous heads (dc07bd4, 425cbfb), the only change since is the unrelated 4-line node-owner fix, and it passed 6/6 locally on this head, so it is a timing intermittent.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
openclaw#187346)

System-started turns now continue with the current authority of whoever started the work they continue. Before, they had no person authority: person-scoped tools like sessions_spawn refused with "User is not a participant of this turn" (8 Team-server refusals since 10-02; 4 in real-model stress on main), and the agent silently stopped work as soon as it continued from an event.

- A guest's background exec, subagent or goal continues as that guest, keeping the guest's current policy (AutoReview etc.), revalidated at the point of effect.
- Only system work with no originating caller (restart resume, unattributed events) falls back to the session principal's current authority. An explicit non-human assignment never falls back to a former human creator; no-principal turns get no person authority and an honest refusal.
- Node exec completions keep the captured logical target and agent; the prefixed queue key is used only for storage and cleanup.
- Cron keeps its own authority model.

This redoes openclaw#187105, which was reverted in openclaw#187126 after it continued a guest-started background completion with owner authority (lost the guest's AutoReview).

Proof at exact head b16e958:
- The exec-completion sessions_spawn regression is red on base; guest-continuation, revocation and delayed-node custody tests pass; the node-owner regression is red on dc07bd4 and green here.
- Locally, 21 files (430 tests) and ten static checks pass, including zero-cycle guards.
- Exact-head CI: 93 jobs passed. The single failed job, checks-node-changed-compact-large-23, is sessions-create-thinking-claim.test.ts "...at the same timestamp (delivered-event)". It passed on both previous heads (dc07bd4, 425cbfb), the only change since is the unrelated 4-line node-owner fix, and it passed 6/6 locally on this head, so it is a timing intermittent.
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 gateway Gateway runtime size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant