Skip to content

docs(gateway): clarify activity recap service authority - #183897

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-activity-recap-policy-revoke-20260919
Oct 25, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-activity-recap-policy-revoke-20260919

Conversation

@steipete

@steipete steipete commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Activity recap calls after an operator role's model-policy revocation can look like revoked operator inference because the existing automatic-metadata exception does not name recaps explicitly.

User Impact

Documents the existing behavior without changing it: shared recaps use the owning agent's Gateway utility authority, including for operator-created sessions and authorized refresh requests. Role-policy revocation does not cancel these calls. Disabling that agent's utility routing stops recap generation and affects its other utility routing too. Session permissions still govern reading recaps and requesting refreshes.

Why This Change Was Made

The original role-policy implementation (#156346, 6b4ebc0) explicitly preserved service authority for bounded automatic metadata. Recaps already used that path at that commit. The recap owner checks its lifecycle and current utility route, while caller-bound utility work still carries and enforces operator authority. Clarify that distinction in the owner comment, operator-policy docs, Activity docs, and utility-fallback docs.

Production executable LOC delta: 0; production file delta: +3 comment lines. No new policy, configuration, schema, cache, or runtime path. A regression requiring zero post-revocation recap calls would contradict the existing contract, so no behavior-changing regression was added.

Evidence

  • Current-main (f84df5359d794f2d682769c6446cefabb99e9961) isolated built-Gateway replay: 10/10 iterations passed. Across 40 provider requests, 20 were primary allowed/held requests and 20 were Activity recaps (verified by captured system prompts). Four recap calls arrived between the config write and acknowledgment; six arrived after acknowledgment. Denied, queued, and subsequent operator turns made zero provider calls and returned the expected policy error. Zero late/cross-iteration requests; owned processes and listeners were verified stopped. Ten iterations with 10,800 synthetic sessions, 40 plugins, trusted-proxy roles, a mock provider, held inference across config.patch revocation, queued work, and subsequent requests. Every provider arrival is recorded through a settled quiet window; no production Gateway was used.
  • Existing src/agents/isolated-completion.operator-model-policy.test.ts: 5/5 passed (47.93 s wall time), including the automatic-metadata/ambient-operator boundary.
  • pnpm build: passed; the unchanged Control UI build emitted asset-budget warnings.
  • Changed-file oxfmt, focused oxlint, three-file MDX validation, and git diff --check: passed.
  • PR CI run 40239617105: passed on exact head b3dc05805f199829ea2dbacc8dcabc910b8d268f in 14m 38s; final CI/security gate passed, no failed test jobs or reruns.
  • Independent subagent review (autoreview route unavailable): no actionable P0–P2 findings. The helper refused a provider-route/config mismatch; configuration was preserved.

This is a documentation/comment-only change. No performance improvement is claimed, so no base/candidate load-test metrics were collected. The live replay tests authority behavior, not stress performance.

@clawsweeper

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

@steipete
steipete marked this pull request as ready for review October 25, 2026 22:19
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XS labels Oct 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-25T22:21:04.855659Z b3dc058 Draft marked ready
ℹ️ 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 25, 2026
@clawsweeper

clawsweeper Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Clarifies that Activity recaps use Gateway service authority independently of an operator’s model policy.

Example: An administrator revokes a role’s model access with modelPolicy.allow: [].

  • Before: The utility-model documentation could imply that the revocation also stops shared Activity recap calls.
  • After: The docs explicitly explain that recaps continue and that utilityModel: "" disables the owning agent’s utility routing.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified documentation clarification with no executable changes or actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Documentation and comments only; the supplied Gateway replay describes existing behavior, and source inspection independently confirms the documented distinction.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Administrators can mistake post-revocation Activity recap requests for operator inference that escaped the role’s model restriction.
Reason: The clarification names an intentional exception and its existing disable control without changing the authority contract or adding another setting.

Merge readiness

✅ Ready for maintainer review

This PR usefully clarifies an existing authority contract; the documentation matches current code and historical intent, with no actionable findings.

Priority: P3
Reviewed head: b3dc05805f199829ea2dbacc8dcabc910b8d268f

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway recap service consumes completed-session transcript excerpts, invokes the owning agent’s utility model, and stores shared recaps; session permissions independently control reading and requesting refreshes.

flowchart TD
  A[Run completion] --> D[Recap queue]
  B[Refresh request] --> C[Session authorization]
  C --> D
  D --> E[Agent utility route]
  E --> F[Model provider]
  F --> G[Shared recap]
Loading

Technical review

Best possible solution:

Merge the focused clarification after the existing CI gates complete.

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

This is a documentation clarification; source inspection confirms the described service-authority behavior without running target code.

Is this the best way to solve the issue?

The smallest complete change is to clarify the existing exception in the policy, utility-model, Activity documentation, and owning call-site comment, as this PR does.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Operator model-policy exception and recap ownership keeps the original intent (6b4ebc0: The original role-policy implementation preserved service authority for bounded automatic metadata, and recaps already invoked the utility completion path without operator authority.)
  • Utility fallback documentation keeps the original intent (6861671: Independent utility fallbacks retain operation-specific authorization and exhaustion behavior; the clarification distinguishes operator-bound tasks from shared recaps.)

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c02fb41 adds src/gateway/session-activity-summaries.ts:382 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c02fb4152692; files: src/gateway/session-activity-summaries.ts)
  • Shakker: Raw commit 6b4ebc0 adds docs/gateway/operator-scopes.md:216 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6b4ebc043bc8; files: docs/gateway/operator-scopes.md)

PR surface

Source +3, Docs +10. Total +13 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 0 +3
Tests 0 0 0 0
Docs 3 11 1 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 14 1 +13

Labels

Label changes:

  • add P3: Documentation polish explains an existing behavior without changing inference, permissions, or configuration.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Documentation polish explains an existing behavior without changing inference, permissions, or configuration.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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 October 25, 2026, 6:34 PM ET / 22:34 UTC.

@steipete
steipete merged commit 950d2a7 into main Oct 25, 2026
208 of 210 checks passed
@steipete
steipete deleted the steipete/perf-micro-activity-recap-policy-revoke-20260919 branch October 25, 2026 22:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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