Repository navigation
feat(apps): Kiro Space as an App Store store source - #38064
Conversation
Sensitive Change ReviewSensitive files changed:
|
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The store sits behind one provider key and does nothing when no provider is set. Readers of the hidden Update path are listed, and the new sign-in folder is masked from the agent. Notes
[DESIGN-REVIEWED] bd842c2 Description read[DESCRIPTION-READ] 33acf6b25418b2043ef6b7d5649336f29c66a67fe2febb2f4ffcdf35dd4a159e 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 Nothing blocks. The new store surface stays inert without a provider, follows the §31 seam the base already has ("No default client ships"), and the Update hiding matches the #36500 server refusal. Two generalizations have only one consumer. Notes
What this change shipsInventory (10 items) — 8 justifiedIntent: let an owner sign in to a Kiro Space store and browse and install its apps from the App Store. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] bd842c2 Description read[DESCRIPTION-READ] 54ab429f880f800ec5e42a167a51fa53f639ab9317adb743714f18e9f096caab That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the Sources-popover states that add their own controls: the "More actions" (⋯) overflow menu, the "Retry" button, and the store's empty and sign-in-timeout states. No screenshot shows any of them. Evidence gaps
Notes
[UX-REVIEWED] bd842c2 Description read[DESCRIPTION-READ] 9452bf41cf612e6af749af6648ba43ffb8bd46c356b5924c25bf33fd5ddc8853 That sha256 names everything this verdict read: the PR description, plus the 17 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: |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: The only tightening is one new TIGHTENING: ADJUDICATED: 18 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: The diff assumes a crew-home path,
UNADJUDICATED: The leaf is enforced outside the shell composite, so no shell verdict covers these paths:
[SCOPE-REVIEWED] bd842c2 |
GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)GPT 6.1 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- src/kiro_crew/apps/market_registries.py:365 -- Replacing a store misattributes existing installations
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — LOW harm. I confirmed three conditions. First, False positive or not applicable? A repository writer can comment: |
Sensitive change review
|
17ee588 to
0d94193
Compare
9bfd0f2 to
e9c36de
Compare
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 14% chance that this change introduces a defect, above the 12% limit for approving on its own. Approve. The PR adds a provider seam ( Tier: 2, held for a person: security-sensitive path. 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 |
Sensitive change review
|
a61f1b2 to
5ca5263
Compare
5ca5263 to
e66c1fc
Compare
Sensitive change review
|
|
The reds on e66c1fc (Backend Tests (3.12, 8), Backend Tests (Windows) (8), and the Coverage Gate after them) are AI-assisted, sent by Bolin Review bot |
e66c1fc to
a2a99cb
Compare
A build that can reach a Kiro Space store sets app["market_registries"] to a provider. Core keeps the added store ids in config.json, checks every store route and the install factory against one list (added and offered), sets app["market_client_factory"] at startup, and turns ListListings / GetListing answers into card rows. Nothing read from a store is kept: every read goes to the store with the credential that is current then, and every answer names the account it was read for. Five owner-only routes under /api/apps/market/ add, sign in, list and open a listing. With no provider they answer offers: [] or 503. Install confirm refuses a staging prepared under another account than the one signed in now. A market: install gets no update claim from a same-named git row, in the catalog rows or in the update field. The per-store sign-in folder is masked in every sandbox mode. Folded in: when the install store's status cannot be read, prepare and confirm answer 503 market_unavailable instead of a misleading 409 market_account_changed. HttpMarketClient._call raises market_signed_out on a store 401, with or without a CBOR body; every other non-200, including 403, is unchanged.
The Sources popover lists the stores the build offers, with add, sign in and sign out; while a sign-in code shows, the row polls the status. Each added store is a source in the rail; its apps show in their own block, keyed by store and ref, under the rail's category and installed-only filters, with an install dialog that confirms what prepare verified. A listing page lives at /apps/-/market/. A market: install has no Sync or Update anywhere. The page keeps the account it loaded under and reloads when a status read, or a listing answer, names another one. It reads the status on focus, every 30 seconds while visible, and after its own sign-in or sign-out. Folded in: the Install from Kiro Space dialog maps a 409 market_account_changed to its own localized message instead of the server's English text.
a2a99cb to
bd842c2
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Sensitive change review
- Head commit: bd842c2
- What rule changed: one new leaf,
market-registries, is added to three lists:_CREW_SECRET_LEAVES(src/kiro_crew/security/paths_lists.py),_CREW_HIDDEN_LEAVES(src/kiro_crew/sandbox_leaves.py) and_CREW_PRECREATE_HIDDEN_DIR_LEAVES(src/kiro_crew/sandbox_precreate.py). Nothing is removed and no existing entry changes. Since the previous reviewed head (32ca82e), two route fixes landed and the three lists are unchanged: install confirm now checks the store and the account while it holds the app's lifecycle lock, right before the install; a failed store sign-out now answersmarket_signout_failedinstead of the sign-in error. - Before -> after (what was allowed/blocked, now): before, the folder did not exist and was not covered by any list. After, an agent can neither read nor write
<crew home>/market-registries/(path policy and the OS-level sandbox mask), and the folder is created empty before the first sandbox spawn, so the mask is in place even when the first store sign-in happens after sessions are already running. Only the gateway and the store CLI child that it runs open it. - Worst case if wrong (breaks commands / leaks secret / locks user out): if the mask failed, a same-user agent could read a store refresh token or swap in another person's sign-in. If the mask were too wide, store sign-in would fail; no other command, path or user lockout is involved, because the leaf is new and nothing else uses that name.
- Evidence checked (which sandbox result proves it): the leaf follows the existing
aws-control-stagingpattern in all three lists. In a live run on a throwaway Linux box (on an earlier head with the same three lists), store sign-in, listing and install worked end to end through the gateway (97 checks pass). - No regression:
- Tools still work (which tools/commands were run, result): App Store git install, update and uninstall; Space store sign-in, list, detail, install; gateway restart. All passed in the live run.
- Backward compatible (old config / old data / old callers still work, how checked): the leaf is new, so no existing config, data or caller reads it. The existing test suites for the touched modules pass (
test/test_facade_mirror_guards.py, app route and update tests). - Existing tests (which suites passed on this head):
test/test_apps_market_registry_routes.py,test/test_apps_market_install_routes.py,test/test_app_update_status.py,test/test_app_routes.py,test/test_app_update_notify.py,test/test_facade_mirror_guards.py,test/test_sandbox_governance_mask.py,test/test_sandbox_protected_name_holds.py,test/test_security_gate_liveness.py(1094 passed on 67b7ebf). 982ec66 is a rebase of 67b7ebf onto main 979ac2f; the three lists add the same lines as before. On it, the market, update-status and two sandbox suites passed (984), and the App Store page, dialog and i18n checks passed. The website commit's content is unchanged from the previous head, where its App Store tests (553) and i18n tests (1771) passed.
- How to undo: remove the
market-registriesentry from the three lists (one line each), or revert the PR.
Reviewer note: this is @buluoray's filled template from e66c1fc, re-posted for the current head. bd842c2 is a rebase of e66c1fc: the PR-only diff of the two heads is byte-identical, so the three lists add the same market-registries line and nothing else. Backend, frontend and sandbox CI pass on bd842c2.
AI-assisted, sent by Bolin Review bot
Problem / Motivation
Goal: An App Store can list a Kiro Space store as a source next to the git catalogs, so the owner can sign in to it, browse its apps and install one from the dashboard.
Today the App Store reads only git registries. The Kiro Space install routes (prepare, then confirm) already exist, but nothing lists a store's apps, signs in to it, or lets the page install from it. A build that can reach a Kiro Space store has no seam to offer that store to the App Store.
Why it matters
Teams that publish apps to a Kiro Space store cannot reach them from the App Store page. They have to install by hand, and the page can show a same-named git row that offers an Update which would reinstall the app from git over the store install.
Not a goal
What changed (motivation → approach → change)
Goal → approach: a build plugs a store in through one aiohttp key, and core owns the routes, the config and the account rules, so the open-source build stays inert without a provider. The design is in
docs/system-specs/modules/app-kit-platform.md§31a (updated in this PR).Provider seam (
apps/market_registries.py). A build setsapp["market_registries"]to aMarketRegistryProvider:offers(),status(id),client(id),sign_in(id),sign_out(id).config.jsonkeeps only the added store ids (top-levelmarket_registries, a list of strings), never an address. Every store route and the install factory check one list: the id must be added AND offered now. A startup hook setsapp["market_client_factory"]andapp["market_account"]only when a provider is present.apps/market_client.pygainsListListingsandGetListing.Routes (
apps/routes_market_registry.py). Five routes under/api/apps/market/: read and set added stores, sign in, sign out, list a store's apps, read one listing. Every route runs the owner check (require_owner_dashboard_request) before it reads the body. Without a provider the read answersoffers: []and the rest answer503 market_registry_unavailable. No new listener is added; the gateway still binds 127.0.0.1 only.Account handling. Nothing read from a store is kept, in memory or on disk. Every read goes to the store with the credential that is current then, and every answer names the account it was read for. After each await the route reads the status again and answers no rows if the account changed. Install prepare refuses when the page loaded under another account, and confirm refuses a staging prepared under another account: both answer
409 market_account_changed. The page keeps the account it loaded under (components/appstore/marketAccount.ts), re-reads the status on focus, every 30 seconds while visible, and after its own sign-in or sign-out, and reloads when an answer names another account. A second change within 10 seconds of a reload holds that store (no rows, no Install) instead of reloading again, so a flapping status cannot loop.No overwrite of a store install. A git catalog row whose installed app has a
market:source carriesinstalledFrom: "market"and neverupdateAvailable, andupdate_status.published_indexgives such an app noupdatefield. The UI shows "installed from Kiro Space" on that git row and offers no Update or Sync for it (row, tile menu, detail page, Update All). This builds on the merged #36500, which refuses a folder update over such an app on the server.UI. The Sources popover lists offered stores with Add, Sign in (device code and approval page, polled while shown) and Sign out. Each added store is a rail source with its own block under the category and installed-only filters. An install dialog shows what prepare verified (publisher, version, size, SHA-256, trust, declared permissions). A listing page lives at
/apps/-/market/<store>/<ref>. New strings are in every locale file.Sandbox. The per-store sign-in folder (
<data home>/market-registries/) is added to the hidden leaves, so it is masked in every sandbox mode (docs/system-specs/modules/security.md).Backwards compatibility
Compatible: with no provider set, nothing new is listed and every new route answers an empty read or 503; the
market_registriesconfig key is new and optional.The diff hides Update and Sync, and drops the update claim, for an app whose source is
market:. Readers of that field:Reader: src/kiro_crew/apps/update_notify.py:update notes (reads
updateAvailable) -- app -- a market: install is no longer named in update notes, which is intended | test_update_notes_skip_a_market_installReader: src/kiro_crew/apps/routes_listing.py:attach_update / attach_updates (
updatefield onGET /api/apps/<name>and the installed list) -- crew page, app -- noupdatefor a market: install; other sources unchanged | TestKiroSpaceInstall::test_the_catalog_does_not_answer_for_a_market_installReader: src/kiro_crew/apps/registry_pipeline/catalog.py:_enrich_with_install_status (catalog rows) -- crew page -- git rows over a market: install carry
installedFrom: "market"and no update | test_catalog_rows_give_no_update_over_a_market_installReader: website/src/components/appstore/AppListRow.tsx:AppListRow -- crew page -- shows "installed from Kiro Space" instead of Update | MarketStoreSource.test.tsx "a git row over a Kiro Space install"
Reader: website/src/pages/apps/LaunchpadTile.tsx:LaunchpadTile (Sync menu row) -- crew page -- no Sync for a market: install | MarketStoreSource.test.tsx "has no Sync in its tile menu"
Reader: website/src/pages/apps/useAppUpdates.ts:runUpdate / updateAll -- crew page -- market: installs skipped | MarketStoreSource.test.tsx "is skipped by a row update and by Update All"
Reader: website/src/pages/AppDetailPage.tsx:canUpdate -- crew page -- no Update or Sync for a market: install; the server already refuses it (#36500)
Tests
Backend:
test/test_apps_market_registry_routes.py(new): no provider gives an empty read and 503s; every route refuses anyone but the owner; a store not added or not offered is 503 everywhere; add, sign in (empty body, https approval page only), sign out; listing rows, paging stops at 10 pages and markstruncated; every read goes to the store and names its account; a switch, sign-out or failed status probe during a read answers no rows of the old account; token refused while the status says signed in keeps the live status; detail route and its download count; catalog rows and update notes give no update over a market: install; registry install routes refuse a market: record; the sign-in folder is in all three mask tables; config round-tripsmarket_registries.test/test_apps_market_install_routes.py: confirm refused when the account changed since prepare or no account is known; prepare refused when the page loaded under another account; confirm installs when the account is the same.test/test_app_update_status.py:attach_update/attach_updatesgive noupdatefor a market: install, and still answer for the same name from the catalog's own source.Frontend:
website/src/test/MarketStoreSource.test.tsx(new): no store offered draws nothing; Sources block add, sign in, sign out; sign-in polling and its time limit; sign-in card for a signed-out store; install by ref through the market route; listing page; truncated notice; same-name store and git rows stay two cards; no Update or Sync for a market: install.website/src/test/MarketStoreAccounts.test.tsx(new): reload on account change (status, listing and detail answers, own Sign out, 30 s poll and focus, open Install dialog); at most one reload when answers keep disagreeing; a held or unknown store hides rows, listing and Install, and its status line names the new account.website/src/test/DiscoverPage.marketRail.test.tsx(new): rail counts for store rows under All sources, a picked store and search; a store-only category stays on the rail.website/src/test/ApiClient.refactor.surface.test.ts: the new client methods.Local runs on the head: the related backend files plus
test_app_routes.py,test_app_update_notify.pyandtest_facade_mirror_guards.pygave 348 passed; the four frontend files gave 234 passed;tsc --noEmitandeslinton the touched files exit 0.Manual verification
A live run on a throwaway Linux box, with the dashboard built from this head and a fake store provider built on this PR's own test fakes (two test accounts, each seeing different apps, driven from a second shell like the store's sign-in tool). Headless Chromium drove two tabs. 97 checks passed:
market:source and no update.Screenshots / video
Signed in to a store: its apps show in their own block above the git catalog, with downloads and rating. A store app whose name a git app already uses shows a disabled Install and says why under it.
The same rows at 390px and 320px: the name-taken notice wraps under the summary, and the name stays readable.
The install dialog, fully open: its title names the store the card sits under, it shows what prepare verified, and Install is enabled. Under Permissions it says, in the dashboard's own words and at normal weight, that the publisher wrote the list, that the app installs switched off, and that turning it on asks you to trust its code.
Signed out: the sign-in card with its Sign in button. After Sign in, the card shows the code and a link that names the site it opens.
Sources, the git row, the listing page, errors
The Kiro Space block in Sources before a store is added: the intro and Add.
After Add and sign-in: the store, its status line, Sign out and Remove.
A git row for an app installed from the store says "Installed from Kiro Space" instead of Update.
The listing page: Back in the page header, then downloads and rating.
The listing page at 320px, scrolled: the header with Back stays in view while the body scrolls.
The install dialog when the store refuses the install.
With a git source picked in the rail, a store whose read failed still shows its error under its own name.
The notice when a store has more apps than the page lists.
Related Issues
N/A — no open issue tracks this. Builds on #36500.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.