Repository navigation
fix(acp): accept qualified model ids - #17892
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Check before merge: the shared Not justified as shipped
What this change shipsInventory (5 items) — 4 justifiedIntent: let a cron job or subagent spawn save a provider-qualified model id that the model picker itself offers (#17891). FIX.
[FIRST-PRINCIPLES-REVIEWED] 0cb5b03 Description read[DESCRIPTION-READ] c06eee4eadf253c79fd9b2c7adca4cdd073426afddf0d544762675a8f029c848 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that session create ( [DESIGN-REVIEWED] 0cb5b03 Description read[DESCRIPTION-READ] 552042d1650eea05d1465b2ffe5e61566fbf2fc531153db9131718ca5b54fd72 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: |
Widen the shared cron/subagent _MODEL_NAME_RE to accept exactly one optional non-empty trailing bracket qualifier (e.g. gpt-6-astra[high]). Empty, unbalanced, nested, repeated or non-trailing qualifiers and shell metacharacters remain rejected. MODEL_ID_RE and ACP runtime validation are unchanged. The touched test file is Black-clean, so its baseline exemption is removed. Fixes #17891 Replaces #9054 by @Premshay Co-authored-by: Premshay <28099628+Premshay@users.noreply.github.com>
8f6e3b5 to
0cb5b03
Compare
UX Review (Opus 5.5) — ⏭️ skippedRevision |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (5 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: fix with a diff that matches its description. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/common/model-selection.md.
|
Self-review (crew-pr-reviewer, read-only): RECOMMEND APPROVE Reviewed head |
Replaces #9054 by @Premshay. Fixes #17891.
I have ADMIN/push on the repo, so this is an in-repo replacement of the fork PR to run the full CI + review lanes. The change is identical to the author's.
Problem / Motivation
Goal: Cron and subagent model selections can use the provider-qualified ids (such as
gpt-6-astra[high]) that the model picker itself offers.Provider-qualified effort variants such as
gpt-6-astra[high]are rejected when a dashboard cron or a subagent spawn records a model selection, despite being safe model identifiers advertised by kiro-cli's own model list.Why it matters
Cron and spawn model selections whose ids carry a provider qualifier cannot be saved or applied.
Not a goal
MODEL_ID_REor theAcpRuntimemodel validation.What changed (motivation → approach → change)
The shared spawn and cron
_MODEL_NAME_REaccepts one optional, nonempty trailing bracket qualifier. Unbalanced, nested, repeated, empty and non-trailing qualifiers remain rejected, as do shell metacharacters.MODEL_ID_REand ACP runtime validation are unchanged.The unrelated frontend restyle-baseline edit is removed. The touched model-selection test is Black-clean, so the required formatting ratchet removes its baseline exemption.
Backwards compatibility
Compatible: existing unqualified ids match the new pattern unchanged; the pattern only adds the bracket-qualifier class.
Pattern harvest
Rule candidate: when a provider protocol qualifies a value with a bounded suffix, extend a constrained allowlist rather than bypassing validation.
Tests
Verified locally on the repaired branch:
Broader backend run previously reported 49,499 passes, 135 failures and 112 skips. All 135 failed identifiers were rerun against clean upstream base
6819b80069d1bf56c4263be5c453d54cad82de34: 134 failed there too; the remaining session-control case passed on both that base and this repair branch. The full backend suite is not claimed green.Full mypy checked 1,995 source files and reported one Python 3.14 compatibility error at
src/kiro_crew/cli.py:448(asyncio.PidfdChildWatcher). A focused mypy run against the same CLI file on the clean base reproduces that error.Current-head Windows evidence: shard 1 failed
test_a_third_turn_routes_from_the_base_model_again: the third decision-log row was missing after an exclusive file-lock timeout (0.5 seconds). The exact test passes on Linux at this head and clean based8fa6a527e927504b399246332cd243d7b450e2f; its test and decision-log implementation are byte-identical there. This does not establish a Windows baseline failure or a flaky result. Native Windows reproduction is still needed to identify the lock holder.The failed PR Hygiene job read an older description missing
**Goal:**and## Not a goal. The current body contains both and passes the repository's description checker.Manual verification
N/A — focused automated coverage is sufficient.
Related Issues
N/A.
Checklist
Contribution License Agreement
N/A — template placeholder; no CLA wording is supplied.