Skip to content

fix: v0.12.2 hotfix batch 4 (four more of our fixes, adapted to release) - #34746

Merged
bolichen97 merged 5 commits into
release/0.12.0from
hotfix/0.12.2-batch4
Nov 10, 2026
Merged

bolichen97 merged 5 commits into
release/0.12.0from
hotfix/0.12.2-batch4

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Ship four more of our own fixes from main to 0.12 users in 0.12.2, on release/0.12.0.

These four fix bugs that are in release code. They are larger than the usual pick, so each is adapted to release's code and leaves out what needs code only on main; every adaptation is a Backport note: line in its commit.

Why it matters

0.12 users hit each of these today: a cloud launch that fails with a raw IAM error, a chat greeting that appears only at the first send, KAS settings that drop mcp.json tools, and agent spec files the custom agents tab hides but still reserves.

Not a goal

  • No new behaviour on release: each commit is a git cherry-pick -x of the main merge commit; a hand-port keeps release's own code and says what it left out in a Backport note: line.
  • No app files: the app parts of these PRs stay out.

What changed (motivation → approach → change)

The 8 picks, in main merge order, on release/0.12.0 at f0994b5e47:

# PR Main merge commit Fix
1 #33818 6a1ea993df refuse a launch into an account without a host policy
2 #33644 208d6b2b89 show the agent greeting early and contain chunk failures
3 #33510 d4f82fbaf6 mcp.json tools allowlist, useLegacyMcpJson and glibc floor fixes (four of the six fixes; trustedAgents on KAS and hook-covered grants need code only on main)
4 #33820 29a09dcca2 list spec files the custom agents tab hides but reserves (without the spec-pin checks, which need code only on main)

Release-only commit: one black reflow of agent_templates_unlisted.py (backport assembly).

Hand-ports with a Backport note::
Each commit's body lists what it adapted and what it left out.

Backwards compatibility

No behaviour change beyond each listed fix. No config key, CLI flag or API is removed or renamed.

Tests

  • On a DevSpace with the release venv: the union of the four picks' test files, 1296 passed, 12 skipped, 0 failed; each lane's own tests also passed (cloud 2358, KAS 1618, chat 83+80, agents 214); flake8, isort, mypy --platform linux, black, comment-history and brand: clean. Website npm run build, tsc -p tsconfig.app.json and the touched vitest files: pass.

Proof: not provable -- other: a cherry-pick batch of already-merged main fixes, each proven in its own main PR

Manual verification

N/A: each fix was verified in its own main PR; the whole 0.12.2 line is smoke-tested again on the gate build.

Screenshots / video

N/A: no visual change.

Related Issues

0.12.2 hotfix, batch 4: #33818, #33644, #33510, #33820.

Sibling sweep

Siblings: none -- a backport batch; each pick's own PR carried its sweep

Pattern harvest

Not generalizable: a release backport batch, not a new defect fix.

Checklist

  • Each commit is a cherry-pick -x of a main commit with a Conventional Commits title
  • 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.

…3818)

An edition's cloud_instance_policy names managed policies that every EC2
crew's instance role gets, but nothing checked that the launch account
holds them. In an account without one, CloudFormation's attach failed
with IAM NoSuchEntity and the stack rolled back, leaving the user only
the raw 404 from cloud launch, setup or the dashboard.

ec2.deploy asks IAM for each such ARN before the source upload and the
network discovery, and refuses the launch with a message naming the
policy when IAM's error code is NoSuchEntity. The code is read from the
aws CLI's own error prefix, never from the text that quotes the ARN. A
read that fails another way is logged and the launch goes on, since the
attach still needs the policy.

The --host-policies addendum grants iam:GetPolicy on exactly those ARNs
while the document fits IAM's 6,144-character cap. Without room it is
the attach statement alone, and the CLI says so on stderr. The cloud
and platform-context specs no longer say the policy exists in every
account.

(cherry picked from commit 6a1ea99)
…33644)

Agent welcome: a new chat on an agent whose spec sets welcomeMessage
showed nothing until the first send, and the row the first turn wrote
then folded away with the working steps under the default collapse-all
setting. The slot create, agent switch and workspace and project
switches read the answering agent's greeting, the slot summary ships it
as welcome_message while the chat has no row, and the welcome page
draws it under its heading. The cold-start row carries meta.kind
agent_welcome, and TurnBlock keeps that kind out of the fold.

The greeting read runs after the switch locks are released, so a newer
switch can commit during it. Each switch therefore reads its answer
from the slot once that read returns, and a slot replaced under the
name meanwhile answers the 404 a missing slot gets: the acting tab
writes the answer into its store and must not bring back a superseded
binding. The create's read runs after its block too, so a create whose
chat is closed or replaced during it answers the same 404: the browser
adds the create's answer to its list and drops the close's tombstone
for that key, so a success would bring back a closed chat.

Lazy chunks: the same fix shipped in #33687 (a failed chunk for the
unrestored-tabs notice, the crew window or the composer chips stays in
its place, and Try Again imports it again), so this commit keeps main's
version of it and carries none of those hunks.

Fixes #33593

Backport note: slot_projection.py imports only welcome_preview; release has no preparing_caption (main-only warm catch-up caption), so that import is not added.
Backport note: slot_session.py docstring Writes line keeps release's autocompact_pct (main lists backend there) and adds _welcome_preview.
Backport note: TurnBlock.tsx adds only the agent_welcome kind; release has no crew_paused_notice, so that kind and its comment sentence are not added.
Backport note: index.chat.ts adds only welcome_message; preparing_text and preparing_lang do not exist on release and are not added.
Backport note: ChatPage.views.test.tsx adds only the welcome greeting test; the warm catch-up caption test covers main-only code and is left out.

(cherry picked from commit 208d6b2)
…fixes (#33510)

Backport of the parts of #33510 that release/0.12.0 can carry:

- tools allowlist: mcp.json stubs and KAS includeMcpJson follow the
  agent's tools, so a narrow agent no longer gets every mcp.json tool.
  A routed mcp.json server whose env holds a secret:// reference that
  tools leaves out gets a refusing stub instead, which starts nothing
  and offers no tools, so the host's own mcp.json merge cannot start
  it with the literal reference.
- useLegacyMcpJson: the rewriter reads kiro-cli's alias through the
  reader the KAS projection uses (mcp_cleanup.include_mcp_json), so an
  agent with useLegacyMcpJson: false gets no injected mcp.json stubs.
- glibc floor: below the engine's glibc 2.28 (Amazon Linux 2) chat,
  dashboard and doctor name the cause and a newer image, not a retry.
- file:// prompts: the spec reference states kiro-cli v3 refuses an
  absolute or ~ file:// prompt and why Kiro Crew keeps accepting it.

Both rewriter changes share one move of the rewrite fingerprint schema
to 14, so a kept overlay holding stale injected stubs is rebuilt.

Fixes #32973
Fixes #32923
Fixes #32896

(cherry picked from commit d4f82fb)

Backport note: left out the trustedAgents on KAS fix. Release has no
canonical_tools_settings, trusted_agents_withheld or per-session
governance (may_skip_gate_for_session, session_profiles_govern), so the
governance_app and governance_scope plumbing and its test and
governance.md hunks are not carried.
Backport note: left out the hook-covered grants fix. Its only answerer
is the batch-guard-grant gate row and batch_guard._auto_approved, which
are not on release, so CREW_ANSWERED_HOOK_HELD_KEY, hook_held_grants,
spec_hook_held, pre_tool_hooks_fire and their tests and docs are not
carried.
Backport note: dropped the app files (apps/agent_turn_sdk.py,
parked_queue owning_app, auto_improvement runners and its test) as out
of scope; src/kiro_crew/acp/harness/kas_cloud.py,
test_kas_tools_settings_aliases.py and test_app_agent_turn_sdk.py stay
deleted as on release.
Backport note: kas_agents_registered.py (a pure move of the projected_*
and switched_* readers) is not carried; they stay in kas_agents.py.
Backport note: kas_agents.py keeps release's imports and
to_client_custom_agent body, with only the includeMcpJson-true-stays-off
-the-wire change and the resolve_prompt docstring applied.
Backport note: agent-spec-fields.md and security.md take release's text
plus the includeMcpJson, prompt and secret:// refusing stub hunks; the
hooks row and the hook-held security paragraph are not carried.
…#33820)

A spec file in ~/.kiro/agents that the Custom agents list cannot show
still made its name taken. The list keeps only files that read and one
row per declared name, while a create counts the stem of every file,
readable or not, so a create was refused 409 name_taken with no row to
open, rename or delete, and the delete could not reach the file.

GET /api/agents/templates now returns `unlisted`: each hidden file with
its reason (it does not read, or it declares a name another file holds)
and whether a delete can reach it. The tab shows them under Files not
shown, with Delete file or a rename-by-hand hint; a same-name copy's
confirm says the listed file and the agent of that name stay. A refused
create names the file that holds the name, including the stem of a
listed file whose row carries another name. DELETE reaches an
unreadable spec by its exact stem under the same reference guard and a
locked re-check. Deleting a hidden file whose declared name a listed
file still declares keeps that name's sidecar entry and saved
capabilities, and its reference and capabilities guards count the
file's stem alone, since the name stays with the listed file. A file
that holds nothing once the hidden file goes does not keep the name: a
symlink that reads the hidden file, or a markdown spec while a
configured host loads JSON specs alone. Beside such a listed file the
tab offers no delete of the copy, since its confirm says the listed
file stays. When agent.spec_pins picks the hidden file for that name,
by naming it or a symlink that reads it, every session of the name
runs it, so the tab offers no delete and the guards count the name too.
A name a listed row carries keeps the plain refusal.

A spec whose row cannot be built no longer breaks creates and deletes
of other names, and neither one nested past the JSON parser's depth
nor a symlink loop fails the tab or its own delete. Discovery logs a
WARNING when it drops a plain file whose name another file declares,
with the names escaped.

Fixes #33664

Backport note: docs/feature-map/README.md and learn-cron-dashboard.md conflicted; kept release wording (mates) and re-applied the fix sentences by hand.
Backport note: release has no agent.spec_pins (agent_spec_pins, agent_spec_pin_ops, declared_spec_claim are main-only); dropped pinned_here and every pin check from agent_templates_unlisted.py and agent_templates.py, the pin paragraph of crew-mode.md and the three spec-pin tests of test_agent_templates_unlisted.py.
Backport note: AgentTemplatesTab.unlisted.test.tsx expects "a Bot" (release catalog wording) instead of "a bot".

(cherry picked from commit 29a09dc)
The release branch has no black baseline row for the file the #33820
backport adds, so the black gate flags it. Format it.

Backport note: assembly-only change, no behaviour change.
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 19:31
@bolichen97
bolichen97 requested review from iamwhatever and removed request for a team November 10, 2026 19:31
@bolichen97
bolichen97 merged commit a7a6dd4 into release/0.12.0 Nov 10, 2026
@bolichen97
bolichen97 deleted the hotfix/0.12.2-batch4 branch November 10, 2026 19:31
@github-actions

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/security_posture.py

  • No reasoning template for cf5e0fc 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: cf5e0fc4315cdbbbdd3071dd1a5ede7f22736e77
- 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

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 cf5e0fc4315cdbbbdd3071dd1a5ede7f22736e77 — 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 "Files not shown" section on the custom agents tab and the agent greeting on the chat welcome screen. The PR attaches no image, so the blind read was not performed.

Evidence gaps

  • "Files not shown" section (UnlistedSpecFiles.tsx), in both places it renders: below the template list, and under the empty state when there are no templates. Each row shows a file name, a reason line, and either a Delete file button or the "Rename or delete this file in ~/.kiro/agents" line. Close it with a screenshot of each placement, one with a duplicate-name row and one with an unreadable-file row.
  • Delete file flow: the confirm dialog ("Delete the file “{{file}}”?", in both its plain and duplicate-name wording), the success line "Deleted …", and the inline error. Close it with one screenshot per state.
  • New create-refusal errors err_name_taken_unlisted and err_name_taken_listed, which appear in the create form. Close it with a screenshot of each error at its field.
  • Agent greeting on the chat welcome screen (WelcomeView agentWelcome): it now shows before the first send, and also stays unfolded in the turn (TurnBlock agent_welcome). Close it with a screenshot of the empty chat showing a multi-line greeting, plus one of the turn after the first send.

Notes

  • unlisted_hint is a three-sentence paragraph that is always visible. Cut it to its task ("Each file still takes its name. Fix, rename or delete it to free the name.") and leave the explanation to the reason line on each row.
  • unlisted_reason_unreadable lists four possible causes. The server knows which one it is, so name the one that applies (e.g. "Does not parse as JSON").

[UX-REVIEWED] cf5e0fc

Description read

[DESCRIPTION-READ] 8b0131318817a6b3ab2ed16768c0a2664cac49944b12aa82197e68a96a25278c

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

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

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

Design-Verdict: PASS

cannot evaluate: missing a screenshot of the Agents tab's new "Files not shown" panel and of the agent greeting on WelcomeView. The description says "no visual change", but the diff adds both surfaces.

Blockers

A new UI surface ships without rendered evidence of this revision
Trigger: The PR adds the new component website/src/pages/overview/UnlistedSpecFiles.tsx. It renders a section with its own header and count, a hint line, one row per file (icon, filename, reason) and a danger "Delete file" button. AgentTemplatesTab.tsx mounts it in two places: under the empty state, and below the listbox at max-h-[45%]. WelcomeView.tsx gains <p data-testid="agent-welcome" …>{agentWelcome}</p> under the heading. The description says "Screenshots / video: N/A: no visual change." The evidence file lists 0 images, 0 recordings and 0 committed media.
Outcome: 0.12.x users get a release with a reshaped Agents tab and welcome screen that no reviewer has seen on release's code. A 45%-high panel squeezes the listbox, and a greeting of any length sits under the heading. Release has its own layout, so the screenshots from the main PRs (#33820, #33644) do not show this revision. Whether these surfaces have the right shape on release cannot be judged.
Fix: attach screenshots taken on this branch's build. Show the Agents tab with at least one unlisted entry, both with a populated list and with an empty list. Show the welcome view with a slot that has a welcome_message. Correct the "no visual change" line.
Clears when: the description carries github.com/user-attachments images, or the PR commits images under temp-screenshots/ that show both surfaces rendered from this revision.

Notes

  • "Manual verification: N/A … verified in its own main PR" relies on main-side checks. The UI and KAS-settings hunks are hand-ported to release, so each needs its own check on release.

[DESIGN-REVIEWED] cf5e0fc

Description read

[DESCRIPTION-READ] 82f0e4ddcef9da9b38c1a2a11c3ded80967168bb6504ee252f575514c8312f32

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of cf5e0fc4315cdbbbdd3071dd1a5ede7f22736e77 — 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 backports four already-merged main fixes. Each item removes a defect the Goal names, and no item makes a new default or product-shape decision.

What this change ships

Inventory (9 items) — 9 justified

Intent: give 0.12 users four bug fixes from main without waiting for 0.13. This is a FIX.

  1. A cloud launch into an account without the edition's host policy now stops before upload, naming the missing policy, instead of rolling back with a raw IAM 404 — justified
  2. kirocrew cloud iam-policy --host-policies grants the launcher read access to those policies, and warns on stderr when IAM's size cap leaves no room for that read — justified
  3. An agent's greeting shows on the welcome page before the first send — justified
  4. The greeting row stays visible outside the turn fold, and a failed chunk no longer breaks the transcript — justified
  5. A spec that opts in to mcp.json under either spelling (includeMcpJson or useLegacyMcpJson) now keeps its mcp.json servers on KAS — justified
  6. A host KAS cannot run on (wrong OS or architecture, or glibc too old) gets a final refusal with no retry advice, issued before any network fetch — justified
  7. The Custom agents tab lists spec files it hides but that still reserve a name, with the reason for each — justified
  8. Such a hidden file can be deleted from the tab when it is safe to remove — justified
  9. A 409 name_taken refusal now names the file holding the name — justified

[FIRST-PRINCIPLES-REVIEWED] cf5e0fc

Description read

[DESCRIPTION-READ] ff0c9f005bfeac3c1316ddc4953cb6e5adcd116077e029e42a2c9f3fe036897f

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

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] cf5e0fc

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

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] cf5e0fc

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

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

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.

1 participant