Skip to content

fix(talk): let admitted consultations finish after revocation - #201527

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-red-stale-mid-request-authority-tests-20260919
Nov 19, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-main-red-stale-mid-request-authority-tests-20260919

Conversation

@steipete

@steipete steipete commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A Talk consultation that already passed admission can incorrectly refuse a native action if its device is revoked while it is running. Main CI also still expects revocation to cancel a pending Talk approval, so both public-callback variants wait forever for a cancellation that the current contract no longer promises.

User Impact

Admitted Talk work can finish after device revocation. The next consultation must pass authorization again, and explicit Stop still cancels pending approvals without executing their native action. No configuration or schema changes are required.

Why This Change Was Made

Move the retained Talk source check to consultation entry and remove its repeated raw device/policy check from native effects. The admission owner already reauthorizes before execution; retained lifetime and cancellation checks remain in place. Production code shrinks by three lines.

Update the Talk approval fixture to resolve an admitted approval after device revocation, explicitly exercise Stop, and settle failed fixtures through cancellation. Update the in-process sessions.list test to permit its admitted read while retaining the next-request denial. The separate sessions-list-privacy fix belongs to #201502 and is excluded here.

This follows the admission contract established in #197557 and implemented by @obviyus in #201334, with the test pattern from #201473. The obsolete Talk source guard dates to #159697; #201334 exposed the stale cancellation expectation.

Evidence

The native-effect regression fails before the production change with “agent harness host capability is no longer active” and passes after it, including denial of the next consultation. The stale in-process read assertion also fails on the main base before correction.

Local Bun validation: 42 focused tests passed across Talk permission parity, admission scope, gateway control, and in-process session reads. Another 35 tests passed across portable Talk history and prompt-prefix stability; three Linux-only cases are skipped on macOS. Codex review found no actionable P0–P2 findings.

Linux CI passed all 22 Talk history tests on final head fec29882493e: the previously hanging approval/Stop variants completed in 6.070 s and 1.479 s, versus 120 s timeouts in main run 44401396829. Exact-head Linux job. The native permission regression also passed again after rebasing onto the already-merged dead-export repair #201497; the patch ID is unchanged. Full local pnpm check:changed passed, including all three export scans. No production performance improvement is claimed.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: S labels Nov 18, 2026
@steipete
steipete marked this pull request as ready for review November 18, 2026 23:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T23:57:48.868698Z fec2988 New commits
ℹ️ 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

github-actions Bot commented Nov 18, 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: fec29882493e26de05b77b9b5257fb2075f6bd3e
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

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

Carefully review these changes before merging.

Apply the request-start authority contract from #197557 and @obviyus’s #201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow #201473 for the stale in-process session-read expectation.
@steipete
steipete force-pushed the steipete/perf-micro-main-red-stale-mid-request-authority-tests-20260919 branch from 4ef8f4a to fec2988 Compare November 18, 2026 23:55
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please review final head fec29882493e26de05b77b9b5257fb2075f6bd3e. The earlier run was superseded without publishing findings; the branch and evidence are now settled.

Local pnpm check:changed passed. Linux CI job https://github.com/openclaw/openclaw/actions/runs/44424770582/job/135227677290 passed all 22 Talk history tests, including both previously hanging approval/Stop variants in 6.070 s and 1.479 s. The native-effect regression fails before the production change and passes afterward, while the next consultation remains denied. Explicit Stop still prevents the native effect. Production delta is -3 lines; the privacy-test fix remains owned by #201502.

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR lets admitted Talk consultations finish after device revocation while preserving authorization for subsequent consultations and explicit Stop.

Example: A Talk consultation awaits approval to run /usr/bin/touch node-parity-effects when its device is revoked.

  • Before: The retained source check can refuse the admitted native action.
  • After: Approving the pending action lets it finish; another consultation is denied, and explicit Stop still prevents execution.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation and regression coverage are sound, but required shipped-entry-point behavior proof is not supplied.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An admitted Talk consultation can refuse its native action after device revocation despite the request-start authority contract.
Reason: The maintainer-authored direction follows the established authority contract and preserves subsequent-request denial and explicit Stop.

Merge readiness

✅ Ready for maintainer review

Keep open: this focused maintainer-authored fix completes Talk’s adoption of the request-start authority contract; no actionable introduced defect was found.

Priority: P2
Reviewed head: fec29882493e26de05b77b9b5257fb2075f6bd3e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supply redacted running-Gateway Talk evidence showing approval completion after revocation, refusal of the next consultation, and explicit Stop preventing the native action.
Agent review details

How this fits together

Talk carries authenticated caller authority into agent consultation admission, then supplies retained run authority to native tools and approval handling.

flowchart TD
  A[Authenticated Talk caller] --> B[Consultation admission]
  B --> C[Retained run authority]
  C --> D[Agent and tool approval]
  D --> E[Native action]
  F[Explicit Stop] --> C
  G[Device revocation] --> B
Loading

Technical review

Best possible solution:

Keep consultation admission authoritative and preserve existing run-lifetime and Stop checks without restoring per-effect device-policy checks.

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

Current main supplies a raw source-current assertion to native effect admission, so revocation can reject an already-admitted consultation; the author reports the focused regression failing before this change and passing afterward.

Is this the best way to solve the issue?

The patch is the smallest complete correction: it reuses the existing admission and cancellation owners, removes the obsolete effect check, and updates affected consumer expectations without adding machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 6b27489 adds src/gateway/talk/client-run-authority.ts:41 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6b274894dc15; files: src/gateway/talk/client-run-authority.ts)

PR surface

Source -3, Tests +3, Docs +5. Total +5 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 5 -3
Tests 4 63 60 +3
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 70 65 +5

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The bug affects an admitted Talk action when device revocation occurs during execution or approval.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The bug affects an admitted Talk action when device revocation occurs during execution or approval.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 18, 2026, 7:17 PM ET / November 19, 2026, 00:17 UTC.

@steipete
steipete merged commit ac17452 into main Nov 19, 2026
153 checks passed
@steipete
steipete deleted the steipete/perf-micro-main-red-stale-mid-request-authority-tests-20260919 branch November 19, 2026 00:22
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…aw#201527)

Apply the request-start authority contract from openclaw#197557 and @obviyus’s openclaw#201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow openclaw#201473 for the stale in-process session-read expectation.
RomneyDa added a commit that referenced this pull request Nov 19, 2026
Apply the request-start authority contract from #197557 and @obviyus’s #201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow #201473 for the stale in-process session-read expectation.

(cherry picked from commit ac17452)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. security-sensitive-changed size: S 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