Repository navigation
Description
Parent
Ticket MG1 of spec #2427 (0.1.2): driver v1's model field accepts provider-qualified model ids. This is a contract change, by the planner's ruling. Size: M.
What to build
Driver v1's model grammar, ^[A-Za-z0-9][A-Za-z0-9 ._:@+-]{0,59}$ in kernel/driver-kit/schema.json and in the local driver's START table, refuses /. That blocks the documented provider-qualified ids that harness rows need. Reviews found it on Pi (#2774 R2), Kimi (#2785 R1: kimi login provisions kimi-code/kimi-for-coding) and OpenCode (--model provider/model). Kilo and Crush in wave 2 hit it as well.
Widen the grammar to /-separated segments:
- each segment follows today's character rules;
- no leading or trailing
/, no//, and no segment that is.or..; ~may open a segment only if a real CLI's own docs show it (OpenCode's OpenRouter ids such asopenrouter/~anthropic/...). Cite the source, or leave~out.
Keep the length cap, or raise it slightly and give the reason, with the longest real ids you found.
Change only:
kernel/driver-kit/schema.json: the startmodelpattern;kernel/driver.v1.md: one sentence saying the model may be provider-qualified;- the local driver's
STARTmodelpattern, kept equal to the schema; adapters/local/schema.json: the byte copy;- the kit's tests: real ids taken from the Pi, OpenCode, Kilo, Crush and Kimi docs, with links, all accepted; and refused shapes (
/x,x/,x//y,x/../y,x/./y, a space-only segment, too long); changes/<this ticket>.md.
The credential check on start fields stays as it is. A provider-qualified id is not a credential, so check that the kit's holds_credential doesn't flag the real ids.
Every other driver keeps a byte copy of schema.json (EF1's rule), checked by its own test_driver.py. Copy the new schema into each driver's adapters/<driver>/schema.json listed under Owned paths (the drivers on main when this ticket was cut). If another driver has merged with its own copy by build time, ask on this ticket for a grant, since those are byte-for-byte copies with no logic. Every open driver PR re-copies schema.json from main after this merges, or it fails release (2) in the merge queue. The PR body says so, and the lead tells the other leads.
First commit: an approach note at the top of the PR body. It covers the grammar, the threat list (path traversal if a model reaches a path, argument injection, credential shapes, length) and what the tests can and can't prove.
Owned paths
kernel/driver-kit/schema.json(shared: the start model pattern only)kernel/driver.v1.md(shared: one sentence on the model field)kernel/driver-kit/test_kit.py(shared: the model grammar cases only)adapters/local/driver(shared: the START model pattern only)adapters/local/schema.json(shared: the byte copy only)changes/2904.md(new)adapters/boat/schema.json(shared: the byte copy only)adapters/cloudroom/schema.json(shared: the byte copy only)adapters/devin/schema.json(shared: the byte copy only)adapters/openclaw/schema.json(shared: the byte copy only)adapters/template/schema.json(shared: the byte copy only)
Relies on: kernel/driver.v1.md, kernel/driver-kit/schema.json
Links
- 0.1.2 HR1: the harness-row contract, the local driver's row loader and the kit check for rows #2431 real: the harness rows whose provider-qualified models this grammar lets through
Acceptance criteria
- Red first: a start with a real provider-qualified id, for example Kimi's
kimi-code/kimi-for-coding, is refused at main (D3,model is not valid), and every listed bad shape is shown - Green: the real ids from five CLIs' docs pass the schema and
adapters/local/driver start's validation, and every bad shape is refused - Every
adapters/*/schema.jsonequalskernel/driver-kit/schema.jsonbyte for byte, and every driver'stest_driver.pypasses - The kit's own tests and
adapters/local/test_harnesses.pypass
Proof
The kit's and the local driver's red then green, plus each driver's byte-copy check.
Activity
#2904: red: provider-qualified model ids are refused at main
#2904: driver v1 model takes provider-qualified ids, up to 100 charac…
#2904: the template-and-schema length case moves to the new 100-chara…
#2904: red: the other drivers refuse a provider-qualified model at ma…
#2904: the other drivers and the live rig take the provider-qualified…
jparker2006 commentedon Nov 24, 2026
launch-fleet: started
launch-fleet: start checked, branch room/2904-model-grammar
Started at 00:56:21Z on the planner's ruling (driver v1 model grammar, option a), on Claude Opus 5.5 Medium. The record is delayed by GitHub's write pacing. Hand checks read just before the start:
The planner's ruling makes
adapters/local/drivershared with EF4 #2585: this ticket touches only the START model pattern.jparker2006 commentedon Nov 24, 2026
agent: builder
state: working
harness: Claude Code
model: Opus 5.5
skills: build-ticket@0.2.2
step: Built the provider-qualified model grammar with red-first proofs; running the hand-back checks.
time: 2026-11-24T06:07:02Z
#2904: approach note names the other drivers' grammar change
#2904: green: every driver, the kit and the live rig take provider-qu…
jparker2006 commentedon Nov 24, 2026
F4 supporting edit granted (planner), for #2904:
adapters/template/driveradapters/boat/driveradapters/cloudroom/driveradapters/devin/driveradapters/openclaw/driverkernel/live-rig/rig.pyEach grant covers only the duplicated model-pattern line: each driver's START
modelpattern andKIT_MODELinrig.py. Each changes to the same widened grammar askernel/driver-kit/schema.json, with a test that a real provider-qualified id now passes. The same drivers'test_driver.pyfiles are granted for that one test each. Other open PRs share these files by line: EF2 #2700 (boat, cloudroom and devin test start lines), EF9 #2855 (openclaw) and the live-rig PRs onrig.py. Whichever merges second merges main in, resolves keeping both sides, and gets a merge-only re-check. Granted by the wave 1 lead under the planner's ruling (option a).adapters/template/test_driver.pyadapters/boat/test_driver.pyadapters/cloudroom/test_driver.pyadapters/devin/test_driver.pyadapters/openclaw/test_driver.py#2904: green: verify owned-paths grant and driver-kit semantics