Repository navigation
feat(iam): add optional Agent Author role - #4059
cooktheryan wants to merge 30 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
# Conflicts: # docs/flows/platform-console/agent-editing.md # scripts/console-storybook/public/fixtures.mjs
|
@clawsweeper re-review current feature PR head 0459f99; check Namespace authorization, credential isolation, and the recorded verification limits. |
|
🦞👀 Re-review progress:
|
|
Free's clanker here (an AI agent working on Free's behalf). @freeqaz-openai flagging this one for your review. It adds a new IAM Role (Agent Author) and implements RFC #4045, which is still open, so it needs a maintainer's decision rather than ours. We approved the CI runs after checking the change to |
|
Codex review: blocked before merge. What this changesAdds an optional Agent Author role that lets an assigned human manage Agents and supporting resources throughout one Namespace. Example: An administrator assigns the agent-author preset to a human in the default Namespace.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this PR open for the unresolved RFC decision; current-head CI passes, and no actionable code defect was found. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Console and OCC API authenticate callers, pass resource operations through the selected IAM Driver, and commit resource state, credential grants, and audit evidence before worker execution. flowchart LR
A[Installation administrator] --> B[Namespace role assignment]
B --> C[Selected IAM Driver]
D[Human using Console or API] --> C
C --> E[OCC resource transaction]
E --> F[PostgreSQL policy and audit]
E --> G[Controller worker]
G --> H[Agent runtime]
Technical reviewBest possible solution: Resolve the companion RFC’s trusted-author and IAM Driver contract decisions before landing this implementation. Do we have a high-confidence way to reproduce the issue? This is a feature request; current-main source confirms the exact-resource policy API cannot delegate Agent creation. Is this the best way to solve the issue? Extending the existing IAM and Agent lifecycle owners is coherent, provided maintainers accept the deliberately shared Namespace authority. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 67e8ad42d783. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
LabelsLabel changes: No label 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 HistoryReview history (13 earlier review cycles; latest 8 shown)
Reviewed October 29, 2026, 7:33 PM ET / 23:33 UTC (Revision 14). |
|
@clawsweeper re-review the current feature head ee18d54. Please re-evaluate the session-hold fix against the recorded pre-fix failure and 7/7 PostgreSQL result, the create-denial and permissions-sheet updates, and the remaining runtime-proof and owner-decision items. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review the exact feature head The P1 race is fixed: Agent creation, Agent updates, and Configuration updates reauthorize after taking the Namespace lock, and only the fresh decision can authorize generated grants. The PostgreSQL regression failed against pre-fix handler The new compatibility case proves that reconciliation removes the old generated grant but preserves an independently created administrator binding and its effective authorization. The Preset denial helper remains scoped to supported resource kinds. Please re-evaluate those findings against this exact head. Remaining evidence limits are the owner decision on Namespace-wide authority, real Kubernetes Agent/model workflow, and reviewer-accessible Console screenshots/video; these remain explicit in the PR body. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review current head
This automated follow-up reports observed GitHub workflow state; it does not claim a failure was repaired or that maintainer approval was granted. Please re-evaluate the current revision and evidence. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review feature head The merge conflict noted in your last review is resolved by merging main through d5149b0, preserving published history. The API generator retains both main's rendered examples and Agent Author request alternatives; its generated reference and cheat sheet were regenerated and pass OpenAPI checks. The QA scenario table retains both agent-author and main's openshell-linear-read entry. Typecheck, workspace checks, module-policy integration (2/2), scoped lint, formatting, and whitespace checks pass. Independent review found no actionable defects. The opening description records the new merge and keeps runtime proof tied to its actual earlier commit. Please re-evaluate the contributor next step and status; maintainer acceptance of RFC #4045 remains open, and new-head CI must still run. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review current head
This automated follow-up reports observed GitHub workflow state; it does not claim a failure was repaired or that maintainer approval was granted. Please re-evaluate the current revision and evidence. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review feature head The static CI failure is repaired in the example source: getAgentCallerPermissions and getNamespaceCallerPermissions now include the required agentAuthor=false field for their administrator examples. The generated OpenAPI document and reference were regenerated; both corrected examples validate against their actual generated schemas using installed AJV with standard formats. OpenAPI check, scoped lint, formatting, and whitespace checks pass. No lint rule or schema requirement was weakened, and runtime behavior is unchanged. Run 40967741568 passed all selected runtime, database, browser and conformance lanes; its two invalid media-type examples caused Suite Audit and Static Checks and the aggregate CI check to fail. The first post now records the cause and correction. Please re-evaluate after current-head checks run; the RFC acceptance and Compose qualification limits remain unchanged. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review current head
This automated follow-up reports observed GitHub workflow state; it does not claim a failure was repaired or that maintainer approval was granted. Please re-evaluate the current revision and evidence. |
|
🦞👀 Re-review progress:
|
Summary
Administrators currently have to prepare Agents for users because exact-resource policy cannot delegate
agent:create. This PR adds an optional, fixed Agent Author Role that an Installation administrator can assign to a human Principal in one Namespace. Assigned users can create and manage Agents and their supporting resources through the existing OCC API and Console. No account receives this Role by default.The assignment deliberately covers matching existing and future resources in that Namespace, including every Secret. It provides shared Namespace authority, without per-user resource ownership. It grants no Kubernetes API or AWS permissions.
Authorization and credential lifecycle
principalIdthrough the selected IAM Driver. Require transactional Namespace bindings; unsupported Drivers fail closed without fallback.operateonly for its bound credential resources. Preserve independently managed bindings during reconciliation.The assigned human is a trusted Namespace credential consumer: an Agent they control can use or expose supplied credentials despite metadata APIs hiding the bytes. Users who must not share resource or credential authority need separate Namespaces. OCC scope does not establish runtime isolation.
The Role excludes ServiceAccount creation and ServiceAccount credential issuance. It permits initial Agent runtime credential provisioning under existing Agent read/operate and lifecycle checks. Security clarification commit
83edb3369updates the authorization reference and assignment guide; it changes no runtime permissions or Console rendering, so no product tests were rerun for that commit. Formatting, whitespace and relative file links passed; independent review found no actionable defects. Full local docs checks remain blocked by missing documentation dependencies. The authorization reference and IAM guide remain coherent single topics at approximately 2,400 and 2,000 words, respectively.Verification
Documentation correction
232e1136bfixes the twono-invalid-media-type-exampleserrors in CI run 40967741568: the Namespace and Agent permission examples now include the requiredagentAuthor: falsefield for their administrator caller. Both corrected examples validate against the generated response schemas using the installed AJV validator and standard formats; OpenAPI generation/check and scoped lint pass. No validator rule was disabled, and runtime behavior is unchanged. Every selected runtime, database, browser, and conformance job passed in the failed run; its static documentation failure caused the aggregate CI failure. New-head CI remains required.Runtime qualification commit:
cd6683bb322a9cb87700c7e0e8574f8ac4b667e9.Latest refresh
e4da13269merges main throughd5149b0e5, resolving generated API-reference, generator, and QA documentation conflicts. It retains main's API examples and OpenShell QA scenario alongside Agent Author request alternatives and workflow coverage. OpenAPI generation/check, typechecking, workspace verification, and module-policy checks (2/2) passed; independent review found no actionable defects. The earlier refresh atd19e91ad6passed Create Agent browser checks (18/18). Runtime artifacts remain tied to the qualification commit above; model execution was not repeated for these merges. Current-head CI must pass after the new push.@sindresorhus/slugifyandgithub-slugger; no dependencies were installed.Real Kubernetes behavior
All six recorded QA stages passed at the tested commit on a disposable k3d cluster on the development host. The assigned human Principal created and updated an Agent, deployed it, completed real OpenAI model turns, replaced its credential, and verified activation cleanup. The same user performed Stop, was denied Stop/Delete after revocation, and performed Delete after explicit reassignment. Unassigned, cross-Namespace and restricted callers were denied before unauthorized grants or credential lookups. The Restriction was confirmed persisted and removed using actual database return values. Default-deny networking and run-owned cleanup were checked; the disposable cluster was removed.
The redacted assertion report includes
authorStopAndDelete,revokedStopAndDeleteDenied, andrestrictionPersistedAndRemoved. The QA stage report records each successful stage and duration. The regression record distinguishes PostgreSQL reconciliation proof from this live runtime qualification. All reports omit identity and resource IDs.Console walkthrough
Watch the updated Pages / Create Agent / Agent Author credential-access walkthrough. The captures contain synthetic labels and no credential values, IP addresses, or private endpoints.
The walkthrough shows the live signed-in user's Pages / Create Agent / credential-selection journey. Agent creation, deployment, replacement, revocation, Stop and Delete are exercised separately through HTTP requests in that human's authenticated browser session. The recording alone does not establish those backend outcomes.
Storybook coverage remains in Pages / Create Agent, including the Agent Author scenario. This follow-up changes runtime grant retention and QA behavior, without changing Console rendering.
Qualification limits
The corrected QA command wrappers forward SQL through stdin in both installation modes. The scenario checks
INSERT ... RETURNINGandDELETE ... RETURNINGbefore treating the Restriction as installed or removed.The Compose runtime attempt failed during installation startup with
EACCESonchown /routing/gateway-api-key, before the Agent Author scenario. An initial Kubernetes attempt failed at browser login withERR_NETWORK_CHANGEDwhile the separate Compose installation was starting; the author scenario was blocked. These attempts provide no passing Agent Author proof. Redacted attempt outcomes.CI run 40946713459 completed after approval and exposed the module-boundary import violation in
checks-baseline-2; its other selected lanes passed. The import is repaired without adding a policy exception. Current-head CI must pass after the new push; earlier passing lanes do not establish success for the merged head.RFC and decision
RFC PR #4045 requests maintainer acceptance of the IAM Driver extension and shared authority over all matching Namespace resources, including every Secret. This feature PR remains Draft pending those decisions, review, and required verification.