Repository navigation
docs(gateway): clarify activity recap service authority - #183897
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesClarifies 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: [].
Review scores
ProductKind: Docs · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +3, Docs +10. Total +13 across 4 files. Added test files: 0. View PR surface stats
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 Reviewed October 25, 2026, 6:34 PM ET / 22:34 UTC. |
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
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.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.git diff --check: passed.b3dc05805f199829ea2dbacc8dcabc910b8d268fin 14m 38s; final CI/security gate passed, no failed test jobs or reruns.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.