Conversation
🦋 Changeset detectedLatest commit: 1f0a170 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Running ultrareview automatically — This PR introduces a fail-closed authorization gate for agent management endpoints controlled by an org-targeted feature flag, with the gate applied in the auth path and a new CI gate; a subtle bug could expose or block agent management incorrectly, warranting a deeper review.. I'll post findings when complete. |
There was a problem hiding this comment.
Ultrareview completed in 3m 57s
All reported issues were addressed across 10 files
Linked issue analysis
Linked issue: AIM-190: test: gate M1 agent identity and setup authorization
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | A standalone, non-retrying CI gate runs the combined M1 identity, lifecycle, authorization, policy, migration, audit, telemetry, and privacy test suites. | The new m1-agent-gate job runs the listed server packages with count=1 and is required by the main PR checks. |
| ✅ | M1 agent-management endpoints remain unavailable unless the organization-targeted rollout flag is authoritatively enabled. | Authentication is followed by per-organization flag evaluation, and disabled, missing, indeterminate, or provider-error states return a uniform not-found error. |
| ✅ | Rollout requires both the focused M1 CI result and complete-database administrator-grant verification before enforcement. | The runbook explicitly requires the published-SHA CI gate and successful migration verification before enabling the feature flag. |
| ✅ | M1 management audit actions emit the existing agent webhook event with the expected attribution. | Lifecycle, ownership, and policy tests now compare recorded audit actions with agent webhook outbox actions, while the helper validates organization and agent subject attribution. |
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
9c8b486 to
36d2d13
Compare
There was a problem hiding this comment.
All reported issues were addressed across 5 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
5e9bca1 to
fa67467
Compare
ca78e45 to
972317d
Compare
This comment has been minimized.
This comment has been minimized.
972317d to
db91a5a
Compare
|
I have read the CLA Document and I hereby sign the CLA 7 out of 8 committers have signed the CLA. |
|
|
||||||||||||||||
|
|
||||||||||||||||
fec3154 to
1f0a170
Compare
|
recheck |
Summary
Gates agent-management endpoints behind an organization-targeted
agent-managementfeature flag and extends authorization and audit coverage for agent identity and setup. Endpoints fail closed unless the flag is explicitly enabled, and rollout requires administrator-grant verification before the feature flag is enabled.Motivation
Agent-management surfaces must not become reachable until administrator grants are fully backfilled and verified.
Technical details
Rollout control
The feature flag is evaluated after session authentication using the authenticated organization ID and organization cohort. Disabled, missing, indeterminate, and provider-error results return a uniform not-found response before an endpoint can read or mutate agent state.
Grant verification
The operator runbook requires complete-database grant verification before enabling the feature for an environment or cohort. Verification fails when required grants are missing, unexpected agent grants exist, or administrator roles remain unresolved.
Rollout prerequisite
This PR targets
main. The backfill command and runbook remain in #6044; they are an operational rollout prerequisite, not a runtime code or merge dependency of this PR.Run the administrator-grant backfill and verify the complete target database before enabling the
agent-managementfeature flag for an environment or cohort. Keep the flag disabled until verification exits zero and reportssummary.verification.ready_for_enforcement=true.Linear: AIM-190