Skip to content

fix: name the approval field and cli command in the auto refusal - #36420

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/36334-approval-field-reachable
Nov 13, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/36334-approval-field-reachable

Conversation

@JLargent42

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When an agent's cron tool refuses auto-approve, the user is told exactly which control turns it on, on the Schedule page or from the CLI.

cron_add / cron_update refuse approval_mode='auto' and tell the agent to "ask the user to turn on auto-approve for this job on the Schedule page". The reporter could not find the control and fell back to kirocrew cron update <id> --approval-mode auto, which worked.

Why it matters

Every owner whose agent creates a cron that needs auto-approve hits this refusal. If the message names a page but not the control, the owner is stuck unless they already know the CLI flag, and the job keeps stopping on approvals.

Not a goal

  • Moving, relabelling or restyling the Schedule page's Approval field. It already renders in the job editor for every agent (message) job (website/src/components/JobForm.tsx, vertical layout, label "Approval", options Default / Auto-approve).
  • Changing who may turn auto-approve on (owner-only, fix(cron): agent tools can no longer turn on a job's auto-approve #24352).

What changed (motivation → approach → change)

Symptom: the refusal points at a page, not a control. Cause: _AUTO_APPROVAL_OWNER_ONLY and _AUTO_APPROVAL_RESET_NOTE in src/kiro_crew/mcp_cron.py say "on the Schedule page" and stop there. Change:

  • The refusal now says: open the job on the Schedule page, set its Approval field to Auto-approve and save, or run kirocrew cron update <job-id> --approval-mode auto. It also says that a later tool edit to the message, agent, model, schedule, channel or thread turns auto-approve off again (_AUTO_RESETTING_FIELDS).
  • The note cron_update adds when that reset happens gives the same two routes, with the job's real id in the CLI command.
  • src/kiro_crew/docs/cron-and-scheduling.md names the field and the CLI route.

Backwards compatibility

Compatible: only the text of two tool replies changes. The refusal still starts with the same Error: approval_mode 'auto' can only be turned on by the owner prefix, and the reset note still contains Auto-approve was turned off.

Removes nothing: no path, field, record or validator is taken away; two strings get longer.

Tests

  • test_the_refusal_names_the_owner_s_controls: the refusal names the Approval field, the CLI command and the reset rule.
  • test_a_behaviour_edit_turns_auto_off[*]: the reset note now carries kirocrew cron update <that job's id> --approval-mode auto.

Proof: PROVEN test/test_cron_auto_approval_owner_only.py::test_the_refusal_names_the_owner_s_controls, test/test_cron_auto_approval_owner_only.py::test_a_behaviour_edit_turns_auto_off[message] (head ea1d7d0)

Manual verification

N/A: unit coverage is enough for a change to tool reply text. The CLI flag it names (cron update --approval-mode {auto,default}) is defined in src/kiro_crew/cli_parser_agent.py.

Related Issues

Closes #36334

Sibling sweep

Swept: git grep -n "Schedule page" -- src/kiro_crew/mcp_cron.py src/kiro_crew/mcp_cron_tool_list.py
Sibling: src/kiro_crew/mcp_cron.py -- changed here
Sibling: src/kiro_crew/mcp_cron_tool_list.py -- not affected -- the schema text only says auto is refused and owner-only; the refusal carries the instructions

Pattern harvest

Not generalizable: one tool reply was missing the directions to its control. Nothing else repeats the defect.

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.

The cron tools refuse approval_mode='auto' and send the user to the
Schedule page, but did not say which control to use, so a user could not
find it. The refusal and the reset note now name the job editor's
Approval field (Auto-approve) and the equivalent
'kirocrew cron update <id> --approval-mode auto', and the refusal says a
later behaviour edit turns it off again.
@JLargent42
JLargent42 requested review from a team and KiroCrewCaptain as code owners November 13, 2026 05:04
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ea1d7d0421b1fecc1bf39a7f91d77d643399e914 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the only change is the wording of two agent-facing replies, and both routes they name exist (cron update --approval-mode in cli_parser_agent.py, the Approval field in JobForm.tsx).

Notes

  • The refusal spells out the English UI labels "Approval" and "Auto-approve". If those labels are ever renamed in the i18n catalog, the reply will point at a control that no longer exists. Only the CLI string is checked against real code.

[DESIGN-REVIEWED] ea1d7d0

Description read

[DESCRIPTION-READ] cf1c58364d1db6cbbebb3657069fa426d54263a723783778ee276691f5ef3f48

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 ea1d7d0421b1fecc1bf39a7f91d77d643399e914 — 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. The change is three reply strings and one doc sentence, all aimed at the control the reporter of #36334 could not find.

What this change ships

Inventory (4 items) — 4 justified

Intent: when a cron tool refuses auto-approve, the owner learns exactly which control turns it on. FIX.

  1. The cron_add/cron_update refusal now names the Schedule page's Approval field → Auto-approve, and the command kirocrew cron update <job-id> --approval-mode auto — justified
  2. The refusal now warns that a later tool edit to message, agent, model, schedule, channel or thread turns auto-approve off again — justified
  3. The reset note cron_update adds now gives both routes, with the job's real id in the CLI command — justified
  4. The cron-and-scheduling user doc names the Approval field and the CLI route — justified

[FIRST-PRINCIPLES-REVIEWED] ea1d7d0

Description read

[DESCRIPTION-READ] 38896708b18336711db16b244249fc725ce353b323878ff99fa8e3ae1909fe36

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

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] ea1d7d0

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

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

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ea1d7d0

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

@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 13, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 13, 2026 07:06

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (3 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the refusal text for approval_mode auto names the Schedule field and CLI command; gate logic unchanged, with tests.

@KiroCrewCaptain
KiroCrewCaptain merged commit 6230f9c into main Nov 13, 2026
98 of 107 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/36334-approval-field-reachable branch November 13, 2026 07:06

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. I read the whole diff, tests included.

  • This only changes wording. The cron_add and cron_update refusal for approval_mode="auto" fires on the same condition as on main, and no new condition is added. The text now names the Approval field on the Schedule page and the kirocrew cron update <job-id> --approval-mode auto command.
  • The reset note after a tool edit now fills in the job id with .format(job_id=updated.id). _AUTO_APPROVAL_RESET_NOTE has one caller on main, and it is the one this PR updates. The note has one placeholder and no other braces.
  • The docs paragraph matches the new messages. The tests check the refusal text and the reset note with the real job id.
  • No regex, no new refusal, and all 96 checks are green.

I did not run the tests locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schedule page: no reachable Approval field to turn on auto-approve for an agent cron, though the cron tool points users there

3 participants