feat(skills): atomically promote safe auto-skill updates - #4533
Conversation
GPT review dispositionsExact reviewed head:
Validation on this exact head: complete affected suite 1015 passed, 20 skipped, 49 warnings; Black, isort, Flake8, mypy (988 source files), compilation, docs checks, and |
484dd70 to
25ac351
Compare
GPT review dispositions for
|
25ac351 to
08f0961
Compare
08f0961 to
8ae5bc3
Compare
8ae5bc3 to
70e44a9
Compare
|
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR surfaced in automated triage with merge conflicts and blocking readiness items. I assessed it, and it is outside what unattended automation should drive:
When you've rebased and resolved the conflicts, the pipeline will re-assess on its next cycle. |
Head branch was pushed to by a user without write access
70e44a9 to
58b71f8
Compare
|
CI triage for head f7327c0: 59/61 green. The two remaining failures:
Coverage Gate itself now passes. No code changes pending on my side. |
f7327c0 to
16f4825
Compare
First Principles Review (Fable 5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS
Not justified as shipped
What this change shipsIntent: let users who disabled skill approval receive safe prose-only updates automatically, while making candidate promotion consume exactly the bytes that were validated — an ADDITION carrying a TOCTOU FIX (linked issue #3795).
WatchThe unattended path runs two identity checks: Subtractions
[FIRST-PRINCIPLES-REVIEWED] 1d24654 |
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands. BLOCKING -- src/kiro_crew/skills.py:5269 -- attended candidates remain mutable through pre-claim descriptors FINDING -- src/kiro_crew/history_consolidation.py:1701 -- lifecycle failure after [BLOCK-MERGE] 1d24654 Adjudication (Opus 4.8) — is blocking on each finding proportionate?The adjudicable block is empty; only fenced finding F1 requires a ruling. F1 — attended-path TOCTOU on claimed candidate. The attended promotion branch (
Cannot complete a rarity/extremeness record — the condition set is the ordinary attended path against an agent-reachable pending directory, i.e. the very LLM-planted-content threat this feature targets. UPHOLD-FENCED. |
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Claim-first promotion is the right shape, but fail-closed no-replace support silently wedges the whole review queue, and an unrelated summary-freshness rework rides along. Watch
[DESIGN-REVIEWED] 1d24654 |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed |
GPT review disposition — head
|
|
Head Root cause — pre-existing test-isolation defect, surfaced by shard repacking. Fix: the missing autouse fixture ( Remaining external item: the Fork workflow-change guard still needs the |
GPT review disposition — head
|
Design Review dispositions — head
|
First Principles Review dispositions — head
|
|
CI triage for head |
|
Follow-up on the audit failure above: the upstream fix landed on main — #7936 ( |
GPT review disposition — head
|
Disposition — round-21 verdicts on
|
|
Head moved
Full local battery (2,925) green on the new head; delta-scoped GPT + Opus lanes both clean on the exact SHA. |
Disposition — stage-2 GPT verdicts on
|
Disposition — advisory FINDING on
|
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
|
@rubencu This PR and #7617 (also yours) both change What overlaps: #7617 rewrites the NEW-candidate branch ( What differs: with approval off, #7617 discards a script-supplying candidate, while this PR keeps a script-supplying update staged for human review. Same question, opposite answers. There is no textual conflict today, but this PR's call site at Which side is further along: #7617 touches 4 files. This PR touches 24 files, carries two blocking CHANGES_REQUESTED reviews, and is dirty at 635 commits behind, since main split Suggested sequence: land #7617 first, write the single rule for Posted from the 2026-09-08 open-PR relationship audit (read-only, one auditor per PR); reply here if any of this is wrong. |
Auto-apply prose-only existing auto-skill updates when approval is disabled, while keeping every script-bearing proposal staged for review. Claim pending candidates before inspection, serialize promotion and dismissal, preserve replacement candidates, recover abandoned claims, and report authoritative versions through dashboard notifications.
|
Rebased onto main Conflicts resolved:
Gates run locally on changed files: isort, flake8, Please review the resolution. A maintainer push makes the maintainer the last pusher, so a second approver is needed under the repo last-push rule. Reply if anything looks wrong. |
Problem / Motivation
When
skills.approval_required=false, newly generated auto-skills could be applied automatically, but safe prose-only updates to existing auto-skills still required manual approval. The pending-candidate flow also inspected public candidate directories before consuming them, allowing concurrent replacement or mutation between validation and promotion.Why it matters
Users who opt out of approval should receive safe prose improvements consistently without giving script-bearing changes unattended execution. Promotion must consume exactly the candidate that was validated; otherwise concurrent writers or hostile filesystem entries can redirect, corrupt, misroute, or lose pending work.
What changed (motivation → approach → change)
auto,AUTO,Auto,auto/<slug>, and aliases) before generic mutation, preventing recursive namespace deletion and case-insensitive macOS/Windows aliases from bypassing the live auto-skill target lock.base_versionremain supported.platform_compatfor Linux, macOS, and Windows, including older-glibc Linux fallback and Windows lock preparation.(mtime, message-byte-count, rotation-generation)identity. Metadata-only rewrites remain valid, same-tick message changes are detected, and legacy sidecars withoutsizeretain their prior semantics.Tests
25ac3513315f1db049d8b10fbdc590828ac4daa2: 59,035 tests collected, exit 0 with 16 workers after removing only the injected xdist worker variable inside Python.diff_signals.py, andgit diff --checkpass.cfn-lint==1.22.3, and the complete frontend build/type/lint/i18n/render/test profile; this PR changes no frontend files.Manual verification
N/A — there is no rendered UI change; promotion, dashboard routing, concurrency, recovery, summary freshness, and platform behavior are covered by deterministic automated tests.
Related Issues
Fixes #3795
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)