Skip to content

fix: 0.13 backport batch 1, part 2 of 3 (KAS and user-reported fixes) - #37355

Merged
buluoray merged 20 commits into
release/0.13.0from
crew/slack/backport-0.13.0-batch1-part2
Nov 14, 2026
Merged

buluoray merged 20 commits into
release/0.13.0from
crew/slack/backport-0.13.0-batch1-part2

Conversation

@buluoray

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Bring the KAS fixes and the user-reported fixes that merged on main after the 0.13 cut to release/0.13.0, so 0.13 ships them.

Backport batch 1, part 2 of 3, onto release/0.13.0 (head 1fe3510b2fa2, after part 1 #37323). Batch 1 carries the 38 main fixes that fix KAS or that users reported, plus 23 prerequisites, in main's merge order. It lands in three PRs because its whole diff is over the 1 MB the AI review lanes accept. This part has 16 picks and 4 prerequisites.

One commit per pick, each made with git cherry-pick -x in main's merge order. All 20 applied with no conflict; nothing was hand-resolved.

Pick Main commit Tag What 0.13 users get
#36541 9a5c716a1cd9 KAS Run allowed commands beside denyByDefault and deniedCommands.
#36952 2f4e88a3bccd user report Seed the substitute model on a cold cache when retrying.
#36955 c0a9585cb5ed KAS, user report Show each session-start spec notice once per chat.
#36996 114fa6cdc848 KAS Stop claiming the global compact threshold on KAS.
#36145 19f781c8c3df KAS Exclude the mcp.json servers under KIRO_HOME too.
#36922 b8d6f3320945 user report Price "with sharing" from one idle stub while sharing is off.
#36951 036bc927cd26 user report Find the sudo user's nvm node for the systemd unit.
#36957 c28afeacebac user report Read a shipped built-in's hard-linked app.json by its RECORD.
#13040 3dcc03032ec8 user report Gate app-menu IPC per-action for remote gateway senders.
#36813 9f1ff8e17a05 KAS, user report Grant allowedCommands beside plain output redirects.
#36978 c8f45fb8709c KAS, user report Send sign-in and renewal through the proxy.
#37052 9449adaf23cf user report Reuse the update lane's gateway credential across polls.
#37062 2e6bffdfc231 user report Keep one-shot ssh commands from binding a config forward.
#36998 874b8e79cbc1 user report Keep a deleted app cron job deleted across restarts.
#37093 8892812dcba9 KAS Defer the default servers' tools on a custom agent.
#36993 b2520fa573d6 KAS Name a dropped oauth block on every harness, not only KAS.
Prerequisite Main commit Needed by What it is
#36500 d9a5c59def0e #37097 Refuse a folder update over a marketplace app.
#36325 fe1abf3b33e0 #37097 Hand a seam back to the builtin when its copy unloads.
#36738 c4eb21d647ac #37097 Require the owner on the app catalog refresh routes.
#36610 1752cb6d4871 #37097 Show app translations keyed by a regional or lower-case locale.

Each prerequisite is a fix from main with its own tests, and none changes behaviour beyond what its own PR describes. "Needed by" names the pick whose conflict pulled it in, which lands in part 3: without the prerequisite, that pick conflicts on code it added.

Why it matters

0.12.2 was the last 0.12 release, so 0.13 is the next release users get. The KAS picks in this part fix shell grants (#36541, #36813), KAS sign-in through a proxy (#36978), the mcp.json servers under KIRO_HOME (#36145), the compact threshold KAS claimed (#36996), MCP sign-in notices (#36993), tool loading on a custom agent (#37093), and repeated spec notices (#36955). The other picks fix bugs that users reported after the cut, including the per-action IPC gate for remote gateway senders (#13040).

Not a goal

  • Features, refactors, tests-only and docs-only commits from main.
  • Batch 1 part 3, and the other fix and perf commits: they come in later PRs.

What changed (motivation → approach → change)

Cherry-picks only. No hunk was hand-resolved.

Backwards compatibility

Compatible. Each pick behaves as it does on main, where it was reviewed. Nothing is removed: no key, path or record.

Tests

Test changes come from the picks.

Release PRs get no backend test lanes in CI, so the backend tests ran locally: one pytest process per batch of 20 files, no xdist.

  • This part on top of part 1 (tree identical to this head): 631 test files (every test file the picks touch, plus every test file that imports a module they change). 27,470 passed, 5 failed. The 5 fail the same way, in the same batches, on a clean release/0.13.0 checkout. They also fail locally on a clean main, while the PR that the 0.13 cut was taken from (feat: let an administrator allow or refuse each decision model #36271) passed every Backend Tests shard in CI, so they come from this test machine, not from the code.
  • All of batch 1 together (parts 1 to 3): 2,775 test files, 117,266 passed, 146 failed, all of which also fail on clean release.

Frontend: tsc -p tsconfig.app.json is clean on this head. The 3 vitest files this part touches pass.

flake8 and black on every Python file in batch 1: clean.

Manual verification

N/A. Unit coverage above; the same changes are on main.

Screenshots / video

Why no screenshot: this part adds no UI of its own. Its frontend changes are cherry-picks: #36610 and #36996 passed Design and UX review on main; #13040's main PR has no Design or UX run; its frontend part is the Windows title-bar menu and its strings, behind the new per-action IPC gate.

Related Issues

Backport of the main PRs listed above. Follows #37323.

Sibling sweep

Siblings: none -- the backport touches the same sites the picked PRs changed on main

Pattern harvest

Not generalizable: backport of already-reviewed fixes

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: ...). A backport batch keeps one commit per pick.
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

chenmingwei23 and others added 20 commits November 14, 2026 21:19
* test(apps): red tests for overwriting a marketplace record

update_app from a local folder, and register_external_app over the same
name, rewrite a market:<ref>@<n> record's source and sourceCommit,
dropping the app's listing provenance and its trust coordinate.

Ticket: CREW-27311

* fix(apps): refuse a folder update over a marketplace app

update_app and register_external_app now refuse a record whose source is
market: with app_update_market_source before anything is replaced, so
the installed tree, the market: source and the zip sha256 stay as they
were. A marketplace update path (resolve, verify, re-confirm) comes
later.

Ticket: CREW-27311
(cherry picked from commit d9a5c59)
#36541)

On KAS, a spec whose shell allowedCommands sit under denyByDefault
beside a deniedCommands list asked before every matched command,
where kiro-cli runs it unasked (#30017). Three readers kept the grant
at the prompt:

- the deny lift read denyByDefault as a restriction on a matched
  command; it now asks kas_agents._allowed_commands_withheld, the
  reader the plain allowedCommands answer uses, so denyByDefault only
  refuses an unmatched command;
- parse_deny refused any entry holding "|"; it now refuses only
  alternation, so a literal "|" in a class or escaped is checked;
- the Rust-syntax reader refused the control escapes \n \t \r \f \v
  \a; it now reads them as Rust does.

Every refusal row still runs first.

(cherry picked from commit 9a5c716)
)

An adopted former built-in registers its seam providers from on_startup
under the builtin's id, replacing the providers the wheel copy's seams.py
registered. Those providers import the copy's own modules at call time,
so after a disable, update or uninstall unloads them every call raises
ModuleNotFoundError: the consent cards fall back to the default chain,
the project pill reports an expired SSO sign-in as unavailable, and the
MicroVM staging and crew digest fail, until the gateway restarts. The
built-in answered whether or not it was enabled.

unload_app_modules now calls seams.release_app, which restores the
provider the builtin's seams module registered during the one-time load.

Part of #26967

(cherry picked from commit fe1abf3)
…6952)

When the pinned Claude model is restricted, session/new answers with a
substitution advisory and no session. Crew adopts the substitute and
retries, but the re-seeded settings.local.json writes `model` only on a
warm advertised-model cache. That cache fills only after a session/new
succeeds, so an install restricted from its first session retried with
the user's own settings still naming the restricted model, and every
session failed.

The retry now records the model it adopted, and the payload writes that
model even on a cold cache. The first attempt and every other cold-cache
seed are unchanged.

Closes #36938

(cherry picked from commit 2f4e88a)
A chat starts a new backend session on every reconnect, reload and
gateway restart, and _prepare_spec_hooks added its spec notices again
on each one: keys nothing carries, confirm: true hooks, too-long hook
commands, withheld project spec hooks, and the notices for hooks,
steering or toolsSettings nothing runs. Nothing about the spec had
changed, so the same rows piled up in the chat.

The chat now keeps a short list of marks, one per notice it showed,
keyed on the notice text and, for a folder-bound notice, its folder.
A notice shows again only when its mark is new. The list holds the
newest 32 and is saved on the chat's metadata line, so a restart keeps
it. No new setting.

Closes #36824

(cherry picked from commit c0a9585)
On a chat that runs on KAS and follows the global auto-compact setting,
the context popover read "Following global (70%)" and showed 70% as the
threshold. KAS leaves compaction to its own summarization at the global
threshold (#33224), so that line told the user something that does not
happen.

In that case the threshold now reads "Set by KAS" and the existing note
that KAS compacts on its own, and that a threshold set here compacts
sooner, takes the place of the "Following global" line. A KAS chat with
its own or its agent's threshold, and every other backend, look as
before.

Closes #36995

(cherry picked from commit 114fa6c)
POST /api/app-store/refresh and POST /api/apps/registries/refresh
were the only registry writes that skipped the owner check, so a
non-owner dashboard subject could bust the registry caches and make
the gateway re-fetch every configured registry. Both now refuse a
non-owner with the same owner_only 403 as the install, update and
registry-config routes. An app token keeps the store refresh, since
it reaches it only through an explicit permissions.api grant.

(cherry picked from commit c4eb21d)
On KAS an agent that does not opt in to mcp.json loads only the
servers it declares: Kiro Crew names every mcp.json server and tells
KAS to leave the undeclared ones out. Kiro Crew's global path is
~/.kiro/settings/mcp.json and does not follow KIRO_HOME, while KAS
reads its global file under KIRO_HOME. With KIRO_HOME set to another
folder, as in every Dev Fleet pod, the servers of that file were never
named, so a folder agent got them.

The settings stamp now also names the servers of
$KIRO_HOME/settings/mcp.json when that is another file. It is read
only to add exclusions and to carry disabledTools. A file that cannot
be read adds one notice line and the session still starts. With
KIRO_HOME unset nothing changes.

Closes #36144

(cherry picked from commit 19f781c)
#36922)

With sharing off no stub runs, so the MCP page's footprint had no stub
to price "with sharing" by and left that figure out. The gateway now
reads one: once per gateway run it starts a single idle stub through
the sandbox, with the same --read-limit the rewriter gives real stubs,
has it register on a private unix socket, round-trips one initialize,
reads the stub's PSS, stops it and keeps the reading.

The socket sits in a fresh 0700 directory under the gateway's own
runtime dir, is made 0600, is unix only, and is removed with its
directory on every way out, a timeout included. The probe serves no
backend, so no server starts. A probe that cannot run or read is no
reading, kept as such, and the page shows the "now" figure alone.

The reading prices a freshly attached idle stub, a floor: stubs that
have run for hours grow past it. A test pins the probe within 15% of a
stub attached to a real gatewayd on the same interpreter.

Part of #36884

(cherry picked from commit b8d6f33)
)

Under `sudo kirocrew service install`, sudo replaces PATH with its
secure_path, so the unit's PATH named no nvm dir and fell back to
/usr/bin/node. MCP servers that need a newer Node then failed to start
after a reinstall, and the unit also carried root's own PATH entries
although it runs as SUDO_USER.

service_path() now drops entries under root's home when the unit runs
as another account, and when the installer's PATH has no nvm dir it
reads the SUDO_USER account's nvm install from that account's home:
~/.nvm, then ~/.config/nvm, the version alias/default names, else the
newest installed. Only files are read; nothing in that home runs.

Closes #36908

(cherry picked from commit 036bc92)
…RD (#36957)

On an install that hard-links package files, the agent-spec reader
refuses every file with more than one link, so owning_app_for_agent and
the command-agent containment check read nothing for any built-in app:
its agents counted as custom agents and lost their app's name.

The agent-spec reader now takes an opt-in admission callback, the same
contract the skill reader already uses for built-in SKILL.md files. The
two built-in app lookups pass it only for a shipped built-in's package
root, and it admits a hard-linked .json file only when the installed
distribution's RECORD lists that path under kiro_crew/apps/builtins/
and the bytes read match its sha256 digest. Every other hard-linked
spec stays refused.

Closes #36939

(cherry picked from commit c28afea)
#13040)

* fix(electron): gate app-menu IPC per-action for remote gateway senders

The Electron app-menu IPC channel (`app-menu:items` / `app-menu:execute`)
was gated per-channel via `assertLocalDashboard`, letting through anything
a local dashboard could issue. A remote gateway page loaded in a
connection window shares the same preload, so it could invoke privileged
menu roles (paste reads the OS clipboard, quit terminates the app,
close/minimize/zoom mutate OS window state, togglefullscreen covers the
desktop) plus custom-click items (DevTools opens on the local dashboard,
Settings/About windows).

Classify menu items into four sets — LOCAL_ONLY_ROLES,
LOCAL_ONLY_MENU_IDS, LOCAL_ONLY_ITEM_IDS, REMOTE_SAFE_ITEM_IDS — and
enforce them at `executeMenuItem` when the sender is not local. Thread
`senderIsLocal` down from the IPC boundary through `menuItems` and
`executeMenu` so `app-menu:items` also advertises LOCAL_ONLY rows as
`enabled: false` for a remote sender — a rendered row must not silently
no-op on click. Resolve the verdict once per WebContents via a WeakMap
cache invalidated on `did-navigate` to keep the per-click cost sub-ms.

Add a template-walk drift pin that walks `buildMenuTemplate` output for
both isMac branches, filters by `WINDOWS_TITLEBAR_MENU_IDS` reachability,
and asserts every reachable leaf is classified in exactly one set. This
catches an unclassified item added to `app-menu.js` that a set-membership
pin alone would miss.

Windows-only enforcement is deliberate: the `app-menu:*` IPC is the only
renderer-invocable menu path (Linux/macOS use the native OS menu with no
renderer API, and custom click handlers resolve to
`focusedDashboardWebContents()` which finds the dashboard view, not
remote content). The classification sets are the global policy; the
enforcement point is single because the attack surface is single.

A gated row carries no per-row decoration and the payload carries no
accelerator-registration field. Greying states the row is inert from this
window, and the footer adds the one thing greying cannot say: the
shortcuts still shown do fire, because Electron's native accelerator
dispatch and Chromium's own clipboard handling both bypass this IPC.
That sentence is kept true by subtraction rather than annotation.
`serializeMenuItems` blanks the caption of a gated row whose chord cannot
reach its command, which is File > Settings… alone — `registerAccelerator:
false` displays Alt+, without binding it, and the in-page handler that
does route it only receives the keystroke while the dashboard page holds
focus. So the wire carries an existing field with a narrower value rather
than a new flag no consumer reads. One renderer test pins the absence of
any per-row marker, one wire test pins the suppression, and one pins the
absence of the field.

Paint the menu without waiting on the port probe. A lapsed positive
verdict paints `app-menu:items` at once and re-probes in the background;
`app-menu:execute` still refuses unless a fresh probe proves a local
owner, so the click stays the real gate. A probe that cannot name the
primary-port holder (unknown, or none while our gateway restarts) keeps
the rows painted enabled for a restart-sized grace instead of greying the
local window's own menu, but never authorizes an action. Past the grace
the rows grey with the footer. A proven foreign holder revokes the
positive, and a first call still fails closed.

`classifyPortOwner` gains `unidentified` for a holder that demonstrably
exists but whose command line could not be read. `unknown` means the probe
never ran, so nothing is known to hold the port and the adopt path may
fail open; here a holder exists and only its identity is missing, so the
adopt path refuses it exactly as it refuses `foreign`, while the app-menu
gate reads it as inconclusive rather than as a proven foreign holder. That
is what stops a transient probe failure from revoking the local user's own
menu rows.

Off macOS the Window menu's Zoom is a custom click calling
`applyWindowControl(win, "maximize-toggle")` rather than Electron's
macOS-only `zoom` role, so it carries no role for `LOCAL_ONLY_ROLES` to
catch and would have inherited remote-safe on execute. It is fenced by id
as `window-zoom`, and the template-walk pin is what found it.

Co-authored-by: Bolin Chen <bolichen@amazon.com>
Co-authored-by: Joe Guo <12429733+iamwhatever@users.noreply.github.com>

* fix(electron): keep a hostile menu id inside the rejection-log budget

A page could pass an app-menu id whose own toString throws. Building the
focus-moved refusal line called it, so the throw skipped the per-sender
budget and every queued invoke wrote its own dispatch-failed line.

Render renderer-supplied ids by type instead of coercing them, and send
the dispatch-error line through the same budget.

* fix(electron): refuse a menu dispatch when focus moved inside the window

The focus-moved check compared windows, so a modal opened inside the
same window moved the focused WebContents unnoticed and a Reload then hit
the modal. Compare the focused WebContents too.

The refusal notice covers the whole shell, so its ask-the-agent hand-off
could unmount a page holding unsaved drafts. Turn it off, as
errors-use-error-notice requires.

---------

Co-authored-by: Bolin Chen <bolichen@amazon.com>
Co-authored-by: Joe Guo <12429733+iamwhatever@users.noreply.github.com>
(cherry picked from commit 3dcc030)
…36610)

An app's l10n block was read only under the reader's exact locale and
its base language, with a case-sensitive key match. The manifest
accepts "zh-cn" and regional tags like "pt-BR", but the dashboard's
reader locale is "zh-CN" or "pt", so those translations installed
cleanly and were never shown. Match keys without case, an exact key
winning over a case variant, and when there is no exact or
base-language entry, use a regional entry for the same language before
falling back to English. A regional entry that can switch the script
(a Chinese region, a script subtag) is never borrowed. The manifest
reference and the app-kit spec describe the new order.

Fixes #36609

(cherry picked from commit 1752cb6)
kiro-cli's v3 engine takes plain redirects off a command before it
matches allowedCommands, so "make build > build.log 2>&1" runs without
a prompt under the entry "make build". Kiro Crew refused every command
holding < or >, so on KAS such a build always asked.

The gate now takes the same redirects off first (split_redirects) and
matches what is left. Before it grants, each file a redirect opens must
pass Crew's own floors: a write target is not sensitive or
write-protected, a < source is not sensitive. A relative target with no
session directory, or inside a chain, keeps the prompt. $() and
backticks still ask, and so does a redirect before the program.

Closes #36798

(cherry picked from commit 9f1ff8e)
Kiro Crew's own requests to the sign-in service ignored HTTPS_PROXY,
HTTP_PROXY and NO_PROXY, so on a proxy-only network a renewal failed and
the chat said 'Not signed in to Kiro'. Every sign-in and refresh request
now passes resolve_proxy(url), with trust_env still off (no netrc), and
the temporary renewal session is bounded to 30 s.

An engine line that names the proxy, its tunnel or CONNECT and carries a
refusal is now a connection error with a proxy message, not a sign-in
failure. A bare 403 keeps its signed-out verdict.

Closes #36954

(cherry picked from commit c8f45fb)
…#37052)

The managed update lane reads the gateway's armed record every 30s
(GATEWAY_ARM_POLL_MS), and createGatewayArm's request() ran the full
credential chain on every call. Each run is a fresh mint: a local-secret
link token, or `ssh <host> kirocrew token` for a remote crew. Every mint
takes one of the gateway's 50 link-nonce slots and does a link-to-session
exchange, so the poll alone produced about 120 mints an hour.

In 0.12.2 this poll had no own-gateway guard, which is what drove one
ssh mint every 30s from a Mac app tunnelled to a dev desktop. Main now
skips the poll for a gateway the app does not own (#35775), but a local
gateway still minted on every poll.

request() now keeps the credential it resolved and reuses it until the
gateway answers 401/403, then re-resolves once and retries; a second
refusal is returned as is, so it cannot loop. An empty answer is not
cached, and a borrowed cookie that cannot be turned into a header drops
the cache. Crew-companion, mochi and the app-window host already reuse
their credential this way.

(cherry picked from commit 9449ada)
…ard (#37062)

The desktop app fetches a remote crew's dashboard token with a plain
`ssh -n -o BatchMode=yes -o ConnectTimeout=N <host> kirocrew token`.
That ssh reads the user's ssh_config, so a `LocalForward 5476 ...` set
for the dev desktop's host is applied to it too. When nothing else holds
the port, the token ssh binds it, the dashboard's sockets start riding
it, and ssh keeps running after `kirocrew token` exits because it waits
for those forwarded connections to close. The execFile timeout (20s by
default) then kills it: the token it printed is thrown away and every
connection on the port drops. The next fetch binds the port again.

A field log shows this exactly: every 30s a fetch starts, the port
answers while that ssh lives, and it stops answering the moment the ssh
is killed 20.009s later.

Pass `-o ClearAllForwardings=yes`, which tells ssh to ignore the
forwards in its config files, in both one-shot builders: the desktop
token fetch (website/electron/remote-token.js) and the gateway's
token_mint._build_ssh_argv, which the remote token mint, restart_remote
and the diagnostics probes share. None of them wants a forward. The
supervised tunnel (`ssh -N -L`) is unchanged: ClearAllForwardings would
also clear its own -L. The instances spec now says why the one-shots pin it.

(cherry picked from commit 2e6bffd)
At every gateway start the core reconciled app crons by creating any
manifest job missing from the store, and nothing recorded that a person
had deleted one. A deleted job of an enabled app therefore came back on
the next start and ran again.

A person's delete of a manifest-stamped app job now records the job's
name under member-records/app-crons-deleted/<app>.json, and the
start-time registration skips a recorded name that is absent from the
store. Disabling the app or finishing an uninstall clears the record,
so the next enable brings the jobs back. Removals the app itself
requests, one-shot self-removals and whole-app removals are not
recorded.

Closes #36974

(cherry picked from commit 874b8e7)
A custom agent (an agent file Kiro Crew did not write) gets Kiro
Crew's kirocrew-core and kirocrew-cron servers at spawn. It grants no
tool_search loader, so the KAS handshake listed every one of their 90
tools on toolSearch.neverDefer and each request carried them in full.

On a host that reads the settings channel (KAS), the handshake now
leaves the servers Crew itself added (crew_added_servers: the managed
entry, byte for byte) behind KAS's loader, as on the default agent.
Their whole-server grant and their share of "*" are not expanded; a
tool of theirs the author names one by one stays direct, and so does
mcp_server_wait (CUSTOM_AGENT_JOB_TOOLS). Every other tool the spec
grants is unchanged, and other backends send exactly what they did.

Specs and docs: providers.md, agent-host-contract.md, mcp.md (the
job-tool table) and agent-spec-fields.md.

Part of #37080

(cherry picked from commit 8892812)
…36993)

Co-authored-by: Joe Guo <zejiangg@amazon.com>
(cherry picked from commit b2520fa)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 14, 2026 21:21
@buluoray
buluoray requested review from iamwhatever and removed request for a team November 14, 2026 21:21
@github-actions

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/hook_runtime/gate_tiers.py

  • src/kiro_crew/security_posture.py

  • No reasoning template for 30ccc01 yet.

How to clear this check:

  1. The PR author posts the template below as a PR comment, with
    every field filled (N/A needs a reason). Keep the
    Head commit line: it must name the current head SHA.
  2. The check turns green within a minute, with no push.
  3. A new push resets this check: post it again for the new head.

Only the author's comment counts this way. A reviewer can instead
paste the filled template into an "Approve" review on this head.
Merging still needs a reviewer's approval.

## Sensitive change review
- Head commit: 30ccc0151a7d8982bd9133778ba5247f5d89d933
- What rule changed:
- Before -> after (what was allowed/blocked, now):
- Worst case if wrong (breaks commands / leaks secret / locks user out):
- Evidence checked (which sandbox result proves it):
- No regression:
  - Tools still work (which tools/commands were run, result):
  - Backward compatible (old config / old data / old callers still work, how checked):
  - Existing tests (which suites passed on this head):
- How to undo:

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

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 30ccc0151a7d8982bd9133778ba5247f5d89d933 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing screenshots of the Windows titlebar menu's new refused and greyed states and the changed auto-compact readout. The PR has no images, so the blind read was not performed.

Evidence gaps

  • Windows titlebar menu, refused click: the ErrorNotice that says "“{{item}}” did not run. It is unavailable here right now." (WindowsTitlebarMenu.tsx). No screenshot shows it. A screenshot taken after clicking a gated item, such as Reload, in a remote connection window would close this gap.
  • Windows titlebar menu, gated rows: the greyed rows and the footer "Some items are unavailable here. The shortcuts shown still work." No screenshot shows them. A screenshot of the open View menu in a remote connection window would close this gap.
  • Auto-compact popover (ContextShelf.tsx): the threshold value now reads "Set by {{backend}}" instead of a percentage, and the harness-managed note now replaces the "Following global" line. No screenshot shows either. A screenshot of the context-usage popover in a KAS chat would close this gap.

Notes

  • "unavailable here" appears in both strings and never says why. Naming the reason, for example "Unavailable in a remote connection window", would tell the user which window can run the item.
  • In the auto-compact popover, the slider still shows a position while the value beside it reads "Set by KAS". The screenshot should show that the two read as one consistent setting.

[UX-REVIEWED] 30ccc01

Description read

[DESCRIPTION-READ] 6f517b81b02ab30911614a6f9124fb05828a9b7272d9a3581332282fec241b5d

That sha256 names everything this verdict read: the PR description, plus the 3 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

Copy link
Copy Markdown
Contributor

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

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

Design-Verdict: PASS

cannot evaluate: missing screenshot of the Windows title-bar menu's new refusal notice and gated-row footer. #13040 adds both. By the description's own account it never had a Design or UX run, and this PR attaches no rendered evidence.

Blockers

The Windows title-bar menu gains UI that has never been rendered for review
Trigger: the description says "#13040's main PR has no Design or UX run; its frontend part is the Windows title-bar menu and its strings", and the diff adds to WindowsTitlebarMenu.tsx an notice ("titlebar_menu_refused_notice") and a footer (role="note", "titlebar_menu_disabled_footer"). design-evidence.txt lists 0 images and 0 recordings.
Outcome: two new pieces of UI (a fixed full-shell overlay and a footer inside the popup) reach 0.13 users. No reviewer has seen them on main or here. The surface only runs on Windows Electron, so CI does not exercise it either, and "Manual verification: N/A" leaves its placement, width and wrapping unchecked → layout defects ship in the release.
Fix: on a Windows Electron build of this head, capture the menu with a gated row showing the footer, and capture the refusal notice after a refused click.
Clears when: the description carries a github.com/user-attachments screenshot or recording of the footer and the refusal notice from this revision, rendered on Windows.

Notes

[DESIGN-REVIEWED] 30ccc01

Description read

[DESCRIPTION-READ] 424ef63cc1ed3c65501b65d3eee1f04b1823992ed733d54ad38df19dcd5ee129

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 30ccc0151a7d8982bd9133778ba5247f5d89d933 — 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

Every item is a fix that was already reviewed and merged on main. The one reversed pin (#36541's denyByDefault tests) is declared in the description and backed by a test reproducing the reported spec.

What this change ships

Inventory (10 items) — 10 justified

Intent: ship the KAS fixes and the user-reported fixes merged on main since the cut in 0.13. This is a FIX (backport).

  1. Allowed shell commands run unasked beside denyByDefault/deniedCommands; the deny still refuses what it names (fix(kas): run allowed commands beside denyByDefault and deniedCommands #36541, fix(kas): grant allowedCommands beside plain output redirects #36813) — justified
  2. KAS sign-in and token renewal go through the configured proxy (fix(kas-auth): send sign-in and renewal through the proxy #36978) — justified
  3. mcp.json servers under KIRO_HOME are excluded too; oauth-drop notice shows on every harness (fix(kas): exclude the mcp.json servers under KIRO_HOME too #36145, fix(mcp): name a dropped oauth block on every harness, not only KAS #36993) — justified
  4. The context popover no longer shows the global compact threshold as the one in force on KAS (fix(chat): stop claiming the global compact threshold on KAS #36996) — justified
  5. Each session-start spec notice shows once per chat (fix(chat): show each session-start spec notice once per chat #36955) — justified
  6. Windows titlebar menu: per-action IPC gate for remote senders, with a refusal notice and a footer for gated rows (fix(electron): gate app-menu IPC per-action for remote gateway senders #13040) — justified
  7. A deleted app cron job stays deleted across restarts (fix(cron): keep a deleted app cron job deleted across restarts #36998) — justified
  8. Smaller user-report fixes: seed the substitute model on a cold cache, find the sudo user's nvm node, read a hard-linked app.json, idle-stub pricing, reuse the update lane's credential, one-shot ssh forwards (fix(acp): seed the substitute model on a cold cache when retrying #36952, fix(service): find the sudo user's nvm node for the systemd unit #36951, fix(apps): read a shipped built-in's hard-linked app.json by its RECORD #36957, fix(mcp): price "with sharing" from one idle stub while sharing is off #36922, fix(desktop): reuse the update lane's gateway credential across polls #37052, fix(instances): keep one-shot ssh commands from binding a config forward #37062) — justified
  9. Default servers' tools are deferred on a custom agent (perf(kas): defer the default servers' tools on a custom agent #37093) — justified
  10. Four prerequisites: refuse a folder update over a marketplace app, owner gate on catalog refresh, seam hand-back, regional-locale app translations (fix(apps): refuse a folder update over a marketplace app #36500, fix: require the owner on the app catalog refresh routes #36738, fix(apps): hand a seam back to the builtin when its copy unloads #36325, fix: show app translations keyed by a regional or lower-case locale #36610) — justified

[FIRST-PRINCIPLES-REVIEWED] 30ccc01

Description read

[DESCRIPTION-READ] 40eaf7a3e99842354f489bdbdfdf36532aa7edcf1960d53442a0ff75b88a9a46

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

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ PASS

Which legitimate operations does 30ccc0151a7d8982bd9133778ba5247f5d89d933 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): 12 classified, 0 newly refused, 12 still allowed.
  • ubuntu-latest (platform posix): 12 classified, 0 newly refused, 12 still allowed.
  • windows-latest (platform windows): 6 classified, 0 newly refused, 6 still allowed.

No candidate flipped from allowed to refused.

Scope-Verdict: PASS

Reason: The only shell-side tightening is a new redirect floor on the spec-builtin-grant path. It applies to commands that carry redirects, and before this change those commands were never granted at all. A command with no redirect stays clear, so no call the gate granted before newly loses its grant. That floor, the Electron local-only menu gating and the market-source app-update refusal are all outside the three-tier deny composite, so the classifier cannot measure them, and they are named under UNADJUDICATED.

TIGHTENING: _spec_command_granted now ANDs in redirect_floor.redirects_clear -- it refuses an allowedCommands grant whose redirect opens a sensitive or write-protected file, or a relative target inside a chain or without an absolute session directory: "+ return _command_matches_any(call.command, call.spec_granted_commands) and redirects_clear(\n+ call.command, call.spec_write_cwd\n+ )" together with "+ if not os.path.isabs(redirect.target) and (chained or not os.path.isabs(cwd)):\n+ return False".

ADJUDICATED: 16 candidates, 0 confirmed newly-refused (no verdicts were handed to this review; none is claimed)

PLATFORM COVERAGE: I wrote posix, windows and any rows. The diff assumes things about paths in two places: os.path.isabs on the redirect target and on spec_write_cwd, and splitting words on a single space with /-free target screening. The posix rows probe absolute /tmp/... and /dev/null targets, relative build/... targets, a < source, >&2, &> and both chained shapes. The windows rows probe a drive-letter absolute target (C:\Temp\...), a backslash relative target and 2> NUL. Those rows matter because _UNPLAIN_TARGET_CHARS includes \, so on Windows every backslash path redirect fails the split. The deny composite should not be affected by that, but the windows rows record it. The any rows cover 2>&1 and a quoted literal |, which sits next to the parse_deny alternation change. I did not write a PowerShell-specific redirect spelling (*>, 3>&1), because the diff refuses those outright and no legitimate row could probe it beyond what the windows rows already cover.

UNADJUDICATED:

  • Guard: platform/redirect_floor.redirects_clear, reached through hook_runtime/gate_tiers._spec_command_granted from the spec-builtin-grant / _tier_spec_shell_allowlist row. Call path: a KAS shell tool call → ToolCall.command + spec_write_cwd → allowed_commands.split_redirects → sensitive_write_path_refusal / sensitive_path_refusal. "Not clear" withholds the grant and returns the prompt; it never denies. Inputs I would have submitted against a spec granting npm run .* / pytest.* / git log.*:
    • npm run lint > lint.txt && cat lint.txt (relative target in a chain: keeps its prompt by design);
    • pytest -q > C:\Temp\out.txt on Windows (the backslash refuses the split, so it keeps its prompt; kiro-cli's v3 engine may grant it, so Crew is narrower there);
    • make build >> build.log 2>&1 with no absolute session directory.
      None of these was granted before this change, so none is a regression. They are the boundary where the new grant is narrower than kiro-cli's.
  • Guard: Electron ipc-registrar.js / windows-menu-model.js LOCAL_ONLY_ROLES / LOCAL_ONLY_MENU_IDS / LOCAL_ONLY_ITEM_IDS sender-locality gating. Call path: a renderer menu click → IPC → sender origin and port-holder probe → refuse when the holder is foreign or the probe is inconclusive. Inputs: a local user clicking DevTools or reload on the primary window while the port probe is transient or slow, and a window on a local gateway reached through an ssh -L forward. The design text says an inconclusive probe refuses the click, which may withhold the row from a legitimate local user during a probe failure. I cannot confirm this with a classifier.
  • Guard: apps/manager_install.update_app and apps/routes_install / routes_registry / registry_pipeline/install.py refusing a folder or registry update over a market:-sourced app. Call path: kirocrew app update <app> --source <dir> or the dashboard install route → source check → outcome="rejected". Inputs: a developer updating an app they first installed from the marketplace from a local checkout of the same app, and a registry refresh of a marketplace app.
  • Guard: parse_deny now treats any alternation as unknown, not just a raw |, and a deniedCommands entry with a literal or class | (foo\|bar, [|]) is now read. This widens grants and does not tighten anything, so it is outside this lane.

[SCOPE-REVIEWED] 30ccc01

@github-actions

Copy link
Copy Markdown
Contributor

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

GPT 6.1 flagged blocking issues on 30ccc0151a7d8982bd9133778ba5247f5d89d933; 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/cron_service/service/job_removal.py:125 -- Concurrent app registration can resurrect a deleted cron
await asyncio.to_thread(_remember_deleted_app_jobs, [row], actor=actor)
Trigger: An app update overlaps a dashboard DELETE of its manifest cron. api_cron_delete → remove_job_async persists removal before recording the deleted name; meanwhile, handle_update_app → _resync_app_crons_after_update → register_app_crons_with_service snapshots the missing job and the old deletion record, then calls add_job_if_absent_async.
Outcome: DELETE returns success, but registration recreates the scheduled job. Later registrations, including after restart, preserve it because the deletion check skips only missing jobs.
Anchor: defect
Fix: Coordinate removal plus deleted-name recording with registration’s deletion-check-and-create operation under a shared lock; recheck the deletion record inside that coordinated creation.

[BLOCK-MERGE-DOWNGRADED] 30ccc01
[GPT-REVIEWED] 30ccc01

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

LOW: the deleted cron comes back only if a dashboard DELETE and an app update overlap within a few thread hops. Removal is persisted at job_removal.py:122 and the deletion is recorded at job_removal.py:125. Registration takes its job snapshot at bridges_crons.py:720 and reads the deletion record at bridges_crons.py:726. If the snapshot is taken before the removal, the job counts as present with a matching stamp and is skipped (bridges_crons.py:744-747), so only the narrow interleaving recreates it. The returned cron is visible in the cron list. Deleting it again goes through remove_job_async, which records the deletion (job_removal.py:124-125), so it stays gone. Before this PR, every deleted manifest cron came back on the next registration.
The real fix is a lock shared by the cron-store removal path and app registration, plus a recheck inside the creation step. That adds a new ordering contract across two modules, and it would exist only for a millisecond race whose result the user can see and undo.

[ADJUDICATION] 30ccc0151a7d8982bd9133778ba5247f5d89d933 total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/cron_service/service/job_removal.py:125 reason=disproportionate-remedy
[GPT-ADJUDICATED] 30ccc0151a7d8982bd9133778ba5247f5d89d933

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

@buluoray
buluoray merged commit 705bf17 into release/0.13.0 Nov 14, 2026
23 of 27 checks passed
@buluoray
buluoray deleted the crew/slack/backport-0.13.0-batch1-part2 branch November 14, 2026 21:44
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 14, 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.

6 participants