Repository navigation
docs(session-control): spec the closed-authoring-session cron refusal as shipped - #17641
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm that a [DESIGN-REVIEWED] 14f4464 Description read[DESCRIPTION-READ] 583ef189acb2c43f44310c90952dd0c2260bb4d505bc477bd9f86fa6b800e8cd 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 |
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: |
|
Disposition of the Design Review advisory (confirm that a released job passes |
|
The rewrite matches the code. |
bolichen97
left a comment
There was a problem hiding this comment.
Approving. The rewritten paragraph in session-control.md now matches the owning_slot is None branch of _app_owned_cron_refusal, which returns cron_owner_unverifiable, and the recovery command it names (with --release or --session-of) exists in cli.py. The refusal table row matches too.
Problem / Motivation
Goal: Make the session-control spec describe the cron dispatch refusal that main actually ships when a job's authoring session has closed.
docs/system-specs/modules/session-control.mdsays that when a cron job'ssession_keynames a session that is no longer open,_app_owned_cron_refusal"returns nothing" and the fail-closed direction "is wrong here". Since #8335 the code does the opposite: it refuses withcron_owner_unverifiable(src/kiro_crew/dashboard/session_control.py, theowning_slot is Nonebranch), andtest/test_cron_session_control.py::TestAppOwnedCron::test_a_job_whose_authoring_session_has_closed_fails_closedpins it. The refusal table row above it also omits this case.Why it matters
The spec is what reviewers and agents read before touching this security gate. A paragraph that calls the shipped fail-closed arm a mistake invites someone to "fix" the code back to the fail-open #8335 closed, and gives an operator no recovery path for a refused user cron.
Not a goal
What changed (motivation → approach → change)
Stale spec text contradicts the shipped gate → rewrite it to match the code, docstring and pinned test → two edits in
docs/system-specs/modules/session-control.md:cron_owner_unverifiable, why (app authority lives only insession_keyforcron_addjobs), the accepted cost (user crons with a closed tab are refused too), the operator recovery (kirocrew cron adopt <id> --releaseor--session-of, already documented insrc/kiro_crew/docs/cron-and-scheduling.md), and a pointer to cron dispatch: persist app ownership on the job so a closed authoring tab does not refuse a user cron #8449/Own app cron records by an owner_app field, not by the created_by stamp #13583 for the durable fix.Backwards compatibility
Compatible: documentation only; no runtime behaviour changes.
Removes nothing: the diff replaces a spec paragraph that described behaviour the code no longer has.
Tests
No test change; the described behaviour is already pinned. Ran
timeout 900 python3 -m pytest -n0 test/test_cron_session_control.py -x -q -k fails_closedwithPYTHONPATH=<worktree>/src: 4 passed, includingtest_a_job_whose_authoring_session_has_closed_fails_closed.Manual verification
N/A — docs-only; cross-checked each sentence against
_app_owned_cron_refusalonorigin/mainand thecron adoptrows insrc/kiro_crew/docs/cron-and-scheduling.md.Decision for the owner
#8449 asks whether a user-created dispatching cron whose authoring tab has closed should be allowed to dispatch again, which needs an ownership record the confined app cannot influence (a new field written host-side at
cron_add, or a separate gateway-written store, decided together with #13583'sowner_app). This draft does not make that call and only ships the decision-free slice the thread converged on, correcting the spec to the shipped fail-closed gate withcron adopt --releaseas the documented recovery, because every input the gate can read today is selectable by the party being confined.Related Issues
Refs #8449. Related: #8335, #13583.
Pattern harvest
Not generalizable: a single spec paragraph that a same-commit code change contradicted; the code, docstring and test were already consistent.
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.