Skip to content

fix: 0.13 backport batch 2, part 1 (line-budget rows, #31606, 0.13 feature follow-ups) - #37413

Merged
buluoray merged 17 commits into
release/0.13.0from
crew/slack/backport-0.13.0-batch2-part1
Nov 15, 2026
Merged

buluoray merged 17 commits into
release/0.13.0from
crew/slack/backport-0.13.0-batch2-part1

Conversation

@buluoray

@buluoray buluoray commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Ship in 0.13 the fixes and small completions that a 0.13 feature needs to feel done, so no 0.13 user has to wait for 0.14 for them.

Backport batch 2, part 1, onto release/0.13.0 (head b91bc876264, after batch 1). The rule for this batch: a feature that is new in 0.13 (merged to main before the 0.13 cut at a29fcc3c2e6b, not in 0.12) gets the later main changes without which a 0.13 user would hit a pit or find it unfinished. The PR also carries the security line-budget row files (#37239) first, so later security picks bring their own row instead of editing a constant.

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

Pick Main commit 0.13 feature What 0.13 users get
#37239 06111a27b684 security line budget Each budget raise is a row file under test/security_line_budget/, so security picks stop conflicting on one constant. Test-only.
#31606 b12ad9c367f4 KAS shell rules The rm floor still refuses a wipe after an arithmetic shift such as x=$((1<<2)). It brings its own budget row (heredoc-reader-arithmetic-shift.txt, +36), as on main.
#36494 2ea45a8e545f folder agent hooks The agent_sdk comments match the code. Comment-only; a later fix (#36983) applies on top of it.
#36248 0711f587095f secrets vault, live browser card A browser sign-in can use a login saved in the vault, instead of retyping it on the card every time.
#36462 9b4805e93e54 MiMo Code harness Keeps the harness adapter for the session and asks it for MCP servers. No behaviour change; later MiMo Code and opencode fixes build on it.
#36602 14387662489d chat-app notification bridge Feishu owners get the bridged notes the other chat apps get.
#36274 ea6253ef01c7 personal relay Crew A personal Crew's host can lease with its owner's Kiro sign-in, which personal Crews use.
#36302 701e45f12499 conductor drift check The conductor checks each worker's new transcript on every patrol turn. Two later prompt fixes apply on top of it.
#36336 02a5f9ef50ce chat-app notification bridge On Webex, a bridged tool approval can be answered by replying approve or deny.
#36251 ba3a1caec327 personal relay Crew A person who sees their own personal Crew in the relay list can open it (the viewer sends the profile ARN).
#36833 67014fc3b6fa OTel tracing A conductor round is one trace, with a span per ledger write.
#36717 875b273f12a9 OTel tracing Workflow, phase and outcome spans; a sub-agent completion joins its run.
#37045 c917dfc31f90 chat-app notification bridge A bridged question can be answered by replying with the option's number.
Prerequisite Main commit Needed by What it is
#35906 bcb94e5c4ee6 #36064 (next part) Fix: pause one sidebar status filter by clicking its chip; only the X clears it.
#36658 7009e5cd3d41 #36833 Fix: a person's steer is drained so a cancel cannot orphan it.
#36595 c114ed9012d8 #36324 (next part) Fix: the Kiro sign-in card names the signed-in account next to the provider.
#36277 538bad7fc752 #36064 (next part) Fix: an MCP server is routed only after the user says it does not use the project folder.

Each prerequisite is a fix from main with its own tests, and none changes behaviour beyond what its own PR describes. Without it, the pick it is needed by 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. Each of these 0.13 features would ship with a known gap that only 0.14 closes: a personal relay Crew that cannot be opened or hosted, bridged notes that cannot be answered on Webex or by number, Feishu owners left out, traces with missing spans, and a vault the browser card cannot use.

Not a goal

What changed (motivation → approach → change)

Cherry-picks only. No hunk was hand-resolved and no line is new.

Backwards compatibility

Compatible. Each pick behaves as it does on main, where it was reviewed. #36248 adds the publicsuffixlist==1.1.2.20261109 dependency to setup.cfg, as on main. 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 batch 1: one pytest process per batch of 20 files, no xdist. The run covered 323 test files (every test file the picks touch, plus every test file that imports a module they change): 16,089 passed, 61 failed. None comes from this PR:

  • test_browser_quick_ask_vault.py (21): this test machine's venv lacks publicsuffixlist, which feat(browser): sign in from the secrets vault on the live card #36248 adds. With the pinned version on the path, all 32 pass.
  • test_agent_refactor_contracts.py (36): fails only when it shares a batch with other files; run alone, all 68 pass.
  • test_folder_steering_provider_dedup.py, test_kas_cli_floor.py, test_worker_agent_spawn_gate.py (4): fail the same way on a clean release/0.13.0 and on a clean main locally, while main's CI is green.

test_security_gate_liveness.py passes with the cap equal to the measured package size (36,250 + the one +36 row = 36,286, no spare room); test_shell_commands_reader.py and test_shell_heredoc_reader.py pass.

Frontend on this head: tsc -p tsconfig.app.json clean, scripts/check-i18n-keys.mjs OK, the 16 vitest files the picks touch pass. flake8 and black on every Python file in the diff: clean.

Manual verification

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

Screenshots / video

Why no screenshot: this PR 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 #37389.

Sibling sweep

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

Pattern harvest

Not generalizable: backport of already-reviewed changes

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.

buluoray and others added 2 commits November 14, 2026 23:31
…t holds (( (#31606)

* fix(security): read << inside arithmetic as a shift, not a heredoc

* fix(security): read a closed arithmetic shift as data in the heredoc reader

In heredoc mode with tracking on, read_commands follows each
$((...)) / ((...)) span in its one pass. A << inside the span is held
as a heredoc until the span closes with )) on that line; then it is a
shift, so no body follows and a wipe on the next line is read as a
command. A span that closes as subshells or is still open at the
newline reads exactly as on main. The rm floor joins this reading
with its untracked one, so it only adds refusals; rm_floor.py and the
default reading are unchanged. Deep nesting stays linear.

---------

Co-authored-by: Zejiang Guo <zejiangg@amazon.com>
Co-authored-by: Ray Xu <buluoray@gmail.com>
(cherry picked from commit b12ad9c)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 14, 2026 23:44
@buluoray
buluoray requested review from CrysisDeu and removed request for a team November 14, 2026 23:44
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/secrets/vault.py

  • src/kiro_crew/security/shell_commands.py

  • No reasoning template for 0409e6b 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: 0409e6b05cc5e6b8b02608ea39c852a46df23510
- 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

github-actions Bot commented Nov 14, 2026 •

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

Design-Verdict: PASS

cannot evaluate: missing screenshots of the new vault picker on the browser card, the MCP folder-use question, and the paused sidebar filter chip. This revision adds these surfaces on release/0.13.0 but carries no rendered evidence of them.

Blockers

New user-visible surfaces with no rendered evidence of this revision

  • Trigger: The diff adds website/src/pages/chat/quickAsk/QuickAskVault.tsx and website/src/pages/settings/McpManagementCwdQuestion.tsx as new files. It also changes chat-sidebar/filters.tsx and SearchFilterBar.tsx so that clicking a status chip pauses it. The evidence list shows 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: Screenshots taken on main show main's surroundings, not this tree's. Batch 1 and the missing 0.14 follow-ups (feat(kas): tell a chat when the user's agent lists no tools #36064, feat(kas-auth): say which account Kiro Agent runs as on the sign-in card #36324) mean the release branch can lay these surfaces out differently. As a result, nobody can check whether the sheet, the card and the chip look right as 0.13 users will get them, and this release ships them unseen.
  • Fix: run the release-branch head and capture the three surfaces: the vault picker on the browser sign-in card, the cwd question in MCP management, and a paused status chip next to its X. Attach the captures to the description or commit them under temp-screenshots/.
  • Clears when: The evidence list names a downloaded or committed image or recording of each of those three surfaces, taken from this PR's head.

Notes

  • The title, the checklist and AGENTS.md all say "at most two commits per PR", but this batch keeps 17 cherry-picks. If the release flow exempts backports, cite that exemption so PR Hygiene and reviewers don't flag it.

[DESIGN-REVIEWED] 0409e6b

Description read

[DESCRIPTION-READ] bb9b2a35aafcd31d73c38df0ca3241cb792427bd42af6e5a407c620f083db873

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 14, 2026 •

Copy link
Copy Markdown
Contributor

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

UX-level review of 0409e6b05cc5e6b8b02608ea39c852a46df23510 — 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 UI this PR adds. The description says "this PR adds no UI of its own," but the diff adds visible controls and copy. The blind read was not performed.

Evidence gaps

Notes

  • cwd_question_help and cwd_question_why together are four sentences of always-visible prose. Keep the help line and move "why" behind an InfoTip.

[UX-REVIEWED] 0409e6b

Description read

[DESCRIPTION-READ] 0e97f669cb8b5075b0f49a9d4d3402139d08bf1e9f21e1430e6dff2659f3180d

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 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 0409e6b05cc5e6b8b02608ea39c852a46df23510 — 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 pick is a cherry-pick of a main change, and each one closes a named gap in a 0.13 feature. The product-shape picks are covered by base RFCs that are not drafts: drift-check accepted, notification-bridge accepted, otel-tracing in-progress.

Notes

What this change ships

Inventory (10 items) — 8 justified

Intent: give 0.13 users the main follow-ups that 0.13 features need to feel finished. A FIX/backport.

  1. Security line-budget raises become per-row files (test-only) — justified
  2. The rm floor refuses a wipe after an arithmetic shift — justified
  3. A browser sign-in card can fill a login saved in the vault (new publicsuffixlist dependency) — justified
  4. Feishu owners receive bridged notes — justified
  5. Webex approvals answered by approve/deny; bridged questions answered by option number — justified
  6. A personal relay Crew can be hosted with the owner's sign-in, and its owner can open it — justified
  7. The conductor checks each worker's transcript on every patrol turn — justified
  8. OTel: one trace per conductor round, plus workflow, phase and outcome spans — justified
  9. Sidebar status chip click pauses the filter instead of clearing it — rides along, needed only by a later part
  10. Kiro sign-in card names the signed-in account — rides along, needed only by a later part

[FIRST-PRINCIPLES-REVIEWED] 0409e6b

Description read

[DESCRIPTION-READ] 80d2eea48ee3bc8ec7f74ddc7ea36dda5ccf2ec177d65653d2f38238fdf4128c

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 14, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ PASS

Which legitimate operations does 0409e6b05cc5e6b8b02608ea39c852a46df23510 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): 18 classified, 0 newly refused, 10 still allowed.
  • ubuntu-latest (platform posix): 18 classified, 0 newly refused, 10 still allowed.
  • windows-latest (platform windows): 5 classified, 0 newly refused, 4 still allowed.

No candidate flipped from allowed to refused.

Scope-Verdict: PASS

Reason: The only shell-gate change is the shared reader shell_commands.read_commands. In heredoc mode with tracking on, it now reads a << inside a $((…)) / ((…)) span that closes on the same line as a shift. The line after it is then read as a command, not as a heredoc body. No row came back with a confirmed refusal. The 23 boundary rows above go to the classifier. One side effect is unadjudicated and named below: s3_direction._reads_all_downloads also calls this reader with heredocs=True and the default track=True, so its download exemption now sees the new reading.

TIGHTENING: the recursive-force rm floor (rm_floor.py) reads through the shared heredoc reader (src/kiro_crew/security/shell_commands.py, read_commands, arith = track and heredocs). The threat it refuses is a home or root wipe hidden on the line after an arithmetic shift, which the old reader took for heredoc body data. From the hunk: if char == ")": char = "" # ``))`` ends it: its held ``<<`` were shifts … pending = [doc for doc in pending if id(doc) not in held_ids]. The spec text names the attack: "x=$((1<<2)), then a wipe on the next line".

ADJUDICATED: 23 candidates, 0 confirmed newly-refused

PLATFORM COVERAGE: posix (18 rows). The diff assumes bash's arithmetic and heredoc grammar. The rows test that grammar's edges: a shift then a scoped rm (under home, /tmp, $TMPDIR, /var/tmp, the worktree); a shift then a real heredoc on the next line or the same line (cat, git commit -F -, python3 -, bash -n); ((…)) in a for header and in a test; a $(( that is really a subshell ($((cd … ) | tail -1)); an unquoted heredoc body that expands a shift; a nested bash -c shift; and an s3 download after a shift. windows (5 rows). The reader works on text and would see the same bytes from Git Bash on Windows, so there are Git Bash rows with a /c/... mount path, rm.exe with a drive letter and \ separators, and $USERPROFILE. There are also native rows: cmd set /a "mask=1<<4" (cmd's own << shift, inside quotes) and PowerShell -shl, each followed by a recursive clean. No row is any: every row names an executable or a path. No platform spelling the diff assumes was left without a row.

UNADJUDICATED: The s3 download exemption, security/s3_direction.py::_reads_all_downloads, sits on the deny-rules / exfil path through deny_gate.py (around lines 1266–1289). It calls _commands.read_commands(text, heredocs=True) with track at its default of True, so the arithmetic tracking is now on for it as well. This is not stricter in this lane's direction. Its gate fails closed on any statement it cannot read, so lines that were once body and are now statements can only turn an allowed line into a denied one. That happens only if such a line was allowed before because it was hidden inside a body. The opposite case is a loosening, which belongs to the other lanes: chunk=$((8<<20)) then aws s3 cp s3://…/x ./x on the next line may now be read as an exempt download where before the deny stood. The row above (chunk=$((8<<20))\naws s3 cp …) does go through the composite. But a verdict on that row does not show which of the two readings (shift or heredoc) the exemption used, so the effect of the change on this guard is not separately measured. Tests are needed in test/ for s3 download lines after a same-line arithmetic shift. One more input I could not express as a row: a case … in a) pattern inside a $( … ) nested in an arithmetic span. Its ) pops the paren frames out of order, and the reader could then wrongly drop a real heredoc as a shift. I could not show a legitimate command that does this, so it is named here and does not block.

[SCOPE-REVIEWED] 0409e6b

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 0409e6b05cc5e6b8b02608ea39c852a46df23510 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 0409e6b

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

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — 🔴 changes requested (blocking)

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

The security package's line budget now has 36 lines of headroom that no change accounts for. rm-floor-arithmetic-shift.txt adds a second +36 for the same 36-line growth in shell_commands.py, so the ratchet would let a later unreviewed 36 lines pass.

BLOCKING — test/security_line_budget/rm-floor-arithmetic-shift.txt:1
+36 / "On main this growth fit inside the budget's existing headroom; release/0.13.0 has none, so the 0.13 backport records it here."
Trigger: test_the_package_stays_within_its_line_budget runs _package_line_budget(_BUDGET_ROWS_DIR), which is _PACKAGE_LINE_BUDGET + sum(rows) = 36,250 + 36 (heredoc-reader-arithmetic-shift.txt) + 36 (this row) = 36,322. The measured total of src/kiro_crew/security/*.py at this head is 36,286. That is 36,250 plus this diff's net +36 in shell_commands.py, the only security file the diff changes.
Outcome: the cap sits 36 lines above the measured total, which breaks the test's own "measured total with no spare room" rule. A later PR can grow the security package by up to 36 lines with no budget row or reason, and the gate stays green.
Anchor: a-ratchet-may-only-tighten
Fix: drop rm-floor-arithmetic-shift.txt, a 0.13 backport artefact whose own text says main does not need it, so the rows add up to the measured 36,286.

[BLOCK-MERGE] 2073ea3
[OPUS-REVIEWED] 2073ea3

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

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

bolichen97 and others added 15 commits November 15, 2026 00:07
Unchain the one chained ternary the module detector reports in
agent_sdk/ (the exact-or-case-folded server name in
mcp_problems.mcp_server_state) into if/elif/else, and flatten the
four-deep name/entry filter in mcp_json_reach.mcp_json_server_names
with a continue.

Fix comments and docstrings that say something the code does not:
backend_identity says the public build refuses acp_backend "claude"
(it is baseline-selectable) and lists three backend ids;
provider_identity calls the "acp" provider the kiro-cli-and-KAS family
and names acp_backends as a stdlib-only link in an import chain it is
not part of; backends_members says deepseek has no mirror, leaves
mimocode, goose, deepseek and pi out of the client-path member lists,
and says KAS's session array comes from _mirrored_session_mcp (only
codex's does); mcp_problems names two of the five unattended runs that
wait on declared MCP servers and one of the two surfaces that print
the not-ready note, and mcp_json_reach calls that wait "the cron
wait". Drop a tracker id and the "as before" / "today's" narration
from the edited docstrings, keeping the reason the Tool Search entry
sends no empty neverDefer list.

No behaviour change: every changed file except mcp_problems.py and
mcp_json_reach.py is AST-identical to its base once docstrings and
comments are dropped, and the two rewritten conditionals are
equivalent for every input.

(cherry picked from commit 2ea45a8)
Behind the secrets_vault preview, a credentials quick ask offers the
vault logins for the page's base domain (eTLD+1 from the bundled
Public Suffix List; exact host and port where there is none; never an
https login on an http page) by name. A click fills the login through
the same bound, re-verified fill a typed answer takes, read in the
gateway only. With no match the card offers an off-by-default Save to
vault; after a fill lands the typed login is stored as a new item under
a free name. The agent's ask op and outcome words do not change, and no
value or username reaches the agent, a log, the SEL or the replay.

Adds publicsuffixlist==1.1.2.20261109 (MPL-2.0) as a runtime dependency.

Co-authored-by: CrysisDeu <crysisdeu@users.noreply.github.com>
(cherry picked from commit 0711f58)
… servers (#36462)

* refactor: keep the process adapter for the session and ask it for mcp servers

Steps 1 and 2 of issue #35740. No harness changes behaviour.

AcpClient now keeps the ProcessAdapter that process_adapter_for builds
for the spawn (_process_adapter), from before resolve_spawn runs until
_reset_state drops it. Before this change the adapter was a local that
was dropped after the spawn, so the opencode and MiMo Code launches
wrote what their config read-back found onto the client as ten
_opencode_* / _mimocode_* fields.

Those facts now live on the adapter, in one HarnessReadBack dataclass
(denies_in_force, denies_unenforced, native_mounts, config_mcp_servers,
disabled_servers). Every reader goes through one accessor,
AcpClient._harness_read_back, which returns an empty read-back when no
adapter is kept. The two places in client_mcp_array.py that picked the
opencode or MiMo Code field by backend become one read each.

ProcessAdapter gains session_mcp_servers(session), whose default adds
no server. The opencode, MiMo Code, goose, DeepSeek, Copilot and pi
adapters override it to call the client method that exists today, and
those client methods keep their names. The six per-harness lines at
each of the three session/new and session/load sites in
client_start.py become one call to _adapter_session_mcp_servers. A
client that reaches those sites without having spawned asks a fresh
adapter for its backend, so it gets the same list as before. The Claude
lines and the kiro-cli arm are unchanged.

The H6 splice test now pins the adapter splice plus claude's, and a new
test pins that each adapter asks only its own client hook.

* test: pin a late mimo code permission event after a reset

_reset_state drops the MCP array cache and the process adapter
together. A MiMo Code permission request that arrives after that still
asks which servers the session placed, so the array resolves cold with
no adapter kept, and the projection records disabled_servers on an
empty read-back that nothing reads.

The test answers the same placed and foreign servers before and after
the reset. It passes on main and on this branch, and it fails with a
RuntimeError against a read-back accessor that refuses the write when
no adapter is kept.

(cherry picked from commit 9b4805e)
The notification bridge already delivers a routed channel's notes, the
pending tool-approval note included, to the owner's DM on Discord,
Telegram and Webex, but Feishu was in neither of its transport lists, so
an owner reachable only on Feishu heard nothing while an approval waited.

Feishu joins BRIDGE_TRANSPORTS and TRANSPORT_SINKS and the Deliver to
row gets its label. It is served by the same TransportBridgeSink and
owner-DM leg as the other transports, so routing, governance, rate
limit, redaction and the single allow-listed owner rule are unchanged.
It stays out of REPLY_TRANSPORTS: answering from Feishu needs an inbound
reply reader and is tracked separately.

Closes #32130

(cherry picked from commit 1438766)
* feat(relay): send profileArn on lease renew and release for a personal Crew

A personal relay Crew's host signs in to the lease service as its owner,
and the service needs the owner's profile ARN on RenewCrewLease and
ReleaseCrewInstanceLease to tie the lease to that profile.

LeaseHostTokenSource takes an optional profile_arn reader. With a reader,
both calls append profileArn as the last body key. Headers are unchanged:
an IAM Identity Center sign-in still sends no TokenType and an outside
identity provider still sends EXTERNAL_IDP. A reader that returns nothing
or raises sends today's body and logs one INFO line with no value in it.
A team Crew on a crew API key cannot take a reader.

Nothing passes a reader yet, so every existing config sends byte for
byte the same requests. The host never calls VerifyCrewConfig.

Tests pin today's renew and release bytes for a team Crew on API_KEY and
for the default config, and cover the profile ARN for both sign-in kinds,
the no-ARN case, and that no ARN or credential reaches the logs.

* feat(relay): host a personal Crew with its owner's Kiro sign-in

A personal Crew's host leases with its owner's own Kiro sign-in, IAM
Identity Center or an organization's identity provider, not a key, and
the lease service needs that sign-in's profile ARN on each call.

tunnel.relay_lease_credential takes a new value, kiro-sign-in. With it,
the lease client reads the Crew's sign-in for each renew and release
through KasAuthProvider, as the relay viewer does, so the token is
refreshed near its end. After an HTTP 401 the one retry refreshes the
refused token; a second 401 stops, as today. The sign-in's auth method
names the TokenType, and its profile ARN goes on the same call through
the profile ARN reader. A token type set beside kiro-sign-in keeps
Remote Control from starting.

Builder ID, social and a sign-in with no profile are refused before any
request, with a message that names what to sign in with and what to sign
out of. Every sign-in failure backs off and reads again, so signing in
again resumes hosting without a restart. No message carries a token, a
refresh token or the profile ARN.

Every other value (secret://NAME, a file, a team Crew's API key) sends
today's requests and never loads the sign-in module, and nothing dials
unless Remote Control is on. The settings text, the config baseline and
the platform spec say so.

(cherry picked from commit ea6253e)
…y patrol turn (#36302)

Co-authored-by: Joe Guo <zejiangg@amazon.com>
(cherry picked from commit 701e45f)
…36336)

The notification bridge lets the owner answer a bridged tool approval by
replying approve or deny on Telegram and Discord. Webex is now the third
reply transport (B4g): a bound approval note posted to the owner's
Webex DM shows what the call will run and how to answer, and the
owner's reply in that note's thread settles the same decision.

Webex has no quoted reply, so a reply is a message whose parentId names
the note. The bridge addresses the owner's DM by email, so the note is
linked under the email and a reply is looked up under its sender's
personEmail, only in a direct room; the owner is that email against the
one configured owner DM, the identity the email allow-list already
authorizes on. The shared reader decides and audits the answer under the
same rules as the other reply transports. A stop, a message with a file
or a card press is never an answer, and since a thread stays open after
the answer, only an exact approve or deny in it is taken: every other
message in the thread goes to the turn path as before. The note is
sized to one Webex message in UTF-8 bytes.

(cherry picked from commit 02a5f9e)
* relay viewer: send profileArn when opening a personal relay Crew

The control plane needs the owner's profile ARN on CreateCrewAccessToken
to open a personal Crew. The viewer now reads the profile ARN the Kiro
sign-in stored, next to its bearer and token type, and adds profileArn
to the mint body only when the Crew list marked that endpoint crewType
PERSONAL and the sign-in has a profile.

Every other mint sends the same body as before, so a team Crew's
request is unchanged. ListCrewEndpoints is unchanged. A personal Crew
with no profile in the sign-in is minted as before, with one INFO line
that carries no token or ARN value. The test credential carries no
profile.

* test(relay): accept profile_arn in the executor test's mint fake

(cherry picked from commit ba3a1ca)
…36658)

`record_person_steer_result` commits the `steer` event (`apply_person_steer`)
and then appends its `work/recorded` crew-log entry, undoing the event when the
append does not land -- but it ran that commit-then-record sequence bare, inside
the board lock. A cancellation (gateway shutdown) landing between the commit
and the append left the steer event in the cache with no crew-log entry and no
undo, so the Board and sidebar showed an answered steer that the next
`work_ledger_rebuild` silently dropped, and callers reported `not_recorded`
while the cache said otherwise.

Wrap the commit-and-record block in a nested coroutine and drive it through
`_drain_before_cancelling`, the same way the worker-report route and the
conductor write path already do: once the event commits, the append (or the
restore) finishes before the cancellation is re-raised. Pre-commit reads and
refusals are unchanged.

(cherry picked from commit 7009e5c)
…er write (5a, #1643) (#36833)

Co-authored-by: Kyle Seaman <kseam@dev-dsk-kseam-1b-55230d27.us-east-1.amazon.com>
(cherry picked from commit 67014fc)
…e Kiro sign-in card (#36595)

The card said only "Signed in with Google". It now names the account
(email, else account name) read from the top bar usage reading, but only
while the saved main harness is KAS: on any other harness that reading
names kiro-cli's login, not the sign-in this card manages. A sign-in, a
sign-out or a main-harness switch now drops that reading with the model
list, so the card never names the previous login until the next poll.

An e-mail follows the account popup's hide toggle (hidden by default),
read through usePersistedBool in both places so they live-sync. Open,
the card shows it blurred beside the same Show/Hide e-mail toggle the
popup has; folded, it names the account only when it is visible.

Fixes #36156

(cherry picked from commit c114ed9)
…e run (phase 3b, #1643) (#36717)

* feat(tracing): workflow, phase and outcome spans; completion joins the run (#1643)

Phase 3b of the native tracing RFC. A workflow run is now one trace,
as one more run kind of the 3a surface root helper (TRIGGER_WORKFLOW):
WorkflowRunner.run opens a "workflow <name>" anchor around the whole
run and ends it with "workflow outcome <status>" and the spend roll-up.

Each ctx.phase() is a "phase <title>" span from its phase_started event
to the next phase or the run's end, with its own roll-up. A phase that
a parallel branch closes while another branch's call under it still
runs is exported once that call is released, so its roll-up keeps the
call's spend. Each live ctx.agent() call is one turn under its phase,
named "invoke_agent <phase>:<label>", with a turn id derived from the
run and agent id, so running the same run again rebuilds the same tree.
A call replayed from a prior run streams no turn, so a resumed run
emits no span for it.

run_background pins the turn that launched the run, and the completion
turn the dashboard starts joins the run's trace under its root and
links to that launcher, whether it starts at once or drains from the
queue (meta.workflow_run_id). A retry of that turn carries the same
meta, so it joins the same run.

phase_started gains phase_index (the phase's 1-based ordinal), and
agent_started gains the index of the phase its call ran in, so a
consumer never recounts phases.

* fix(tracing): trace a workflow's authoring turn under its phase

A run started from an intent authors its script in a task the runner
starts for the author. A turn root bound by the runner's own task is
refused there, so the authoring turns rooted unrelated traces, the
Authoring phase had no model children and the outcome understated the
run's spend. The author task now binds its own call under the
Authoring phase and releases it when authoring ends.

The two fixed sleeps in the workflow tracing tests are replaced with
event barriers (await_until, until_parked), and the dashboard
composition pins gain the workflow auto-turn's lazy tracing import and
its extra_meta argument.

---------

Co-authored-by: Kyle Seaman <kseam@dev-dsk-kseam-1b-55230d27.us-east-1.amazon.com>
(cherry picked from commit 875b273)
… project folder (#36277)

A routed MCP server runs in one fixed folder outside the session sandbox,
shared by every chat, so a server that works on the project's files answered
every worktree from the wrong folder. Nothing can tell from a server's config
whether it uses the folder, so MCP Management now asks.

- mcp_gateway.cwd_use records the answer per server (uses_cwd / not_used;
  absent is unanswered).
- POST /api/mcp-gateway/servers/stub refuses stub=true (cwd_unconfirmed) for a
  server that is not Kiro Crew's own and is not answered not_used. That route
  is the only writer of launch approvals, and the rewriter wraps a server only
  for an approved launch, so an unanswered server never gets a live stub on
  kiro-cli or KAS.
- The routed-set resolver drops a server answered uses_cwd.
- A server routed before the question keeps running until answered; its row
  asks once.
- The dashboard asks in plain words with an example, and "Not sure" counts
  as "it uses the folder", the safe choice.

Co-authored-by: Joe Guo <zejiangg@amazon.com>
(cherry picked from commit 538bad7)
An agent's ask_question card with one single-select question can be
answered from Slack's buttons (B4e). The reply transports (Telegram,
Discord, Webex) now answer it too (B4g): the bridged note shows the
card's options numbered from 1 inside the same code fence an approval's
command sits in, and the owner's reply with a number answers the card
exactly as the dashboard would for that option.

The question binds for the same owner an approval does (Slack's, else a
reply transport's owner DM). The registry now records what a binding
decides, so the shared reply reader reads a question reply as the
number of an offered option and an approval reply exactly as before,
and tells the owner which kind of answer it expects. On Webex, whose
thread stays open, a question's thread takes only a number and an
approval's only approve or deny.

(cherry picked from commit c917dfc)
@buluoray
buluoray force-pushed the crew/slack/backport-0.13.0-batch2-part1 branch from 2073ea3 to 0409e6b Compare November 15, 2026 00:08
@buluoray

Copy link
Copy Markdown
Contributor Author

span=0281f47ded8c

  • Duplicate budget rows loosen the security line-count ratchet

fixed in 0409e6b: dropped the backport-only rm-floor-arithmetic-shift.txt. #31606 already carries its own heredoc-reader-arithmetic-shift.txt (+36), so the second row double-counted.
The cap is now 36,250 + 36 = 36,286, equal to the measured package size; test_security_gate_liveness.py passes with no spare room.

@buluoray

Copy link
Copy Markdown
Contributor Author

span=92e0b48751fc

  • rm-floor-arithmetic-shift.txt double-counts the +36 growth

fixed in 0409e6b: removed test/security_line_budget/rm-floor-arithmetic-shift.txt; the only row for this growth is #31606's own heredoc-reader-arithmetic-shift.txt.
The cap equals the measured 36,286 lines, so a later PR cannot grow the package without its own row.

@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 15, 2026
@buluoray
buluoray merged commit 7873346 into release/0.13.0 Nov 15, 2026
27 of 31 checks passed
@buluoray
buluoray deleted the crew/slack/backport-0.13.0-batch2-part1 branch November 15, 2026 04:32
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 15, 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.

9 participants