Repository navigation
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS A refused authority still shows up as an unexplained failure: the dashboard throws away the new 409 hint, and on macOS/Windows auto-skills turn off with only a log line. Watch
[DESIGN-REVIEWED] 9c3d166 Description read[DESCRIPTION-READ] 0ee64dd4cb346d24f81c6dc6afa60308e1a4268555d95a1b1383beb24af02660 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, fork) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK product-shape change without accepted RFC: auto-skill extraction stops on native Windows, macOS with the Kiro CLI sandbox, and sandbox-off installs, and the author says the decision is still pending. Not justified as shipped
What this change shipsInventory (9 items) — 8 justifiedIntent: let an operator who turned approval off also receive prose-only skill updates unattended, and make every process certify the auto-skill authority; ADDITION.
Blockers
[FIRST-PRINCIPLES-REVIEWED] 9c3d166 Description read[DESCRIPTION-READ] f00cc774369b105a81012242c56ea41a3a0068d37282482fde67c546c68f9c7f That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings that block the merge. FINDING — src/kiro_crew/skills.py:6605 — a candidate with two scripts that share a filename (or [OPUS-REVIEWED] 9c3d166 |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
5db8c92 to
9c3d166
Compare
|
Replayed onto #19427's fixed head (
|
|
The PR Hygiene red on this head is the commit cap, not the content: the gate allows 1 or 2 commits over |
9c3d166 to
b78b2ad
Compare
|
Rebased the three-commit stack onto |
b78b2ad to
2522313
Compare
|
Final stack refresh after main advanced: part 3 is |
|
Replayed split part 3 onto #19427 |
2522313 to
cafd430
Compare
|
This is part 3's push for this round: It fixes this part's CI red. Backend Tests (3.12, 1) and (Windows) (1) failed The Windows (6) red was part 1's read-only delete, which #19410 fixes. The Opus and Security Scope lanes ended incomplete or unsettled on |
9bc384f to
72bc5fe
Compare
|
This is part 3's push for this round: Main's #17283 and #22866 changed two composition-contract test modules this part also edits. The replay kept every per-file patch ID, and those modules pass after it. The runs on |
72bc5fe to
05eb8ac
Compare
|
This is part 3's push for this round: The round's Coverage Gate passed on Checked on this head: parts 1 to 3's owning set (7,185 passed, 924 skipped), the Slack gateway modules (1,048 passed), the tree-scan guards and ratchets (261 passed), the 24 script gates, and |
05eb8ac to
0e3e8ef
Compare
|
Rebase onto main Checked on this head: parts 1 to 3's owning set (7,187 passed, 924 skipped), the Slack gateway modules (1,048 passed), the tree-scan guards and ratchets (261 passed), the 24 script gates, and |
) Part 1 of the kirodotdev#18595 split. It carries the platform half of kirodotdev#3795: the helpers the atomic skill candidate claim and promotion path publishes and verifies with, and nothing that uses them yet. platform_compat gains opened_file_identity and opened_path_identity_matches, which compare an already-open file or directory by device and inode on POSIX and by native volume and file id on Windows, open_path_no_reparse and unlink_path_if_identity, which delete exactly one opened Windows entry whose native identity still matches, and the Win32 structures those read. pinned_fs.scan_tree_pinned accepts optional entry and depth budgets enforced while the listing is consumed. The tests cover the identity comparison on both platforms including the FileIdInfo and legacy-id split, the no-reparse entry open, the identity-bound delete (a match, a mismatch, a file-for-directory swap, the READONLY clear, an identity that is not full FileIdInfo, and native Windows cases), and the descriptor-bound directory sync ignoring a substituted path. The link-screen baseline declares the one new screen-then-resolve site, and the platform-compat spec documents the two identity helpers.
…ev#3795) Part 2 of the kirodotdev#18595 split. It carries the candidate claim and promotion path of kirodotdev#3795: every promotion, dismissal and unattended apply first captures the pending generation through authenticated no-follow reads, records its digest in a held claim lock, renames the public directory into a hidden quarantine and publishes only from a fresh private materialization of the captured bytes. Updates publish the complete live tree with no-replace renames and keep the replaced generation as permanent public evidence. Restart recovery consumes, re-queues or retains each claim by exact digest and native identity. The private authority lives at tag-grants/auto-skill-private, beneath a directory every Kiro Crew sandbox already masked, so no new deny leaf, mask or spawn check is added. All auto-skill locks follow one documented order, skills.AUTO_SKILL_LOCK_ORDER: slug claim, claim, target, namespace. skill_runtime/auto_skills stages the candidate beneath the pinned pending parent and takes the target lock inside the slug claim lock, skill_runtime/versions numbers the snapshot from the captured live generation, and constants names the authority directories. Nothing provisions the authority yet: gateway startup, the standalone CLI commands and the dashboard, Slack and consolidation surfaces arrive in part 3. The test conftest models that startup lazily so every existing suite keeps its behaviour.
…tdev#3795) Part 3 of the kirodotdev#18595 split. It wires the surfaces of kirodotdev#3795 onto the claim and promotion path part 2 shipped. Gateway startup provisions or certifies the auto-skill private authority once, before any loader or session, and keeps serving with auto-skill staging and promotion disabled when that refuses. kirocrew consolidate and kirocrew run attempt the same certification, and kirocrew skills authority-retire moves an idle authority aside under the gateway lock. A prose-only update to an existing auto-skill is applied without review when the operator opts in with skills.auto_apply_updates on top of approval_required=false. Disabling approval alone still stages every update. An update whose supplied scripts all failed validation is rejected when it would be applied unattended and staged as prose when update review is on. Consolidation skips skill detection wherever staging and promotion are off. The dashboard raises a Skill auto-updated notification for an unattended apply, and a dismissal, delete or pin the authority rule refuses answers a coded 409 instead of a 404 or 400.
0e3e8ef to
abc94b1
Compare
|
Rebase onto main Checked on |
|
Superseded by #23649: see #19431 (comment) for the recommendation that a maintainer close this PR. |
Problem / Motivation
Goal: An operator who disabled review can opt into receiving prose-only skill updates unattended, every Kiro Crew process certifies the auto-skill authority the way the gateway does, and a refusal of the authority rule reaches the dashboard as a coded 409 instead of a 404.
With
skills.approval_required=false, a safe prose-only update to an existing auto-skill still waits for manual approval, and nothing lets an operator apply it unattended. Part 2 of this series (#18595 split) shipped the claim and promotion protocol and its private authority, but nothing provisions that authority, so on part 2 alone staging and promotion stay off. The dashboard also reports a dismissal, delete or pin the authority rule refused as 404 or 400, which tells the operator the skill is gone while it is still there.This is part 3 of 4 of #18595, bolichen97's ruling of 2026-10-12. Stack: #19410 -> #19427 -> PR3 (this) -> #19431 docs and specs. #18595 stays open as the whole-change reference.
Stacked on #19427: the diff shows PR1's and PR2's commits (
2ce645b4c3,636e185628) until they merge: #19410's headcd12c94a90replayed onto current main, the same patch, and the head of #19427. GitHub refuses a fork branch as the base of a PR into kirodotdev, so the PR targetsmain. This part's own change is the one commitabc94b1a26.Why it matters
Users who opt out of approval and also opt into unattended updates should receive prose improvements without granting unattended execution to script-bearing candidates, and turning approval off alone must not widen what it already meant. Every process that can stage or promote (gateway,
kirocrew consolidate,kirocrew run) has to certify the authority at the same boundary, or the fail-closed default of part 2 is a feature that never turns on. A refusal that surfaces as "not found" costs an operator a wrong diagnosis.Not a goal
skills.auto_apply_updates. It is set withkirocrew config set.self-protection-skills-authority-retireargv floor that denieskirocrew skills authority-retirethrough an agent shell. It is a sensitive-path change a maintainer lands from a repository branch (commitfe170cc32aon fix(security): denykirocrew skills authority-retirefrom an agent shell #4533). The floor-bound tests skip on a base without it and say so.What changed (motivation → approach → change)
Goal: wire every surface onto the part 2 protocol with one certification boundary per process and one refusal vocabulary.
Approach: the surfaces are carried from commit
7fa433e33con #18595. Each process certifies once at startup, before it constructs a loader or consolidator, and a refusal never stops the process: the initializer records the reason, every staging and promotion path refuses, and the rest of the work proceeds.slack/gateway_runtime/process_entry.py):run_gatewayprovisions or certifies the authority once, before any loader or session, and logs the refusal and keeps serving when it cannot. Certification stays on the readiness path so no agent this gateway spawns runs before the stale-state checks.cli_knowledge.py,cli_parser_agent.py,cli.py,cli_server.py,cli_help.py):kirocrew consolidateandkirocrew runattempt the same certification before constructing mutation-capable collaborators and print one stderr notice on a refusal whenskills.auto_create_from_sessionsis on.kirocrew skills authority-retiretakes the gateway lock and moves an idle authority root, its record and the public quarantines aside under one.stale-<token>suffix, printing every set-aside path and deleting nothing.config/memory_sections.py,config/section_builders.py,config-baseline.json,history_consolidation_skills.py):skills.auto_apply_updates(default false) applies a prose-only update whenapproval_required=falseandauto_refine_on_deviation=false. Disabling approval alone still stages every update._stage_skill_updatestages with notification suppressed, captures the candidate binding, and_auto_apply_staged_updatepromotes throughauto_apply_pending_update, runs the lifecycle pass with the target exempt, and auditsauto_applied_update,auto_apply_committed_recovery_pendingorauto_apply_failed. An update whose supplied scripts all failed validation is rejected withall_scripts_rejectedonly when it would be applied unattended and is staged as prose whenever update review is on, the rule fix(skills): respect disabled approval setting #7617 set for new candidates.history_consolidation_skills._run_skill_detection): whereauto_skill_promotion_disabled_reason()is set there is no aux model call, no candidate that could only be lost and no detection marker, so the window is judged once creation is available again.dashboard/handlers/prompts_skill_pending.py,dashboard/handlers/prompts_skill_edits.py,dashboard/server.py,dashboard/server_runtime/skill_learning.py):api_skill_pending_dismisscallsdismiss_pending_skill_checkedand mapsPendingDismissalRefusedto 409pending_dismissal_refused.DELETE /api/skills/{name}andPOST /api/skills/-/pincalldelete_skill_checkedandset_pinned_checkedand mapLiveSkillMutationRefusedto 409skill_mutation_refused, each withreason,detailand the retirehint, auditedrejected. A skill that is gone keeps its 404 and 400.set_update_auto_applied_hookraises a Skill auto-updated notification for an unattended apply, the one record the operator sees that a live skill changed. The pending notification readshas_scripts is Trueso an unknown value is not reported as scripts.cli._skills_cmdtests intest_skill_versioning.py,test_skill_write_guard.pyandtest_skill_write_territory_guard.py(handler doubles stand in fordelete_skill_checked),test_dashboard_pinned_write_migration.py, and the newtest_skills_authority_retire_floor_link.py, which holds the CLI path, the operator hint and the floor id equal.Backwards compatibility
Breaking: auto-skill staging, approval, unattended apply and unreviewed direct publication need a certified private authority protected by the live Kiro Crew credential mask, so they refuse where none exists or where the configured sandbox mode changes to off. The same refusal applies on native Windows and on macOS with the Kiro CLI internal sandbox (fail-closed default, pending maintainer confirmation on #18595), a gateway whose startup refused, and a process that never runs authority initialization. A dismissal the authority rule refuses while its candidate is still staged answers 409
pending_dismissal_refusedinstead of 404. A liveauto/delete or pin the same rule refuses while the skill is still there answers 409skill_mutation_refusedinstead of 404 and 400.skills.auto_apply_updatesis a new key defaulting false, so an approval-off install keeps staging updates as it does today.Reader: src/kiro_crew/history_consolidation_skills.py:_stage_skill_update -- chat -- unchanged unless auto_apply_updates is on, an update whose scripts all failed is rejected only when it would be auto-applied (test_disabled_approval_alone_never_auto_applies_an_update, test_update_whose_scripts_all_failed_stays_reviewable_while_update_review_is_on)
Reader: src/kiro_crew/history_consolidation_skills.py:_run_skill_detection -- chat -- wherever staging and promotion are off, detection is skipped with no aux model call and no marker while memory consolidation proceeds (test_consolidation_still_runs_on_a_delegated_host)
Reader: src/kiro_crew/dashboard/handlers/prompts_skill_pending.py:api_skill_pending_dismiss -- crew page -- a candidate still staged when the authority rule refuses answers 409 with the reason and retire hint, audited rejected, a missing candidate keeps its 404 (test_dismiss_refused_by_the_authority_rule_is_a_coded_409_not_a_404, test_dismiss)
Reader: src/kiro_crew/dashboard/handlers/prompts_skill_edits.py:api_skill_detail and api_skill_pin -- crew page -- a refused delete or pin answers 409 skill_mutation_refused, a missing or non-auto skill keeps its 404 and 400 (test_delete_and_pin_refused_by_the_authority_rule_are_coded_409s, test_pin_roundtrip)
Reader: src/kiro_crew/cli_knowledge.py:_consolidate_cmd -- release -- attempts certification once, a refusal keeps consolidation running with skill detection off and one notice when auto-skill creation is on, the list-only form stays read-only (test_standalone_consolidation_certifies_before_staging, test_consolidation_still_runs_on_a_delegated_host, test_standalone_refusal_is_silent_when_auto_skills_are_off)
Reader: src/kiro_crew/cli_server.py:_run_task -- release -- attempts certification once before constructing sessions, stores and the consolidator, a refusal keeps the task running (test_authority_is_certified_before_task_state, test_authority_refusal_keeps_the_task_running, test_authority_refusal_is_silent_when_auto_skills_are_off)
Reader: src/kiro_crew/cli_knowledge.py:_skills_cmd -- release -- kirocrew skills authority-retire holds the gateway lock and prints every set-aside path (test_authority_retire_cli_holds_the_gateway_lock, test_authority_retire_cli_reports_a_root_retired_without_a_record)
Reader: src/kiro_crew/slack/gateway_runtime/process_entry.py:run_gateway -- release -- the authority initializes after boot_platform and before GatewayOrchestrator on every platform, and a refusal never stops the gateway (test_authority_initializes_before_orchestrator_on_every_platform, test_maskless_existing_authority_logs_one_retire_hint)
Tests
On
db794425bc(three commits on main1f033607bd). That is the same patch as this head (patch ID8e34973093f0) before its replay onto main7796e2af52, whose one newer commit touches none of this series' files. Run withPYTHONPATH=src python -m pytest -q -p no:cacheprovider:test_cli_server_more_coverage*.py,test_cli_server_facade.py,test_consolidate_cmd.py,test_dashboard_pinned_write_migration.py,test_dashboard_server_composition_contract*.py,test_history.py,test_history_consolidation_facade.py,test_history_consolidator.pyand the CLI split contract tests): 7,205 passed, 922 skipped (880 of them the website-dependenttest_skillform_frontmatter_parity.py).test_slack_gateway.pywith everytest_slack_gateway_*.pytopic module: 1,048 passed.test_skill_update_flow.pypins the opt-in, the all-invalid-script rule on both sides of update review, the recovery-pending outcome and the detection skip.test_consolidate_cmd.pydrives a realSkillsLoaderthroughkirocrew consolidateon a delegated host. Its autouse floor now reads an empty cgroup file for the confinement probe, as part 2's suite does. On a runner inside a Kiro Crew agents slice, that test otherwise read the operator's terminal as confined.test_cli_server_facade.py's frozen import inventory now listsinitialize_gateway_auto_skill_private_authority, which_run_taskimports into the facade (tests patch it there).test_slack_gateway_run.py::TestRunGatewaypins the startup order on linux, darwin and win32 and the single retire hint.test_skill_pending_api.pypins the three 409s, their SEL rows and the unchanged 404 and 400.test_dashboard_server_composition_contract_owners.pypins the Skill auto-updated notification on the serving loop and inline, and that a failed or unreadable record is contained.-n0: 261 passed. The 24 script gates pass, andpush_guard.py --base main --max-ahead 3reports SAFE TO PUSH.Manual verification
N/A: unit coverage sufficient. The dashboard change is three JSON error payloads and one notification with no rendered component change, and the Skills tab renders the 409 through its existing uncoded dismiss-failure copy.
Related Issues
Part 3/4 of the #18595 split (stack: #19410 -> #19427 -> PR3 -> #19431). Fixes #3795.
Pattern harvest
Rule candidate: review-prompt
Pattern: a handler that maps every exception from a mutation to 404 or 400, so a refusal of a resource that still exists reads as the resource being gone.
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).