Repository navigation
Conversation
…refused for a bound source The Agent caller permissions answer adds agentSourcesOperate: the source grants every Agent update checks (Secret operate on each Configuration binding and a Secret Harness source, credential source operate on each listed or Harness source, ServiceAccount read on a ServiceAccount Harness source), answered only with Agent update and Configuration read. The Plugins, authentication source and repository access editors show the missing grant and send no save when it is false (finding 2441).
Secret bindings, the Harness authentication Secret and a credential source each flip the answer with the same no-op Agent PATCH; any-vs-every, dropped-target, missing Configuration read and wrong-target mutants fail these tests.
…abled saves Browser coverage for the agentSourcesOperate note on the Plugins, authentication source and repository access editors (no write sent), the reread that moves from the Agent update note to the sources note and then enables Save, exact permission shapes, and a Storybook scenario.
…t update checks Flow doc keeps 2,484 words by moving two 10-24 changelog entries to its history page.
…t a repository driver The sources test checks the note and disabled fields there; the reader test keeps its Save check.
…e the page navigated away from
|
🦞👀 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 changes before merge. What this changesThis PR disables Agent settings editors when the caller lacks grants required by the Agent’s currently bound sources. Example: A member can update an Agent and read its Configuration but cannot operate its bound API key Secret.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it addresses a current Console permission mismatch, but its new denial message gives incorrect recovery guidance for ServiceAccount-backed Agents. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Console reads advisory permissions from the controller, which checks exact resources through IAM; actual Agent updates independently enforce authorization in OCC. flowchart LR
Console[Console editors] --> Permissions[Controller permission summary]
Permissions --> IAM[IAM Driver]
Permissions --> Console
Console --> Save[Agent update]
Save --> OCC[OCC authorization and persistence]
OCC --> IAM
Technical reviewBest possible solution: Keep the advisory permission check and correct the shared denial text and affected guides to include ServiceAccount read. Do we have a high-confidence way to reproduce the issue? Current main checks only Agent update before enabling these editors, while OCC also requires bound-source grants; source inspection establishes the mismatch without executing target code. Is this the best way to solve the issue? Extending the existing advisory summary is appropriate and preserves server enforcement, but its shared explanation must cover every grant that can make the new answer false. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 19a727572230. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
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, 7:31 AM ET / 11:31 UTC. |
Problem
Every Agent PATCH (
updateAgentinpackages/occ/src/index.ts) checks the caller's grant on each source that the Agent and its Configuration bind now, on top of Agentupdateand Configurationread:operateon every Secret that the Configuration binds;operate(API key, Service Accounts token), credential sourceoperate(ChatGPT OAuth), or ServiceAccountread(ChatGPT service account);operateon every credential source that the Agent lists.The console gated the Plugins, authentication source and repository access editors only on Agent
update. A member with Agentupdateand Configurationreadbut nooperateon, for example, a bound Slack token or the model API key Secret got enabled editors, and every Save answered 403 after the click (finding 2441). #3611 addedconfigurationSecretsOperate, but that bit is answered only to callers with Configurationupdateand does not cover the Agent's own sources.Change
agents/{id}/permissionsaddsagentSourcesOperate: whether the IAM Driver allows every grant listed above now.truewhen nothing is bound.updateand Configurationreadwhose Agent settings are readable; otherwisefalse.harnessAuthandcredentialSources, and Configurationreadalready returns the Secret bindings. A real PATCH reports the same decision, with an audit row.configurationSecretsOperate(bindings are capped at 64, credential sources at their own limit).false, the Plugins, authentication source and repository access editors are disabled with a note that names the missing grant: "Saving these settings needs operate on each Secret and credential source this Agent and its Configuration bind, which your access does not include. Ask an administrator for that access." A missing Agentupdatestill shows its own note first. The Plugins tab does not read the plugin policy capabilities in that state, because no save could keep a policy edit. A draft refresh (for example Reload authentication source) reads the answer again and redraws the editors, as for Agentupdate(finding 1538).configurationSecretsOperate: an Agent update checks more than the Configuration's bindings (the Harness source and credential sources), and it needs Agentupdate, not Configurationupdate.docs/reference/api.mdare regenerated. The flow doc and both console guides are updated. The flow doc stays at 2,484 words because two 10-24 changelog entries moved to its history page.Verification
Integration,
tests/integration/console-api.test.mjs: the new test "the Agent sources answer matches what a real Agent update checks". Two Configuration Secrets (one bound under two names) plus the Harness API key Secret. Each step checks the answer against the same no-op Agent PATCH (403 or 200):falseand 403;trueand 200;falseand 403;falseand 403.Integration,
tests/integration/device-authorization-api.test.mjs: a ChatGPT OAuth Agent (Harness credential source, listed incredentialSources). Without credential source operate:falseand 403. With it:trueand 200.Browser,
tests/browser/console-agent-save-refusals.test.ts:nonAuthWriteRequestsis empty.updatetest now shares the same helper.updatenote, to the sources note, to an enabled Save as each grant is added.Mutants, each run against the integration tests (all fail):
everychanged tosome; the Agent's sources dropped; the Configuration bindings dropped; the Configurationreadgate removed; the wrong Harness Secret id; credential sources checked as Secrets; the field removed (that is, main).Remote test VM:
checks-browserlane passed.checks-browser-2lane ran once before the last test fix; its only failure was the new test's repository step. That step is fixed: an Agent editor's repository tab offers no Save without a repository Driver, so the test now checks only the note and the disabled fields there. After the fix,console-agent-save-refusals.test.tspassed 15/15.Local: the two integration tests passed 20 of 20 runs at 2 CPUs.
Media (simulated UI proof from the browser test fixture): a member with Agent
update, Configurationreadand Secretread, but nooperateon the Agent's API key Secret. Before, Save authentication source was enabled and answered 403. After, it is disabled and the note names the grant. Before = main403639fffb, after = this branch. No video.Storybook: "Components/Credentials / Model authentication, editor cannot operate a bound source" (new). CI builds Storybook; I did not build it locally.
Local:
tsc --build(all projects and tests), eslint and prettier on the touched files,openapi:check.Risks
falsewhen the reason is missing Configurationread, and the note then names sourceoperate. In practice that caller cannot load the draft's Configuration.read) has no dedicated test. It mirrorsauthorizeBoundHarnessAuthand goes through the same helper as the Secret and credential source branches, which are tested.