Skip to content

Fix CreateFleet authorization for GPU host launches - #694

Merged
ejc3 merged 1 commit into
mainfrom
fix/fcvm-createfleet-context
Oct 26, 2026
Merged

ejc3 merged 1 commit into
mainfrom
fix/fcvm-createfleet-context

Conversation

@ejc3

@ejc3 ejc3 commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

The coordinator cannot launch GPU hosts: CreateFleet parent authorization omits instance-type and Purpose context, so the policy added in #676 explicitly denies the intended calls.

Scope CreateFleet parent authorization through the existing account/region resource ARNs. Keep instance type, template, image, subnet, security group and role restrictions on RunInstances, and enforce each template kind’s Purpose on its instances. Add a sanitized fixture from the actual authorization failure.

Validation: 50 focused ARM tests, 35 authorizations in the primary matrix, and 22 independent IAM simulation cases pass. The real-context baseline denial is reproduced; the corrected parent request is allowed while negative resource, type, template, Purpose and PassRole cases are denied. Independent code/security review passes; Access Analyzer reports zero findings. The policy is 9,662 compact bytes, below the 10,240-byte role limit.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 863cbda3-dd72-4010-881b-f314509e3fe7
Commits

Reviewing files that changed from the base of the PR and between 102d17a and 8b5d553.

Files selected for processing: 3
  • fcvm-fleet.tf
  • scripts/fixtures/fcvm-fleet-create-fleet-context.json
  • scripts/test-fcvm-fleet.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The coordinator IAM policy changes its CreateFleet grants and narrows several denials to RunInstances. It also adds host and tile template Purpose restrictions. The tests and fixture cover these authorization changes.

Changes: Fleet launch authorization

Layer / File(s) Summary
CreateFleet authorization grants
fcvm-fleet.tf, scripts/fixtures/fcvm-fleet-create-fleet-context.json, scripts/test-fcvm-fleet.py
CreateFleet grants no longer check aws:RequestedRegion. Tests check the fleet and volume grants, host instance resources, referenced-resource condition, and recorded authorization context.
RunInstances restrictions
fcvm-fleet.tf, scripts/test-fcvm-fleet.py
Instance-type and Purpose denials apply to RunInstances, not CreateFleet. Host and tile template instances must use Purpose=fcvm-fleet-host and Purpose=fcvm-fleet-tile, respectively.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related issues

  • ejc3/fcvm#1289 — The issue plans to measure CreateFleet staging. This change updates CreateFleet authorization.
  • ejc3/fcvm#1257 — The issue includes CreateFleet launch timing. This change affects the coordinator's host launch authorization, but does not add timing instrumentation or fallback work.

Possibly related PRs

  • ejc3/aws#633 — That PR adds the on-demand tile launch template; this change applies a Purpose restriction to tile-template instances.
Merge Risk: Minimal · up to 8b5d5

The change scopes CreateFleet parent authorization to account and region resource ARNs and keeps the type and Purpose restrictions on RunInstances. No concrete merge-blocking defect was established. Confirm the pending real-context authorization simulations and the negative boundary matrix before relying on this in production.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: fixing CreateFleet authorization for GPU host launches.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T04:24:51.282005Z 8b5d553 Manual request
🔒 Security Review ✅ Completed 2026-10-26T04:26:29.239748Z 8b5d553 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ejc3

ejc3 commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 8b5d553d2a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 8b5d553d2a

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ejc3
ejc3 merged commit 14dc560 into main Oct 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant