Skip to content

feat(apps): Kiro Space as an App Store store source - #38064

Merged
bolichen97 merged 2 commits into
mainfrom
crew/kiro-space-x-appstore/space-store-source
Nov 19, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
crew/kiro-space-x-appstore/space-store-source

Conversation

@buluoray

@buluoray buluoray commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

  • The store provider itself (the code that talks to a real store and its sign-in tool). It lives outside this repository; the open-source build sets no provider and ships no store address.
  • Ratings or reviews UI beyond the rating and review count that the card already shows from the listing.
  • Any server-side cache of store listings.
  • An update path for an app installed from a store (this PR hides Update and Sync for it instead).

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 sets app["market_registries"] to a MarketRegistryProvider: offers(), status(id), client(id), sign_in(id), sign_out(id). config.json keeps only the added store ids (top-level market_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 sets app["market_client_factory"] and app["market_account"] only when a provider is present. apps/market_client.py gains ListListings and GetListing.

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 answers offers: [] and the rest answer 503 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 carries installedFrom: "market" and never updateAvailable, and update_status.published_index gives such an app no update field. 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_registries config 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_install
Reader: src/kiro_crew/apps/routes_listing.py:attach_update / attach_updates (update field on GET /api/apps/<name> and the installed list) -- crew page, app -- no update for a market: install; other sources unchanged | TestKiroSpaceInstall::test_the_catalog_does_not_answer_for_a_market_install
Reader: 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_install
Reader: 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 marks truncated; 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-trips market_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_updates give no update for 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.py and test_facade_mirror_guards.py gave 348 passed; the four frontend files gave 234 passed; tsc --noEmit and eslint on 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:

  • Every gateway listened on 127.0.0.1 only.
  • With no provider: empty read, 503 on every other route, 403 for a request without the owner token.
  • Folder and git installs, updates and uninstalls still work.
  • Store add, sign in with a device code, list, detail (downloads and rating), prepare and confirm; the installed record has a market: source and no update.
  • A folder update over the store install is refused.
  • Store or status probe down: no rows and an error, then rows come back.
  • A slow read that ends after another account signed in answers no rows of the first account.
  • An account switch from the second shell reloads both tabs within the 30 s poll, or at once on focus; dashboard sign-out and sign-in do the same.
  • An Install dialog opened under one account and clicked after a switch answers 409 and installs nothing; the staging is single use.
  • Signed out: no rows and no Install.
  • No reload loop over 3 minutes each while signed in, signed out, store down, status unknown, and token refused.
  • A gateway restart with the page open and a switched account reloads once to the new account.
  • The listing page hides a held or unknown store.

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.

Store block, signed in

The same rows at 390px and 320px: the name-taken notice wraps under the summary, and the name stays readable.

Name taken at 390px

Name taken at 320px

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.

Install dialog

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.

Sign-in card

Sign-in in progress

Sources, the git row, the listing page, errors

The Kiro Space block in Sources before a store is added: the intro and Add.

Sources store not added

After Add and sign-in: the store, its status line, Sign out and Remove.

Sources store controls

A git row for an app installed from the store says "Installed from Kiro Space" instead of Update.

Git row installed from Kiro Space

The listing page: Back in the page header, then downloads and rating.

Listing page

The listing page at 320px, scrolled: the header with Back stays in view while the body scrolls.

Listing page at 320px

The install dialog when the store refuses the install.

Install dialog error

With a git source picked in the rail, a store whose read failed still shows its error under its own name.

Store read error under a git source

The notice when a store has more apps than the page lists.

Truncated list notice

Related Issues

N/A — no open issue tracks this. Builds on #36500.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality (new tests added; only the related suites were run locally, the full suite is CI's)
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 16, 2026 19:07
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/sandbox_leaves.py

  • src/kiro_crew/sandbox_precreate.py

  • src/kiro_crew/security/paths_lists.py

  • @bolichen97 approved bd842c2 with a complete reasoning template.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of bd842c2b9ee1a187c9cbd61fff25336c72200004 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • market_registries.py says the install factory takes no store id, so install refuses once two stores are added. The Sources popover still lets the owner add a second store, which silently turns Install off for both. Either cap Add at one store or pass the store id to the factory now.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of bd842c2b9ee1a187c9cbd61fff25336c72200004 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Item 3 — one consumer, generalized: config.json market_registries is a list, and MAX_ADDED = 16 is checked, but handle_market_registries_put refuses any second id with "only one Kiro Space store can be added for now". The 16-cap has zero consumers. Subtraction: delete MAX_ADDED and its check, since len(wanted) > 1 already bounds the list.
  • Item 9 — oversized: provider-set market_client_factory is a second way to plug in (if provider_of(app) is not None and app.get(MARKET_CLIENT_FACTORY_KEY) is None). A build can now set either key, and the two can diverge on the account and store checks. Subtraction: make the provider the only seam, and drop build-set market_client_factory from the §31 contract.

What this change ships

Inventory (10 items) — 8 justified

Intent: let an owner sign in to a Kiro Space store and browse and install its apps from the App Store. This is an ADDITION.

  1. The Sources popover lists offered stores with Add, Sign in and Sign out — justified
  2. Each added store is its own rail source, with listing rows — justified
  3. New market_registries config key (a list of store ids) — one consumer, generalized: capped at one store
  4. Five owner-only /api/apps/market/ routes that answer 503 or empty without a provider — justified
  5. Install refused with 409 when the store account changed between page load, prepare and confirm — justified
  6. The page re-reads account status on focus and every 30s, with a flap hold — justified
  7. A git row over a store install shows "installed from Kiro Space", with no Update or Sync — justified
  8. New listing page at /apps/-/market/<store>/<ref> and an install dialog showing what was verified — justified
  9. Provider seam app["market_registries"] sets the install factory at startup — oversized: second plug-in point
  10. The market-registries/ sign-in folder is masked in every sandbox mode — justified

[FIRST-PRINCIPLES-REVIEWED] bd842c2

Description read

[DESCRIPTION-READ] 54ab429f880f800ec5e42a167a51fa53f639ab9317adb743714f18e9f096caab

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of bd842c2b9ee1a187c9cbd61fff25336c72200004 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • "More actions" (⋯) menu. MarketRegistryManager.tsx shows the first action as a button and moves the rest into a dropdown once there are more than two. That happens for an added store in no_access: Sign in stays a button, Sign out and Remove go in the menu. Shot-08 only shows the two-button signed-in row. Needs a screenshot of the no_access row with the menu open.
  • "Retry" button. It appears when the store status is unknown but the CLI is not outdated. No screenshot has it. Needs a screenshot of that row.
  • Unshown states. No screenshot shows these: the empty store ("This store has no apps yet."), "Sign-in didn't finish. Sign in again.", "The Kiro Space command line isn't set up on this computer." / "…is too old. Update it.", or "Kiro Space refused this sign-in." Needs one screenshot of each.

Notes

  • Contradiction on one app. The store card says "An app with this name is already installed from another source." while the git row below says "Installed from Kiro Space" (shot-09). The reader said: "I can't tell if these are one app or two." Name the actual source in name_taken, e.g. "Installed from {{source}}".
  • "Kiro Space" is never explained. The reader could not tell what it is. The section intro "Stores this build offers." doesn't help: the reader said "'This build' means nothing to me." Explain Kiro Space in plain words in the intro string.
  • "Remove" may sound like uninstall. The reader would be "careful with Remove because I don't know if it uninstalls my apps." Rename it to "Remove store", or say in the row what happens to installed apps.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed bd842c2b9ee1a187c9cbd61fff25336c72200004 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] bd842c2

Verdict parsed from the review's SHA-scoped output markers for commit bd842c2b9ee1a187c9cbd61fff25336c72200004.

False positive or not applicable? A repository writer can comment:
/ai-review override fable bd842c2b9ee1a187c9cbd61fff25336c72200004 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ PASS

Which legitimate operations does bd842c2b9ee1a187c9cbd61fff25336c72200004 newly refuse? Updated in place on each push. A script-confirmed regression blocks; the model proposes candidates and never decides a refusal.

Verdict basis: adjudicated, zero confirmed regressions.

Security scope review -- adjudicated candidates

  • macos-latest (platform posix): 13 classified, 0 newly refused, 13 still allowed.
  • ubuntu-latest (platform posix): 13 classified, 0 newly refused, 13 still allowed.
  • windows-latest (platform windows): 10 classified, 0 newly refused, 10 still allowed.

No candidate flipped from allowed to refused.

Scope-Verdict: PASS

Reason: The only tightening is one new market-registries leaf on the file-tool fence and the sandbox masks. None of the three shell tiers reads those tables, so the 18 shell candidates should stay allowed, and the fold reports their actual verdicts. The file-tool and sandbox side of this leaf can't be classified, so it's named under UNADJUDICATED below.

TIGHTENING: _CREW_SECRET_LEAVES, sandbox._CREW_HIDDEN_LEAVES and _CREW_PRECREATE_HIDDEN_DIR_LEAVES each gain the directory leaf "market-registries" (src/kiro_crew/security/paths_lists.py: + "market-registries",). The one threat it refuses: "a same-UID agent cannot read the refresh token or swap in another person's sign-in, which the gateway would then send on the owner's behalf."

ADJUDICATED: 18 candidates, 0 confirmed newly-refused

PLATFORM COVERAGE: The diff assumes a crew-home path, <data home>/market-registries/<id>, built from data_home() and following KIROCREW_HOME.

  • posix: rows cover the default ~/.kiro/crew/market-registries, the $KIROCREW_HOME relocation, du and grep naming the leaf as data, and pytest runs of the touched tests.
  • windows: rows cover the PowerShell spelling $env:USERPROFILE\..., the cmd spelling %USERPROFILE%\... with backslashes, Select-String, a .venv\Scripts\python.exe pytest run, and the curl.exe executable name.
  • any: rows cover the leaf name inside a commit message, kirocrew config get market_registries, kirocrew app list, gh pr diff and vitest, none of which depends on the platform.
  • Not probed: a UNC-path data home and the legacy .kirocrew prefix spelling. The shell tiers match no paths, so neither one changes what the shell gate sees.

UNADJUDICATED: The leaf is enforced outside the shell composite, so no shell verdict covers these paths:

  • Agent file tools: fs_read/fs_write call is_sensitive_path / is_sensitive_write_path, which check _matches_gate_rows against _SENSITIVE_HOME_DIRS. That list gains <crew-prefix>/market-registries for every crew-home prefix (paths_lists.py:848-850). Inputs I would have submitted:

    • an agent fs_read of ~/.kiro/crew/config.json (it should stay allowed: the store ids live there, not in the fenced folder);
    • an fs_read of a sibling file whose name only starts with the leaf, like ~/.kiro/crew/market-registries.json. It should stay allowed, because the match is target + os.sep.

    _KEYSTONE_ARTIFACT_PARENTS adds no new parent: a bare leaf's parent is the crew-home root, which is already listed.

  • Linux sandbox: _CREW_HIDDEN_LEAVES and _CREW_PRECREATE_HIDDEN_DIR_LEAVES bind-mask and pre-create the folder for every spawned shell. That means a sandboxed ls ~/.kiro/crew/market-registries sees an empty folder whatever the shell gate says. This is the threat working as intended, not a regression. Nothing classifies it.

  • New HTTP checks in routes_market_registry.py and routes_market_install.py are dashboard routes. These are require_usable_registry, the 400 market_registry_one_only / market_registry_unknown answers, the 409 market_account_changed and market_registry_changed checks, and the 401 → market_signed_out mapping in HttpMarketClient._call. A legitimate input I would have submitted is an install prepare with no account or registry field, as an older dashboard page sends it. The spec says both fields are optional, so it should still be accepted. None of these routes can be expressed as a shell command line, so the classifier gives no verdict on them.

[SCOPE-REVIEWED] bd842c2

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 6.1 flagged blocking issues on bd842c2b9ee1a187c9cbd61fff25336c72200004; Opus 5.5 adjudication downgraded every one of them. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents.

This comment is updated in place on each push.

Review details

BLOCKING -- src/kiro_crew/apps/market_registries.py:365 -- Replacing a store misattributes existing installations

installed_version = _market_version(installed.get("source"), ref) if installed else None
Trigger: Install acme/board from store A, remove A through Sources, and add offered store B containing acme/board. Both listing routes call listing_row, which matches the installed source by ref without comparing the store.
Outcome: B’s listing is incorrectly marked Installed and appears in B’s Installed filter; its card and detail page suppress the other-source name-collision notice.
Anchor: defect
Fix: Persist the originating store id with market installations and require both store and ref to match. Treat legacy installations with unknown store provenance as name collisions.
Sites: src/kiro_crew/apps/routes_market_registry.py:357, src/kiro_crew/apps/routes_market_registry.py:404; readers at website/src/components/appstore/MarketListingRows.tsx:114, website/src/components/appstore/MarketListingRows.tsx:234, website/src/pages/apps/MarketListingPage.tsx:115, and website/src/pages/apps/DiscoverPage.tsx:350.

[BLOCK-MERGE-DOWNGRADED] bd842c2
[GPT-REVIEWED] bd842c2

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1 — LOW harm. I confirmed three conditions. First, listing_row matches an install only by the market:<ref>@<n> prefix and never checks the store (src/kiro_crew/apps/market_registries.py:329,365). Second, only one store can be installed from at a time (market_registries.py:264-268), so the trigger needs the operator to remove store A and add store B, and B must offer the same <ns>/<name> ref. Third, the module says on purpose that store provenance is recorded only once a second store exists (market_registries.py:23-25). The open-source build offers no stores at all (:5-7).
What goes wrong is a badge: B's listing shows "Installed" where it should show "name taken". Nothing is installed twice and no data is touched, because install_app refuses a second app with the same name either way (:348-349). Recovery: none needed, since the wrong label can't trigger a duplicate install.
The real fix costs more than that. Install sources would need a new store-id field, a rule for older installs that have no store recorded, and changes to the shape both listing routes read (routes_market_registry.py:357,404). All of that would serve a rare store swap that only changes a label.

[ADJUDICATION] bd842c2b9ee1a187c9cbd61fff25336c72200004 total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/apps/market_registries.py:365 reason=disproportionate-remedy
[GPT-ADJUDICATED] bd842c2b9ee1a187c9cbd61fff25336c72200004

False positive or not applicable? A repository writer can comment:
/ai-review override gpt bd842c2b9ee1a187c9cbd61fff25336c72200004 false-positive: <reason, 20 to 500 characters>

@buluoray

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: 17ee588
  • 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.
  • 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-staging pattern in all three lists. The branch tests for the store routes pass (348 backend). In a live run on a throwaway Linux box, 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 70, 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 (348 passed); website market tests (234 passed).
  • How to undo: remove the market-registries entry from the three lists (one line each), or revert the PR.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 16, 2026
@buluoray
buluoray force-pushed the crew/kiro-space-x-appstore/space-store-source branch from 17ee588 to 0d94193 Compare November 16, 2026 21:06
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 16, 2026
@buluoray
buluoray force-pushed the crew/kiro-space-x-appstore/space-store-source branch 10 times, most recently from 9bfd0f2 to e9c36de Compare November 17, 2026 03:42
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: 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 (app["market_registries"]) that lets a build offer a Kiro Space store as an App Store source, without adding any store code to this repository. With no provider set, the read route answers offers: [] and every other route answers 503. Every route runs the owner check (require_owner_dashboard_request) before it reads the body. A store must be both added in config and offered by the provider before any route or the install factory will use it. PUT accepts at most one store (market_registry_one_only), which fits the zero-argument install factory and answers the Design Review's concern about adding two stores. Prepare checks the account and store the page loaded under. Confirm checks both again and refuses when no account can be named, with 409 tests for both. The server stops claiming updates for a market: install in _enrich_with_install_status and published_index. The frontend hides Update and Sync on the row, the tile menu, the detail page and Update All. The sign-in folder is added to the secret, hidden and pre-created leaf tables, with its threat stated, as AGENTS.md requires. Config adds a new optional key that round-trips, and t

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 e9c36de456 · 6256 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@buluoray

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: a61f1b2
  • 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 answers market_signout_failed instead 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-staging pattern 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-registries entry from the three lists (one line each), or revert the PR.

@buluoray
buluoray force-pushed the crew/kiro-space-x-appstore/space-store-source branch from a61f1b2 to 5ca5263 Compare November 18, 2026 19:31
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 18, 2026
bolichen97
bolichen97 previously approved these changes Nov 18, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving 5ca5263. The delta from 982ec66 is small: a held store shows its rows again when the loaded account comes back, with a test for it, plus the rebase's i18n rows. Design sign-off stands from my earlier comment.

AI-assisted, sent by Bolin Review bot

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 18, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

@buluoray I re-approved 5ca5263 with auto merge on. Sensitive Change Review needs your template again for this head: please repost it with Head commit: 5ca5263f8a… (full SHA). The check re-runs on your comment, no push needed.

AI-assisted, sent by Bolin Review bot

@buluoray
buluoray force-pushed the crew/kiro-space-x-appstore/space-store-source branch from 5ca5263 to e66c1fc Compare November 18, 2026 20:21
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 18, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving e66c1fc. The delta from 5ca5263 is small: keepAccounts takes a canRelease flag, so a held store is shown again only on a status read that names the loaded account, plus a comment tweak.

AI-assisted, sent by Bolin Review bot

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 18, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author

Sensitive change review

  • Head commit: e66c1fc
  • 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 answers market_signout_failed instead 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-staging pattern 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-registries entry from the three lists (one line each), or revert the PR.

@bolichen97

Copy link
Copy Markdown
Contributor

The reds on e66c1fc (Backend Tests (3.12, 8), Backend Tests (Windows) (8), and the Coverage Gate after them) are test_bare_session_handle_guard.py::test_no_test_builds_a_bare_session_handle_directly. That one is main's, not this PR's: #38978 broke it and #39262 fixed it, but this PR's test merge is on an older main. A rebase onto current main and a push should clear it. My approval will need renewing on the new head, and I'll do that once it is green.

AI-assisted, sent by Bolin Review bot

@buluoray
buluoray force-pushed the crew/kiro-space-x-appstore/space-store-source branch from e66c1fc to a2a99cb Compare November 18, 2026 23:11
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.
@buluoray
buluoray force-pushed the crew/kiro-space-x-appstore/space-store-source branch from a2a99cb to bd842c2 Compare November 19, 2026 00:28

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 answers market_signout_failed instead 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-staging pattern 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-registries entry 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

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 19, 2026
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.

3 participants