Skip to content

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

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

buluoray merged 13 commits into
release/0.13.0from
crew/slack/backport-0.13.0-batch1-part3

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 3 of 3, onto release/0.13.0 (head 705bf17e7fb, after part 2 #37355 and #37357). 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 8 picks and 5 prerequisites.

One commit per pick, each made with git cherry-pick -x in main's merge order. 8 applied with no conflict; 5 carry a hand-resolved hunk, listed below.

Pick Main commit Tag What 0.13 users get
#36975 338f7254d5d2 KAS, user report Treat a standalone kiro-cli 3.x as the chat binary, not a launcher.
#30062 684bc6215f2d user report Resume a conversation into the scratch tree it had. Hand-resolved, see below.
#36135 6b75355d50f4 KAS, user report Say in chat when a kas server waits for a sign-in. Hand-resolved, see below.
#37108 a5585710658a KAS Send a new chat's session-stable blocks as the agent prompt.
#37097 dd9d0e3c25a9 KAS Stop the KAS projection repeating work every new chat. Hand-resolved, see below.
#36295 011a6ddad5fe KAS Lift the Kiro CLI update card when KAS moves to the bundle.
#36923 f04ddad1da07 user report Read aws s3 downloads across statements and assignments. Hand-resolved, see below.
#37203 2cbf235c107b KAS Read a sandbox launcher exit as unknown, not as no engine flag.
Prerequisite Main commit Needed by What it is
#37105 e564a9ba4e27 #37097 Fix stale claims in system specs against current code.
#37135 c296cd7df02d #37097 Show an app's own translations on its store listing.
#36347 9bfa880fcbbd #37097 Refresh an open not-installed app tab when the app is installed. Hand-resolved, see below.
#36327 f43dd14a1fdc #37097 Pin the parents of every hidden crew-home leaf.
#30943 9c6dc115f811 #37097 Say which part of an app's session grant is missing.

Each prerequisite is a fix from main with its own tests, except #37105, which changes docs only. "Needed by" names the pick whose conflict pulled it in: 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 cut the start-up work every new KAS chat repeats (#37097, #37108), say in chat when a KAS MCP server waits for a sign-in (#36135), treat a standalone kiro-cli 3.x as the chat binary (#36975), lift the Kiro CLI update card when KAS moves to the bundle (#36295), and read a sandbox launcher exit correctly (#37203). The other picks fix bugs that users reported after the cut.

Not a goal

What changed (motivation → approach → change)

Hand-resolved hunks

No code line was hand-resolved. Each hunk below takes the pick's change and leaves out what belongs to a main commit that is not on 0.13. Original authorship is named in each of these commits' messages.

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 on this head, on top of parts 1 and 2: one pytest process per batch of 20 files, no xdist. The run covered 1,759 test files (every test file the picks touch, plus every test file that imports a module they change): 78,222 passed, 25 failed. All 25 also fail on a clean release/0.13.0 checkout run the same way; they fail locally on a clean main too, while main's CI is green, so they come from this test machine, not from the code.

Frontend on this head: tsc -p tsconfig.app.json clean, scripts/check-i18n-keys.mjs OK. The 6 vitest files this part touches: 5 pass. The other one, CrewChatWindow.test.tsx ("draws a code fence in a peer USER row copy-only too"), fails the same way on a clean release/0.13.0.

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; each frontend change is a cherry-pick of a main PR that carried its own review evidence on main.

Related Issues

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

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.

iamwhatever and others added 13 commits November 14, 2026 22:28
Audit every docs/system-specs page against the module it names and
correct identifiers, paths, defaults, counts, routes and behaviour
statements that no longer match the code: renamed or moved functions,
retired routes and categories, wrong config defaults, and incomplete
lists that claim to be complete.

Co-authored-by: zejiangg <zejiangg@amazon.com>
(cherry picked from commit e564a9b)
)

* fix(scratch): resume a conversation into the scratch tree it had

A resumed conversation (gateway restart, transient backend exit, idle
reap) built a new provider that got a fresh, empty $KIROCREW_SCRATCH.
The old tree then had no live owner and the hourly sweep deleted it,
with the agent's staged work.

Record each session's work tree per session key in an index inside
the masked scratch root, and hand it back as shared_scratch on a
resume. The index lives in a new agent_scratch_trees module.

A failed index write, or an index that cannot be opened, keeps the
in-process binding of the tree in use and lets the session start;
only a disk row naming another tree for the key is dropped.

Continues #15980 by Premshay. Fixes #15979.

Co-authored-by: Premshay <28099628+Premshay@users.noreply.github.com>

* fix(scratch): start the session when retirement cannot be persisted

A resumed or reset session refused to start when abandon_tree could
not confirm the index write, so one unreadable or unwritable
.trees.json blocked every such session until someone repaired it.
Before the index existed a resume always started, in a fresh tree.

Log a warning naming the index and let the allocation continue.
abandon_tree drops the key's in-memory binding first, now also when
the managed root itself cannot be read, so this process never hands
the tree back; after a gateway restart the key may rejoin its own
earlier tree, never another key's.

---------

Co-authored-by: Premshay <28099628+Premshay@users.noreply.github.com>

Hand-resolved backport; original author: Ray Xu.

(cherry picked from commit 684bc62)
An app's l10n block reached the dashboard only once the app was
installed: _merge_manifest, which builds a store row from the app's
app.json, copied displayName and description but never l10n. A reader
whose language the app translated saw English on the store card and
detail page until after install. Carry the block on the row as
manifest.l10n, where the dashboard already reads it, parsed with the
install's L10nConfig so a malformed or over-cap locale is dropped the
same way.

(cherry picked from commit c296cd7)
On KAS a remote MCP server whose saved OAuth sign-in stopped working
left every new chat without its tools and with nothing that said why.
The engine deletes saved tokens, and reports failedAuthorization, only
for invalid_grant, invalid_client and unauthorized_client. Any other
refusal of a refresh keeps the tokens and reports the server failed, so
nothing tracked it for a sign-in and naming it in a message did nothing.

A failed entry whose error says the token endpoint refused the saved
sign-in is now tracked like failedAuthorization and listed as waiting
for a sign-in. A 5xx, server_error or an unreachable endpoint is left
alone: a sign-in reset would delete tokens that may still work.

A chat also adds one notice row, once, naming the servers that wait for
a sign-in and have no open sign-in card, with how to sign in. The chat
page draws it with a link to the MCP Servers page. It starts no sign-in.

On the MCP Servers page a server with a saved sign-in that the page
cannot sign in to (added outside the page) says how to sign in, where
the row used to show nothing. A server added from the page already
offers Sign in again; a test pins it.

Hand-resolved backport; original author: Ray Xu.

(cherry picked from commit 6b75355)
#37108)

A new dashboard chat on the default agent sent its agent system prompt,
critical rules and tool-name rules inside its first user message. That
message is unique per chat, so the engine's prompt cache never served
those bytes and every new chat paid for them in full.

On a KAS harness known to apply a client agent's prompt, a dashboard
session of the default agent whose spec prompt is the managed stub now
sends those three blocks as the agent's prompt, folded like the message
and closed by a short gateway note. The engine caches its first message,
which holds that prompt. The runtime records each block on session/new
and session/load, and the session-start build leaves a block out only
when its record equals it byte for byte.

A resumed chat that started with a head and whose resumed session holds
none gets the agent system prompt back in its resume message, because
the engine rebuilt its first message from the stub. The session map
keeps that per sid (head_sid). Another agent, a prompt a person wrote,
a non-dashboard key and every other harness keep the message path.

The agent prompt has one renderer, agent_spec._render_contract, which
the builder calls with its per-session readings and the head calls with
live ones.

Decision: docs/request-for-change/rfc-kas-session-head-in-agent-prompt.md

Part of #36928

(cherry picked from commit a558571)
…36347)

An open "X isn't installed" tab kept saying so after the app was
installed from the CLI or another tab, until a reload or a focus
change. The gateway already sends the app_reload frame for every
install, but only a mounted AppHost listened for it.

A new useAppInstalledElsewhere hook lets the two not-installed views
(AppPage after a 404, BuiltinAppRoute's released state) hear that
frame for their app: it fires mc:apps-changed so the shell re-reads
the installed-apps list, and AppPage also re-reads the app's record.

Part of #26967

Hand-resolved backport; original author: Bolin Chen.

(cherry picked from commit 9bfa880)
A sandboxed child could rename a parent of a masked crew-home leaf
(apps/meetings/data, apps/aws-control, or an app's credentialMasks
data dir). On Linux the mask is a mount that moves with the parent
inside that spawn, but on disk the leaf then sits at a name no mask
covers, so the next spawn read it there. On Seatbelt the parents of
core hidden leaves were not guarded either.

Every parent of every hidden spelling, core or app-declared, now joins
the rename guards the read-only seals already use: pin_seal_parents
binds on Linux, literal write denies on Seatbelt. A leaf the spawn
lifts keeps its parents unguarded there. A retired leaf, which nothing
writes any more, guards its parents only while they exist, so
md-notebook's sandboxed backend can still create its own home.

(cherry picked from commit f43dd14)
An app token without the user-session control grant got one body on
every route that needs it: {"error": "app cannot manage session
approvals", "code": "session_approval_not_granted"}. The grant needs
three things: permissions.sessionApproval in app.json, the owner's
consent, and the app turned on. The refusal named none of them, so a
developer could not tell an app.json change from an owner's click.

session_approval_denial_cause names which part is missing, and
app_can_manage_session_approvals grants from it, so the decision lives
in one place. The 403 keeps its code and adds cause. error says who
clears it: add "sessionApproval": true and update the app, have the
owner click "Enable and allow chat control" or "Enable", or retry. The
cause is read again after the decision, off the event loop, so the
wording never decides a refusal.

(cherry picked from commit 9c6dc11)
)

With 64 MCP servers the KAS custom-agent projection still took 433 to
673 ms of a new chat's start on Linux, and 138 to 157 ms on its own.
Three parts of it redo the same work every chat with the same inputs:

- the resource-glob match behind the auto-approval and hook-coverage
  checks, about 4,100 calls, is now memoized (lru_cache of 4096 pairs
  on batch_guard._read_glob_matches; a string over 256 characters is
  matched uncached). It is a pure function of two strings; a test pins
  that it reads no module state. Every grant decision built on it is
  still made fresh.
- the MCP config scopes are read once per projection in
  KasHarness.session_extras and handed to the worker-stub withdrawal,
  the agent block, the declared names and each sub-agent target,
  instead of two or more reads.
- a shared launch snapshot that already holds exactly its bytes, as
  this user's owner-only regular file, is left in place instead of
  rewritten with fsync. Missing, different, linked or not owner-only
  files are written as before; Windows always writes.

An agent that names several sub-agent targets also repeated, for each
target, the agent-spec name scan, every skill file read and every
installed app's manifest read. One session start now reads each once
(build_reuse.one_build around the projection): the spec scan keyed on
each file's identity, so a spec written meanwhile is read again;
nothing is kept past the start. With 8 targets the targets took 9.1 s
before and 0.74 s after.

The projection's output is unchanged: tests project a 64-server spec
and a several-target agent with and without the reuse and compare the
bytes.

Closes #37041

Hand-resolved backport; original author: Bolin Chen.

(cherry picked from commit dd9d0e3)
#36295)

* fix(setup): lift the Kiro CLI update card when KAS moves to the bundle

The too-old latch followed only the configured route, so with config
still naming the relay the card stayed up after KAS moved to the
bundled engine on its own (no kiro-cli, or kiro-cli signed out).

While the latch is set, also ask kas_route.resolve_kas_route, at most
once per minute: the resolver reads kiro-cli's SEL-audited sign-in
store and the gate polls every few seconds.

Closes #35450

* fix(setup): resolve the KAS route through agent_sdk and list it in the facade

The latch's route check imported kiro_crew.acp.kas_route from application
code, which the agent-sdk boundary refuses. Ask agent_sdk.kas_bundle.kas_route
instead, which now forwards the service's environ and home. Name the two new
probe names in the kiro_prerequisite facade manifest, and patch the autouse
route fixture through _floor_monkeypatch.

---------

Co-authored-by: Jacob Largent <largjaco@dev-dsk-largjaco-kiroc-2a-dc066d04.us-west-2.amazon.com>
(cherry picked from commit 011a6dd)
#36923)

The credential-exfil-s3-{cp,mv,sync} rows refused ordinary downloads
when a command held more than one statement (several cp lines joined
by newlines, ';' or '&&') or used a
variable set earlier on the line (B=b; aws s3 cp s3://$B/...).

s3_direction now splits the line into top-level statements with the
existing quote-aware shell_commands reader and narrows the rows only
when every aws s3 transfer on it is a plain download. A plain literal
assignment made once on the line is resolved. A pipe, background '&',
subshell, command substitution, any here-document or redirect, compound
keyword, reassignment or any upload keeps the deny.

When one of these rows still refuses a line that looks like a download,
deny_guidance answers with download guidance (literal paths, or
aws s3api get-object) instead of the upload prose.

Closes #36876

Hand-resolved backport; original author: Ray Xu.

(cherry picked from commit f04ddad)
…lag (#37203)

When the sandbox launcher refuses the kiro-cli acp --help probe and
its trusted re-run then passes, the result carries no sandbox_failure,
so the launcher's own sandbox: line was read as kiro-cli's help. That
help has no --agent-engine flag, so the gateway marked KAS unservable
and ran on kiro-cli. This was seen when one gateway started while
another booted.

A probe reading what a kiro-cli supports now treats a nonzero exit
carrying any launcher exit line as unknown: the pinned acp --help and
v3 start probes (logged, never cached) and the PATH-only --version
probe. An exit kiro-cli made itself is still its answer. A help gap's
fallback notice now names the run it was read from.

(cherry picked from commit 2cbf235)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 14, 2026 22:55
@buluoray
buluoray requested review from CrysisDeu and removed request for a team November 14, 2026 22:55
@github-actions

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/deny_guidance.py

  • src/kiro_crew/hook_runtime/safe_reads.py

  • src/kiro_crew/sandbox_argv.py

  • src/kiro_crew/sandbox_leaves.py

  • src/kiro_crew/security/deny_gate.py

  • src/kiro_crew/security/paths.py

  • src/kiro_crew/security/paths_lists.py

  • src/kiro_crew/security/s3_direction.py

  • No reasoning template for 8bd104d 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: 8bd104d1c498b86c2d83f544b8b317adb132f726
- 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 8bd104d1c498b86c2d83f544b8b317adb132f726 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing screenshots of the new chat sign-in notice and the new MCP tab line. The PR attaches no image, so the blind read was not performed.

Evidence gaps

  • Chat sign-in notice (McpSignInNeededNotice.tsx, the warning card using mcp_sign_in_needed_single / _several, which can end in "N more"): no screenshot. Closing it takes two stills of a chat transcript: one with a single server waiting for sign-in, one with several servers including the "N more" overflow.
  • MCP tab status line (McpTab.tsx, signed_in_no_row_sign_in: "Signed in. This page can't list this server's tools…"): no screenshot. Closing it takes a still of the Overview → MCP tab showing a signed-in server with no tools listed.
  • Not-installed app page refreshing on its own (AppPage.tsx and BuiltinAppRoute.tsx through useAppInstalledElsewhere): no screenshot. Closing it takes before and after stills of an open "not installed" app tab, then the same tab after the app is installed from somewhere else.

Notes

  • The text in mcp_sign_in_needed_several runs three sentences in a single paragraph. Cut "Each one needs its own sign-in." The example message already shows that sign-in goes one server at a time.
  • signed_in_no_row_sign_in says "calling one in chat is the real check". That is how the system works inside, not something the user does. Suggested replacement: "Signed in. Tools for {{name}} show up in chat; if one fails, send "Sign in to {{name}}"."

[UX-REVIEWED] 8bd104d

Description read

[DESCRIPTION-READ] 612c38cec73187d4dae81626cb2dd34a4d57b2f336e414b8c920ad1ee8c49e44

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

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 8bd104d1c498b86c2d83f544b8b317adb132f726 — 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 cherry-pick -x of a fix main already reviewed. No default or product shape changes beyond what main shipped, and each prerequisite is there only so a pick applies cleanly.

Notes

What this change ships

Inventory (10 items) — 9 justified

Intent: ship the KAS fixes and user-reported fixes that merged on main after the cut in 0.13. FIX.

  1. A standalone kiro-cli 3.x is treated as the chat binary, not a launcher — justified
  2. A resumed conversation gets back the scratch tree it had — justified
  3. Chat says when a KAS MCP server is waiting for a sign-in — justified
  4. A new chat sends its session-stable blocks as the agent prompt — justified
  5. The KAS projection is no longer rebuilt on every new chat — justified
  6. The Kiro CLI update card goes away when KAS moves to the bundle — justified
  7. aws s3 downloads are read across statements and assignments — justified
  8. A sandbox launcher exit is read as unknown, not as "no engine flag" — justified
  9. Store listing shows an app's own translations (prerequisite) — rides along
  10. Prerequisites: an open not-installed app tab refreshes on install, hidden-leaf parent pins, the session-grant cause is named, docs fixes — justified

[FIRST-PRINCIPLES-REVIEWED] 8bd104d

Description read

[DESCRIPTION-READ] 315a8b60fdb0653c0875c3960182ea7b975d792f438073a9bc501fa944d95128

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

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

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

Design-Verdict: PASS

cannot evaluate: missing screenshot of the new chat "MCP server waits for a sign-in" notice and the McpTab "signed in, no row sign-in" line as they render on release/0.13.0.

Blockers

The new UI ships with no screenshot of this revision
Trigger: The diff adds website/src/pages/chat/McpSignInNeededNotice.tsx (new file; return <NoticeCard content={content} tone="warn" body={body} />) and a new McpTab branch (data-testid="mcp-signed-in-no-row-sign-in"). The evidence file lists 0 images and 0 recordings. The description says "each frontend change is a cherry-pick of a main PR that carried its own review evidence on main".
Outcome: Main's screenshots show main's state, not this one → transcriptRenderers.tsx was hand-resolved here to keep 0.13's "Ultra Mode" neighbouring row, and McpTab.tsx/AppPage.tsx differ from main → nobody has seen how the warn notice and the new McpTab line look in 0.13's chat and MCP Servers page before 0.13 ships.
Fix: attach a screenshot of each surface taken from this branch.
Clears when: the description carries a github.com/user-attachments image, or a committed one under temp-screenshots/, showing the chat sign-in notice (one server and several) and the McpTab row, rendered from this head.

Notes

  • The description says "No code line was hand-resolved", then lists hand-resolved hunks. It also says 5 picks carry one but shows 4 bullets, and the first starts "for the same reason", which points to a bullet that isn't there. Make the list match the 5 commits.

[DESIGN-REVIEWED] 8bd104d

Description read

[DESCRIPTION-READ] af1874b3d9579a0c33aeb692030b53017d3692768ff8ea222d69d0f6f5856fd7

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

Security Scope Review -- ✅ PASS

Which legitimate operations does 8bd104d1c498b86c2d83f544b8b317adb132f726 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): 19 classified, 0 newly refused, 17 still allowed.
  • ubuntu-latest (platform posix): 19 classified, 0 newly refused, 17 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-tier change is a rewrite of the s3 download reader in s3_direction._s3_download_only. It allows more sequences than before, though the new statement splitter is a new path for single downloads that the old reader already allowed, so 25 boundary candidates probe it. The real tightening is the new scratch/.trees.json keystone leaf, the scratch-root override fence in is_sensitive_path, and the hidden-leaf rename guards in the sandbox. That tightening is in the file-tool path gate and the OS sandbox, which the classifier cannot measure, so it is named under UNADJUDICATED below.

TIGHTENING: the crew keystone path fence and the sandbox rename guards -- these stop an agent from reading or rewriting the subagent scratch tree index, which would expose other trees and remap resumes. The hunks: + "scratch/.trees.json", # Reads expose other trees; writes remap resumes. (paths_lists.py _CREW_SECRET_LEAVES, and the same in sandbox_leaves.py _CREW_HIDDEN_LEAVES), plus if (os.path.basename(cand_cf) == TREE_INDEX_FILENAME or cand_cf.endswith(".tmp")) and os.path.dirname(cand_cf) in scratch_parents: return True (paths.py _path_in_home_dirs). Secondary change in the deny-rules tier: if raw and raw.lower() != command: return False in s3_direction._s3_download_only, and the new structural gate if cmd.separator not in (";", "&&", "||", "\n", ""): return False.

ADJUDICATED: 25 candidates, 0 confirmed newly-refused

PLATFORM COVERAGE:

  • posix (17 rows): The s3 reader returns False on Windows before and after this change, so only POSIX can flip. The posix rows probe the new splitter at its edges:
    • quoted spaces and a quoted # in a key
    • a trailing newline and backslash continuations
    • the Running: prefix and an inline AWS_PROFILE= prefix
    • quoted globs, a - destination and a mkdir && … && ls sequence
    • the non-transfer neighbours aws s3 ls, s3api and cloudformation
    • shell reads and renames of the newly fenced ~/.kiro/crew/scratch and .trees.json
  • windows (8 rows): They cover the same scratch-folder and tree-index operations in %USERPROFILE%\… with \ separators, %KIROCREW_SCRATCH%, a PowerShell $env: read, and the non-transfer aws neighbours. The diff adds no Windows-specific shell assumption.
  • any (0 rows): Every row names an executable or a path.
  • Uncovered spelling: the legacy .kirocrew prefix (the second entry of _CREW_HOME_PREFIXES).

UNADJUDICATED:

  • Guard 1: security.paths.is_sensitive_path. It now refuses <crew-home>/scratch/.trees.json through _CREW_SECRET_LEAVES → _SENSITIVE_HOME_DIRS.
    • It also refuses any *.tmp or *.lock directly in <crew-home>/scratch/, because _KEYSTONE_ARTIFACT_PARENTS is derived from the leaves.
    • When a scratch-root override is set, it also refuses .trees.json or any *.tmp directly under that override root (_path_in_home_dirs).
    • Call path: an agent file tool (read/write/edit) → the path tier of hooks.GATE_TIERS → is_sensitive_path(resolved) → _path_in_home_dirs.
    • Inputs I could not get a verdict for:
      • a subagent writing $KIROCREW_SCRATCH/<tree>/notes.tmp, which is one level down and should stay allowed;
      • a file tool reading <scratch-root>/<tree>/out.json;
      • when the override root is a user-owned build directory, an editor or tool writing <override>/foo.tmp directly at that root, which this change now refuses;
      • the same on Windows with C:\Users\me\scratch\foo.tmp and on a case-insensitive volume, where the check uses casefold.
    • Possible narrowing, argued but not confirmed: the .tmp arm fences every *.tmp at the override root, not only atomic-write temps of .trees.json. Keying it to the tmp*.tmp mkstemp shape would keep the threat refused.
  • Guard 2: sandbox rename guards in sandbox_argv._live_plan_host.
    • Before this change, Linux namespace mode guarded only the seal parents against rename, and Seatbelt also guarded the parents of app-declared hidden leaves. Now both backends also guard the parents of every core _CREW_HIDDEN_LEAVES spelling (now including scratch/.trees.json) and of the relocated targets.
    • Call path: an agent shell spawn → sandbox_plan → _renameable_ancestor_guards / _literal_ancestor_guards.
    • Inputs I could not get a verdict for: mv ~/.kiro/crew/scratch/old-tree … run inside a sandboxed shell, which renames a child, not the guarded scratch entry; renaming or removing ~/.kiro/crew/scratch itself during cleanup; and the md-notebook backend creating workspace/md-notebook (covered by the lexists carve-out).
    • The shell classifier only reads command text, so the posix mv row tests the deny tiers, not this guard.

[SCOPE-REVIEWED] 8bd104d

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 8bd104d1c498b86c2d83f544b8b317adb132f726 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8bd104d

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

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 8bd104d

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

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

@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 14, 2026
@buluoray
buluoray merged commit b91bc87 into release/0.13.0 Nov 14, 2026
24 of 27 checks passed
@buluoray
buluoray deleted the crew/slack/backport-0.13.0-batch1-part3 branch November 14, 2026 23:30
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention 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