Repository navigation
fix(aws-control): name the region searched when no drive is found - #24892
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change only adds a payload field and longer messages, and it can be reverted cleanly. Notes
[DESIGN-REVIEWED] bceed17 Description read[DESCRIPTION-READ] c35a10fb312c8cd86acd03bfa45f5041f8182e5709c01d409190204476d3dd3d 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 The new status field has no reader. The setup card, which the description names as where the harm happens, still renders from Notes
What this change shipsInventory (5 items) — 3 justifiedIntent: stop an owner from creating a second drive because "no drive" did not say only one region was searched. FIX.
[FIRST-PRINCIPLES-REVIEWED] bceed17 Description read[DESCRIPTION-READ] e147b43a3fb679f15f961d51a029b5b86e003b1249fb7c13e9eca5a582da9813 That sha256 names the PR description this verdict read. 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.
Approving bceed17.
The region reported is the region actually queried: searched_region() is the same expression find_drive passes to --region, and the empty-profile case resolves to DEFAULT_REGION. Error codes and statuses are unchanged; only the advisory error prose and one status field change, which matches the error-handling spec's code-plus-advisory-text contract. No new catalog strings are needed: the dashboard branches on code (drive_missing → backup_start_no_drive), and the places that render the prose verbatim (remoteError, the backup_failed reason) already passed the old English text through.
Verified locally: aws_control routes, backup job, hooks and facade tests pass (337). Removing the region from the message, dropping searched_region from the status payload, or dropping the default-region fallback each turns a test red. CI is green on this head (92 pass, 14 skipped).
Non-blocking follow-ups:
- No UI reads
searched_regionyet. The no-drive setup card is where an owner would create a second drive, and it still doesn't say only one region was searched; rendering the field there (with catalog keys in every locale) would finish option C from the user's side. Closes #24887closes the issue while account-scoped discovery (option A) is still open. ConsiderRefs #24887or a follow-up issue for option A.docs/system-specs/modules/aws-control.md§ "Several installs, one drive" says every install pointed at the account finds the same bucket; that is only true within one region.- The backup runner's new message isn't pinned by a test; reverting it to the old text keeps the suite green.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (7 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: names the one region drive discovery searched when no drive is found, in the status reply and every drive-missing message; with tests.
Problem / Motivation
Goal: When AWS Control finds no drive, it tells the owner which AWS region it searched, so a drive created from a profile in another region is not mistaken for "no drive".
The AWS Control drive is one per account, but
find_driveasks the tagging API in one region only: the profile's region. A second install whose profile points at another region sees "no drive yet", and its setup card offers to create a second drive in the same account. Nothing in the status or the refusal says that only one region was searched.Why it matters
An owner with two installs in one account can end up with two drives without knowing it, and backups then land in different buckets depending on which install ran them. Today the "no drive" state gives them no hint that a drive may exist in another region.
Not a goal
deploy/iam.py), bucket policy or ACL.What changed (motivation → approach → change)
The decision on #24887 was option C: keep the one-region lookup and say which region it covered.
routes_parts/drive.py){"exists": false, "searched_region": "<region>"}_require_driverefusal (drive_missing)routes_parts/library.py,routes_parts/drive_writes.py)backup.py)storage_drive.pygainssearched_region(region), whichfind_driveuses for its--regionargument, so the region reported is always the one queried (the default region when the profile has none).no_drive_message(region)builds the text, keeping the existing "no drive yet" phrase that other readers match. Thestorage.pyfacade serves both names. Error codes and the frontend are unchanged.The full fix is still open: option A on #24887 (one
s3api list-buckets --prefix kirocrew-drive-call, addings3:ListAllMyBucketsto the drive policy) would find the drive in any region. That is the maintainer's call.Backwards compatibility
Compatible: the status payload gains one field and the refusal messages gain words; every code, status and existing field is unchanged, and the "no drive yet" phrase readers match is kept.
Removes nothing: no route, field, code or check is removed.
Tests
test_no_bucket_reports_exists_false: the status payload is{"exists": False, "searched_region": "us-west-2"}.test_an_empty_profile_region_reports_the_region_discovery_used: an empty profile region reports the default region discovery queried.test_list_refuses_when_no_drive_exists: thedrive_missingrefusal namesus-west-2.Proof: not provable -- other: prove.py's throwaway tree errored at collection on this host for a sibling PR, so I ran two hand mutants instead. Dropping the region from
no_drive_messageturnstest_list_refuses_when_no_drive_existsred; droppingsearched_regionfrom the status payload turnstest_no_bucket_reports_exists_falsered.Scoped runs:
test/test_aws_control_routes.py,test/test_aws_control_app.py,test/test_aws_control_backup_job.py,test/test_aws_control_hooks.py,test/test_campaign_facades_base_public_names.py(403 passed) andtest/test_aws_control_routes_*.py(121 passed). flake8, isort, black, mypy, comment-history and brand checks are clean on the changed files.Manual verification
N/A — unit coverage sufficient: the change is message text and one payload field on paths fully driven through stubbed discovery; no AWS call or UI changed.
Related Issues
Closes #24887
Related: #24820 / PR #24866 (the same one-region lookup in the personal publish drive).
Sibling sweep
Swept: git grep -n "no drive yet" -- src/kiro_crew/apps/builtins/aws_control
Sibling: src/kiro_crew/apps/builtins/aws_control/backend/routes_parts/drive.py -- changed here
Sibling: src/kiro_crew/apps/builtins/aws_control/backend/routes_parts/drive_writes.py -- changed here
Sibling: src/kiro_crew/apps/builtins/aws_control/backend/routes_parts/library.py -- changed here
Sibling: src/kiro_crew/apps/builtins/aws_control/backend/backup.py -- changed here
Sibling: src/kiro_crew/apps/builtins/aws_control/hooks.py -- not affected -- a log line for the nightly skip, never shown to the owner
Pattern harvest
Rule candidate: review-prompt
Pattern: an account-scoped resource discovered through a region-scoped API without saying which region was searched.
Checklist