Skip to content

fix(release): forward-port crash, hang and fail-open fixes to 0.12 - #29386

Merged
buluoray merged 1 commit into
release/0.12.0from
crew/slack/fwd-0.12-crash
Nov 4, 2026
Merged

buluoray merged 1 commit into
release/0.12.0from
crew/slack/fwd-0.12-crash

Conversation

@buluoray

@buluoray buluoray commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Bring the wide-impact crash, hang and fail-open fixes from main to release/0.12.0 so the next 0.12.0 RC ships without them

All five are merged on main and absent from release/0.12.0:

Why it matters

Each one is a hang, a launch crash, wrongly failed sub-agents on every macOS host, or a fail-open security gap on 0.12. The release branch takes only fixes of that weight. Every fix must land before the bare-version drop PR and the promotion RC.

Not a goal

What changed (motivation → approach → change)

One squashed commit; the per-pick breakdown is in its message. Picks in order, each with git cherry-pick -x:

Source Merge SHA Applied
#22326 i18next floor 26.4.4 7efc7669a46e clean; lockfile now resolves i18next 26.4.4
#28980 libgbm dependency 068b96bbae12 clean
#27615 macOS all-zombie pgroup_exists e1b9965677ac clean
#27734 macOS all-zombie killpg EPERM 7d4da6bb99a5 clean (after #27615)
#27745 cron governance, fail closed unattended 3fa3e8024d47 one conflict, cron_turn.py

The four clean picks are byte-identical to their source diffs.

#27745 conflict, src/kiro_crew/slack/gateway_runtime/cron_turn.py, both _cron_stream_with_posttoken_resume calls (_cron_run_sequence and _cron_run_single). On main the added lines sit next to on_resume=, which #27508 added. The resolution adds exactly the source's two keyword arguments at both sites and leaves on_resume= out:

session_key=agent_session_key,   # sequence site; session_key=session_key at the single site
unattended=True,

Why it still fails closed: _cron_stream_with_posttoken_resume forwards **stream_kwargs to stream_and_collect, which on 0.12 already takes session_key and unattended. With unattended=True it wraps the turn in hooks.unattended_turn, and hook_runtime/governance_gate.py returns Blocked by governance policy: it could not be evaluated for an unattended turn when evaluation raises. Those two files, hooks.py, the heartbeat and monitor-wake sites, and the new test/test_governance_unattended_turns.py match the source commit exactly.

Backwards compatibility

Compatible: each change matches its main PR. The only tightening is #27745's: an unattended turn whose governance cannot be evaluated is now refused, the behaviour main already has.

Removes nothing: no key, path or record is removed.

Tests

Proof: not provable -- other: release-branch picks of merged fixes; proofs ran on each source PR

Manual verification

N/A - unit coverage from the source PRs applies unchanged; the conflict is covered by the tests above.

Screenshots / video

Why no screenshot: the website/ change is a dependency floor bump and a unit test, with no rendered difference.

Related Issues

Refs #22326
Refs #28980
Refs #27615
Refs #27734
Refs #27745

Sibling sweep

Siblings: none -- picks of merged fixes; their own sweeps ran on main.

Pattern harvest

Not generalizable: release-branch picks of fixes already harvested on their source PRs.

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.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 3, 2026 23:48
@buluoray
buluoray requested review from bolichen97 and removed request for a team November 3, 2026 23:48
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Sensitive Change Review

Sensitive files changed:

  • src/kiro_crew/hook_runtime/governance_gate.py

  • src/kiro_crew/hooks.py

  • No reasoning template for 7c0f212 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: 7c0f212559ec5c7b878b00c90ec3e768c24f5e94
- 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 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

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

Nothing blocks. All five picks are fixes already merged on main and linked by issue. The one reversed pin, the "soft fail-open" comment in governance_gate.py, is reversed by #27745 on main, so it is not reversed here.

What this change ships

Inventory (8 items) — 8 justified

Intent: let 0.12.0 RC users get main's hang, launch-crash, macOS sub-agent and governance fail-open fixes. FIX.

  1. A chat with an unclosed $t( marker no longer freezes the tab (i18next floor raised to 26.4.4) — justified
  2. The Linux deb and rpm packages now declare libgbm, so the app no longer dies at start on hosts without it — justified
  3. On macOS, a sub-agent whose process group holds only zombies is no longer recorded as failed (pgroup_exists) — justified
  4. On macOS, killpg returning EPERM on an all-zombie group is treated as already exited — justified
  5. Cron, heartbeat and monitor-wake turns are now judged by their session's governance profile (the session key reaches the gate) — justified
  6. When governance evaluation raises on an unattended turn, the tool call is refused instead of allowed — justified
  7. Unattended turns are now marked as such (unattended_turn in hooks.py) through the dashboard, channel, cron, heartbeat and nudge gates — justified
  8. The governance, hooks and desktop-app specs are updated to match — justified

[FIRST-PRINCIPLES-REVIEWED] 7c0f212

Description read

[DESCRIPTION-READ] a0512e684a98dbd7ff6e0c89c35e9a7246f020b925c061c302fb2511cc77f4aa

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

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

These are byte-identical picks of fixes already merged on main. The one conflict resolution keeps the fail-closed wiring, and a mutation test pins it.

Notes

  • "Manual verification: N/A" covers the macOS-only _killpg/pgroup_exists EPERM branch. That branch gets no per-PR macOS CI on release/0.12.0: nightly's macos-15 leg runs only on main. The risk is small because an unreadable listing (members is None) falls back to the old behaviour. Still, run test_killpg_darwin_zombie_group.py and test_pgroup_exists_darwin_eperm.py on a macOS host against the release branch before the promotion RC.
  • The ## Backwards compatibility section has both a Compatible: line and a Removes nothing: line, which contradict each other. fix(governance): judge cron turns by their session and fail closed on unattended turns #27745 makes unattended turns fail closed, so the honest form is Compatible: plus a reader line for cron_turn.py:_cron_run_single / _cron_run_sequence.

[DESIGN-REVIEWED] 7c0f212

Description read

[DESCRIPTION-READ] d94d58e7b33e2d5dacd079734834f92615b6166239ea9d4dd4afe0d02323a15b

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

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing to check. This PR adds or changes no dashboard controls, labels or states. It brings backend, packaging, dependency and test fixes over to the release branch, so having no screenshots leaves no evidence gap.

[UX-REVIEWED] 7c0f212

Description read

[DESCRIPTION-READ] ba35c95de7c051aef97d2ecd2116b445c5c82e383923d04f6bb5deccd8a6e305

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.

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.
@buluoray buluoray changed the title fix(release): forward-port eight crash and hang fixes to 0.12 fix(release): forward-port crash, hang and fail-open fixes to 0.12 Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — 🔴 changes requested (blocking)

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

The cron governance change sends the gate the cron session key but not the agent, so a governance profile bound to that agent never applies to its cron turns.

BLOCKING — src/kiro_crew/slack/gateway_runtime/cron_turn.py:265
session_key=agent_session_key, / unattended=True, (no agent=; the single-agent site at :667 is the same, with cron_agent in scope)
Trigger: an operator binds a profile to Bind(type="task", id="<agent>") and a cron job runs that agent. _cron_run_sequence / _cron_run_single → _cron_stream_with_posttoken_resume(**stream_kwargs) → stream_and_collect(agent="") → _governance_denial → resolve_active_scope(session_key, agent=""). The if agent: task-bind lookup (governance_profiles.py:1433) is skipped.
Outcome: on a chat turn that agent's own tighter profile limits its tools. On a cron turn it does not: only the cron surface binding applies, or the policy ceiling alone. So that agent can run tools in an unattended cron job that its operator-bound profile denies.
Anchor: defect
Fix: pass agent=agent at the sequential site and agent=cron_agent or "" at the single site, alongside session_key=.

[BLOCK-MERGE] 7c0f212
[OPUS-REVIEWED] 7c0f212

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

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

@buluoray
buluoray force-pushed the crew/slack/fwd-0.12-crash branch from e92de71 to 7c0f212 Compare November 3, 2026 23:53
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7c0f212

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

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Security Scope Review -- ✅ human override accepted

@buluoray overrode this lane for 7c0f212559ec5c7b878b00c90ec3e768c24f5e94 via /ai-review override (this commit only).

[SCOPE-REVIEWED] 7c0f212

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 4, 2026
@buluoray

buluoray commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author
  • BLOCKING src/kiro_crew/slack/gateway_runtime/cron_turn.py:265: cron turns give the gate their session key but not their agent

fixed in 7b02f20: both cron stream calls pass agent= (step.dispatch_agent on a sequence, _dispatch_agent or "" on a single job), so a task profile bound to the agent governs its cron turns.
The gap was on main too, so it is fixed there first in #29412 (Closes #29411); 7b02f20 mirrors that commit.
The agent is the dispatched template, the same id a chat turn hands the gate.
Removing either agent= line alone fails its own new test.

This Opus verdict on 7c0f212559ec was computed but not posted (a GitHub API rate limit in the publish step), so it is answered here from the run's withheld-verdict artifact.

@buluoray
buluoray force-pushed the crew/slack/fwd-0.12-crash branch from 7b02f20 to 7d20584 Compare November 4, 2026 01:01
@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
@buluoray
buluoray force-pushed the crew/slack/fwd-0.12-crash branch from 7d20584 to 73e5ec2 Compare November 4, 2026 01:27
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 4, 2026
@buluoray
buluoray force-pushed the crew/slack/fwd-0.12-crash branch from 73e5ec2 to 7c0f212 Compare November 4, 2026 01:42
@buluoray

buluoray commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author
  • BLOCKING src/kiro_crew/slack/gateway_runtime/cron_turn.py:265: cron turns give the gate their session key but not their agent

Moved out of this PR: the mirror commit (7b02f20, later 73e5ec2) was removed, so this head no longer carries a fix and the earlier "fixed in" disposition no longer holds for it.
The gap is not introduced here: main has the same two calls without agent=, and before this pick release passed neither session_key nor agent, so the pick only narrows cron governance.
The fix is on main in #29412 (Closes #29411) and will be forward-ported to 0.12 as its own PR once it lands, so the five picks here are not held up.

Supersedes the disposition posted earlier for this head.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 4, 2026
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 4, 2026
@buluoray

buluoray commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

/ai-review override scope 7c0f212 infra-failure: the earlier Security Scope Review run on this head failed only because a GitHub API rate limit stopped it reading PR comments (https://github.com/kirodotdev/KiroCrew/actions/runs/41742630150); the rerun on the same head passed.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray recorded a infra-failure release (class infra-failure) for the scope AI finding on 7c0f212559ec5c7b878b00c90ec3e768c24f5e94.

the earlier Security Scope Review run on this head failed only because a GitHub API rate limit stopped it reading PR comments (https://github.com/kirodotdev/KiroCrew/actions/runs/41742630150); the rerun on the same head passed.

This decision applies only to this commit. A new push requires a new judgment.

@buluoray
buluoray merged commit 30cf59f into release/0.12.0 Nov 4, 2026
56 of 72 checks passed
@buluoray
buluoray deleted the crew/slack/fwd-0.12-crash branch November 4, 2026 07:33
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 4, 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.

1 participant