docs: plan 2b-1 review round 2 fixes; review closed
needs-operator refuses adds up front, fails the refusing op, clears on the next add once the extra key is gone; enrolment answers 503.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+20
−3
docs/superpowers/plans/2026-11-08-managed-fleets-2b1-console-aws.md+20 −3
CI passed — run details
diff --git a/docs/superpowers/plans/2026-11-08-managed-fleets-2b1-console-aws.md b/docs/superpowers/plans/2026-11-08-managed-fleets-2b1-console-aws.md| index ca9efdad2..85f6d1d4b 100644 |
| --- a/docs/superpowers/plans/2026-11-08-managed-fleets-2b1-console-aws.md |
| +++ b/docs/superpowers/plans/2026-11-08-managed-fleets-2b1-console-aws.md |
| @@ -248,7 +248,12 @@ TestManagedDelayedPublicationFreshness: absent object after >=60s => six fresh c |
| TestManagedDeliveredKeySet: K1 delivered -> seal lost -> K2 minted and delivered -> seal lost; |
| restart retains {K1,K2}; rotation refuses before any reap/mint, K1 survives; |
| durable needs-operator reason names another delivered key still live; show exposes it; |
| - new enrolments refuse before token claim/delivery until resolved; failure to record delivery |
| + refused rotation closes its operation as failed with that reason and releases reserved quota; zero launches; |
| + explicit add while the extra delivered key is live => 409 before any reservation or launch; |
| + COPY reason names needs-operator and the operator's required IAM key deletion; |
| + member/operator explicit add rechecks the full IAM listing; extra delivered key on a later page keeps refusal; |
| + operator deletes the extra key in IAM => next explicit add clears needs-operator and can reserve; no polling; |
| + new enrolments => 503 with Retry-After: 5 before token claim/delivery until resolved; failure to record delivery |
| returns no credentials; legacy migration and lost-response delivery retain protected IDs. |
| TestManagedPublicationRefreshBudget: absent delayed publication reads heartbeat once/60s; |
| one stable pointer per due pass, owner only after other five pass; zero LIST; |
| @@ -300,7 +305,12 @@ Keep the legacy delivered_key_id only as the last-delivered `keep` selector; upd |
| Pass the complete set to rotation under lockFleet; do not prune delivery history when a seal is lost or a key disappears. |
| Update fleetstore's fake and every caller/spy to enforce the same guard before any reap/mint; Task 4 implements it against complete IAM pages. |
| On ErrDeliveredKeyStillLive, persist `needs-operator` with reason `delivered_key_other_than_keep_still_live` (COPY); do not clear it as a transient preparation error. |
| -Check this state before enrolment's token CAS (managedenrol.go:114); refuse new enrolments until explicit recovery verifies the condition is resolved. |
| +Close the operation that hit this rotation refusal as failed with that reason and release its reserved quota; nothing has launched. |
| +Before any new add reservation or launch for a fleet in `needs-operator`, return 409 while the condition persists. |
| +The COPY reason must name `needs-operator`, the live delivered key other than `keep`, and the operator action to delete that key in IAM. |
| +The next explicit add by a member or operator re-runs the guard against a full IAM key listing before reservation or launch. |
| +Clear `needs-operator` only when that complete listing verifies no delivered key other than `keep` is still live after operator deletion in IAM; then the add may proceed through normal admission. |
| +Check this state before enrolment's token CAS (managedenrol.go:114); return 503 with `Retry-After: 5` until resolved. The 2b-2 client retries within its box deadline. |
| Do not automatically delete delivered keys to resolve it; existing ready boxes and their credentials keep working. No background key polling. |
| Read status from SQL in managedFleetView (managedview.go:139), including when no open operation exists; no AWS calls on show. |
| @@ -617,7 +627,7 @@ Required drift-check reads are GetUser, GetUserPolicy, ListUserPolicies, ListAtt |
| Scope CreateBucket/configure/readback actions to the exact managed prefix; use the IAM action names corresponding to the SDK operations, including s3:PutLifecycleConfiguration. |
| The exact S3 grant is CreateBucket, TagResource, GetBucketLocation, GetBucketTagging, Get/PutBucketVersioning, Get/PutEncryptionConfiguration, Get/PutBucketPublicAccessBlock and Get/PutLifecycleConfiguration, all prefixed `s3:`. |
| TagResource is required for CreateBucketConfiguration.Tags; a later PutBucketTagging grant is not a substitute. |
| -Protect deployment/data buckets with explicit Denies on the new bucket creation/configuration actions, even if an operator chooses an overlapping prefix. |
| +Protect deployment/data buckets with explicit Denies on the new bucket creation/configuration actions, including `s3:TagResource`, even if an operator chooses an overlapping prefix. |
| Do not add a console-role DeleteObject Deny on deployment/data buckets: existing lease release depends on it. |
| Build boundary Statement by conditional concatenation: app statements only when store_bucket_prefix != "", fleet statements only when managed is enabled. |
| Add only Task 4's fleet-data actions under the distinct managed prefix; retain enabled app-store effective access unchanged (main.tf:694–711). |
| @@ -833,3 +843,10 @@ Round 1: all findings accepted; three P1s fixed in this plan. This revision does |
| - P3-10 — Fixed (admission clarity): Task 1 fixes the cap at 64 and states that the context times out at 30 s. |
| - P3-11 — Fixed (test-only injection): Tasks 3/4/7 move With constructors to export_test.go. |
| - P3-12 — Fixed (policy evidence): Tasks 4/5 use exact-diff fixtures and structural assertions; the hand-written IAM evaluator is removed. |
| + |
| +Round 2: no P1; P2-1 and P3-2 fixed in this plan without reopening review. |
| + |
| +- P2-1 — Fixed (needs-operator lifecycle): Task 2 specifies add refusal before reservation/launch, failed-operation quota release, explicit-add recovery after a full IAM key listing, and enrolment 503 with Retry-After; TestManagedDeliveredKeySet covers each path. |
| +- P3-2 — Fixed (protected-bucket tagging): Task 5 explicitly includes `s3:TagResource` in the deployment/data bucket Denies. |
| + |
| +Review closed after round 2 (no P1). |