Repository navigation
fix: 0.12.1 batch 42 - seven fixes from Bolin's queue - #32613
Conversation
No session-directive consumer read a cron turn's stream, so a cron job's set_project (or reset_conversation, chat_tag, suggest_followup) ended with the tool's own "requested" text and no audit row. The cron stream wrapper now names each tool call the way the dashboard's out-of-band claim does, so KAS's title-only frames count, and refuses each completed person-only directive with the user-origin gate's own wording and SEL denied row. The refusals are run-scoped and lead the run's result on both the single-agent and the sequence path. Closes #29805 (cherry picked from commit d71889e) Original author: Bolin Chen (#32475). One line resolved by hand in src/kiro_crew/slack/gateway_runtime/cron_dispatch.py: imports EVENT_TOOL_RESULT from kiro_crew.acp.types instead of main's agent_sdk.context.CONTEXT_EVENT_TOOL_RESULT, which comes from #24384 (idle compaction, a feature not on this branch). Both are "tool_result".
) pysqlite3-binary 0.5.4.post2 bundles SQLite 3.51.1. That release can deadlock a thread closing a WAL database's last connection against a thread opening the same file (SQLite 3.51.2 fixes it), and pysqlite3 closes with the GIL held, so the whole process stops: no log line, no timeout, no event loop. That is what wedged the single-flight store-open tests on Linux CI, and a gateway can stop the same way. Exclude that one wheel so the resolver picks 0.5.4 (SQLite 3.46.1, which predates the deadlocking check), and pin that the bundled SQLite is not 3.51.0 or 3.51.1. Closes #29043 (cherry picked from commit 6005c08)
…32450) * fix: don't save over an unreadable instances.json or hooks.json Builds on #28505. Adding, editing or removing one remote instance after instances.json could not be read (a UTF-8 byte-order mark, a Windows sharing violation) saved only that change and erased every other instance and hop lease, and a script hook store whose startup load failed saved its empty list over hooks.json on the first hook edit. Registry mutators now read strictly and raise RegistryUnreadableError before anything is written; the add, edit and remove routes answer 503 instances_file_unreadable. Readers and the strict read both accept a leading byte-order mark. A hook store whose load failed reloads before its next edit and refuses the save while the file still cannot be loaded. Closes #27807 Co-authored-by: Gary Jennings <garysjennings@gmail.com> * fix: load a utf-16 instances.json or hooks.json instead of raising Windows PowerShell 5.1 saves UTF-16LE with a byte-order mark by default. The instances registry and the script hook store read these files as UTF-8 text and caught only parse and OS errors, so such a file raised UnicodeDecodeError past their tolerant loaders, and a UTF-16 hooks.json made gateway startup raise. Both stores, the strict hooks.json read and the import sanitizer now hand json.loads the bytes, which reads UTF-8 with or without a mark, UTF-16 and UTF-32. Bytes none of those decode count as a failed read: readers degrade with a warning and every write is refused. The sanitizer change keeps an imported UTF-16 hooks.json from arriving with its command hooks switched on now that the store loads it. --------- Co-authored-by: Gary Jennings <garysjennings@gmail.com> (cherry picked from commit 94d12e0)
…32379) On Windows os.environ is case-insensitive and boot keeps the first non-empty spelling of a name in .env. The setup step read and merged .env by literal name, so an older slack_bot_token line stayed ahead of the new SLACK_BOT_TOKEN line and kept the old token in force. The step folds every spelling of the app token, bot token and owner ID into the canonical name, matched with _env_name_key and carrying the value in force, so the prompt shows that value and the save replaces it. On POSIX the names are separate variables and nothing changes. Builds on #28557. Closes #23768 (cherry picked from commit eae2b50)
…32306) A recent-session restore that raised after registering its slot (a non-string persisted title, a malformed row) left the half-built slot behind and stopped every later session from restoring. The build now undoes its own slot and restricted marker, as the open-tab restore already does, and both recent-restore drivers log the session and go on to the next. A raise in the reads History resume runs after the slot is built leaked its construction mark, so the key stayed reserved and counted against the live-slot cap for the process lifetime. Those reads now undo the build the same way the materialiser's own rollback does. A JSON null origin was read as the string "None". The constructor keywords and the default-model follow now read it as no origin. Closes #17026 (cherry picked from commit 83f4634)
A Claude-backend compaction that outlives the compaction budget is abandoned without telling the backend, which can still finish it. The next turn's pre-turn drain drops the late frames only after that turn's prompt was built, so nothing restored the session-start context and the agent ran without its role contract. The timeout now arms the one-shot re-injection once the /compact was sent; a budget spent waiting for the turn permit sent nothing and arms nothing. Closes #31580 (cherry picked from commit 36a9fed)
iMessage, Teams, Webex, WeCom and Weixin called the per-message channels governance gate with no text, so its pure-cancel exemption never applied: once the operator denied the channel, a typed /stop was dropped and the reply it was meant to halt kept running. iMessage had no /stop at all. Each dispatcher now passes the text to the gate only when its own parse_command reads the message as a stop (as Feishu already does), so a cancel word another channel spells and every other message keep the strict gate. A Teams or Webex card press is never treated as a stop. The gate moves after callback admission on the four channels that ran it first, because the stop check parses the message and nothing may be parsed before admission. iMessage gains /stop (alias /cancel), a cooperative cancel that mirrors the Weixin one. Closes #27178 (cherry picked from commit 386d030) Original author: Bolin Chen (#32426). One comment-only hunk resolved by hand in src/kiro_crew/wecom/transport_dispatch.py: kept this branch's longer attachment comment (main shortened it in another change) and moved the log line and command-intercept header below the gate, as #32426 does.
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: these are seven cherry-picks of fixes already merged on Notes
[DESIGN-REVIEWED] 62492ce Description read[DESCRIPTION-READ] 5d911846a93325df90714c32b96054336e010934ca20f20a52789f88c67dda98 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Each of the seven backports is a fix that has already merged on What this change shipsInventory (8 items) — 8 justifiedIntent: give 0.12.x users seven defect fixes that have already merged on
[FIRST-PRINCIPLES-REVIEWED] 62492ce Description read[DESCRIPTION-READ] a7a83cd3890781eefb3a775c959f152c507868a62299d882d02af0bee1dd9d49 That sha256 names the PR description this verdict read. Recompute it with |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: Nothing in this diff touches the shell deny composite: no TIGHTENING: Saves now refuse when the file read fails. Three changes do this, and each refuses one threat: writing an empty or partial document over records the read could not load.
ADJUDICATED: 16 candidates, 0 confirmed newly-refused PLATFORM COVERAGE:
UNADJUDICATED:
[SCOPE-REVIEWED] 62492ce |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: Bring seven fixes from Ray's 0.12.1 picks in Bolin's queue that merged on
mainafterv0.12.0ontorelease/0.12.0, one commit each, in a PR of its own.Why it matters
set_project(and other person-only directives) is silently dropped instead of refused, with no audit row.instances.jsonorhooks.jsonraises instead of loading (Windows editors save them that way).kirocrew setup --slackleaves an older lowercase.envtoken in force on Windows./stopis dropped on a governance-denied iMessage, Teams, Webex, WeCom or Weixin channel, so the reply keeps running.Not a goal
main; nothing is changed only here.CHANGELOG.mdchange.What changed (motivation → approach → change)
Each main squash commit was cherry-picked with
-xontorelease/0.12.0@44e6f443e4, in merge order onmain, one commit each.d71889ee10bc51ee732d6005c082e9fa7bc1ef2f94d12e095a7bdc0589f0eae2b50299ad013851a583f46345dee84b814f1d36a9fed3cc53f59f0380386d0301f362492ce674Hand-resolved hunks. No prerequisite was pulled in.
slack/gateway_runtime/cron_dispatch.pyEVENT_TOOL_RESULTfromkiro_crew.acp.typesinstead ofagent_sdk.context.CONTEXT_EVENT_TOOL_RESULT, which #24384 (idle compaction, a feature) adds onmain. Both are the string"tool_result". The pick applied cleanly but failed at import time on this branch, so its own tests found thiswecom/transport_dispatch.pymainchange shortened it) and moved the log line and command-intercept header below the gate, as #32426 doesEvery other file has added and removed lines identical to its main commit. Each hand-resolved commit is authored with the public identity the push guard requires and names its original author in its message; clean picks keep their original author.
builder-security checked: no bind, listener, route, auth mechanism or storage grant changes. #32426 lets only a message the channel's own parser reads as
/stopclaim the governance gate's existing pure-cancel exemption.Backwards compatibility
Compatible: each change is the one already merged on
main, and its compatibility note applies unchanged.Removes nothing: no setting, key or caller is removed.
Tests
Proof: not provable -- other: a backport of main commits whose proofs ran on their own PRs
release/*, so the related set was run here: every touched test file plus every test file that imports a touched module, 114 files,-n 4 --dist loadgroup. Before the fix: refuse set_project from a cron job out loud #32475 import fix: 4243 passed, 8 failed. After it, the 36 tests in the three failing files pass except one:test_sqlite_compat.py::test_the_bundled_sqlite_cannot_deadlock_a_wal_close_against_an_openasserts the installed SQLite is at least 3.51.2. The local environment has 3.51.1, and the test fails the same way on amaincheckout; the pin this PR carries is what CI's fresh install resolves.Manual verification
N/A - each fix was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.
Screenshots / video
N/A - no frontend file changes.
Related Issues
Backport to the 0.12 line for 0.12.1 of #32475, #32424, #32450, #32379, #32306, #32249 and #32426. Source issues: #29805, #29043, #27808, #23768, #17026, #31580, #27178.
Sibling sweep
Siblings: none -- each source PR carried its own sibling sweep; this PR only carries those fixes.
Pattern harvest
Not generalizable: this PR only carries fixes already on
main. The source PRs have their own harvest.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.