Repository navigation
feat(aws-control): a Crews pane for the crews you deployed - #8470
chenmingwei23 wants to merge 2 commits into
Conversation
QA evidenceCaptured against fixtured routes in an isolated instance, no AWS credentials. The Each state below is visibly distinct from the others, which is the point: two of them
Row alignment is measured in a real engine rather than asserted in jsdom, which |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The copy that separates remote crews from local ones points at an "Agents page" no menu names, and detail-row prose wraps mid-word. Watch
Suggestions
[UX-REVIEWED] 0a9607d |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The reader pins a stack/parameter/output contract whose producer (the CloudFormation templates) lives only on an unlanded branch, so drift renders silently as "Unknown". Watch
[DESIGN-REVIEWED] 0a9607d |
bc3e285 to
1f2b3cf
Compare
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The new fixture lib hand-rolls the dashboard's boot-endpoint answers; Not justified as shipped
What this change shipsInventory (10 items) — 9 justifiedIntent: let an owner see, read-only, the Kiro Crew gateways they deployed into their own AWS account from the AWS Control app — an ADDITION.
No consent gate on the new routes is DERIVED: [FIRST-PRINCIPLES-REVIEWED] 0a9607d |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 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: |
2441766 to
33c6739
Compare
33c6739 to
f1c079d
Compare
f1c079d to
c75dfc8
Compare
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsThe sole candidate hinges on a crew being deployed under a name of length 1 or >32 characters. The No grounded 80+ defect surfaced in the changed lines during that work. No findings. [OPUS-REVIEWED] 0a9607d Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
c75dfc8 to
a70035c
Compare
Addressing the GPT 5.6 reviewFour of the five blocking findings were real and are fixed in
The more useful half of this finding is why it survived a gate whose entire job is this class of defect. That mattered because this gate's reverse direction had already been silently vacuous once: it scanned for One judgment call worth surfacing rather than burying:
Both ship.
<button onClick={onBack} data-testid="crew-detail-back">
<ChevronLeft size={14} aria-hidden="true" />
<span className="min-w-0 truncate">{i18nT('apps.awsControl.crews.title')}</span>
</button>So the absent state shows that button, and then "This crew is not in this account any more. It may have finished deleting." Returning to the list is the hand-off, and it is the right one: the two sibling notices carry
Verified after all fixes: 148 gate tests, 13 gate PASS in both memory modes, 254 crew tests, 149 repo tests, brand and scrub clean. |
a70035c to
6dae9ed
Compare
6ad80d7 to
280de9d
Compare
280de9d to
ddf8bd5
Compare
|
/ai-review override gpt ecc0286: 14 of the 15 |
Human judgment recorded@chenmingwei23 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
iamwhatever
left a comment
There was a problem hiding this comment.
Too many changes in one PR, need a close look
|
@chenmingwei23 This draft overlaps two of your own newer open PRs, so a large part of it would be reviewed twice at two different revisions. Against #9223 (the crew container image): 68 of this PR's 153 files also appear there, and 44 of those have byte-identical added lines. Of the 24 that differ, #9223 is the later version in every file under Against #9213 (the portable bundle): 17 shared files. Suggested split: drop Posted from the 2026-09-08 open-PR relationship audit (read-only, one auditor per PR); reply here if any of this is wrong. |
|
@iamwhatever You said this was too many changes in one PR and needed a close look. That was right, and the PR has been split rather than argued with. This PR is now only the read-only Crews pane: the UI, the two GET routes behind it, their tests, and the i18n keys. The whole deploy half moved out to
The size, measured
The 33 includes 8 screenshot and video files, which account for most of the raw line count. The reviewable text is 2,715 lines across 25 files. Two checks back that up, rather than my say-so
Every CI check is green. Could you take another look when you have a moment? |
|
@iamwhatever Flipped this out of draft now that every check is green, so it reads as a real review candidate rather than a draft. The scope change and the measured numbers are in my comment above; nothing has changed on the branch since. This is now blocked only on your review. |
bolichen97
left a comment
There was a problem hiding this comment.
Maintainer review (agent-assisted), pinned to 87b4884. The narrowed read-only code has been reviewed: owner/enabled guards, live account re-probe, fixed describe argv, matched crew identifiers and redacted errors are sound. One material description correction is required: the body promises detecting a digest that disagrees with the running task and labels screenshots 'digest mismatch'. The implementation only reads the stack image reference and service counts; the mismatch state is account_mismatch, not running-image drift. Remove/reword that capability claim rather than implying a detector this diff does not implement.
Low: an unrecognized nonempty memory mode renders blank instead of Unknown; add a fallback plus regression. The module identity-probe docstring also attributes route behavior to the listing helper.
The earlier scope hold by @iamwhatever remains theirs to re-review; this technical assessment does not dismiss it. Dedicated full-diff source/test review and head CI, no local runtime suites run.
|
Not approving for now: two outstanding CHANGES_REQUESTED reviews remain (bolichen97 and iamwhatever), so the earlier review feedback needs resolving before this can be signed off. |
Lists the Kiro Crew gateways the owner deployed into their own AWS account as a service their customers reach: one CloudFormation stack per crew, one ECS service inside it. The pane is read-only. It creates nothing. The scope is the pane and the reads behind it. The machinery that DEPLOYS a crew is not part of this change; it is held back until its path has been exercised against a real AWS account, because a gate suite that runs entirely under --dry-run is not evidence that a paid path works. READ-ONLY BY CONSTRUCTION Two GET routes, three read-only AWS calls (cloudformation describe-stacks, ecs describe-services, sts get-caller-identity), and no mutating verb anywhere in backend/crews.py. The only control is Refresh. Deploying a crew is a separate action; the pane reports what it left behind. The screenshots and the walkthrough clip are fixture data. They show the pane rendering each state; they are not evidence that a crew runs. WHAT THE PANE SHOWS A card per crew: memory mode, endpoint, image digest, and where conversations live. An unknown mode renders as unknown rather than guessing a default, and a digest that disagrees with the running task is called out instead of being smoothed over -- a crew whose image moved under it is the case an owner most needs to see. The empty state names the reason it is empty (no crews, or a profile that cannot be read) rather than showing a bare list, and every string carries a translation in all thirteen catalogs.
|
@bolichen97 Thanks for the review. Addressed on
Since a push was required anyway, I bundled the two advisory UX items I'd agreed with:
Local gates on this head: The earlier scope hold by @iamwhatever is untouched by this and remains theirs -- your review said as much, and their 2026-09-13 note confirms both CHANGES_REQUESTED still stand. This only addresses the points above. |
`_resolve_target` live-verifies that the requested account is still what the profile resolves to, then hands the profile to a read. The verification called `probe_identity` with its default `use_cache=True`, and that function memoises per `(profile, region)` for 30 seconds: an answer of account A, cached and then honoured for a full TTL after the profile was repointed to B, verified A while the read ran against B's live credentials and returned B's rows under a request for A. Switching a profile between accounts is an ordinary operator action, so the window is reachable in normal use. Pass `use_cache=False`. The docstring named the cache and argued it "bounds the cost without reopening the five-minute window", which is the defect stated as its own justification and is why nothing looked again. It now says what the live probe does and does not buy: the probe and the read are still two operations, so a repoint between them is caught by nothing here, and that window is one call wide instead of thirty seconds. Fixed in the shared resolver rather than at the two call sites this change adds, because the other eleven reach the same probe the same way. 320 tests across the three route suites pass unchanged. The existing stale-mapping test mocks `probe_identity` outright, so it could never see this: a mock has no cache. The new one drives the real one, priming an answer and repointing underneath it, and was watched failing first. `MODE_LABEL_KEY` is typed `Record<CrewMemoryMode, string>`, so the compiler treats it as total. The value arrives over the wire from a live stack, and one carrying a `Memory` this build was never taught indexes to `undefined`, which `i18nT` renders as an empty cell. On a page about someone's deployment, blank is indistinguishable from a row that failed to load. `modeLabelKey` falls back to the same "Unknown" the empty case uses, and `isNamedMode` drives the muted and italic presentation for both. The sentence explaining an unknown mode stays gated on the EMPTY case alone: it says the stack predates the parameter, which is true there and invented for a value that merely cannot be read. Unknown may be reported; its cause may not be guessed. The module docstring also attributed the identity re-probe to the listing helpers, which contradicts `list_crews` three lines down: the ROUTE re-derives the account before calling in, and the helpers deliberately do not repeat it. Dropped the clause placing these crews behind a shared load balancer with it, since nothing in this module reads a load balancer and no template here defines one.
|
Head moved to State of @bolichen97 every point from your review is answered on this head, and your review pinned @iamwhatever your note on 2026-09-13 named the two outstanding CHANGES_REQUESTED reviews as the blocker rather than the original scope concern. The scope split you asked for landed on 09-09 and this PR is now the read-only Crews pane only, so that condition is what remains. |
|
Why not put this section in remote crew page directly |
A read-only Crews section in the AWS Control app. It lists the Kiro Crew gateways an owner has deployed into their own AWS account (one CloudFormation stack per crew, one ECS service inside it) and shows one crew's mode, endpoint, image digest and conversation store.
Scope
The pane and the reads behind it. The machinery that deploys a crew is not in this PR. It lives on
feat/aws-control-crew-deployand comes back as its own change once its path has been exercised against a real AWS account.That is a deliberate narrowing in response to the Design Review finding on this PR, and I think the finding was right. A path that spends money in a customer account, shipped user-invokable, needs at least one real execution behind it, and a 248-test gate suite that runs entirely under
--dry-runis not that evidence. The suite's own history makes the point:secret_digest()carried a defect that aborted a first real deploy before the secret was created, and it survived every green gate run. Splitting it out also means this PR matches the title it started with.Nothing is lost by the split. The deploy branch holds the full tree: container image source, both CloudFormation templates, the bundle curator, the deploy driver and its gates.
Read-only by construction
Two GET routes. Three read-only AWS calls:
cloudformation describe-stacks,ecs describe-services,sts get-caller-identity. No mutating verb anywhere inbackend/crews.py, and the only control in the UI is Refresh. Nothing here can create, change, or spend money in an AWS account.What the pane shows
A card per crew: memory mode, endpoint, image digest, and where conversations live.
Two cases get deliberate treatment rather than a default. A memory mode this build cannot name renders as unknown instead of guessing, whether it arrived empty or as a value a newer driver introduced, because describing someone's live deployment from a default states a fact nothing was read from. And
account_mismatchgets its own copy rather than the generic error wall, because a profile that now signs in to a DIFFERENT AWS account is not a transient failure: the fix is a reconnect, not a retry.On what this does NOT do, since an earlier draft of this description overreached: nothing here compares a stack's image against the digest a running task reports. The listing reads the stack's image reference and the service's running and desired counts, and that is all. Detecting that a crew's image moved under it would need the running task's own digest, which no call in this diff makes.
The empty state names its reason (no crews, or a profile that cannot be read) instead of showing a bare list. All thirteen locale catalogs carry every new string.
Evidence, and its limits
test/test_aws_control_crews.py+test_aws_control_app.pyvitestonsrc/apps/aws-control/+src/i18n/tsc -bnpm run i18n:checkThe screenshots and the walkthrough clip under
temp-screenshots/aws-control-crews/are fixture data. They show the pane rendering each state: populated, empty, account mismatch, narrow viewport. They are not evidence that a crew runs, and the capture harness is checked in so the next person can regenerate them.One CI red, recorded so nobody re-derives it
E2E (stub ACP backend, offline)went red once on this head and is green on a plain re-run of the same commit, with no code change in between.It was not this branch. The render gate compares against an exported base tree, and the 8 findings it counted were the words of a single JavaScript TypeError message,
Cannot read properties of undefined (reading 'total_sessions'), being scanned as untranslated text. The chain isproviders/adapters/acp.tsreadingdata.sessions.total_sessionsafter the offline fixture answers/api/usage/kirowith an array (that path is absent from the fixture table and does not match its object-shaped route pattern, so it falls through to[]).data.sessionsis then undefined, and thes?.errorguard above the read passes through it.All four files in that chain --
OverviewPage.tsx,acp.ts,api-fixtures.mjs,api/client.ts-- are byte-identical to main on this branch, so the read could produce that TypeError before this change exactly as after it.It is also already fixed upstream:
fix(overview): report a usage payload without sessions, not a TypeError(#9721, commit 49ce171) added the missing guard. This branch's base predates it, which is precisely why the flake could still reach this PR.