model-selection-regression-factor-catalog.yaml 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503
  1. schemaVersion: 1
  2. catalogId: model-selection-regression
  3. title: Model selection and provider regression factor catalog
  4. status: planning
  5. language: zh-CN
  6. sourceOfTruth:
  7. productSemantics:
  8. - docs/conversation-product-state-space.md
  9. - docs/conversation-protocol-declaration.md
  10. - docs/conversation-product-protocol.md
  11. modelSelection:
  12. - docs/chat/manual-model-switch-resolution-chain.md
  13. - docs/chat/new-task-model-resolution-chain.md
  14. - docs/ui/chat-model-select-menu.md
  15. providerRegistry:
  16. - docs/working-memory/provider-refactor/design/registry/provider-and-model-configuration-overview.md
  17. - docs/working-memory/provider-refactor/design/registry/model-membership-and-enablement.md
  18. - docs/superpowers/specs/2026-08-21-model-provider-modality-settings-design.md
  19. implementation:
  20. - packages/shared/src/model-selection.ts
  21. - packages/provider/src/config/model-config.ts
  22. - packages/provider/src/resolver.ts
  23. - packages/provider/src/registry.ts
  24. - packages/provider-node/src/model-selection-config-file-codec.ts
  25. - packages/provider-node/src/model-selection-config-repository.ts
  26. - packages/provider-node/src/zcode-builtin-release.ts
  27. - packages/provider-node/src/zcode-builtin-provider-config-source.ts
  28. - packages/provider-node/src/zcode-builtin-remote-synchronizer.ts
  29. - apps/zcode-cli/packages/bootstrap/src/app/provider-registry-model-runtime.ts
  30. - apps/zcode-cli/packages/adapters/src/model/runner.ts
  31. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/commands/handlers/model-config.ts
  32. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/commands/input-intent.ts
  33. graph:
  34. - .agents/skills/feature-boundary-planner/references/zcode-feature-graph.yaml
  35. graphIndex:
  36. status: unavailable
  37. note: No live codegraph index was present; live-code evidence was checked with rg and direct source reading.
  38. decisionBacklog:
  39. file: docs/testing/model-selection-regression-decision-backlog.yaml
  40. questionnaireFile: docs/testing/model-selection-regression-decision-questionnaire.md
  41. purpose: 将因子目录中不适合直接假设的隐含产品决策、契约冲突和实现核验项单独管理
  42. totalEntries: 114
  43. decisionEntries: 64
  44. contractConflictEntries: 12
  45. proofEntries: 38
  46. note: totalEntries 不等于需要用户逐条拍板的数量;proofEntries 是已有口径需要补证据,contractConflictEntries 是文档或实现需要先收敛。
  47. statuses:
  48. - accepted
  49. - undefined
  50. - pruned
  51. - ignored
  52. - bug-candidate
  53. dimensions:
  54. - id: surface
  55. category: product
  56. owner: surface-local
  57. values:
  58. - id: chat-draft
  59. label: 对话空草稿
  60. - id: chat-existing-session
  61. label: 已有会话工具栏
  62. - id: chat-task-restore
  63. label: 历史任务切换与恢复
  64. - id: automation-editor
  65. label: Automation 编辑
  66. - id: automation-run
  67. label: Automation 手动或定时运行
  68. - id: offpeak-editor
  69. label: Off-Peak 编辑
  70. - id: offpeak-run
  71. label: Off-Peak 调度与执行
  72. - id: user-subagent
  73. label: User Subagent
  74. - id: builtin-subagent
  75. label: Built-in Subagent
  76. - id: provider-settings
  77. label: Provider 设置
  78. - id: login-welcome
  79. label: 登录与 Welcome 初始选择
  80. - id: bot
  81. label: Bot /model 与 Bot 请求
  82. - id: official-mcp
  83. label: 官方 MCP Coding Plan 鉴权
  84. - id: git-commit
  85. label: Git commit message
  86. - id: title-sidecar
  87. label: 标题与 Goal 标题 sidecar
  88. - id: goal-verifier
  89. label: Goal completion verifier
  90. - id: compact
  91. label: 手动或自动 Compact
  92. - id: project-memory
  93. label: Project memory
  94. - id: steering-guide
  95. label: Steering / Guide
  96. - id: connectivity
  97. label: Provider/model connectivity
  98. - id: manual-claim-plan
  99. label: Manual claim plan
  100. - id: tui
  101. label: CLI/TUI model、effort、variant
  102. - id: operation
  103. category: event
  104. values:
  105. - id: display
  106. - id: open-picker
  107. - id: select-model
  108. - id: select-thought
  109. - id: create-session
  110. - id: first-input
  111. - id: send-text
  112. - id: send-goal
  113. - id: switch-model-config
  114. - id: queue-submission
  115. - id: send-queued-now
  116. - id: stop
  117. - id: compact
  118. - id: auto-compact
  119. - id: retry
  120. - id: fork
  121. - id: edit-query
  122. - id: restore-session
  123. - id: prewarm
  124. - id: provider-save
  125. - id: provider-refresh
  126. - id: provider-connectivity
  127. - id: login
  128. - id: automation-save
  129. - id: automation-run
  130. - id: offpeak-create
  131. - id: offpeak-run
  132. - id: subagent-create
  133. - id: subagent-run
  134. - id: bot-model
  135. - id: mcp-auth
  136. - id: generate-text
  137. - id: title
  138. - id: goal-verify
  139. - id: memory-generate
  140. - id: tui-effort
  141. - id: provider-identity
  142. category: provider
  143. values:
  144. - id: native
  145. - id: custom
  146. - id: ghost
  147. - id: hidden-internal
  148. - id: legacy-claude
  149. - id: legacy-opencode
  150. - id: legacy-gemini
  151. - id: legacy-codex
  152. - id: legacy-glm
  153. - id: account-zai-api-key
  154. - id: account-zai-start-plan
  155. - id: account-zai-individual-coding-plan
  156. - id: account-zai-team-coding-plan
  157. - id: account-bigmodel-api-key
  158. - id: account-bigmodel-start-plan
  159. - id: account-bigmodel-individual-coding-plan
  160. - id: account-bigmodel-team-coding-plan
  161. - id: provider-source
  162. category: provider
  163. values:
  164. - id: zcode-builtin
  165. - id: account-builtin
  166. - id: personal
  167. - id: legacy-import
  168. - id: remote-host-mirror
  169. - id: execution-only
  170. - id: provider-family
  171. category: provider
  172. values:
  173. - id: zai
  174. - id: bigmodel
  175. - id: generic-custom
  176. - id: openai-compatible
  177. - id: anthropic-compatible
  178. - id: openai-native
  179. - id: offpeak-family
  180. - id: access-mode
  181. category: auth
  182. values:
  183. - id: oauth
  184. - id: api-key
  185. - id: start-plan
  186. - id: individual-coding-plan
  187. - id: team-coding-plan
  188. - id: offpeak
  189. - id: none
  190. - id: entitlement-state
  191. category: auth
  192. values:
  193. - id: unknown
  194. - id: loading
  195. - id: available
  196. - id: exhausted
  197. - id: unavailable
  198. - id: expired
  199. - id: team-scope-missing
  200. - id: product-mismatch
  201. - id: connection-state
  202. category: auth
  203. values:
  204. - id: disconnected
  205. - id: connecting
  206. - id: connected
  207. - id: expired
  208. - id: auth-error
  209. - id: network-error
  210. - id: server-error
  211. - id: credentials-missing
  212. - id: credentials-invalid
  213. - id: api-format
  214. category: transport
  215. values:
  216. - id: anthropic-messages
  217. - id: openai-chat-completions
  218. - id: openai-responses
  219. - id: auth-profile
  220. category: transport
  221. values:
  222. - id: static-api-key
  223. - id: dynamic-api-key
  224. - id: oauth-token
  225. - id: start-jwt
  226. - id: individual-jwt-signing
  227. - id: team-jwt-signing
  228. - id: offpeak-ticket
  229. - id: security-verification-challenge
  230. - id: missing-dynamic-credentials
  231. - id: invalid-credentials
  232. - id: endpoint-state
  233. category: transport
  234. values:
  235. - id: default
  236. - id: custom
  237. - id: trailing-slash
  238. - id: anthropic-v1-normalized
  239. - id: proxy-route
  240. - id: stale-route-cache
  241. - id: refresh-route-cache
  242. - id: invalid-base-url
  243. - id: registry-state
  244. category: registry
  245. values:
  246. - id: bundled-valid
  247. - id: account-valid
  248. - id: personal-valid
  249. - id: complete
  250. - id: incomplete
  251. - id: loading
  252. - id: stale
  253. - id: refresh-failed
  254. - id: revision-match
  255. - id: revision-mismatch
  256. - id: no-selectable-model
  257. - id: provider-not-found
  258. - id: model-not-found
  259. - id: provider-flags
  260. category: registry
  261. values:
  262. - id: enabled-visible
  263. - id: enabled-hidden
  264. - id: disabled-visible
  265. - id: disabled-hidden
  266. - id: account-enabled
  267. - id: account-disabled
  268. - id: family-materialized
  269. - id: family-not-materialized
  270. - id: model-flags
  271. category: registry
  272. values:
  273. - id: enabled
  274. - id: disabled
  275. - id: retired
  276. - id: complete
  277. - id: incomplete
  278. - id: builtin-member
  279. - id: personal-member
  280. - id: duplicate-cross-source
  281. - id: duplicate-within-source
  282. - id: exact-hidden
  283. - id: ghost-unavailable
  284. - id: model-capability
  285. category: model
  286. values:
  287. - id: text-only
  288. - id: image-input
  289. - id: video-input
  290. - id: audio-input
  291. - id: pdf-input
  292. - id: tools
  293. - id: structured-output
  294. - id: native-web-search
  295. - id: mid-conversation-system
  296. - id: tools-and-structured-output
  297. - id: unknown-legacy-modalities
  298. - id: large-context
  299. - id: small-context
  300. - id: limited-output
  301. - id: unlimited-output
  302. - id: adapter-capability-mismatch
  303. - id: input-shape
  304. category: request
  305. values:
  306. - id: text
  307. - id: text-image
  308. - id: text-video
  309. - id: text-audio
  310. - id: text-pdf
  311. - id: attachment-only
  312. - id: tool-result-media
  313. - id: empty-text-with-attachment
  314. - id: empty-text-no-attachment
  315. - id: reasoning-profile
  316. category: reasoning
  317. values:
  318. - id: unsupported
  319. - id: fixed-single-level
  320. - id: generic-effort
  321. - id: glm52-max-high-nothink
  322. - id: glm53-low-high-max
  323. - id: kimi-k3-low-high-max
  324. - id: upstream-v4-special
  325. - id: qwen-enable-thinking
  326. - id: kimi-mimo-toggle
  327. - id: anthropic-adaptive-effort
  328. - id: anthropic-fixed-budget
  329. - id: openai-reasoning-effort
  330. - id: openrouter-ox-alpha
  331. - id: reasoning-selection
  332. category: reasoning
  333. values:
  334. - id: absent
  335. - id: default
  336. - id: explicit
  337. - id: disabled
  338. - id: inherited
  339. - id: invalid
  340. - id: stale-level
  341. - id: unknown-alias
  342. - id: reasoning-level
  343. category: reasoning
  344. values:
  345. - id: none
  346. - id: low
  347. - id: medium
  348. - id: high
  349. - id: xhigh
  350. - id: max
  351. - id: enabled
  352. - id: off
  353. - id: nothink
  354. - id: adaptive
  355. - id: fixed-budget
  356. - id: unknown
  357. - id: max-output
  358. category: request
  359. values:
  360. - id: omitted
  361. - id: model-default
  362. - id: positive-within-limit
  363. - id: exact-limit
  364. - id: over-limit
  365. - id: zero
  366. - id: negative
  367. - id: non-integer
  368. - id: anthropic-thinking-clamped
  369. - id: selection-source
  370. category: state
  371. values:
  372. - id: explicit-user-selection
  373. - id: renderer-draft
  374. - id: host-preferred
  375. - id: workspace-default
  376. - id: recent
  377. - id: session-runtime
  378. - id: conversation-snapshot
  379. - id: automation-record
  380. - id: automation-run-snapshot
  381. - id: offpeak-task-record
  382. - id: subagent-profile
  383. - id: parent-inheritance
  384. - id: fork-time-config
  385. - id: fallback
  386. - id: legacy-migration
  387. - id: draft-state
  388. category: state
  389. values:
  390. - id: empty
  391. - id: model-selected
  392. - id: thought-selected
  393. - id: prewarming
  394. - id: prewarm-failed
  395. - id: unavailable-selection
  396. - id: provider-sync-pending
  397. - id: session-phase
  398. category: session
  399. values:
  400. - id: draft
  401. - id: prewarming
  402. - id: running
  403. - id: completed-success
  404. - id: completed-interrupted
  405. - id: error
  406. - id: active-work
  407. category: session
  408. values:
  409. - id: none
  410. - id: primary-turn
  411. - id: foreground-subagent
  412. - id: compact
  413. - id: goal-verifier
  414. - id: goal-continuation
  415. - id: turn-steer
  416. - id: queue-state
  417. category: session
  418. values:
  419. - id: empty
  420. - id: text
  421. - id: goal
  422. - id: compact
  423. - id: mixed
  424. - id: held
  425. - id: selected-submission
  426. - id: queue-auto-drain
  427. category: session
  428. values:
  429. - id: "true"
  430. - id: "false"
  431. - id: command-result
  432. category: protocol
  433. values:
  434. - id: accepted
  435. - id: rejected
  436. - id: stale
  437. - id: duplicate
  438. - id: failed
  439. - id: noop
  440. - id: provider-not-in-registry
  441. - id: model-not-found
  442. - id: reasoning-not-supported
  443. - id: max-output-out-of-range
  444. - id: history-shape
  445. category: request
  446. values:
  447. - id: clean-text
  448. - id: tool-history
  449. - id: signed-reasoning
  450. - id: unsigned-reasoning
  451. - id: redacted-reasoning
  452. - id: cross-model-reasoning
  453. - id: orphan-reasoning
  454. - id: trailing-reasoning
  455. - id: whitespace-assistant
  456. - id: empty-assistant
  457. - id: responses-stored-references
  458. - id: recovery-state
  459. category: recovery
  460. values:
  461. - id: none
  462. - id: auth-failure
  463. - id: model-not-found
  464. - id: rate-limit
  465. - id: network-failure
  466. - id: server-failure
  467. - id: stream-idle
  468. - id: stream-interrupted-before-output
  469. - id: stream-interrupted-after-output
  470. - id: empty-completion
  471. - id: signature-repair
  472. - id: registry-refresh
  473. - id: reconnect
  474. - id: cli-restart
  475. - id: offpeak-expired
  476. - id: compact-required
  477. - id: delivery-kind
  478. category: delivery
  479. values:
  480. - id: desktop-continuous
  481. - id: web-remote-replayable
  482. - id: host-kind
  483. category: environment
  484. values:
  485. - id: desktop-local
  486. - id: desktop-ssh
  487. - id: desktop-wsl
  488. - id: desktop-docker
  489. - id: web-remote-shared-host
  490. - id: workspace-identity
  491. category: environment
  492. values:
  493. - id: local-path-fallback
  494. - id: remote-identity
  495. - id: same-path-different-identity
  496. - id: missing-identity-invalid-remote
  497. - id: remote-session-id-changed
  498. - id: persistence-state
  499. category: persistence
  500. values:
  501. - id: not-persisted
  502. - id: persisted-valid
  503. - id: persisted-legacy
  504. - id: persisted-model-missing
  505. - id: persisted-model-disabled
  506. - id: revision-migrated
  507. - id: cold-resume
  508. - id: cross-process-refresh
  509. - id: renderer-recent
  510. - id: query-source
  511. category: product
  512. values:
  513. - id: main-turn
  514. - id: compact-summary
  515. - id: git-commit-message
  516. - id: title
  517. - id: goal-title
  518. - id: goal-verifier
  519. - id: project-memory
  520. - id: connectivity
  521. - id: subagent
  522. - id: automation
  523. - id: offpeak
  524. - id: presentation-context
  525. category: presentation
  526. values:
  527. - id: desktop-wide
  528. - id: desktop-narrow
  529. - id: mobile
  530. - id: light
  531. - id: dark
  532. - id: locale-zh
  533. - id: locale-en
  534. - id: keyboard
  535. - id: pointer
  536. - id: reduced-motion
  537. constraints:
  538. - id: MSR-PRUNE-001
  539. status: pruned
  540. kind: invalid
  541. when:
  542. all:
  543. - dimension: model-flags
  544. in: [disabled, incomplete]
  545. - dimension: operation
  546. in:
  547. [
  548. select-model,
  549. create-session,
  550. first-input,
  551. switch-model-config,
  552. send-text,
  553. queue-submission,
  554. ]
  555. decision: reject-or-hide
  556. effect:
  557. - Settings retains the record for repair or re-enable.
  558. - Registry, picker, default, fallback, and exact ModelFactory reject it.
  559. invariant: disabled-or-incomplete-model-is-not-executable
  560. representativeCases: [MSR-REG-006]
  561. - id: MSR-PRUNE-002
  562. status: pruned
  563. kind: invalid
  564. when:
  565. all:
  566. - dimension: provider-flags
  567. in: [enabled-hidden, disabled-hidden]
  568. - dimension: surface
  569. in: [chat-draft, chat-existing-session, automation-editor, user-subagent]
  570. decision: not-visible
  571. effect:
  572. - Hidden providers are absent from ordinary Settings and Selection facades.
  573. - Complete hidden providers remain available for exact internal creation when enabled.
  574. invariant: provider-visibility-is-not-model-enabled
  575. representativeCases: [MSR-REG-007, MSR-OFF-001]
  576. - id: MSR-PRUNE-003
  577. status: pruned
  578. kind: invalid
  579. when:
  580. all:
  581. - dimension: access-mode
  582. in: [start-plan]
  583. - dimension: surface
  584. in: [offpeak-editor, offpeak-run]
  585. decision: reject
  586. effect: Off-Peak does not use Start Plan execution.
  587. invariant: offpeak-start-plan-is-unsupported
  588. representativeCases: [MSR-OFF-002]
  589. - id: MSR-PRUNE-004
  590. status: pruned
  591. kind: invalid
  592. when:
  593. all:
  594. - dimension: model-capability
  595. in: [text-only]
  596. - dimension: input-shape
  597. in: [text-image, text-video, text-audio, text-pdf, attachment-only, tool-result-media]
  598. decision: reject-before-network
  599. effect: Adapter returns InvalidModelRequest without provider network I/O.
  600. invariant: capability-validation-precedes-network
  601. representativeCases: [MSR-REQ-004]
  602. - id: MSR-PRUNE-005
  603. status: pruned
  604. kind: invalid
  605. when:
  606. all:
  607. - dimension: reasoning-profile
  608. in: [unsupported, fixed-single-level]
  609. - dimension: reasoning-selection
  610. in: [explicit, inherited]
  611. - dimension: reasoning-level
  612. in: [low, medium, high, xhigh, max, enabled, adaptive, fixed-budget]
  613. decision: reject-or-use-target-default
  614. effect: Unsupported explicit thought never reaches provider wire.
  615. invariant: reasoning-level-must-be-model-supported
  616. representativeCases: [MSR-REASON-004]
  617. - id: MSR-PRUNE-006
  618. status: pruned
  619. kind: invalid
  620. when:
  621. all:
  622. - dimension: access-mode
  623. in: [team-coding-plan]
  624. - dimension: entitlement-state
  625. in: [team-scope-missing, product-mismatch]
  626. decision: unavailable
  627. effect: Do not silently downgrade Team to Individual or API Key.
  628. invariant: team-scope-is-explicit
  629. representativeCases: [MSR-AUTH-004]
  630. - id: MSR-PRUNE-007
  631. status: pruned
  632. kind: invariant
  633. when:
  634. all:
  635. - dimension: surface
  636. in: [title-sidecar, git-commit]
  637. - dimension: reasoning-selection
  638. in: [inherited]
  639. decision: operation-specific-projection
  640. effect: Title disables reasoning; Git commit preserves explicit thought but disables it when there is no explicit value.
  641. invariant: sidecar-reasoning-policy-is-not-main-turn-policy
  642. representativeCases: [MSR-SIDE-001, MSR-SIDE-002]
  643. - id: MSR-PRUNE-008
  644. status: pruned
  645. kind: invariant
  646. when:
  647. all:
  648. - dimension: delivery-kind
  649. in: [desktop-continuous, web-remote-replayable]
  650. - dimension: presentation-context
  651. in: [light, dark, locale-zh, locale-en, desktop-wide, desktop-narrow, mobile]
  652. decision: pairwise-representative
  653. effect: Presentation axes are covered by shared UI tests and a small number of desktop/mobile representatives, not by every provider/model cross-product.
  654. invariant: delivery-and-presentation-axes-do-not-change-model-authority
  655. representativeCases: [MSR-UI-001, MSR-REMOTE-001]
  656. - id: MSR-PRUNE-009
  657. status: pruned
  658. kind: invariant
  659. when:
  660. all:
  661. - dimension: surface
  662. in:
  663. [
  664. chat-draft,
  665. chat-existing-session,
  666. automation-editor,
  667. user-subagent,
  668. builtin-subagent,
  669. ]
  670. - dimension: provider-source
  671. in: [zcode-builtin, account-builtin, personal, remote-host-mirror]
  672. decision: signature-class-representative
  673. effect: Model IDs are grouped by provider/auth/API/capability/reasoning signatures; literal model IDs are not all multiplied together.
  674. invariant: model-id-is-opaque-but-wire-profile-is-the-test-equivalence-key
  675. representativeCases: [MSR-REG-001, MSR-REASON-001, MSR-REQ-001]
  676. - id: MSR-PRUNE-010
  677. status: pruned
  678. kind: invariant
  679. when:
  680. all:
  681. - dimension: delivery-kind
  682. in: [desktop-continuous, web-remote-replayable]
  683. - dimension: host-kind
  684. in: [web-remote-shared-host]
  685. decision: shared-host-attachment
  686. effect: Mobile remote attaches to an existing host and reuses the same CLI/runtime; it never creates an independent model runtime.
  687. invariant: remote-does-not-create-independent-agent-runtime
  688. representativeCases: [MSR-REMOTE-001, MSR-REMOTE-002]
  689. - id: MSR-UNDEFINED-001
  690. status: undefined
  691. kind: product-decision
  692. when:
  693. all:
  694. - dimension: operation
  695. in: [queue-submission, send-queued-now]
  696. - dimension: selection-source
  697. in: [session-runtime, explicit-user-selection]
  698. decision: choose-queue-model-semantics
  699. effect:
  700. - Candidate A: queue item freezes the complete Submission model/thought at admission.
  701. - Candidate B: queue item reads the latest Session model/thought at consumption.
  702. - Current state-space text and live input-intent code support A; older accepted invariants still state B.
  703. invariant: queued-model-contract-must-be-single-valued
  704. evidence:
  705. - docs/conversation-product-state-space.md
  706. - docs/conversation-protocol-declaration.md
  707. - docs/conversation-product-protocol.md
  708. - apps/zcode-cli/packages/bootstrap/src/zcode-protocol-v4/commands/input-intent.ts
  709. representativeCases: [MSR-QUEUE-001]
  710. - id: MSR-BUG-001
  711. status: bug-candidate
  712. kind: implementation-gap
  713. when:
  714. all:
  715. - dimension: operation
  716. in: [switch-model-config]
  717. - dimension: model-capability
  718. in: [large-context, small-context]
  719. - dimension: session-phase
  720. in: [running, completed-success, completed-interrupted]
  721. decision: context-window-guard
  722. effect: Target context window guard should compact/stop/wait before committing the switch; current audit says V4 migration may not fully enforce it.
  723. invariant: model-switch-context-budget-is-safe
  724. evidence:
  725. - docs/superpowers/specs/2026-06-10-model-switch-context-window-guard-design.md
  726. - docs/chat/model-resolution-chain-audit.md
  727. representativeCases: [MSR-SESSION-006]
  728. - id: MSR-BUG-002
  729. status: bug-candidate
  730. kind: contract-drift
  731. when:
  732. all:
  733. - dimension: operation
  734. in: [open-picker, select-model]
  735. - dimension: model-flags
  736. in: [disabled]
  737. decision: lock-disabled-model
  738. effect: Shared picker supports locked items, while the V4 toolbar path currently appears to disable the lock flag; verify product intent before using it as an E2E oracle.
  739. invariant: disabled-current-model-is-not-selectable
  740. evidence:
  741. - docs/ui/chat-model-select-menu.md
  742. - packages/ui/src/ModelConfigSelect.tsx
  743. - packages/ui/src/v4/composer/V4ComposerToolbar.tsx
  744. representativeCases: [MSR-UI-003]
  745. - id: MSR-DRIFT-001
  746. status: ignored
  747. kind: stale-source
  748. when:
  749. all:
  750. - dimension: provider-source
  751. in: [legacy-import]
  752. decision: legacy-only
  753. effect: Old client-config model facts, magic_name, fallback, and tombstone paths are not current Registry inputs; cover only migration compatibility where explicitly requested.
  754. evidence:
  755. - docs/model-provider-client-config-remote-model-facts.md
  756. - apps/zcode-cli/packages/bootstrap/src/app/legacy-cli-model-config.ts
  757. highRiskCrossProducts:
  758. - id: MSR-X-001
  759. dimensions: [provider-family, access-mode, api-format, auth-profile]
  760. risk: Provider family and transport determine credentials, signing, metadata, and wire shape.
  761. preferredLayer: provider-unit-and-adapter-wire
  762. - id: MSR-X-002
  763. dimensions: [model-capability, reasoning-profile, reasoning-level, max-output]
  764. risk: Model defaults, thought mapping, Anthropic budget, and output limits interact.
  765. preferredLayer: resolver-runtime-and-wire
  766. - id: MSR-X-003
  767. dimensions: [selection-source, session-phase, operation, command-result]
  768. risk: Draft, active Session, queue, switch ACK, and fallback have different authority.
  769. preferredLayer: bootstrap-core-and-desktop-e2e
  770. - id: MSR-X-004
  771. dimensions: [registry-state, provider-flags, model-flags, persistence-state]
  772. risk: Refresh, stale revisions, disabled models, recent/default and cold resume can diverge.
  773. preferredLayer: provider-and-cold-resume
  774. - id: MSR-X-005
  775. dimensions: [session-phase, active-work, queue-state, recovery-state]
  776. risk: Stop, compact, retry, empty completion, and context guard change model timing.
  777. preferredLayer: core-runtime-and-stream-replay
  778. - id: MSR-X-006
  779. dimensions: [delivery-kind, host-kind, workspace-identity, registry-state]
  780. risk: Remote attachment must preserve target Host facts and replayable recovery without creating a second runtime.
  781. preferredLayer: service-integration-and-remote-e2e
  782. - id: MSR-X-007
  783. dimensions: [surface, selection-source, persistence-state, query-source]
  784. risk: Shared picker callers have different owners and commit sinks.
  785. preferredLayer: surface-focused-and-cross-surface-e2e
  786. caseSeeds:
  787. - id: MSR-REG-001
  788. status: accepted
  789. state: personal provider is complete, enabled, visible, and selectable
  790. event: open-picker then select-model
  791. target: provider-settings -> chat-draft
  792. guard: target provider/model exists in target Host Registry
  793. effect: picker and first request preserve complete provider/model identity
  794. assertions:
  795. - provider/model are not inferred from model ID alone
  796. - first request uses the selected provider and model
  797. - no unrelated Session or workspace is changed
  798. evidenceLayers: [ui, runtime, network, persistence]
  799. - id: MSR-REG-002
  800. status: accepted
  801. state: same model ID exists under two custom providers
  802. event: switch between the two providers
  803. target: chat-existing-session
  804. guard: full provider/model tuple comparison
  805. effect: Session and picker restore the correct provider identity
  806. assertions:
  807. - A and B do not collapse by model ID
  808. - subsequent requests use the correct endpoint and provider
  809. evidenceLayers: [ui, snapshot, network]
  810. - id: MSR-REG-003
  811. status: accepted
  812. state: Provider Registry is loading or remote target is waiting
  813. event: open-picker
  814. target: chat-draft
  815. guard: target Host is not ready
  816. effect: show pending state without falling back to Base/Local registry
  817. assertions:
  818. - remote candidates are not replaced by local candidates
  819. - workspaceIdentity and remoteSessionId remain attached
  820. evidenceLayers: [ui, service, remote]
  821. - id: MSR-REG-004
  822. status: accepted
  823. state: Account snapshot revision does not match ZCode Built-in revision
  824. event: provider-refresh
  825. target: provider-settings -> chat-draft
  826. guard: revision pair mismatch
  827. effect: retain prior complete Registry while recomputing Account overlay
  828. assertions:
  829. - no partial Registry is published
  830. - Personal-only updates are not blocked
  831. - active model is not interrupted
  832. evidenceLayers: [provider-unit, runtime, persistence]
  833. - id: MSR-REG-005
  834. status: accepted
  835. state: Provider/model has sparse Personal overlay
  836. event: provider-save
  837. target: provider-settings
  838. guard: resolve then validateComplete
  839. effect: complete effective config enters Registry only after validation
  840. assertions:
  841. - overlay precedence is Built-in -> Account -> Personal
  842. - missing fields are filled from the correct source
  843. - invalid Personal data is preserved for recovery
  844. evidenceLayers: [provider-unit, persistence]
  845. - id: MSR-REG-006
  846. status: accepted
  847. state: model is disabled or incomplete
  848. event: select-model or create-session
  849. target: chat-draft
  850. guard: disabled/incomplete execution gate
  851. effect: picker/default/fallback/factory reject it while Settings retains it
  852. assertions:
  853. - no network request is made
  854. - existing Active Model is not interrupted by refresh
  855. evidenceLayers: [ui, registry, runtime, network]
  856. - id: MSR-REG-007
  857. status: accepted
  858. state: complete hidden Provider contains an enabled internal model
  859. event: ordinary picker display and internal exact creation
  860. target: chat-draft + offpeak-run
  861. guard: visibility is separate from execution availability
  862. effect: absent from ordinary picker but available to permitted internal path
  863. assertions:
  864. - ordinary user cannot select it
  865. - Off-Peak exact creation can validate it through Registry
  866. evidenceLayers: [ui, registry, runtime]
  867. - id: MSR-AUTH-001
  868. status: accepted
  869. state: Z.ai or BigModel is in API Key mode
  870. event: login then first-input
  871. target: login-welcome -> chat-draft
  872. guard: API Key provider selected and key valid
  873. effect: selected family/provider/model reaches request with API-key auth
  874. assertions:
  875. - selected key persistence is family-scoped
  876. - no OAuth-only fields are required
  877. evidenceLayers: [ui, persistence, network]
  878. - id: MSR-AUTH-002
  879. status: accepted
  880. state: Start/Individual/Team entitlement is loading
  881. event: open-picker
  882. target: chat-draft
  883. guard: entitlement is inconclusive
  884. effect: preserve saved selection until conclusive unavailability
  885. assertions:
  886. - saved model is not prematurely hidden
  887. - loading state is visible and deterministic
  888. evidenceLayers: [ui, service, registry]
  889. - id: MSR-AUTH-003
  890. status: accepted
  891. state: Start Plan is conclusively unavailable
  892. event: provider-refresh
  893. target: chat-draft
  894. guard: entitlement unavailable
  895. effect: hide unavailable Start provider and follow Agent-safe fallback
  896. assertions:
  897. - fallback is persisted only after authoritative validation
  898. - active model is not retroactively interrupted
  899. evidenceLayers: [service, runtime, persistence]
  900. - id: MSR-AUTH-004
  901. status: accepted
  902. state: Team mode lacks organization/project scope
  903. event: first-input
  904. target: automation-run or chat-draft
  905. guard: Team access context incomplete
  906. effect: unavailable/auth error without silent downgrade
  907. assertions:
  908. - request does not use Individual or API Key credentials
  909. - error identifies provider/access cause
  910. evidenceLayers: [runtime, network, logs]
  911. - id: MSR-REASON-001
  912. status: accepted
  913. state: GLM-5.2-like model exposes max/high/nothink
  914. event: select each level and send
  915. target: chat-draft
  916. guard: exact model reasoning mapping
  917. effect: wire request receives the matching provider-specific reasoning option
  918. assertions:
  919. - default is max
  920. - high and nothink remain distinguishable
  921. - provider/model identity is preserved
  922. evidenceLayers: [ui, runtime, network]
  923. - id: MSR-REASON-002
  924. status: accepted
  925. state: Qwen or Kimi/MiMo OpenAI-compatible model
  926. event: select enabled and disabled thought modes
  927. target: chat-existing-session
  928. guard: model-specific extra-body projection
  929. effect: Qwen uses enable_thinking; Kimi/MiMo uses thinking.type
  930. assertions:
  931. - no unintended extra_body nesting remains
  932. - inherited reasoning options are cleared by explicit no-thinking
  933. evidenceLayers: [runtime, network]
  934. - id: MSR-REASON-003
  935. status: accepted
  936. state: Anthropic adaptive or fixed-budget reasoning model
  937. event: send with small and normal max output
  938. target: chat-existing-session + compact
  939. guard: Anthropic thinking budget calculation
  940. effect: thinking budget is clamped and total budget remains valid
  941. assertions:
  942. - visible output budget is not negative or zero
  943. - shared model config is not mutated
  944. - compact uses the correct output budget
  945. evidenceLayers: [runtime, network, unit]
  946. - id: MSR-REASON-004
  947. status: accepted
  948. state: model exposes one fixed reasoning level or no reasoning
  949. event: submit unsupported explicit level
  950. target: chat-draft
  951. guard: Registry validates reasoning option
  952. effect: reject before network or use the target model default only where the command contract permits
  953. assertions:
  954. - unsupported level never appears as a provider request
  955. - UI does not offer a fake generic five-level list
  956. evidenceLayers: [ui, registry, runtime, network]
  957. - id: MSR-REASON-005
  958. status: accepted
  959. state: source model and target model have different thought vocabularies
  960. event: cross-provider/model switch
  961. target: chat-existing-session
  962. guard: target model capability resolution
  963. effect: clear source thought and use target default until explicit target selection
  964. assertions:
  965. - source thought is not inherited by spelling
  966. - final Snapshot and next request agree
  967. evidenceLayers: [ui, snapshot, network]
  968. - id: MSR-REQ-001
  969. status: accepted
  970. state: model supports image/video/PDF or tools/structured output
  971. event: send matching request
  972. target: chat-existing-session
  973. guard: Adapter capability validation
  974. effect: request is projected with supported content and options
  975. assertions:
  976. - model capability and actual wire request agree
  977. - tool/structured/media options are not silently dropped
  978. evidenceLayers: [runtime, network, model-io]
  979. - id: MSR-REQ-002
  980. status: accepted
  981. state: provider uses custom endpoint or OpenAI-compatible format
  982. event: first-input
  983. target: provider-settings -> chat-draft
  984. guard: endpoint normalization and provider kind binding
  985. effect: request uses configured endpoint, headers, and provider namespace
  986. assertions:
  987. - trailing slash and Anthropic /v1 normalization are stable
  988. - temporary route cache is refreshed when stale
  989. - secrets are absent from logs and persistence
  990. evidenceLayers: [provider-unit, runtime, network, logs]
  991. - id: MSR-REQ-003
  992. status: accepted
  993. state: request auth is dynamic and missing
  994. event: first-input or retry
  995. target: chat-existing-session
  996. guard: request-auth preflight
  997. effect: fail before network I/O
  998. assertions:
  999. - provider receives no request
  1000. - error is classified as auth/configuration, not network
  1001. evidenceLayers: [runtime, network, logs]
  1002. - id: MSR-REQ-004
  1003. status: accepted
  1004. state: model capability does not support input shape
  1005. event: send attachment request
  1006. target: chat-existing-session
  1007. guard: model adapter capability check
  1008. effect: InvalidModelRequest before provider network
  1009. assertions:
  1010. - no provider request is emitted
  1011. - composer/session remains recoverable
  1012. evidenceLayers: [ui, runtime, network]
  1013. - id: MSR-DRAFT-001
  1014. status: accepted
  1015. state: empty draft has selectable Recent and Host preferred selections
  1016. event: open new task
  1017. target: chat-draft
  1018. guard: Recent is still selectable
  1019. effect: seed draft with Recent; otherwise use Host preferred then safe fallback
  1020. assertions:
  1021. - workspaceKey isolates Recent
  1022. - resolved defaults are not written back as explicit selection
  1023. evidenceLayers: [ui, localstorage, service]
  1024. - id: MSR-DRAFT-002
  1025. status: accepted
  1026. state: draft model changes before first send
  1027. event: select-model then first-input
  1028. target: chat-draft
  1029. guard: submission freezes draft selection
  1030. effect: createSession.config and first request use the selected tuple
  1031. assertions:
  1032. - provider/model/thought are frozen together
  1033. - prewarm cannot send a stale model
  1034. - no existing Session model switch Toast is emitted
  1035. evidenceLayers: [ui, protocol, runtime, network]
  1036. - id: MSR-SESSION-001
  1037. status: accepted
  1038. state: two Sessions have different provider/model/thought tuples
  1039. event: switch A -> B -> A
  1040. target: chat-task-restore
  1041. guard: sessionConfigScoped
  1042. effect: each Session restores its own Snapshot config
  1043. assertions:
  1044. - Task index is not used as Session authority
  1045. - A and B requests remain isolated
  1046. evidenceLayers: [ui, snapshot, runtime, network]
  1047. - id: MSR-SESSION-002
  1048. status: accepted
  1049. state: existing Session receives switchModelConfig
  1050. event: same model thought-only switch, cross-model switch, duplicate switch
  1051. target: chat-existing-session
  1052. guard: CAS, identity compare, target capability validation
  1053. effect: accepted/stale/duplicate/noop outcomes are distinct
  1054. assertions:
  1055. - same tuple is noop
  1056. - stale command refreshes projection and does not silently replay
  1057. - duplicate returns prior result without a second execution
  1058. evidenceLayers: [ui, protocol, runtime]
  1059. - id: MSR-SESSION-003
  1060. status: accepted
  1061. state: switch is pending while send is submitted
  1062. event: switch then send
  1063. target: chat-existing-session
  1064. guard: config barrier
  1065. effect: send cannot use a second uncommitted model
  1066. assertions:
  1067. - request order is deterministic
  1068. - provider/model in request matches authoritative runtime
  1069. evidenceLayers: [protocol, runtime, network]
  1070. - id: MSR-SESSION-004
  1071. status: accepted
  1072. state: provider is missing from target Registry during switch
  1073. event: switch-model-config
  1074. target: local or remote existing Session
  1075. guard: one registry refresh and one retry
  1076. effect: successful refresh applies target; repeated absence fails structurally
  1077. assertions:
  1078. - no Base/Local fallback on remote
  1079. - workspaceIdentity and remoteSessionId are included
  1080. evidenceLayers: [service, protocol, runtime, remote]
  1081. - id: MSR-SESSION-005
  1082. status: accepted
  1083. state: current request is streaming and model switch is accepted
  1084. event: switch model during stream
  1085. target: chat-existing-session
  1086. guard: active request immutability
  1087. effect: in-flight request finishes or is stopped according to switch contract; next model step uses new selection
  1088. assertions:
  1089. - old request does not change to new provider mid-flight
  1090. - late old events cannot revive old work
  1091. evidenceLayers: [runtime, stream, snapshot]
  1092. - id: MSR-SESSION-006
  1093. status: bug-candidate
  1094. state: current used tokens exceed target model effective context budget
  1095. event: switch to smaller-context model
  1096. target: chat-existing-session
  1097. guard: context-window guard
  1098. effect: compact/stop/wait before committing switch
  1099. assertions:
  1100. - no request is sent with an unsafe budget
  1101. - queue is preserved
  1102. - model switch is committed only after fresh usage fits
  1103. evidenceLayers: [runtime, stream, snapshot, network]
  1104. - id: MSR-QUEUE-001
  1105. status: undefined
  1106. state: queue has Q1 and Session model changes before Q1 consumption
  1107. event: consume Q1 or sendQueuedNow
  1108. target: chat-existing-session
  1109. guard: queued model contract decision required
  1110. effect: pending decision between frozen Submission and latest Session config
  1111. assertions:
  1112. - do not promote this to a formal E2E until the duplicate invariant is reconciled
  1113. evidenceLayers: [protocol, runtime, network]
  1114. - id: MSR-QUEUE-002
  1115. status: accepted
  1116. state: desktop and mobile submit while Session is busy
  1117. event: send-text from both clients
  1118. target: shared Session
  1119. guard: CLI CommandInbox serial admission
  1120. effect: one FIFO, no renderer or host shadow queue
  1121. assertions:
  1122. - admission order is CLI order
  1123. - sourceCommandId, workspace identity, and delivery are retained
  1124. - desktop continuous and mobile replayable projections remain separate
  1125. evidenceLayers: [protocol, runtime, remote, snapshot]
  1126. - id: MSR-QUEUE-003
  1127. status: accepted
  1128. state: queued Submission contains model/thought and current provider config later changes
  1129. event: queue promotion
  1130. target: chat-existing-session
  1131. guard: Submission model contract plus latest Provider facts
  1132. effect: model/thought intent remains stable while credentials/config are resolved at execution time
  1133. assertions:
  1134. - no second queue is created
  1135. - provider config revision used by ModelFactory is observable
  1136. evidenceLayers: [runtime, network, persistence]
  1137. - id: MSR-RECOVERY-001
  1138. status: accepted
  1139. state: Anthropic history contains unsigned reasoning
  1140. event: follow-up request
  1141. target: chat-existing-session
  1142. guard: request-local reasoning normalization
  1143. effect: preserve canonical history; repair signature only once when provider rejects
  1144. assertions:
  1145. - canonical/persisted history is unchanged
  1146. - retry count is bounded
  1147. - subsequent request uses normalized history
  1148. evidenceLayers: [runtime, network, model-io]
  1149. - id: MSR-RECOVERY-002
  1150. status: accepted
  1151. state: stream finishes with zero output/usage
  1152. event: stream completion
  1153. target: chat-existing-session
  1154. guard: empty-completion retry budget
  1155. effect: one retry, no leaked empty turn
  1156. assertions:
  1157. - physical requests are exactly first-empty then retry
  1158. - final provenance and usage are correct
  1159. evidenceLayers: [runtime, stream, network, snapshot]
  1160. - id: MSR-RECOVERY-003
  1161. status: accepted
  1162. state: provider returns auth/model/rate-limit/network/server error
  1163. event: generate or stream request
  1164. target: chat-existing-session
  1165. guard: failure classifier and retry policy
  1166. effect: classified error with bounded retry and correct UI/runtime status
  1167. assertions:
  1168. - retryable and non-retryable errors differ
  1169. - request auth and model identity remain stable across retry
  1170. evidenceLayers: [runtime, network, logs, snapshot]
  1171. - id: MSR-RECOVERY-004
  1172. status: accepted
  1173. state: CLI/Host restarts after a model-bearing command
  1174. event: cold resume
  1175. target: chat-task-restore
  1176. guard: durable Session/queue/provenance recovery
  1177. effect: restore only authoritative facts; do not replay discarded startNow automatically
  1178. assertions:
  1179. - queue/guide/unknown are settled according to delivery lifetime
  1180. - Session model timeline and assistant provenance remain consistent
  1181. evidenceLayers: [persistence, snapshot, remote]
  1182. - id: MSR-REMOTE-001
  1183. status: accepted
  1184. state: remote SSH/WSL/Docker workspace has a distinct workspaceIdentity
  1185. event: open picker, switch model, reconnect
  1186. target: chat-existing-session
  1187. guard: target Host registry and identity isolation
  1188. effect: remote model candidates and selection survive reconnect
  1189. assertions:
  1190. - workspaceKey is not workspacePath alone
  1191. - remoteSessionId is carried through switch/recovery
  1192. - local workspace with same path does not receive the selection
  1193. evidenceLayers: [ui, service, protocol, remote, persistence]
  1194. - id: MSR-REMOTE-002
  1195. status: accepted
  1196. state: mobile `/remote` attaches to an existing shared host
  1197. event: switch or send while desktop is also attached
  1198. target: shared Session
  1199. guard: trusted delivery profile and owner routing
  1200. effect: one runtime, two delivery profiles, no cross-connection frame leakage
  1201. assertions:
  1202. - desktop remains desktop-continuous
  1203. - mobile remains web-remote-replayable
  1204. - relay/main has no model/session/queue authority
  1205. evidenceLayers: [remote, protocol, snapshot]
  1206. - id: MSR-SURFACE-001
  1207. status: accepted
  1208. state: Automation form has explicit model, thought, or inherit value
  1209. event: save then run
  1210. target: automation-editor -> automation-run
  1211. guard: automation record/run snapshot boundary
  1212. effect: automation uses its own selection without changing current Chat Session
  1213. assertions:
  1214. - legacy model/thought format migrates correctly
  1215. - run snapshot contains the intended provider/model/thought
  1216. - Chat workspace default is unchanged
  1217. evidenceLayers: [ui, service, persistence, network]
  1218. - id: MSR-SURFACE-002
  1219. status: accepted
  1220. state: Subagent profile omits or specifies model
  1221. event: create child and run foreground/background child
  1222. target: user-subagent or builtin-subagent
  1223. guard: profile model authority and parent inheritance
  1224. effect: omitted model inherits parent; explicit model is child authority
  1225. assertions:
  1226. - child model provenance/timeline is durable
  1227. - readonly child detail does not expose a model picker
  1228. - background restrictions are enforced
  1229. evidenceLayers: [service, runtime, persistence, network]
  1230. - id: MSR-OFF-001
  1231. status: accepted
  1232. state: Off-Peak model is hidden from ordinary picker but available in internal Registry
  1233. event: create and execute Off-Peak task
  1234. target: offpeak-editor -> offpeak-run
  1235. guard: exact hidden selection plus ticket/auth context
  1236. effect: internal task executes without changing ordinary Recent/default/session model
  1237. assertions:
  1238. - Start Plan is rejected
  1239. - personal/team credentials and ticket are consistent
  1240. - ordinary busy queue is not polluted
  1241. evidenceLayers: [ui, service, runtime, persistence, network]
  1242. - id: MSR-OFF-002
  1243. status: accepted
  1244. state: Off-Peak request ticket is missing, expired, or provider-mismatched
  1245. event: offpeak-run
  1246. target: offpeak-run
  1247. guard: execution context validation
  1248. effect: fail before provider request or enter expired state
  1249. assertions:
  1250. - failure does not fall back to ordinary Chat model
  1251. - task record preserves diagnosable provider/model identity
  1252. evidenceLayers: [service, runtime, persistence, logs]
  1253. - id: MSR-SIDE-001
  1254. status: accepted
  1255. state: title/goal-title sidecar uses configured or Session model
  1256. event: title
  1257. target: title-sidecar
  1258. guard: sidecar projection
  1259. effect: force reasoning disabled, no tools, JSON title output
  1260. assertions:
  1261. - main Session reasoning preference is not mutated
  1262. - provenance identifies the actual sidecar model
  1263. evidenceLayers: [runtime, network, persistence]
  1264. - id: MSR-SIDE-002
  1265. status: accepted
  1266. state: Git commit generator receives explicit or absent reasoning
  1267. event: generate-text
  1268. target: git-commit
  1269. guard: git querySource policy
  1270. effect: explicit thought is preserved; absent thought disables reasoning; max output is 256
  1271. assertions:
  1272. - inherited thought is not mistaken for explicit thought
  1273. - provider/model in result is complete
  1274. evidenceLayers: [service, runtime, network]
  1275. - id: MSR-UI-001
  1276. status: accepted
  1277. state: shared picker is rendered in desktop and mobile widths
  1278. event: open-picker, Ctrl+M, Ctrl+T
  1279. target: chat-draft or chat-existing-session
  1280. guard: shared UI presentation contract
  1281. effect: group/badge/keyboard/focus behavior is correct without changing authority
  1282. assertions:
  1283. - model IDs containing slash and colon remain opaque
  1284. - mobile does not force input focus
  1285. - dark/light and zh/en labels are stable
  1286. evidenceLayers: [ui, accessibility]
  1287. - id: MSR-UI-002
  1288. status: accepted
  1289. state: model has fixed, multiple, or no thought levels
  1290. event: open thought control and press Ctrl+T
  1291. target: chat-draft or chat-existing-session
  1292. guard: displayed options and semantic no-thinking mapping
  1293. effect: fixed controls do not cycle; multi-level controls wrap in display order
  1294. assertions:
  1295. - unsupported generic levels are not fabricated
  1296. - no-thinking has correct label/aria/value mapping
  1297. evidenceLayers: [ui, accessibility]
  1298. - id: MSR-UI-003
  1299. status: bug-candidate
  1300. state: current model is disabled or restricted
  1301. event: open picker
  1302. target: chat-existing-session
  1303. guard: current V4 lock/disable behavior
  1304. effect: verify whether current disabled model is visibly locked, hidden, or unavailable
  1305. assertions:
  1306. - do not finalize E2E expectation until shared picker and V4 toolbar contract agree
  1307. evidenceLayers: [ui, code-review]
  1308. coverageLayers:
  1309. - id: provider-unit
  1310. scope: resolver, overlay, membership, complete validation, ordering, duplicate handling, revision
  1311. preferredDimensions: [provider-source, registry-state, provider-flags, model-flags]
  1312. - id: selection-unit
  1313. scope: ModelSelection encoding, grouping, Recent, defaults, thought options, workspaceKey
  1314. preferredDimensions:
  1315. [selection-source, reasoning-selection, reasoning-level, workspace-identity]
  1316. - id: runtime-unit
  1317. scope: ModelFactory, active model, context/output validation, session config and command outcomes
  1318. preferredDimensions: [model-capability, reasoning-profile, max-output, command-result]
  1319. - id: adapter-wire
  1320. scope: API format, request projection, auth, history normalization, retry, usage
  1321. preferredDimensions: [api-format, auth-profile, endpoint-state, history-shape, recovery-state]
  1322. - id: service-integration
  1323. scope: automation, Subagent, Off-Peak, official MCP, workspace identity
  1324. preferredDimensions: [surface, query-source, persistence-state, workspace-identity]
  1325. - id: desktop-e2e
  1326. scope: representative user-visible paths with case-local provider replay
  1327. delivery: desktop-continuous
  1328. preferredDimensions: [surface, operation, selection-source, model-capability, reasoning-profile]
  1329. - id: remote-replay-e2e
  1330. scope: shared-host attachment, snapshot/gap recovery, owner routing, model registry sync
  1331. delivery: web-remote-replayable
  1332. preferredDimensions: [delivery-kind, host-kind, workspace-identity, recovery-state]
  1333. - id: formal-state-space
  1334. scope: queue, compact, goal, fork/edit, model-bearing Submission and delivery boundaries
  1335. preferredDimensions: [session-phase, active-work, queue-state, operation, command-result]
  1336. generationPolicy:
  1337. firstPass: pairwise
  1338. highRiskPass: 3-wise
  1339. fullCartesian: only within a declared cross-product, never across all dimensions
  1340. modelExpansion: by capability-and-wire signature, not literal model ID
  1341. statusGate:
  1342. - accepted only for executable formal/E2E cases
  1343. - undefined requires decision record before E2E assertion
  1344. - bug-candidate becomes regression after product contract is confirmed
  1345. - pruned requires a named guard or invariant
  1346. requiredCaseFields:
  1347. - id
  1348. - status
  1349. - state
  1350. - event
  1351. - target
  1352. - guard
  1353. - effect
  1354. - assertions
  1355. - evidenceLayers
  1356. graphDrift:
  1357. - id: GRAPH-DRIFT-001
  1358. status: candidate
  1359. liveSurface: packages/ui/src/settings/OffPeakEditView.tsx
  1360. graphRelation: off-peak settings editor is not fully declared as a distinct UI surface
  1361. followUp: confirm whether it should become a stable surface node
  1362. - id: GRAPH-DRIFT-002
  1363. status: candidate
  1364. liveSurface: login, bot, official MCP, Git commit, title, goal verifier, project memory
  1365. graphRelation: model consumers are only partially represented in the model-selection surface graph
  1366. followUp: keep as downstream consumers or add stable surface nodes after product ownership review
  1367. - id: GRAPH-DRIFT-003
  1368. status: candidate
  1369. liveSurface: current provider Registry and V4 runtime
  1370. graphRelation: older graph/spec references to client-config magic_name/fallback/tombstone are stale
  1371. followUp: mark legacy-only and remove stale semantic edges after migration audit
  1372. unresolvedQuestions:
  1373. - id: MSR-Q-001
  1374. question: queue item consumption should use which model/thought selection?
  1375. options:
  1376. - id: freeze-submission
  1377. recommendation: current state-space and input-intent implementation
  1378. includes: queue item persists complete model/thought intent; execution refreshes Provider facts only
  1379. prunes: latest-session-model behavior for already admitted items
  1380. - id: latest-session
  1381. includes: queue item reads Session model/thought at consumption
  1382. prunes: admission-time model freeze
  1383. blockingCases: [MSR-QUEUE-001]
  1384. - id: MSR-Q-002
  1385. question: should V4 disabled current models render as locked selectable-history entries, hidden entries, or unavailable placeholders?
  1386. options:
  1387. - id: locked-history
  1388. includes: current historical model remains visible but cannot be selected
  1389. - id: unavailable-placeholder
  1390. includes: current value can render, ordinary list excludes it
  1391. - id: hidden
  1392. includes: no visible current item after Registry rejects it
  1393. blockingCases: [MSR-UI-003]
  1394. - id: MSR-Q-003
  1395. question: is the context-window guard a required current V4 behavior or a future design target?
  1396. options:
  1397. - id: current-contract
  1398. includes: model switch must compact/stop/wait before commit
  1399. - id: future-target
  1400. includes: current regression records a known gap without failing existing E2E
  1401. blockingCases: [MSR-SESSION-006]