Skip to content

fix(release): forward-port seven P0 fixes to release/0.12.0 - #30016

Closed
buluoray wants to merge 27 commits into
release/0.12.0from
crew/slack/fwd-0.12-p0-batch3
Closed

buluoray wants to merge 27 commits into
release/0.12.0from
crew/slack/fwd-0.12-p0-batch3

Conversation

@buluoray

@buluoray buluoray commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Bring seven P0 fixes that merged on main after release/0.12.0 was cut onto release/0.12.0, so the next 0.12.0 RC ships them.

Each one is a crash, hang, data loss or security fix, or sits on a path most users hit, or breaks a sign-in external customers depend on. Each bug was checked to exist on release/0.12.0 @ c6ac5ccc8c before picking.

Why it matters

PR What a 0.12 user sees today
#29375 On kiro-cli 3.x's single-binary install (every public Linux and macOS 3.x user), Crew's own MCP tools stop deferring, so about 55-60K hidden tokens ride on every request.
#29372 A Builder ID sign-in, the default free sign-in, fails every chat, cron and crewmate turn on the bundled engine route, with an error that points at retrying or switching models.
#29300 The orphan sweep can kill a live agent process it cannot see, ending the user's turn and its tool work with no report; a long streamed reply stalls the whole gateway.
#29294 A scripted .svg from registry app art opened in its own tab runs on the dashboard origin with the viewer's session; a stale MicroVM bucket name can be claimed by another account and receive the crew bundle.
#29551 On macOS, "Install update and restart" brings the app back on the old version every time for anyone with the default close-to-background behaviour.
#29532 On macOS and Linux, a gateway restart that takes longer than 30 s to bind leaves the desktop app with no gateway and a stuck loading screen.
#29267 On Windows, a state file another program briefly holds open loses its update silently at most write sites.

Not a goal

  • No fix that is not already merged on main; nothing is changed only here.
  • No version bump, no tag, no CHANGELOG.md change.
  • fix(mate): carry template mcp allows for base-declared servers to workers #29893 (crewmate workers refused for a template mcp allow) is P0 too but is not merged on main yet; it is forward-ported separately once it is.
  • No Bot rename or other Bot-only fix; those go to the 0.12 line through a separate owner.

What changed (motivation → approach → change)

Each main commit was cherry-picked with -x onto origin/release/0.12.0 @ c6ac5ccc8c, in the order below, then squashed into one commit. The commit message lists every source commit.

# PR main commit Pick
1 #29375 defer Crew tools under kiro-cli 3.x's single-binary install acef6bd495 clean
2 #29300 fail the orphan sweep closed and stop re-copying a streamed reply 4ee1335977 clean
3 #29372 give the engine the Builder ID profile ARN kiro-cli sends bae908bca5 1 conflict hunk
4 #29551 let the macOS update install close its windows and reach ShipIt c3b4457226 clean
5 #29267 retry the final rename in the remaining tmp + rename writers bcd9def964 3 conflicted files
6 #29532 ask gateway.lock before respawning on macOS and Linux e123ad91ca clean
7 #29294 harden app blob headers and a few small security defaults 233f0e2d93 clean

None of them depends on a main commit outside this list.

Every other pick's added and removed lines match its main commit line for line.

Backwards compatibility

Compatible: each change is the one already merged on main, and each source PR's own compatibility note applies unchanged.

Removes nothing: no pick hides, deletes or renames anything 0.12.0 accepts.

Tests

Proof: not provable -- other: a forward-port of main commits whose proofs ran on their own PRs

  • CI does not run the backend suite on PRs into release/*, so the related set was run here: the 16 test files this diff adds or changes, plus every test file that imports a module these picks touch (210 files), in 11 batches of up to 20 files, each one pytest process with -n 0. 7266 passed, 24 skipped, 12 failed.
  • Each of the 12 fails the same way on clean origin/release/0.12.0 @ c6ac5ccc8c, so none comes from this diff: 3 in test_acp_copilot_backend.py and test_acp_harness_contract.py::test_a_missing_self_served_binary_names_its_install_command[copilot] (they read a project Copilot config on this host), 2 embedding-status tests in test_enable_embeddings_faiss.py and test_handlers_memory_coverage_embeddings.py (host embedding runtime), and 6 in test_pinned_order_real_sandbox.py (the host sandbox cannot pin its data home).
  • After the crew_companion/store.py import fix, the 5 test files that import crew_companion: 351 passed.
  • The 5 Electron test files fix(desktop): let the macOS update install close its windows and reach ShipIt (#29449) #29551 and fix(electron): ask gateway.lock before respawning on macOS and Linux #29532 change: 151 of 159 pass. The 8 that fail are the electron-updater contract tests in auto-update-install-timing.test.js; this host has no electron-updater installed, and the same 8 fail on clean origin/release/0.12.0.
  • Gate on the changed files: flake8, mypy (the only errors are 3 in wecom/client.py, a file this diff does not touch, and the same 3 appear on clean origin/release/0.12.0), check_comment_history, check_brand_name, check_file_line_cap, check_harness_parity and check_subprocess_encoding pass. isort flags three test files (test_acp_client_tool_events.py, test_apps_routes_coverage_blob_proxy.py, test_pid_sweep_helpers.py) that it flags the same way on clean origin/release/0.12.0. scripts/check_black_formatting.py could not run on this host (it needs black 26.10.1, the host has 26.3.1); CI's lint job runs it.

Manual verification

N/A - every pick was verified on its own main PR. The next 0.12.0 insider build is the end-to-end check.

Screenshots / video

Why no screenshot: the frontend changes are Electron main-process files from #29551 and #29532, unchanged from their own PRs, and neither changes a rendered surface.

Related Issues

Forward-port of #29375, #29372, #29300, #29294, #29551, #29532 and #29267 to the 0.12 line.

Pattern harvest

Not generalizable: this PR only carries seven fixes already on main. Each source PR has its own harvest.

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
  • 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; see the Licensing section of CONTRIBUTING.md.

bolichen97 and others added 27 commits November 1, 2026 16:24
Set the three version files to 0.12.0-rc.1 on the new release/0.12.0
branch, cut from main at de683eb.
Written from the c4ce1ef..de683eb range. Feature Previews items
(Ultra Mode, Agent harness per mate, Session Environments) sit in their
own section because they are not generally available yet.
Carries the 0.12.0 CHANGELOG section into a tagged candidate.
…#26913)

The owner reads as this machine's name instead of the dashboard token
subject, and sessions from before attribution read as the owner
(display only; nothing is rewritten). A decision the host settled
through its approval mode carries settled_by=host and leaves the
decision strip, which stays hidden in a solo session.

People shows a two-step connect card: share this machine on Tailscale,
then copy an invite message that leads with the 100.x link and falls
back to the MagicDNS name. Members appear from the local Tailscale
daemon's peers without an API key, Remote Control leaves People, and
the dashboard.shared_crew knobs sit under Advanced. Shared Crew copy
keeps titles, actions and states only.

The preview is a Shared Crew card under Developer > Feature previews,
stored in an owner-only file the agent sandbox can read but not write,
applied on restart; KIROCREW_SHARED_CREW_PREVIEW=1 still forces it on.

A collaborator's expected owner_only refusal of the slot environment
read is neither journaled as an error nor retried.

Closes #26896

(cherry picked from commit 88832d9)
) (#27603)

Explore (the top-bar "Explore N/7" pill and its phone twins, the Explore
sheet, the milestone notice, the Try today card on a new chat and the
Display > Explore switch) now shows only while the Feature Preview
mc-preview-explore is on. It is off by default: the sheet is still
settling and its intro clip has Chinese text burned into the frames.

With the preview on nothing changes, and dashboard.milestones_enabled
stays the inner switch. The gateway keeps the switch as
dashboard.feature_previews.explore, and the server keeps recording
milestones either way.

Closes #27424


(cherry picked from commit 763378e)

Co-authored-by: w <w@k.local>
Carries the cherry-pick of #27449 (#27603): Explore moves behind a default-off Feature Preview, and the 0.12.0 CHANGELOG lists it under previews.

Co-authored-by: w <w@k.local>
….0 (#27948, #27933, #27940, #28301) (#28403)

* fix(autonudge): let the gateway arm the default ledger patrol on a crewmate's own thread (#27948)

A member slot refused every outside arm, so conductor_patrol.ensure_patrol
could never arm the default work-ledger patrol on a crewmate's thread, and
auto-extend and the person-wait hold never applied there.

Admit exactly one outside arm on a member slot: the gateway's fixed patrol
(caller conductor-patrol, default_patrol, watch work-ledger, PATROL_MESSAGE,
the fixed bounds, gated, no banner/judge/stop file/monitor), and only on the
attested caller's own thread. The bind and session_create routes resolve the
caller through member_request_scope (peer attestation or signed session
token plus a member execution record), never the X-Session-Key header alone.
Crew slots and every other outside arm stay refused.

The admitted patrol gets a default-patrol grant in the trust record, not a
self-arm entry. The fire-time guard admits its wakes only while the stored
row still carries the fixed patrol (the store is agent-writable), and the
grant never answers is_recorded_self_arm, so it vouches for no reset; the
wake-reset gate also refuses a default_patrol loop by name.

Edits to the patrol's message, banner, judge or watch are refused with a
pointer to monitor_start, so it is never left active but unable to wake.
The monitor-architecture spec is updated to match.

The decision is rfc-conductor-default-patrol.md section 10 (owner decision,
2026-11-02), carried by #28039.

Depends on #28039
Part of #27930

Co-authored-by: cixuuz <26782336+cixuuz@users.noreply.github.com>
(cherry picked from commit 6f47c7f)

* feat(crew): teach the crewmate conductor to track dispatched work in its ledger and patrol it gated (#27933)

Where a crewmate's chat spec mounts kirocrew-work and grants
work_ledger_record (member_mate_tools.binding_has_ledger_tools), the
tracking sentence names the ledger tools and the operating-mode block
appends conductor.patrol: record, session_create, bind, then seed for
tracked work, and a self-armed monitor_start with watch="work-ledger",
the default gate, interval 300..900 and patrol_budget.py renew. The band
and renew wording are copied from the conductor charter. The mate
conductor maps the goal-conductor skill when its spec mounts the ledger.

Without the mount (today, before the ledger is mounted on the mate
conductor) every render is unchanged.

Part of #27930

Co-authored-by: cixuuz <26782336+cixuuz@users.noreply.github.com>
(cherry picked from commit 80cb485)

* feat(crew): mount the work ledger on a crewmate's conductor and worker (#27940)

build_agent_config() skips every opt_in server, so kirocrew-mate-conductor
and kirocrew-mate-worker carried no kirocrew-work: the crewmate prompt named
work_ledger_* tools the session did not have, and a mate worker could not
call work_brief / work_report.

Both mate installers now mount kirocrew-work through
managed_mcp._managed_opt_in_entry("mcp-work") (registry type and
KIROCREW_HOME pin), after the conductor's platform filter. The conductor is
granted _LEDGER_CONDUCTOR_WORK_GRANTS, the worker _WORKER_WORK_GRANTS, both
through the governance ceiling in write_governed_spec.

Co-authored-by: cixuuz <26782336+cixuuz@users.noreply.github.com>
(cherry picked from commit ffe58da)

* test(crew): read the crewmate conductor as ledger-mounted (#28301)

#27933 pinned the crewmate conductor as ledger-less and named the mount
a separate change; #27940 is that mount. With both on main, four
conductor tests and eight spec-byte goldens fail on every host.

The ledger-less cases stub the installer's mount, so they still test
the skill mapping against a spec without kirocrew-work. The default
install is checked as mounted, the template-shape test allows the two
prompt skills the mount maps, and the conductor spec goldens are
re-pinned to the bytes CI printed.

(cherry picked from commit 1dd2be3)

---------

Co-authored-by: Joe Guo <12429733+iamwhatever@users.noreply.github.com>
Co-authored-by: cixuuz <26782336+cixuuz@users.noreply.github.com>
Co-authored-by: Rohan Khanderia <51836404+RohanK6@users.noreply.github.com>
Every main PR the 0.11.2 backport carried that release/0.12.0 still
lacks, plus #28925, cherry-picked with -x in main merge order, oldest
first, then squashed (PR Hygiene allows two commits). Each pick's
added and removed lines match its main commit except where noted.

- fix(mcp): refuse to replace an unparseable global mcp.json (#28023)
  (cherry picked from commit 52184dd)
  conflict in surrounding lines only; the changed lines are main's.
- fix(kas): read allowedCommands classes, groups and quoted parens like
  kiro-cli (#28437)
  (cherry picked from commit 3fc4217)
  conflict in surrounding lines only; the changed lines are main's.
- feat(dashboard): answer /context, /usage, /help and /agent locally on
  KAS (#26681)
  (cherry picked from commit 84ea89d)
- fix(mcp): skip a non-UTF-8 mcp.json in discovery like bad JSON
  (#28795)
  (cherry picked from commit 2af230d)
- fix(kas): split an authored rule's long match instead of refusing the
  block (#28510)
  (cherry picked from commit 60595c7)
- fix(kas): carry session identity to builtin app MCP servers (#28732)
  (cherry picked from commit 8e9701f)
- fix(kas): relay a remote MCP server's headers through a local bridge
  (#28615)
  (cherry picked from commit 755c71b)
- fix(kas): mount use_subagent as the engine's invoke_sub_agent (#28852)
  (cherry picked from commit 83a76fc)
- feat(kas): keep remote MCP sign-ins across sessions by default
  (#28630)
  (cherry picked from commit 00dc406)
  conflict in surrounding lines only: docs/decisions/README.md and
  configuration.md lack neighbouring rows 0.12.0 does not carry.
- fix(project-dir): treat an EPERM marker probe as absent so MCP
  start-up survives a masked mount (#28595)
  (cherry picked from commit 742ae56)
- fix(kas): judge a remote-wrapper web search as its built-in (#28704)
  (cherry picked from commit 54f4e14)
- fix(acp): remove a new KAS session's app launch snapshots at shutdown
  (#28954)
  (cherry picked from commit 1217a85)
- fix: run spec hook commands longer than 4096 characters on kas
  (#28925)
  (cherry picked from commit 0fe72d6)
  adapted: agent-host-contract.md gets main's inserted sentence in
  0.12.0's paragraph, which lacks main's later user-hook-files text.
Declare 0.12.0-rc.6 in all three version files so the next insider
RC ships the 0.11.2 fixes forward-ported by #29148.
…29152)

A non-object agent section, such as an overlay's {"agent": null},
was removed by schema validation and read as unconfigured, so a
stored agent.kas_persist_mcp_sign_in false was dropped and KAS
started storing OAuth tokens against it. agent joins the fail-closed
validation paths, so the loader records the section as degraded and
every gate that reads a degraded agent section, the KAS sign-in vault
included, fails closed.

Closes #28867

(cherry picked from commit 5691cc8)
Forward-port of five main fixes to release/0.12.0, picked with -x in
order, all clean:
#24546, #28593, #27943, #27942, #27917.

----
fix(session-map): keep the map file when its startup read fails (#24546)

SessionMap reads session_map.json once, from its constructor, and every
later mutation rewrites the whole file from memory. _load treated an
OSError on that read like a missing file and came up with an empty map,
so after one EIO, EACCES or Windows sharing violation the first
ordinary write (an agent override, a channel link, a bind) replaced the
file and dropped every session_key -> sid binding.

When the read raises OSError, _load now logs it and sets _load_failed.
While it is set, _write_payload raises OSError without touching the
file, so flush/aflush re-owe the state and persist-before-publish
callers take their existing failure branch rather than reporting a
save. A later start that reads the file recovers every binding. Corrupt
JSON still loads as an empty map and writes as before.

Closes #24545

(cherry picked from commit 62c2733)

----
fix(session): keep an unparseable session map instead of saving over it (#28593)

A session_map.json that carried a UTF-8 BOM or was not usable JSON
loaded as empty, and the next set() rewrote the file from that empty
map, dropping every chat-to-session binding. The OSError branch already
refused to write; the parse branch did not. A BOM now reads normally,
and the first write after an unparseable load moves the file to
session_map.json.corrupt-<utc> with a warning before landing. A failed
move fails that write and leaves the state owed.

(cherry picked from commit d588b4e)

----
fix(dashboard): re-read a folder store that failed to load before writing it (#27943)

(cherry picked from commit 34a44ad)

----
fix(dashboard): keep a sidebar store that failed to load from being overwritten (#27942)

(cherry picked from commit 055bf4e)

----
fix(notifications): keep an unreadable settings file instead of writing defaults over it (#27917)

(cherry picked from commit e8fea43)
…#29391) (#29413)

Right after a gateway daemon restart or upgrade, every session
re-requests its backends at once, and several cold-start together on a
host busy with the restart. A handshake that normally takes about 3s
then takes 13-15s, overruns the 10s POSIX deadline, and the backend is
reaped while it is about to answer, so every turn fails with "KAS
managed MCP initialization failed ... initialize did not complete
within 10s".

The 30s floor added for Windows cold starts now applies on all
platforms. A configured mcp_gateway.initialize_timeout_secs above the
floor still wins. The spawn gate's initialize watcher and slow-init
fraction already read the backend's effective deadline, so they move
with it.

Fixes #26379

(cherry picked from commit 60d8216)
…9378)

Adding an agent's abilities to a crewmate refused any agent that set
hooks, permissions or toolsSettings, because the worker kept none of
them. Crewmates the upgrade moved off such an agent could not get its
tools back.

The kit copy now layers the agent's hooks, permission rules and tool
settings into the crewmate's file exactly, and the worker merge carries
them, never wider than the agent declares. Crew fires the worker
session's merged hooks on KAS. A field that cannot land exactly, or a
crewmate whose worker is off KAS, is refused with an error naming the
field. The crewmate's chat keeps running the stock conductor spec.

Closes #26881

(cherry picked from commit 0354d5f)

Conflict: src/kiro_crew/docs/agent-spec-fields.md (hooks row). Kept
the release text and added only this change's crewmate sentence.
* fix(security): accept Salesforce client ids at operator-listed OAuth endpoints (#29262)

A Salesforce MCP sign-in URL is refused even after its My Domain
endpoint is added to oauth_endpoints.json. At an approved endpoint the
gate skips the bare-secret scan for client_id only when it is exactly
43 base64url characters, and a Connected App consumer key is about 85
characters, so most real keys are read as a secret.

At an endpoint listed in oauth_endpoints.json, and only there,
client_id is now also accepted without the bare-secret scan when it has
the Salesforce consumer-key shape: 3MVG9 followed by 70 to 100 of
[A-Za-z0-9._]. The operator chose that endpoint, so the gate trusts it
for this one shape. At builtin and MCP-discovered endpoints client_id
keeps the full scan, as on main, and every other parameter at every
endpoint is unchanged.

Closes #28554

(cherry picked from commit 0a0f9aa)

Co-authored-by: mbriones98 <50031759+mbriones98@users.noreply.github.com>

* fix(mcp-gateway): route crewmate files through the broker overlay pass (#28798)

A crewmate's worker on KAS got no tools from a gateway-routed stdio server
that needs env credentials: the overlay pass read ~/.kiro/agents only, so the
worker had no stub and KAS declared the server itself without its env.

The same pass now also rewrites each crewmate file in ~/.kiro/mates/agents into
<overlay>/mates/<id>.json under the stub identity crewmate:<id>, with the same
reader, launch approvals, sidecar ledger, fingerprint, cache and prune. A linked
mates/ folder is refused, and a failed overlay write removes its sidecars. On
KAS only, a worker session finds its stubs by its own execution record, in one
lookup whose entry names KAS also subtracts. An app callback from a crewmate
stub is governed under the kirocrew-mate-worker profile and its own identity,
and runs only when both permit. Unverifiable listings, records, files,
collisions or overlays yield no stub.

Fixes #26261

test/test_harness_parity.py: kept only this commit's two
_DECLARED_IDENTITY_TESTS entries; the conflicting context entry for
_session_label_elements comes from #24002, which is not on this branch.

(cherry picked from commit c001b2c)

Also carries the follow-up fix from #29419 (cherry picked from commit
6d4cd3e): worker_overlay_spec and
withdrawn_worker_stubs now also withhold a stub whose governed entry is
registry-governed (mcp_entry_is_registry_governed), so a stale stub is
not injected after its entry is retyped type: registry.

Co-authored-by: CrysisDeu <32421101+CrysisDeu@users.noreply.github.com>

---------

Co-authored-by: mbriones98 <50031759+mbriones98@users.noreply.github.com>
Co-authored-by: CrysisDeu <32421101+CrysisDeu@users.noreply.github.com>
* fix(release): forward-port six P0 fixes to release/0.12.0

Cherry-picked with -x from main, in this order:

- #28534 fix(acp): decide a KAS start on servers the host says its registry filtered
  (cherry picked from commit 6f085b9)
- #29220 fix(auth): accept company SSO start URLs as people paste them
  (cherry picked from commit fb6b6f9)
- #26401 fix(crew): wake a crewmate whose thread a restart left unloaded
  (cherry picked from commit 4f185cb)
- #28549 fix(acp): treat the request size cap as a context overflow
  (cherry picked from commit 1bc67e4)
- #28577 fix(notifications): keep an unreadable push subscriptions file instead of saving over it
  (cherry picked from commit 2bdc9e1)
- #28936 fix(desktop): warn about a previous version's orphaned gateway on macOS
  (cherry picked from commit 39e5961)

#28549 conflicted in docs/system-specs/modules/acp-client.md only: the
PR's size-cap paragraph is taken, and release/0.12.0's AcpPromptBusy line
is kept, since the goose wording main has there belongs to a PR this
branch does not carry.

Co-authored-by: Bolin Chen <17506219+bolichen97@users.noreply.github.com>
Co-authored-by: Kyle Seaman <2904635+kyleseaman@users.noreply.github.com>
Co-authored-by: Zezhen Xu <32421101+CrysisDeu@users.noreply.github.com>
Co-authored-by: Matthew Briones <50031759+mbriones98@users.noreply.github.com>
Co-authored-by: Rohan Khanderia <51836404+RohanK6@users.noreply.github.com>

* fix(crew): keep a deferred thread's reopen seed unless its crewmate is confirmed gone (#29415)

The boot restore defers a crewmate thread whose binding is intact but
names a crewmate the Crew config did not resolve, and retries it once
later. The retry read the binding through read_dm_binding_for_slot,
whose None means both "the crewmate is gone" and "something could not
be read" (an unreadable dm.json, or a config.json that fell back to
defaults), and pruned the key from the reopen seed on any None. The
next flush then removed it from open_slots.json, and the thread stopped
reopening on later boots.

The retry now makes one resolution, resolve_dm_binding_outcome, that
reads the canonical binding once and answers the binding, UNKNOWN, or
CONFIRMED_ABSENT. Absence is confirmed only for an intact id-binding
checked against a config whose base and overlay were read and whose
agents section (and whole document) is not marked degraded. Only
CONFIRMED_ABSENT prunes the seed; UNKNOWN keeps it for the next boot's
restore. read_dm_binding keeps its answers, sharing the same checks.

(cherry picked from commit 71242d5)

---------

Co-authored-by: Bolin Chen <17506219+bolichen97@users.noreply.github.com>
Co-authored-by: Kyle Seaman <2904635+kyleseaman@users.noreply.github.com>
Co-authored-by: Zezhen Xu <32421101+CrysisDeu@users.noreply.github.com>
Co-authored-by: Matthew Briones <50031759+mbriones98@users.noreply.github.com>
Co-authored-by: Rohan Khanderia <51836404+RohanK6@users.noreply.github.com>
…29386)

Cherry-picks (git cherry-pick -x), in this order:

- fix(i18n): raise the i18next floor to 26.4.4 so an unclosed nesting marker cannot hang the tab (#22326)
  (cherry picked from commit 7efc766)
- fix(desktop): make the Linux packages depend on libgbm (#28980)
  (cherry picked from commit 068b96b)
- fix(platform): read a macOS all-zombie process group as empty in pgroup_exists (#27615)
  (cherry picked from commit e1b9965)
- fix(platform): read a macOS all-zombie group's killpg EPERM as an emptied group (#27734)
  (cherry picked from commit 7d4da6b)
- fix(governance): judge cron turns by their session and fail closed on unattended turns (#27745)
  (cherry picked from commit 3fa3e80)

Conflict, hand-resolved:

- #27745, src/kiro_crew/slack/gateway_runtime/cron_turn.py (both
  stream calls): on main the added session_key=/unattended=True lines
  sit next to on_resume=, which #27508 added and 0.12 lacks. Took the
  two added keyword arguments at both sites and left on_resume= out, so
  #27508 is not pulled in. Every other file matches the source.
) (#29387)

* fix(ci): fetch only what Code Review's jobs read, not every branch (#27513)

* fix(ci): fetch only what Code Review's jobs read, not every branch

Every Code Review job checked out with fetch-depth: 0, which downloads
every branch and tag with every blob ever committed (2.87 GiB, 1109
branches). On a slow runner that fetch alone outlasted the job's timeout
and the job was cancelled inside actions/checkout.

The four jobs now check out the merge commit at depth 2 and run one
shared script as their diff-base step. It fetches the commit history of
the base tip and the head without trees or blobs, resolves the
merge-base, fetches the merge-base's files by running the diffs once,
and fails the step if the history is still shallow or any object of the
four commits is still missing, so no later step reads the network. A
retry after an attempt that completed the history asks for no
--unshallow, which git refuses on a complete history.

The script runs from the pull request's own commit, so the jobs hand it
no token. The repository is public, so every fetch is anonymous: the
script turns off any credential helper and the http.extraheader that
actions/checkout writes for github.com. A private repository refuses the
fetch, and the step fails with an error saying the repository must be
public or readable without credentials. PR Hygiene's checker steps now
fail when the base tip's copy of their script cannot be read, and run
the checkout copy only when the base tip has no such file.

Closes #23397

* fix(ci): fetch the history with blob:none, which git 2.56 can deepen

On git 2.56 (the CodeBuild runners), deepening a shallow clone with
--filter=tree:0 aborts in index-pack. blob:none keeps the commit graph
and skips every blob, and passes the suite on git 2.47 and 2.56.

(cherry picked from commit 300ee84)

* ci: blobless full-history checkout for the security scope lanes (#29347)

The Security Scope Review jobs and the fork content scan check out with
fetch-depth: 0, and on the runner fleet that clone alone now outlasts
their 15- and 30-minute budgets: on 2026-11-03 the candidates job and
the publish job were cancelled inside actions/checkout after 30 and 15
minutes.

Apply the pattern from #29301 to every full-history checkout in
security-scope-review.yml, fork-security-scope-review.yml and
fork-internal-content-scan.yml: add filter: blob:none (all commits
and trees arrive, the checked-out tree is complete, older blobs are
fetched on demand) and raise the 15-minute job budgets to 20. The
bounded-checkout test now pins the filter and the budget on each job.

(cherry picked from commit a073c19)

# Conflicts:
#	test/test_workflow_bounded_checkout.py

---------

Co-authored-by: Will Laws <will.laws@me.com>
…29412) (#29565)

A cron turn handed the PreToolUse gate its cron:<job> session key but
no agent, so resolve_active_scope skipped the task bind on the agent
name. A profile an administrator binds to an agent governed its chat
turns but not its cron turns.

Hand the gate the alias or crew record name a chat turn on that agent
hands it: each step's alias on an agent_sequence. On a single-agent
job whose capture selected a member, the member's live alias (the record
dispatch resolves through member_config_for_id), else its captured
selection_name, whatever the job's agent names; otherwise the job's
agent_id, else the agent that runs. Read before a crewmate's worker
swap. The dispatched template stays on session acquisition and message
build.

(cherry picked from commit 46af64f)

Forward-port conflict: test/test_cron_sequence_member_alias.py. On
main the new test follows tests from #28410, which this branch does
not carry. Kept the release file and appended only the new test.
…t budget to 0.12 (#29291)

* fix(link-preview): a scroll that leaves the link in place keeps its card (#28498)

The layer dismissed every unpinned card on any scroll event in the page,
captured from any element. A scroll that does not move the hovered link
(the sidebar, a transcript re-measuring rows after a reload, a scroll
that ends where it began) therefore closed a card the pointer was still
inside, and dropped a show still waiting for a cold frame, so the first
hover after a reload showed nothing until the pointer left and came back.

The layer now remembers where the latest card's link was when its hover
began and dismisses on scroll only when that link has moved.

(cherry picked from commit c3e2583)

* ci: blobless full-history checkout and 20-minute budget for the stable gate and internal content scan (#29301)

Forward-port of #29301 to release/0.12.0, so release/0.12.0 PRs and
the v0.12.0 stable gate stop timing out in actions/checkout.

cherry picked from 4e44f73; internal-content-scan.yml runs-on kept
from release/0.12.0 because #27028 is not on this branch. The
blobless checkout and timeout-minutes: 20 are taken from #29301;
release.yml and both tests applied unchanged.

(cherry picked from commit 4e44f73)

Co-authored-by: CrysisDeu <32421101+CrysisDeu@users.noreply.github.com>

---------

Co-authored-by: CrysisDeu <32421101+CrysisDeu@users.noreply.github.com>
…29473) (#29856)

Forward-port of #29473 to release/0.12.0. A PreToolUse hook whose
matcher names one exact MCP tool now withholds auto-approval for that
tool alone instead of for every MCP tool.

Conflict: src/kiro_crew/docs/agent-spec-fields.md. Kept the release
branch's toolsSettings and hooks rows and added only this fix's
sentence to the hooks row; a main-only pi-backend sentence in that row
is not on this branch and was not brought over.

(cherry picked from commit 1cd15db)
…9192) (#29852)

On the Proactor loop CPython runs CreateProcess inside the subprocess
transport constructor, before its first await. A host whose endpoint
protection holds CreateProcess for 15-20 s holds the gateway loop that
long: every MCP probe times out, kirocrew-core never connects, and the
loop-stall watchdog exits the gateway (#24968, #27800).

Split the transport build: a bounded worker pool builds the Popen
(CreateProcess plus pipe handles), and the stock transport _start binds
that finished Popen to the calling loop. Callers get the same loop-bound
asyncio Process. A cancel during the build waits for the worker, adopts
the child and tears it down as a cancel at the stock await does.

Both gateway entry points run on a loop factory that takes this path on
Windows, so ACP starts, MCP server starts and the Windows script-hook
shell arm are all covered. The owned ACP spawn keeps its CreateProcess
handle capture, now on the worker. POSIX keeps the default loop.

Design: #19136 (comment by buluoray, 2026-11-03).

src/kiro_crew/cli.py: kept release's asyncio.run line and added only
this commit's loop_factory; the _start_gateway_log_after_lock() call in
the conflict context comes from a main-only change not on this branch.

Also carries the follow-up fix from #29872: a cancel during the build
still raises CancelledError when the build itself then fails.

(cherry picked from commit 3eb66b6)
…29261) (#29896)

Forward-port of #29261 to release/0.12.0. On Windows, a stored
agent.sandbox_allow_unsandboxed_exec: false left by builds before
0.6.0 refuses every agent spawn under KAS, so Crew cannot start any
session. The load path now drops that false once, after writing the
critical SEL event, records it in the adoption ledger and logs a note;
a false set afterwards is kept.

Conflict: test/test_memory_v1_golden.py. Kept the release branch's
seeded-home file set (no config-provenance entry, which is main-only)
and added only this fix's Windows superseded_acked files.

(cherry picked from commit fd14faf)
Each main commit below was cherry-picked with -x onto
origin/release/0.12.0 @ c6ac5cc, in this order, then squashed.

- #29375 defer Crew tools under kiro-cli 3.x's single-binary install
  (cherry picked from commit acef6bd)
- #29300 fail the orphan sweep closed and stop re-copying a streamed reply
  (cherry picked from commit 4ee1335)
- #29372 give the engine the Builder ID profile ARN kiro-cli sends
  (cherry picked from commit bae908b)
- #29551 let the macOS update install close its windows and reach ShipIt
  (cherry picked from commit c3b4457)
- #29267 retry the final rename in the remaining tmp + rename writers
  (cherry picked from commit bcd9def)
- #29532 ask gateway.lock before respawning on macOS and Linux
  (cherry picked from commit e123ad9)
- #29294 harden app blob headers and a few small security defaults
  (cherry picked from commit 233f0e2)

Conflicts: #29372 keeps 0.12's connection-error condition and adds
only the model-registry branch. #29267 drops main's budget_s arm and
the pinned-replace "busy" answer, both from commits 0.12 lacks, and
adds the replace_with_retry import crew_companion/store.py needs on
0.12 (main already had it from an earlier commit).
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 4, 2026 23:22
@buluoray
buluoray removed the request for review from a team November 4, 2026 23:22
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/hook_runtime/pinned_writes.py

  • src/kiro_crew/hooks.py

  • No reasoning template for 6ada327 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: 6ada3272dac3f7127e5fab9ef0ffc8be7a41650d
- 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 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: these are seven fixes already merged on main, picked onto the release line, and the conflict resolutions narrow toward 0.12.0 behaviour rather than inventing new behaviour.

Notes

[DESIGN-REVIEWED] 6ada327

Description read

[DESCRIPTION-READ] cee39110098dce333370f70226ac6adb18f039d9845f59e930264cbb83bc5572

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 4, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 6ada3272dac3f7127e5fab9ef0ffc8be7a41650d — 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

This PR only forward-ports seven fixes that already merged on main, so their requirements were settled on their own PRs. The release-branch conflict resolutions leave out main-only arms and add nothing new.

What this change ships

Inventory (8 items) — 8 justified

Intent: ship seven P0 fixes already on main in the next 0.12.0 RC (FIX).

  1. kiro-cli 3.x single-binary installs defer Crew's MCP tools again (fix(acp): defer Crew tools under kiro-cli 3.x's single-binary install #29375) — justified
  2. Orphan sweep no longer kills live agents it cannot see; streamed replies are no longer re-copied (fix(sessions): fail the orphan sweep closed and stop re-copying a streamed reply #29300) — justified
  3. Builder ID sign-in gets the fixed profile ARN, so chats work on the engine route (fix(kas): give the engine the Builder ID profile ARN kiro-cli sends #29372) — justified
  4. macOS update install closes its windows and actually restarts on the new version (fix(desktop): let the macOS update install close its windows and reach ShipIt (#29449) #29551) — justified
  5. Windows tmp+rename writers retry the final rename instead of losing the update (fix(windows): retry the final rename in the remaining tmp + rename writers #29267) — justified
  6. Desktop app checks gateway.lock before respawning on macOS/Linux (fix(electron): ask gateway.lock before respawning on macOS and Linux #29532) — justified
  7. Sandbox CSP on registry app art, form-action 'self', S3 expected-owner pin, HTTPS-only bucket policy (fix: harden app blob headers and a few small security defaults #29294) — justified
  8. Conflict resolutions: drops budget_s and the "busy" answer, re-exports one name only, adds the missing crew_companion import — justified

[FIRST-PRINCIPLES-REVIEWED] 6ada327

Description read

[DESCRIPTION-READ] 1cc5d25e72caeb257af06215c85b6ae5a94d280240e0c04d1559d98586327dbc

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 4, 2026

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ PASS

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

No candidate flipped from allowed to refused.

Scope-Verdict: PASS

Reason: No shell deny tier changed: the only edit to src/kiro_crew/hooks.py is a new replace_with_retry_checked import, so the 21 shell candidates probe tiers this diff did not touch, and no regression came back confirmed. The tightenings this PR does make are a dashboard CSP directive, a response header on the blob proxy, an S3 owner pin and an S3 bucket policy. The classifier can't adjudicate any of them, so they're named under UNADJUDICATED and don't block.

TIGHTENING: Five non-shell guards got stricter. The main one is the dashboard CSP's new form-action directive, which refuses an injected <form> posting to a foreign host: "object-src 'none'; base-uri 'self'; form-action 'self'; " (src/kiro_crew/dashboard/server.py, _BASE_CSP). The other four:

  • The blob proxy now sends "Content-Security-Policy": "default-src 'none'; sandbox" (routes_art.py handle_blob_proxy).
  • The recipe upload now passes args += ["--expected-bucket-owner", expected_bucket_owner] (cloud/microvm/api.py put_recipe_object).
  • The base template adds RecipeBucketPolicy, which denies aws:SecureTransport: "false" (kirocrew-microvm-base.yaml).
  • The DEBUG frame line now goes through redact_text (acp/client_tool_events.py).

ADJUDICATED: 21 candidates, 0 confirmed newly-refused

PLATFORM COVERAGE:

  • posix: the recipe upload (AES256 and KMS forms) with --expected-bucket-owner "$AWS_ACCOUNT_ID", the bucket-policy and stack-output reads, a caller-identity lookup, curl header checks on /api/apps/blob and the dashboard root, kiro-cli --version and the launcher/standalone layout listing, the new pytest files, a debug-log grep, and a scoped git push.
  • windows: the same operations in Windows spelling: %VAR%, \ separators, curl.exe, kiro-cli.exe, git.exe, findstr over %USERPROFILE%.
  • Platform assumptions the diff makes: the sharing-violation retry applies only on Windows, and the kiro-cli sibling check applies only off win32 and only for a launcher named kiro-cli. Both sit outside the shell gate, so the rows above don't measure them.
  • No any rows: every candidate names an executable or a path.

UNADJUDICATED:

  • Dashboard CSP form-action 'self'. Call path: _apply_security_headers → _BASE_CSP on every dashboard response. Inputs I would have submitted:

    • a dashboard form whose action is a same-origin relative path;
    • a form inside the isolatePreviewHost preview iframe that posts to its own loopback preview origin (form-action is enforced by the framed document's own CSP, which a dashboard header shouldn't reach, but nobody has confirmed that);
    • an OAuth or device-flow page that submits a form to an external identity provider from the dashboard origin.

    This last input is the boundary most worth a human check.

  • Blob proxy default-src 'none'; sandbox. Call path: GET /api/apps/blob → handle_blob_proxy → web.FileResponse. Inputs:

    • a registry .png, .svg or .ico loaded as <img> in the store (CSP shouldn't apply there, as the hunk's comment says);
    • an .svg icon fetched by fetch() and inlined into the DOM;
    • a registry asset opened top-level by a user, which now renders inert, as intended.
  • put_recipe_object owner pin. Call path: ApiVmLauncher.resolve_image → put_recipe_object(..., expected_bucket_owner=account_id) → aws s3 cp ... --expected-bucket-owner. Inputs:

    • a lane whose account_id resolves to the caller's own account (works);
    • a cross-account lane where the recipe bucket legitimately belongs to a different account than the one account_id names, which would now get a 403;
    • a LocalStack or custom --endpoint-url lane where the owner check may not be honored.

    The boundary here is the account-id value itself (a 12-digit account number), so no row can carry it. It's left here for a human to check, not as a row.

  • RecipeBucketPolicy DenyInsecureTransport. Call path: CloudFormation deploy → S3 bucket policy on every request to the recipe bucket. Inputs:

    • the image build's own fetch of the recipe;
    • any custom endpoint_url configured with http:// (for example a local S3 emulator), which the bucket would now refuse.
  • DEBUG frame redaction. This is a logging change only. Nothing in it can refuse an operation.

[SCOPE-REVIEWED] 6ada327

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks: the diff adds no control, only two status and error strings that match their siblings, ported unchanged from already-merged main PRs.

Notes

  • The description says the Electron files change no rendered surface. They do: reconnect.js adds the loading-screen status "Waiting for the gateway to finish starting…", and model_registry_errors.py adds a chat error that points to "Settings → Agent Harness → Kiro Agent". Both follow the existing patterns, so the next description should list them rather than claim there is no visual change.

[UX-REVIEWED] 6ada327

Description read

[DESCRIPTION-READ] 44edabb40ec1ffee2ab2b00bff3643f57b80aac6fd117448d09f2e711c3e5940

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

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 6ada3272dac3f7127e5fab9ef0ffc8be7a41650d and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6ada327

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

Notes:

  • The darwin window backstop lists windows with BrowserWindow.getAllWindows(), which leaves out the BaseWindow main and connection windows. The isQuitting fix in main.js already lets the main window close, so no case where this causes a failure is known today.

[OPUS-REVIEWED] 6ada327

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

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

@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 4, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 5, 2026
@buluoray

buluoray commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: release/0.12.0 was rebased onto main (ce255d9, 0.12.0-rc.7 bump), which already contains all seven P0 fixes in this PR.

@buluoray buluoray closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants