Repository navigation
fix(settings): stop blaming iam when the aws credentials check fails - #34223
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Notes
[DESIGN-REVIEWED] d38014a Description read[DESCRIPTION-READ] 8e7ef19defb00039d2635b49d2aa5c595206172df62fd51c973e01f5692debed That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS When the credentials row fails, the three service rows now say they were not checked, which fixes the cause. One item that goes beyond the Goal is listed as a note. Notes
What this change shipsInventory (6 items) — 5 justifiedIntent: a new user whose AWS credentials fail is not sent to an IAM policy that cannot fix the problem. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] d38014a Description read[DESCRIPTION-READ] 0c5b43c7424458ca29f746428ef2da6579f13b226c291bd8d5cfd670266e9140 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The blind reader read the new "Not checked yet — needs working AWS credentials first." rows and the hollow ring correctly as "waiting until the first one passes", and every changed state appears in the four screenshots. Notes
[UX-REVIEWED] d38014a Description read[DESCRIPTION-READ] a5792a7acc04fc118b94eb69356f06e6343812e9421da66519533e365e6650c3 That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Approve on ac08be0. With a failed AWS credentials check, the EC2/CloudFormation/SSM rows now say "Not checked yet" with a hollow mark and no Copy policy JSON, instead of blaming a missing permission; the reachable branch is unchanged. Decisive lines: website/src/pages/settings/RemoteCrewPanel.tsx:894, website/src/pages/settings/RemoteCrewPanel.tsx:1426, website/src/pages/settings/RemoteCrewPanelLaunch.tsx:575, src/kiro_crew/cloud/iam.py:1148
ac08be0 to
76d0a6a
Compare
Code change approver recommendation: A person should decideWhy: the decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier pending: being reviewed. The PR's main claim holds up. Launch is still gated as before: Copy policy JSON now shows only when the credentials work and the CloudFormation call actually ran and failed. A failed service row's sentence moves into
Tier: pending: being reviewed. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
76d0a6a to
b96feeb
Compare
|
self-added: yes
[operator: bolichen97] |
|
[operator: bolichen97] The red Backend Tests shards on this head (3.12 shards 5 and 6, Windows shard 4) and the Coverage Gate that fails closed behind them are red on
|
|
[operator: bolichen97] Both test reds on this head are fixed on main by #35625: |
buluoray
left a comment
There was a problem hiding this comment.
Approve on b96feeb. When the AWS credentials check fails, the EC2, CloudFormation and SSM rows now say "Not checked yet" with a hollow mark and offer no policy to copy, so the page no longer tells the user to fix an IAM permission. A service call that did run and fail is now shown as an error notice with an Ask the agent button. The red test shards on this head are failures that main already had and has since fixed, so the PR needs a rebase before it can go green. Decisive lines: website/src/pages/settings/RemoteCrewPanel.tsx:906-910, website/src/pages/settings/RemoteCrewPanel.tsx:1451-1453, website/src/pages/settings/RemoteCrewPanelLaunch.tsx:545, website/src/pages/settings/RemoteCrewPanelLaunch.tsx:582-583, src/kiro_crew/cloud/iam.py:1194
b96feeb to
3a954af
Compare
|
Rebased: main moved in website/src/pages/settings/RemoteCrewPanel.tsx, docs/system-specs/modules/instances.md and the 13 website/src/i18n/locales/*.json catalogs since this head went green (23b63d2 -> c22557c); CI re-running. The new base carries #35625, which fixed the two test reds the previous head inherited from main ( [operator: bolichen97] |
When the Remote Crew credentials check fails, reachability_check never calls EC2, CloudFormation or SSM, so their flags stay false. The setup checklist painted every false as a missing permission and offered Copy policy JSON, sending a user with no AWS CLI or a mistyped profile to an IAM policy that cannot help. With reachable false the three service rows now show a neutral hollow circle, say they were not checked yet because the credentials have to work first, and offer no policy to copy. PrereqRow takes ok: null for that state; the new line is translated in every catalog, and the instances spec records the rule. A service call that did run and fail shows its needs-permission line through the row's error notice, with the agent hand-off, as the credentials row already does. That hand-off names the failed check and the checked profile and Region. Part of #32095
3a954af to
d38014a
Compare
|
Rebased: main moved in website/src/pages/settings/RemoteCrewPanel.tsx, website/src/pages/settings/RemoteCrewPanelLaunch.tsx, website/src/test/SettingsRemoteCrewPanelCoverage.test.tsx, docs/system-specs/modules/instances.md and the 13 website/src/i18n/locales/*.json catalogs since this head went green (c22557c -> 6e059d7); CI re-running. Main moved the AWS checklist into [operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
I reviewed head d38014a. When the AWS credentials check fails, the EC2, CloudFormation and SSM rows now say they were not checked yet, with a hollow mark and no Copy policy JSON. This matches the backend: the reachability check returns before it makes any service call when the identity lookup fails, so those flags were never really checked. When the credentials work, a failed service row still shows its needs-permission notice with a hand-off that names the failing check and the profile and Region it ran against. Copy policy JSON still shows only when the CloudFormation call ran and failed. Launch gating is unchanged, the new tests pin both states, and the frontend tests and type check pass on this head, so nothing blocks.
Problem / Motivation
Goal: When the AWS credentials check fails on the Remote Crew set-up checklist, the EC2, CloudFormation and SSM rows say they were not checked yet, instead of blaming a missing permission and offering Copy policy JSON.
On Settings → Remote Crew → Add Crew → Set up a new Crew, a missing AWS CLI, a profile that does not exist, a
credential_processhelper the CLI cannot find, or a Region the account has not enabled all fail the AWS credentials row. In every one of those runs (#32095) the three service rows then said "Not available with this profile yet — the launch needs permission for this service." and the CloudFormation row offered Copy policy JSON. None of those causes is a permissions problem.Why it matters
This checklist is the first thing a new user reads on the Remote Crew set-up page, and those four causes are common first-day mistakes. The service rows sent every one of them to an IAM policy, which may need an admin to apply and cannot fix any of the four.
Not a goal
reachability_check'snoteon the dashboard.kirocrew cloud listandkirocrew cloud doctorwording.What changed (motivation → approach → change)
When the AWS credentials check fails, the EC2, CloudFormation and SSM rows now read "Not checked yet — needs working AWS credentials first.", with a hollow circle instead of a red error mark, and no row offers Copy policy JSON. When the credentials work and a service call fails, that row keeps its needs-permission sentence, shown as an error notice with Ask the agent, the same way the credentials row shows its failure. Because the three rows share that sentence, the hand-off tells the agent which check failed and which profile and Region it ran with.
The cause:
reachability_check(src/kiro_crew/cloud/iam.py) returns as soon assts get-caller-identityfails, before it calls EC2, CloudFormation or SSM, so their three flags keep their startingfalse. The checklist drew everyfalseas a missing permission.kirocrew cloud doctoralready lists those services only when AWS is reachable; the dashboard now follows the same rule, keyed on the preflight'sreachableflag.PrereqCard(RemoteCrewPanelSetupCards.tsx) builds the three rows from one helper, andPrereqRow(RemoteCrewPanelLaunch.tsx) acceptsok: nullfor a row that was not checked. That row keeps its hollow ring while the typed profile or Region differs from the checked one, since it has no verdict to grey out. A failed service row passes its sentence as the row'sfailure, whichPrereqRowalready draws throughErrorNotice, plus afailureReportwhose detail is the preflight flag that failed and the checked profile and Region, for example{"cloudformation_reachable":false,"profile":"","region":"us-east-1"}(""is the default profile). The new sentence is in every locale catalog (website/src/i18n/locales/), and the instances spec (docs/system-specs/modules/instances.md) records the rule. Launch stays disabled in that state, and the hint under it still names the AWS credentials row.Backwards compatibility
Compatible: the preflight API and its JSON are unchanged; only how the setup form draws the three service rows changes, and Launch stays off where it was off before.
Removes nothing: Copy policy JSON still shows whenever the credentials work and CloudFormation is not reachable; it is gone only where no service call ran.
Tests
website/src/test/SettingsRemoteCrewPanelCoverage.test.tsx› "explains an unreachable account and keeps Launch out of reach": withreachable: false, all three service rows say "Not checked yet — needs working AWS credentials first." with neither an error mark nor a check mark, no row says it needs permission, and there is no Copy policy JSON button; after typing another profile, those rows still show the hollow ring.The same file › "fetches the IAM policy on demand and confirms the copy": with the credentials working and CloudFormation not reachable, the needs-permission sentence sits inside an alert, and that row carries an Ask the agent button. The four existing Copy policy JSON tests (credentials work, CloudFormation does not) keep pinning that the button shows only on a row whose check ran and failed.
The same file › "hands the agent the failed service check, profile and Region": with CloudFormation not reachable, Ask the agent on that row stages a prompt that carries
"cloudformation_reachable":false, the Regionus-east-1and the default profile"", and names neitherec2_reachablenorssm_reachable.With the two production files put back to the base (
6e059d769e), all three tests fail: the first withUnable to find an element with the text: Not checked yet — needs working AWS credentials first., the second withexpected null not to be nullon its alert check, the hand-off test withUnable to find an accessible element with the role "button" and name /Ask the agent/. With only the mark order put back to grey-before-hollow, the first fails onexpect(element).toHaveClass("border-border-strong"). With only thefailureReporttaken out ofserviceRow, the hand-off test fails withexpected 'This error just came up in the Kiro C…' to contain '"cloudformation_reachable":false'.Proof: not provable -- frontend test (prove.py runs Python only)
Determinism: the hand-off test and "explains an unreachable account and keeps Launch out of reach" each passed 20 of 20 runs on their own, and the whole file (61 tests) passed in a shuffled order (
--sequence.shuffle --sequence.seed=32095).Manual verification
The checklist was rendered from this head's built SPA (
website/dist) with the dashboard API answered from fixtures: first a profile the AWS CLI cannot find, then working credentials with CloudFormation not reachable. Every claim above was asserted on the page before its screenshot was written. Then Ask the agent was clicked on the failed CloudFormation row and the prompt it staged for the chat was read back; its error report reads:This ran on Linux (Ubuntu 24.04). No real AWS account or gateway was used.
Screenshots / video
Credentials check failed (the profile does not exist), dark and light:
Credentials work and the CloudFormation call failed: that row keeps its red error mark, shows the needs-permission sentence as an error notice with Ask the agent, and still offers Copy policy JSON, dark and light:
Related Issues
Part of #32095
Sibling sweep
Swept: git grep -nE "_reachable" -- website/src src/kiro_crew/cli_cloud.py src/kiro_crew/cloud/wizard.py
Sibling: src/kiro_crew/cli_cloud.py -- not affected --
cloud doctorprints the three services only inside itsreach["reachable"]branchSibling: src/kiro_crew/cloud/wizard.py -- not affected -- the launch wizard returns on an unreachable profile before it reads the service flags
Sibling: website/src/pages/settings/RemoteCrewPanel.tsx:961 -- not affected -- the Launch hint names the AWS credentials row first, so it never names a service whose check did not run
Sibling: website/src/pages/ArtifactDeployPage.tsx -- not affected -- it shows only
reachableand never draws the S3 or CloudFront flagsPattern harvest
Not generalizable: one checklist drew rows whose check never ran with the same mark as a check that ran and failed.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)