Repository navigation
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: under Auto, only the app's own Notes
[DESIGN-REVIEWED] 12b0f02 Description read[DESCRIPTION-READ] 5420a787fbb758930f3b6b7fbd241340e0926760b274fcb174cebf0e060af36a 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 This is a scoped fix for a reported regression (#38816), and the description names the #35601 prompt it partly undoes. No duplicate, zero-consumer surface or product-shape item without a recorded decision was found. Notes
What this change shipsInventory (6 items) — 5 justifiedIntent: Meetings on KAS under Auto stops asking the owner to approve every read and write of its notes file. FIX.
[FIRST-PRINCIPLES-REVIEWED] 12b0f02 Description read[DESCRIPTION-READ] ff29595df59fd5d6923d1fbe1ff11cfa41cffe2c58f683bdc5f816861f8095a8 That sha256 names the PR description this verdict read. Recompute it with |
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: |
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: |
a0d26d3 to
a69fbcb
Compare
a69fbcb to
42bfbae
Compare
42bfbae to
396a652
Compare
Code change approver recommendation: A person should decideWhy: the decider thinks the change is probably fine but estimates a 13% chance that this change introduces a defect, above the 12% limit for approving on its own. Under Auto, an app turn now approves a call the gate neither denies nor grants, but only when the session runs the app's own Tier: 2, held for a person: changes requested. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
3b1e7c7 to
48f29c8
Compare
|
span=8bb09d4e6923
|
48f29c8 to
91cfe5d
Compare
|
span=51784250351d
|
91cfe5d to
2c55246
Compare
|
span=8bb09d4e6923
|
|
span=8bb09d4e6923
|
|
/ai-review override gpt 2c55246 not-applicable: Owner-only race at session startup: it needs the owner to re-pin agent.spec_pins while the session starts. No privilege gain; the owner holds the approval anyway (Auto is the owner's choice, and the owner can approve these calls or switch the mode). Gate denies and the trust policy still apply. |
Human judgment recorded@buluoray recorded a not-applicable release (class
This decision applies only to this commit. A new push requires a new judgment. |
2c55246 to
12b0f02
Compare
|
This follows up on my change request on head 396a652. I rechecked head 12b0f02. Earlier items:
My blocking item is resolved. I am still not approving, because two points need a person:
What this review found on this head: a gate deny still wins, because Optional:
|
Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.
Problem / Motivation
Goal: Under the Auto approval mode, an app's agent turn runs the tool calls the tool gate allows without asking, as a channel chat does, so Meetings stops prompting on every notes-file read and write.
With the KAS harness and the approval mode set to Auto, the Meetings agents (note taker, sketch artist, task extractor) raise an approval prompt for every
fs_readandfs_writeon their own notes file: about one prompt every 30 seconds during a meeting. On 0.12 there were none.Why it matters
Everyone who records a meeting on KAS with Auto on is hit. The prompts come faster than a person can answer them, and an unanswered prompt is denied after the short unattended window, so the notes stop updating. KAS is the harness we are stabilising for 0.13.
Not a goal
allowedToolsgrant).What changed (motivation → approach → change)
Symptom: every file call of an app turn prompts under Auto on KAS.
Cause: an app turn (
ctx.turns.run) sends each call the tool gate neither denies nor grants to the owner's approval prompt, the one cron jobs use. That prompt never reads the gateway's approval mode, so Auto does not reach app turns. A channel chat under Auto approves the same call. KAS raises a permission request for everyfs_*call (they are withheld from KAS auto-approve), so on KAS each one became a prompt.Change: the app-turn prompt now follows the gateway's approval mode, as a channel turn does, but only for a turn on one of the app's own agents.
_interactive_approvaltakesfollows_approval_mode;AgentTurnSDK.runsets it from_is_own_agent(app, <recorded agent>). That check askssession_agent_spec_path, the resolver for the file a session of that agent loads (the crewmate folder for the Bot conductor and worker,agent.spec_pinsapplied, links refused, a refusal when two files claim the name with no pin). It says yes only when that one file sits in the user agents folder and is named<app>--<agent>.json, the name the app bridge writes. No file, any other file (host, another app, a Bot service spec) and any resolver error ask the owner. The answer is decided once, when the SDK starts the session (the moment it loads that file), and a reused session keeps it: a later re-pin does not change what a live session runs. A reused session with no stored answer, or one now recording another agent, asks the owner; a reset session is judged again when it starts. Under Auto (the channel resolver_configured_approval_mode) an own-agent call is approved without asking and leaves an SEL audit row (app.approval_mode_auto_approve). Three cases still go to the owner's prompt: a call under a held Bot limit, a low-fidelity child request, and a host whose policy deniestrust(checked per call, as a cron job'sautois). Gate denies are unchanged, since they run before the prompt.Docs: the app-kit API reference, the app-kit platform spec and the
src/kiro_crew/apps/agent_turn_sdk.pydocstring say what Auto now means forctx.turns.run.Backwards compatibility
Compatible: the new keyword defaults to off, so every other caller of the prompt behaves as before; under Interactive app turns still ask.
Note: Auto is the default approval mode (
agent.approval_mode). So on a default install this undoes the owner prompt that #35601 added, but only for app turns on the app's own agents: those turns run without a prompt again, as they did before #35601. A turn on the host agent or another app's agent keeps that prompt.Removes nothing: the change only adds an approve path under Auto; no field, key, row or caller is removed or tightened.
Tests
test/test_app_agent_turn_approval.py: the gateway registers the app prompt withfollows_approval_modeequal toown_agent, andrun()passes_is_own_agentfor the recorded agent._is_own_agenthas one real-file test per resolver branch: the app's own file (yes); a host file, another app's file, an app file under another agent's name, an app file named like a Bot service agent (no); twins with a pin on the app file (yes), a pin on the host file (no), no pin (no); no file (no); a resolver error (no). A cancel during that read releases the session lease. A reused session keeps the answer from its start in both directions (the re-pin case), and a reused session with no stored answer or another agent is not own. A parametrized test pins that an app call is approved without a prompt under Auto, asked under Interactive, asked when the CLI flag says Interactive over a config Auto, and asked for a prompt that does not follow the mode, and that each Auto approval writes one audit row. Another test pins that under Auto a held Bot limit, a policy that deniestrustand a low-fidelity child request still reach the prompt.test/test_slack_gateway_composition_contract.py: the pinned signature of_interactive_approvalgains the new keyword.Proof: PROVEN test/test_app_agent_turn_approval.py::test_the_apps_own_file_is_own, test/test_app_agent_turn_approval.py::test_a_host_file_is_not_own, test/test_app_agent_turn_approval.py::test_another_apps_file_is_not_own, test/test_app_agent_turn_approval.py::test_an_app_file_under_another_agents_name_is_not_own, test/test_app_agent_turn_approval.py::test_an_app_file_named_like_a_mate_service_agent_is_not_own (head 12b0f02)
Mutations, each red on the named test: disabling the Auto branch reddens
test_an_app_prompt_follows_the_gateway_approval_mode[None-auto-True-False]; dropping thetrustpolicy check reddenstest_under_auto_a_held_policy_denied_or_child_call_still_asks[policy]; passingown_agent=Truefor every turn reddenstest_the_prompt_is_told_whether_the_turn_runs_the_apps_own_agent[False]; dropping the file-name check reddens the host, other-app, wrong-name and pinned-host tests; resolving only in the user folder reddenstest_an_app_file_named_like_a_mate_service_agent_is_not_own; a resolver that ignores pins reddens the pinned-app-file test; moving the read out of the release guard reddenstest_a_cancel_during_the_ownership_read_releases_the_session; judging on every turn again reddenstest_a_reused_session_keeps_the_verdict_from_its_startand the two unknown-session tests.Determinism: the changed test file ran 20/20 green at
-n0and 10/10 at-n 4 --dist loadgroupbesidetest_app_agent_turn_sdk.pyandtest_background_approval_routing.py; a shuffled run (seed 4911) passed 31/31.Manual verification
Checked that the reported case still takes the new path (read-only, no live run). The meeting app's file-writing turns (
ctx.turns.run) name the agents its manifest declares: the default note-taker and sketch agents come from its stored defaults, and the task extractor is a fixed constant. An enabled app's declared agents are materialized as~/.kiro/agents/<app>--<agent>.jsonwith their barenamekept, and the session records that bare name (a launch copy renames only the wire name), so_is_own_agentanswers true and Auto applies. A user who points a meeting agent at the host default agent in the app's settings gets the owner prompt, as intended. No new control is needed: Auto is the existing Settings choice.Related Issues
Closes #38816
Sibling sweep
Swept: git grep -n "_interactive_approval(" -- src/
Sibling: src/kiro_crew/slack/gateway_runtime/cron_turn.py -- not affected -- a cron job carries its own per-job approval mode
Sibling: src/kiro_crew/slack/gateway_runtime/nudge_channel_fire.py -- not affected -- an autonudge cycle is not an app turn and is out of this goal
Sibling: src/kiro_crew/slack/gateway_runtime/subagent_wiring.py -- not affected -- a parentless spawn already reads the global approval mode at spawn
Sibling: src/kiro_crew/slack/gateway_runtime/service_boot.py -- changed here
Pattern harvest
Not generalizable: the defect is one surface (app turns) that copied the cron prompt without the channel's approval-mode read; the other prompt users each have a deliberate mode of their own.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)