Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
docs(model-hub): sync spec and acceptance ledger to the final owner rulings (lane L0) (#1083)
Call Whited8e080592347
diff --git a/docs/plans/model-hub-implementation.md b/docs/plans/model-hub-implementation.mdindex f495c3e15..2a106cbff 100644--- a/docs/plans/model-hub-implementation.md+++ b/docs/plans/model-hub-implementation.md@@ -9,11 +9,12 @@ Lane workflow standard: `~/vibe-remote-project/.agents/skills/pr-delivery-loop/S> which shipped dormant. Spec v2 moved the spend order from one global list to a> per-backend ordered subset (`model-hub.md` §0, §4.2; contracts at> `contract_version: 2`). Anything below that assumes a global priority list is-> historical. The v2 lane plan is cut as a separate document; this one is not-> being rewritten in place, only annotated where it would otherwise contradict-> the frozen contracts. **§8 is the exception: it is v2-current and binding** —-> the acceptance criteria the spec-v2 review loop handed to implementation-> instead of answering them with more spec.+> historical. This document is not being rewritten in place, only annotated where+> it would otherwise contradict the frozen contracts. **§3 and §8 are the+> exceptions: both are v2-current and binding** — §3 now carries the v2 lane plan+> (approved 2026-07-29), which replaces the v1 lane split, and §8 the acceptance+> criteria the spec-v2 review loop handed to implementation instead of answering+> them with more spec.---@@ -94,32 +95,326 @@ orchestrator only.`turn-provenance.schema.json` (per-turn model@source record). All three areread-only surfaces with no v1 implementation, so every field is required.-## 3. Lanes+## 3. Lanes (v2 plan, approved 2026-07-29)-Dispatch preference (owner 2026-07-13): balance claude/codex; rigor-critical-backend → codex-lean; product-voice / design-fidelity UI → claude-lean.+The v1 lane split (L1–L7, built for the global priority list) is **superseded** and+lives in git history at `251f8e7b`. The lane IDs below are the v2 ones, and every+lane reference in §8 means one of these.++Dispatch preference (owner 2026-07-13): balance claude/codex; rigor-critical and+cryptography-adjacent backend → codex; product-voice / design-fidelity UI → claude.Every brief cites: spec, this plan, the contracts dir, repo `AGENTS.md`,`pr-delivery-loop` SKILL — all by absolute path — plus explicit file scope andno-touch zones.-| Lane | Executor lean | Scope (files) | Depends on |+| Lane | Executor | Scope | Depends on || --- | --- | --- | --- |-| L1 engine runtime & credentials | codex | new `vibe/model_hub_runtime/` (or Show-Runtime generalization per S3), engine supervisor, key/token generation, fail-closed + Direct escape | S1/S3 |-| L2 config schema + API + events | codex | `config/v2_config.py` (sole owner), new `core/handlers/model_hub*.py`, REST endpoints, serializer guards, event log store | contracts; L1 interface |-| L3 backend injection & modes | codex | `modules/agents/claude_agent.py` / `codex/` / `opencode/` (env, `-c`, overlay + serve hash), mode plumbing; Direct path untouched-by-default proof | L2 API |-| L4 UI: Models page + sources + OAuth connect | claude | `ui/src/components/settings/models/**` (new dir), add-source menu/dialogs, OAuth dialog reusing `BackendOAuthPanel` shell | contracts |-| L5 UI: menus + mapping + backend card + migration dialog | claude | `ui/src/components/settings/models/menus/**`, backend page 供给方式 card, migration dialog | contracts; L4 shared primitives |-| L6 migration backend | codex | scan/import of native configs (Claude settings.json, Codex auth.json controlled import, opencode providers), re-auth orchestration, non-destructive tests | L2 |-| L7 scenario tests + regression + docs + availability guard | either (split) | `tests/scenarios/model_hub/**` catalog + harness, Incus verification script hooks, `avibe-docs` user docs EN/ZH; **engine-asset availability guard** (decided 07-23: mirror pinned CPA assets into Avibe-owned release storage pre-GA, manifest → mirror URLs, upstream as provenance; same manifest-verified backup/recovery pattern as Show Runtime) + **platform-set expansion** (07-23 13:13, from L1 review: add linux-arm64 / darwin-x64 assets — pin + SHA256 + schema platform-enum rev — together with the mirror work; until then unsupported hosts fail closed with Direct as escape hatch, scenario `model_hub_engine_platform_unsupported`) | all |--No-touch zones: only L2 edits `config/v2_config.py`; only L3 edits-`modules/agents/**`; L4/L5 split `ui/src/components/settings/**` by-subdirectory as listed; nobody edits contracts in-lane.--Sequencing: S1–S3 → freeze contracts → L1+L2 start (codex ×2) with L4 in-parallel (claude); L3/L5 join as their dependencies stabilize; L6 after L2;-L7 continuous, finalizes last. Rough sizes: L1 M, L2 L, L3 M, L4 L, L5 M,-L6 M, L7 M.+| **L0 spec sync** | claude | `docs/plans/**` only: commit AC-14 to AC-21 into §8, apply the AC-14 to AC-17 record repairs, sync spec §4.5 and §8 to the push cut, write this lane plan | — |+| **L1 per-agent order core** | codex | `config/v2_config.py` per-backend `sources{policy, order}` + serializer completeness guards, resolver order resolution, **the per-Agent read projection on `GET /api/models/agents` — both its `api.md` term and the `service.py` assembler that fills it** (AC-9, owner ruling 07-29 16:50: one more member of this row's agents-payload extensions, because the projection is computed from resolver state this lane already owns), `PUT /api/models/agents/<backend>/sources` **exposed through the shared route layer** (see 「No-touch zones」), removal of the v1 global priority endpoint and `ModelHubConfig.priority_order` (which is what finally deletes the `priority.schema.json` tombstone, owner ruling #6), **the migration rewrite** (below), **the ordinary source-creation commit paths** — `_commit_new_source_locked` and both its `api_key` and OAuth callers, which today append to the very field this row deletes and return no `adopted_by`, so this row owes the automatic insertion into every eligible `follow` order plus the `adopted_by` projection `api.md` already freezes and L5 already consumes, with tests covering `follow` adoption and the `custom` new-source hint for **ordinary creation** as well as migration (ruling 07-29 17:41, review round 16 — the row previously named only `migration.py`, which would have left source creation writing a deleted field), the eligibility and mode-projection contract fixes — **AC-19, AC-20, AC-21** — and **the coordinated `contract_version: 3` bump** every later lane rides. **The bump carries the whole v3 set, not just L1's own ACs** (§3 single-freeze ruling): every frozen-file edit any §8 criterion needs — L2's and L3's surfaces included — is authored here, so that after this lane merges no other lane edits `model-hub-contracts/**` at all | L0 |+| **L2 repair paths & guards** | codex | replacement invariants on `PUT …/credential` and `POST …/reauth` **and those routes' exposure on the shared route layer** (see 「No-touch zones」), confirm-before-irreversible native re-auth **and its `tests/scenarios/auth_setup/` closed-loop case** (below), one shared `would_interrupt` implementation behind DELETE and `PUT …/credential` **only** (the native re-auth confirmation is unconditional, not guard-computed — AC-13's ruling: what a narrower account supplies is knowable only *after* the login, which is the irreversible act; corrected 07-29 17:41, review round 16), protected-set membership — **AC-2, AC-3, AC-5, AC-8, AC-12, AC-13**. Implements against L1's published v3; **edits no file under `model-hub-contracts/`** | L1 |+| **L3 provenance, probe & chain** | codex | turn-provenance write path + read route, probe route, chain projection, resolution-event emission and its record accuracy — **AC-1, AC-4, AC-7, AC-10, AC-18**, plus the record half of **AC-6, AC-9 and AC-11**, plus **emitting the in-turn error copy** spec §4.5 makes normative (below), plus **the turn-lifecycle seam** that makes successful and canceled turns reachable at all, and — per the 07-29 round-7 ruling, amended 14:04, replaced 14:39, settled 15:07, narrowed 15:42 and cut back 16:20 — **four seams** carrying the **process-scoped** gateway credential: the **launch env-build seam** (`modules/agents/model_hub.py`), the **gateway authorization path** (`core/handlers/model_hub/turn_gateway.py`), **the Codex call site for cwd threading only** (`request.working_path` into the launch resolution), and **the Claude call site for session-identity threading only** (07-29 16:20 — the same additive-parameter class, not adapter surgery). **Plus the pre-launch supply-failure mapping**: a supply failure raised out of the launch resolution — `ModelHubService.resolve` raises `mapping_target_unavailable` / `engine_down` before any backend process, transport or turn gateway exists — is mapped to §4.5's copy forms **once, at the resolve boundary** in `modules/agents/model_hub.py`, the seam this row already owns, so all three backends inherit it instead of three adapters each authoring product copy (ruling 07-29 17:41, review round 16 — see below). Plus its own routes on the shared route layer (provenance, chain, probe — see 「No-touch zones」). **L3's FIRST deliverable is the correlation-mechanism design note** (07-29 16:20): the registry, scope keys, FSM lookup and their coverage are designed there, not here, bounded by the invariants below. Implements against L1's published v3; **edits no file under `model-hub-contracts/`** | L1 |+| **L4 UI: overview & order** | claude | Models page overview, per-backend source order editor (跟随推荐 / 自定义), source rows, status pills — design frames V6 01–04 plus M01/M02; the OpenCode drawer follows the V6 02 pattern rather than inventing a third; **plus AC-9's page attribution — the consumer of L1's per-Agent projection, with its UI test** (07-29 14:39 ruling), **plus AC-7's Direct-mode drawer gate and AC-18's deleted-source feed state, each with its UI test, plus `ui/src/i18n/{en,zh}.json` ownership for AC-19's eligibility-reason keys** (07-29 15:07 ruling; those reasons render in L4's own surfaces — source rows and drawer gray-outs — so the keys follow the surface. L5 appends its own journey strings under normal i18n practice; no shared-file conflict is expected, and if both lanes add keys they coordinate at symbol level, not by locking the file). **The razor, recorded once: a *status* surface — what is broken right now — is L4's; a *journey* is L5's, and reading a status is not a journey.** That is the same test the 14:39 AC-9 ruling applied, generalized at 15:07 so later surfaces do not each need their own ruling | L1 |+| **L5 UI: supply journeys** | claude | the `adopted_by` loop, confirm dialogs (delete, elective replacement, re-auth irreversibility), dry-run, chain preview, and the Models-page 需处理 state the in-turn copy points at; **the Models-page action that invokes AC-3's recovery route** (07-29 ruling — the topped-up user's path runs through this action, and AC-3's scenario drives it through the action rather than calling the route directly); the **in-turn error copy's UI wiring** on the Web side (the copy itself is L3's — see §3); quota projection optional. **No provenance surface at all** (owner ruling 07-29 14:03 — see the cut list) | L2, L3, L4 |+| **L6 integration close-out** | either | AC checkpoint across all of §8, scenario catalog completion, Incus regression evidence, user docs EN/ZH in `avibe-docs` | all |++**Migration belongs to L1** (orchestrator ruling, 07-29 — review round 1 of the L0 PR+found no lane owned it). `core/handlers/model_hub/migration.py` currently appends every+imported source to `updated.priority_order`, the exact field L1 deletes, so the two+changes are one change: the append is **deleted**, imported sources join each backend's+order through `follow`-mode auto-inclusion, and a `custom`-policy agent gets the+new-source hint instead of a silent insertion. Leaving it to a later lane would mean+merging a migration that writes a field that no longer exists.++**In-turn copy is backend work, not UI work** (L0 proposal, 07-29 review round 3 —+**orchestrator confirms at merge**, since it moves scope between lanes). The push cut+made the in-turn copy the only actionable notice a supply failure produces, and every+platform has to produce it: Slack, Discord, Telegram, Lark/Feishu, WeChat and Web all+render the same turn result. That path is Python — `core/handlers/model_hub/turn_gateway.py`+where Model Hub meets the live turn, `core/backend_failure.py` / `core/message_output.py`+where a terminal outcome becomes a message, and `vibe/i18n/{en,zh}.json`, which repo+`AGENTS.md` requires for every backend user-facing string and which today holds no+supply copy at all. L5's UI scope is the Models page (§3 records the one exception the+07-29 conversation-surface ruling added), so leaving the copy there would have shipped it+to Web only and left every IM user with a+generic failure — the exact regression the cut's 「surface it in the turn」 promise+cannot afford. It moves to **L3**, which already owns the moment it must be emitted at:+the same turn resolution that writes provenance and the resolution event. L5 keeps the+Models-page 需处理 state the copy points at, and the dialogs.++**This file set is sufficient, and round 4's objection is what proves it** (orchestrator+ruling, 07-29 review round 4). Round 4 argued the set could not emit copy on a+**successful** fallback — a recovered turn returns a normal result, so it passes through+neither `backend_failure` nor terminal-error handling — and asked for+`core/message_dispatcher.py`. The observation is correct and the conclusion inverted:+**the spec was over-promising, not the scope**. §4.5 now makes a survived turn silent, so+there is no success-path copy to emit, every remaining **post-launch** form is on the+failure path these files already own, and round 4's conclusion holds for those.+**The claim held only for post-launch failures, and round 16 found the gap** (finding+`3672822540`, ruling 07-29 17:41). A turn with no runnable candidate fails inside the+*launch resolution*, before a backend process, a transport or the turn gateway exists:+Codex renders it through its adapter's generic `except Exception` startup copy and+Claude's call site has no typed handling at all, so neither `backend_failure.py` nor+`message_output.py` is ever reached. That path is L3's too, mapped **once** at the+resolve boundary (L3's row above) — which is why the scope grew by one seam rather than+by three adapters. Recorded here because 「the success path+cannot reach the emitter」 is a fact a later lane will rediscover; it is a design+constraint that shaped the ruling, not an oversight to fix.++**L3's turn-lifecycle seam is scope, and the reason is recorded once** (orchestrator+ruling, 07-29 — review round 6). The block above settles the *copy*; this settles the+*record*, and the two went opposite ways because the push cut removed one and not the+other. Provenance is owed for **every FSM-tracked turn**, including the ones that succeed —+and a successful turn never visits `backend_failure.py`, so nothing in L3's original scope+could see it or carry the Avibe `turn_id`. **「FSM-tracked」 is the whole obligation, not a+hedge on it**: 「no FSM truth → no record」 leaves only two ways to satisfy a wider reading,+expanding the FSM (deferred to v2.1) or writing an approximate record (forbidden). L3's+scope therefore gains the module that owns the turn state machine; **L3 verifies the exact+file at implementation and records it in its PR, escalating if it differs** — this plan+names the architecture, not a line number.++The binding constraint travels with it, and AC-1 and AC-4 both turn on it: **turn+completion and cancellation classification are read from the turn FSM's terminal states,+never inferred from transport.** A dropped connection and a user pressing Stop look+identical at the gateway, and only the FSM knows which one happened; an implementation+that guesses from the socket will mislabel one of them, which is precisely the record AC-4+exists to make trustworthy.++The turn FSM is shared core code, so L3's edits there are **additive hooks, coordinated at+symbol level**: L3 adds its call sites without reshaping the FSM, and nothing else in this+batch touches that file — which is what keeps a shared-core edit out of the lane-conflict+class in the first place.++**L3 owns the correlation mechanism, and designs it in its own note** (orchestrator+ruling, 07-29 16:20, accepting L0's proposal). The mechanism that ties a gateway attempt+back to an Avibe turn — the token registry, the scope keys, the FSM lookup, and the+coverage they imply — **is not designed in this plan and is not written by L0**. It is+**L3's first deliverable when its lane starts**: a design note under `docs/plans/`, named+by L3, written by the lane with its hands on the call sites and free to verify each one+before committing to it.++The cut is a first-principles one, not a scheduling convenience. This plan transcribes+decisions; the correlation text was a *mechanism being designed*, in a lane that cannot+read its own call sites into scope and cannot rule on lane boundaries. Three review rounds+punctured it in the same place three times — the Codex `cwd` carrier, the Claude session+identity, the route layer's ownership — while every other part of this batch converged.+The lane that will build it is the lane that can design it.++What stays here is what was **ruled**, and every one of these binds the note:++- **Per-backend tokens are rejected** (round-7 finding, standing).+ `core/handlers/model_hub/turn_gateway.py` authorizes from a per-backend token map today,+ so two concurrent sessions on the same backend and model are indistinguishable at the+ gateway — and AC-1's `failed_attempts` and AC-4's cancellation classification both need+ that correlation to exist at all. Concurrent same-backend sessions are the norm in this+ product, not an edge case.+- **The gateway credential is PROCESS-SCOPED** (07-29 15:07): minted on first use per+ process scope and stable for that process's lifetime, superseding the 14:04 「minted once+ per session」 wording that review round 9 showed codex cannot carry. **Mint-on-first-use+ per scope key is idempotent** (15:42), which is why nothing has to observe process+ restarts. *Which* scope key each backend uses, and what the registry does with it, is the+ note's to state and to verify.+- **Write only when the attribution is exact** (07-29 15:07, guarded 16:35): a+ `turn-provenance` record is written when the FSM shows exactly one active turn for the+ scope **and nothing untracked is using that scope**; anything else writes **no record at+ all**. The guard is not a refinement, it repairs a false invariant: a Web turn and an+ IM/CLI turn can share one codex `(backend, cwd)` transport, and then 「exactly one+ FSM-tracked turn」 is true while 「exactly one user of the scope」 is false — the tracked+ turn's record would absorb the other's attempt, which is the misattribution this batch+ exists to purge. **How** the gateway establishes 「no untracked use」 — or how FSM+ coverage grows until the case cannot arise — belongs to L3's design note, which carries+ it as **a constraint the note must satisfy**, not as an open question it may answer with+ silence. Absence is honest, and it is *all* that remains: the 15:42 ruling deleted+ the event-log half of this pairing, because events trace transitions and a healthy+ attempt is silent on every path (AC-1, AC-4). This replaced the 14:39+ coarse-grain-with-a-marker design, which round 9 showed unwritable: `turn-provenance.schema.json` requires `turn_id` and the only+ contracted read is `GET /api/models/turns/<turn_id>/provenance`, so a record attributed+ to no turn could be neither written nor read back.+- **No FSM truth → no record** (07-29 15:42) — the same rule at its natural boundary. v2+ provenance covers FSM-tracked turns; **IM and CLI turns write no provenance in v2**,+ recorded as a limitation rather than papered over. The loss is debug-marginal because the+ source-grained resolution-event feed stays channel-independent, so those turns' failures+ and switches are still traced even though their per-turn attempt lists do not exist.+ **v2.1 candidate**: extend FSM registration to the IM/CLI dispatch paths — the write rule+ is path-agnostic, so nothing in §4.5 changes when the coverage widens.+- **The exclusion, stated as what it protects** (07-29 15:42, narrowing 15:07): **no+ process-model or lifecycle changes, no wire-format changes, no fingerprint-semantics+ changes.** 「No adapter edits」 was the wrong perimeter — review round 10 showed it forbade+ the one thing the mechanism needs while protecting nothing extra. **Additive call-site+ parameter threading in a backend adapter is ALLOWED.** Those three protections are also+ the compressed form of the three remedies ruled out at 14:39: per-session transports+ (process model), request-level identifiers (wire format), and lifting the token out of+ the restart fingerprint (fingerprint semantics — rejected hardest, because the shared+ transport would then serve every session under the *first* session's token, which is+ silent **misattribution**, the invented-state class this batch purges).+- **This owes NO contract term, and the one the 14:39 text owed is RETRACTED** (07-29+ 15:07). Three deletions: **`turn_id` stays REQUIRED** — no nullable identity, no new read+ route, no list endpoint; **the attribution-grain term is retracted from L1's v3**, since+ a grain marker is vestigial once every written record is turn-exact by construction; and+ **the coarse / workdir grain leaves the recorded vocabulary entirely**. Should the+ opencode verification later find a shared server, the grain question returns **with+ evidence**, for a targeted term — the standing deferred-with-evidence rule.++**The fourth seam is ruled** (orchestrator, 07-29 16:20, closing review round 12): the+additive-threading grant **extends to the Claude call site**. Threading the live session+identity into launch resolution is the same parameter-pass class as the Codex `cwd` —+`resolve_model_hub_launch(controller, "claude", requested_model)` is handed no session+identity today, while `composite_key` and `base_session_id` sit in the surrounding block,+so without the grant the identity chain terminated one hop short for claude. §3's L3 row+carries all four seams as **scope**; what happens inside them is the note's.++**Classification is unchanged by any of this.** The token establishes *what an attempt may+be attributed to*; completion and cancellation still classify from the FSM's terminal+states per the round-6 constraint above. AC-4's two legs stand exactly as written — they+now pin the **unambiguous** fixture — and a **third leg** covers what that fixture excludes,+restated 07-29 15:42 so that it needs nothing the frozen contracts do not already have:+**ambiguous-leg-absent plus control-leg-present.** Under deliberate same-cwd concurrency,+neither turn's provenance contains the ambiguous attempt; run **the same fixture+sequentially**, with no concurrency, and the provenance record MUST be written. The pairing+still defeats silent data-dropping, but structurally rather than by contracting a new+trace: an implementation that guesses fails the ambiguous leg, and one that quietly drops+everything fails the control. The 15:07 wording's positive half — 「the resolution-event log+DOES contain the source-level outcome」 — is **deleted**: events trace *transitions*, a+healthy attempt is silent by design on every path, and an attempt nobody can attribute+legitimately leaves no trace. No new kind, no new reason, v3 untouched. AC-1 adjusts to the+same write rule.++**Silence needs a negative assertion, or it is unenforceable (07-29, review round 6).**+Every criterion in §8 asserts that something is present; a rule whose content is 「nothing+appears」 cannot be caught by any of them, so the superseded 「已自动换线」 tail could be+reintroduced with every gate green. **L6 owns the assertion**, on the existing quota-+failover scenario: when the fallback succeeds, the turn's delivered output contains the+answer **and no supply copy at all** — no switch tail, no error card, no advisory line —+while `GET /api/models/turns/<turn_id>/provenance` — the contracted route, not the bare turn path (corrected 07-29, review round 7) — still shows both attempts. The two halves must be+asserted together in one case, because that pairing is the entire ruling: the record is+kept, the interruption is not. Asserting only the transcript would also pass an+implementation that silently stopped recording provenance.++**Native re-auth owes an auth-setup scenario** (07-29, review round 3). The confirm →+abort → honest-failure ordering AC-13 makes normative is a multi-step auth flow, and+repo `AGENTS.md` is explicit about what those owe: update+`tests/scenarios/auth_setup/catalog.yaml` and add or update a closed-loop case under+`tests/scenarios/auth_setup/test_auth_setup_scenarios.py`. §5's Model Hub catalog does+not discharge it — a different harness over a different capability — so the work is+named in **L2**'s scope beside the flow it covers, rather than left to L6's catalog+sweep, where an unlisted scenario is invisible by construction. Unit and contract tests+cannot see the ordering this exercises: they can assert a confirmation exists, not that+it preceded an irreversible login and could abort it.++**Merge order.** L0 first and alone — it unblocks every other lane. Then **L1**, which+owns the v3 contract bump. **L2 and L3 then run in parallel** off L1, with **L4**+starting alongside them. **L5** joins once L2/L3/L4 have landed the surfaces it wires.+**L6** finalizes.++Two known risks, stated so the lanes plan around them instead of discovering them:++1. **L2 and L3 both touch `core/handlers/model_hub/service.py`.** They are+ **symbol-level no-touch** to each other — L2 owns the repair and guard functions,+ L3 the provenance/probe/chain ones — and **L2 merges first**, so L3 rebases onto+ it rather than the reverse. A lane that needs a symbol the other owns routes+ through the orchestrator; it does not edit it. **The one collision already known is+ pre-granted: `test_source`.** AC-3 puts the route and state-clearing change there —+ L2's repair symbol — while AC-11 needs the source-state event emitted on that same+ non-turn path, which is L3's. Under the merge order above L2 lands its change first,+ and **L3 adds the single emission call inside that symbol on its rebase under this+ standing grant**, with no fresh orchestrator round-trip (ruling 07-29 17:41, review+ round 16: the risk list exists so lanes plan around collisions instead of+ discovering them, so a known one is named and allocated here).+2. **Docs-heavy PRs do not get reviewed by default.** The Codex bot skips docs-only+ diffs, so any lane whose PR is docs-shaped forces the review with `@codex review`+ and confirms the 👀 inside the trigger window, per `pr-delivery-loop`.++**Cut and deferred — no lane builds these:**++- **Proactive push machinery — CUT** (owner ruling 2026-07-29 10:54). No recipient+ resolution, no delivery layer, no scope fan-out, no home-scope fallback. Events are+ recorded; the failing turn and the 「模型」 page are the surfaces (spec §4.5).+- **Provenance as a chat-surface feature — CUT** (owner ruling 2026-07-29 14:03,+ superseding the round-6 orchestrator ruling that had scoped it to the Web conversation+ surface). Users should be **unaware of supply machinery**; provenance inspection is a+ **debug affordance, not a user feature**, and it appears **nowhere in the chat surface —+ neither Web nor IM**. AC-1 reduces to record + API truth accordingly. What is *not* cut:+ the record itself, the contracted route, and the in-turn error copy — error UX is the+ surfacing mechanism the owner endorsed, and it is a different thing from inspection.+- **The 请求日志 / 诊断 page** — v2.1 candidate, **not an AC and owed by no lane in this+ batch**. If provenance ever gets a surface it is that page, in the Models page's 高级+ area — the row already exists as designed (V6 01: 跨厂商自动顶替 · 请求日志 · 诊断) and+ stays as designed. The page ships when it ships.+- **Fallback spend attribution** — v2.1 (spec §10.3).+- **Cross-vendor models as first-class menu entries** — v2.1, gated on the+ agentic-fidelity spike (spec §10.4). Cross-vendor supply itself already works and+ is in scope; what is deferred is promoting it to a first-class menu concept.+- **Per-Vibe-Agent rows on the Models page** — ruled out this milestone (owner+ 2026-07-29 10:44 #3). Backend rows may show 「N 个 Agent 在用」 with a deep link into+ Agent settings; `SupplyGap.agents` keeps the agent grain in the contract for a+ later UI upgrade.++**No-touch zones.** The zones are **time-ordered, not just file-ordered**, because the+merge order already separates the lanes that would otherwise collide:++- **L1 owns `config/v2_config.py` and `core/handlers/model_hub/{resolver,service,rpc,+ migration}.py`** for the priority→per-agent surgery and its endpoints. It is the only+ lane in those files while it is open, and no symbol-level split applies to it — the+ surgery crosses symbols by nature.+- **After L1 merges**, L2 and L3 branch from post-L1 master and share+ `core/handlers/model_hub/**` under a **symbol-level** no-touch: L2 owns the repair and+ guard functions, L3 the provenance/probe/chain ones. A collision — two lanes needing+ the same symbol — escalates to the orchestrator rather than being resolved by+ whichever lane pushes second.+- **The public route layer is a SHARED surface, governed by the same two rules** (07-29+ 16:20 ruling, closing review round 12 — before it, the endpoint surface belonged to no+ lane at all, so no lane could legally delete `/api/models/priority` or expose its own+ routes). The surface is `vibe/ui_server.py`'s models routes, `vibe/model_hub_client.py`,+ and `core/handlers/model_hub/rpc.py` behind them. Rule one, **each lane adds and removes only its+ own routes and wrappers**: **L1** deletes the priority GET/PUT and adds+ `agents/<backend>/sources`; **L2** the repair routes; **L3** the provenance, chain and+ probe routes. Rule two, **sequencing is by merge order** — L1 first, L2 and L3 branching+ post-L1 under symbol-level no-touch to each other, and a collision escalates to the+ orchestrator rather than being resolved by whoever pushes second. Same shape as+ `core/handlers/model_hub/**` above, and named separately because three lanes edit the+ same three files and none of them owns the file.+- **L3 is the only lane outside `core/handlers/model_hub/**` and that route layer** (07-29, review round 3):+ the in-turn copy puts it in `core/backend_failure.py`, `core/message_output.py` and+ `vibe/i18n/{en,zh}.json`. No other v2 lane touches those files, so the zone is a+ statement rather than a negotiation — but L3's brief names them explicitly, because a+ lane that discovers it needs a file outside its declared scope is a lane that has+ already collided with someone.+- **v3 is frozen ONCE, and L1 authors all of it** (orchestrator ruling, 07-29, review+ round 4 — this **supersedes** the round-1 declination of a full v3 pre-freeze, which+ answered 「who branches first」 without answering 「what happens when L2's and L3's own+ ACs edit frozen files after v3 has published」). Round 4 named the consequence: a bump+ at L1 followed by later contract edits inside downstream lanes would make+ `contract_version: 3` denote several mutually incompatible contract states, which is+ precisely what `model-hub-contracts/README.md`'s freeze protocol forbids. So **L1's+ coordinated v3 commit expands to carry every contract shape change any AC in §8+ requires** — L2's and L3's surfaces included, plus AC-11's nullable model for+ source-scoped system events and AC-9's per-Agent read projection. **After L1 merges,+ contracts are READ-ONLY for every remaining lane.** A shape mismatch a lane can prove+ *from its implementation* escalates to the orchestrator for a targeted **v4** with that+ evidence attached; it is never an in-lane edit, and never a silent reinterpretation of+ v3. The merge order is unchanged (L0 → L1 → {L2 ‖ L3 ‖ L4} → L5 → L6); what changed is+ how much L1 carries.+- L4 and L5 split `ui/src/components/settings/models/**` by subdirectory, and **that+ split is the whole of their UI scope again** (owner ruling 07-29 14:03). Review round 7+ had widened L5 into `ui/src/components/workbench/` to make AC-1's conversation-surface+ rendering implementable; the owner then cut that surface entirely, so the exception goes+ with it. The **in-turn error copy is unaffected and stays L5's** on the UI side — it is+ error UX, the owner-endorsed surfacing mechanism, not provenance inspection. If wiring it+ turns out to need a file outside the split, L5 records the exact file at implementation+ and says so in its PR, per the pattern the round-6 seam ruling established.++**GA gate (outside the v2 lane batch).** The v2 batch ships **flag-off and does not+GA**, so the following are GA-blocking deliverables that no lane in this batch owns and+that nobody may read the lane table's silence as having cut:++- **Managed-runtime availability guarantees** (`model-hub-contracts/README.md:263`, v1's+ L7): mirror the pinned engine assets into Avibe-owned release storage under the same+ manifest-verified backup/recovery pattern as Show Runtime, then point the manifest at+ the mirror with upstream recorded as provenance. SHA256s never change (same bytes).+ The platform expansion pinned to the same work — linux-arm64 / darwin-x64 assets plus+ the schema platform-enum revision — travels with it; until then unsupported hosts fail+ closed and Direct mode is the escape hatch.++The contracts README's wording stays as written: it is still true, and still GA-blocking.## 4. Product gates@@ -138,7 +433,14 @@ L6 M, L7 M.## 5. Verification layers- **Unit**: resolution projection, serializer completeness, overlay generation- (identifier stability invariant), migration parsers.+ (identifier stability invariant), migration parsers, and — added 07-29, review+ round 11 — **both migration order policies**, which the rewrite in §3 makes+ user-visible and nothing else here catches: an imported source **auto-joins every+ `follow`-policy order it is eligible for**, and it **stays outside every `custom`+ order** while+ producing the new-source hint. Parsers plus non-destructiveness pass unchanged if+ the migration still inserts into a custom order or fails to adopt into a follow+ one, which is exactly the append that L1 is deleting.- **Contract**: REST API against `model-hub-contracts` schemas (bothdirections), engine adapter against pinned engine version.- **Scenario**: `tests/scenarios/model_hub/catalog.yaml` — at minimum:@@ -148,17 +450,21 @@ L6 M, L7 M.across mode switch, migration non-destructiveness, OAuth forms A/B/C happypath + timeout/cancel. Scenario IDs appear in PR descriptions.- **Behavioral (Incus)**: real backend turns in both modes; 最近切换 log- reflects induced quota errors; UI pixel pass vs exported V4 frames.+ reflects induced quota errors; UI pixel pass vs the exported design frames+ (**V6 01–04 plus M01/M02 for v2**, per §3 — this line's original 「V4 frames」 is+ the v1 reference).## 6. Open items carried from spec §101. Remaining mocks (empty state / Dark / mobile / copy pass) — feed L4/L5;not blocking lane start (contracts govern behavior, mocks govern polish).2. en.json wording pass (Hub / Direct locked; rest of EN copy during L4/L5).-3. `design.pen` V4 frames must be saved (Cmd+S) before L4/L5 dispatch — lanes- verify against the exported frames.+3. `design.pen` frames must be saved (Cmd+S) and re-exported before L4/L5+ dispatch — lanes verify against the exported files, never against the live+ canvas. For the v2 lanes that means **V6 01–04 and M01/M02** (§3); the frames+ this item originally named were V4's.-## 8. Implementation acceptance criteria (review rounds 8-11, 2026-07-29)+## 8. Implementation acceptance criteria (review rounds 8-12, 2026-07-29)Review round 8 of the spec-v2 PR (#1081) returned six findings, five P1 and one P2.Rounds 6 and 7 had each answered a review by adding a spec section, and each new@@ -214,6 +520,46 @@ freeze protocol keys off editing a frozen file, which is why AC-8 and AC-12 wereexempted wrongly. That root is fixed once, below, and both invariants the round exposednow carry a mechanical check.+**Round 12** returned eight findings, all P2, and they split two ways. **Four are+defects in this section's acceptance record** — the same class as all six of round+11's, in a section round 11 had just corrected: a fixture that consumes its own+precondition (**AC-14**), a fixture the identifier rules forbid (**AC-15**), an+assertion naming an Agent its own setup never declares (**AC-16**), and push-count+assertions that silently assumed one branch of an unsettled owner decision+(**AC-17**). **Four are contract defects** (**AC-18** to **AC-21**), two of them+missed instances of classes the spec PR had explicitly swept in round 3 — closed+vocabularies and partial predicates. A class sweep that leaves instances behind is+itself a generator, which is why the loop was closed by directive rather than at a+natural zero. Round 12's findings lived in PR #1081's description only; committing+them here was lane L0's opening task.++**Owner rulings, 2026-07-29 10:44 and 10:54.** The 10:44 pass settled every pending+item at once; the 10:54 addendum then **cut proactive push entirely** (spec §4.5 and+its revision note). Both are applied throughout this section rather than appended to+it, so no criterion below asks for a notification:++- **AC-2 is settled** — an explicit irreversibility warning before the native login,+ and honest failure states after it — and **AC-13's** `force` confirmation reuses+ that shape. Hub-channel api_key replacement stays transactional, unconfirmed.+- **AC-6** reduces to **event-record accuracy** — which, after the downgrade recorded+ under AC-6 itself, means exactly ONE unattributed record carrying **no backend list**,+ the affected backends being derived from current orders and chains (corrected 07-29,+ review round 9: 「which backends the record names」 was the delivery-era framing and+ contradicted AC-6's own acceptance) —+ **AC-11** to the **event-shape half**, and **AC-9** to **which Agents a supply gap+ names** for the delete guard, the confirm dialogs, the feed and the 「模型」 page.+ Their delivery halves are void.+- **AC-17 is superseded**, not deleted: the unsettled recipient policy it insulated+ §8 against no longer exists, so the dependency is closed by removal rather than by+ qualification. Its block records that.+- **`SupplyGap.agents` including the Agents that inherit a backend default stands**+ (ruling #4). It was always guard and confirm payload, never a recipient list.+- **The Models page stays backend-grained this milestone** (ruling #3): no+ first-class per-Vibe-Agent rows, `SupplyGap.agents` unaffected (§3, cut list).++The round narratives above are the record of what each round found at the time it+found it. Where they describe pushes, the criterion below governs, not the narrative.+These are not suggestions and not backlog. Each is a test the implementing lane mustpass. **This PR does not reopen v2 — and a lane that closes an AC by changing a frozenshape publishes a new contract version** (07-29, review round 9). Those two halves were@@ -232,60 +578,201 @@ a new field are one class. AC-8 rewrites the protected set in frozen `api.md` anchanges when DELETE returns `source_last_supplier`; AC-12 rewrites that file'scredential invariants; AC-2's remedy edits its re-auth flow whichever UX the ownerpicks. So the v3 set is **every AC whose surface is a file under-`model-hub-contracts/`** — AC-1, AC-2, AC-4, AC-7, AC-8, AC-10, AC-11, AC-12, AC-13 —-plus **AC-3**, whose remedy adds a route to the contracts even though its surface is-the spec. The first of them to land goes through the orchestrator, bumps-`contract_version` to **3**, updates the mirror table, and states the client-visible-delta in its PR description; the others ride that version if they land in the same-release and bump again if they do not. Two of the round-10 three narrow what already-validates — AC-10 adds a `pattern`, AC-11 forbids `system` on a backend-scoped kind —-so a payload a v2 serializer emits today can stop validating, which is exactly the-client-visible delta the bump exists to announce. **AC-5, AC-6 and AC-9 stay on v2**:-their surface is the spec, and they change guard and fan-out semantics no contract-file states. AC-5 and AC-8 are the same guard from two sides, so a lane owning both-lands the `api.md` half inside the v3 bump and the spec half outside it.+`model-hub-contracts/`** — AC-1, AC-2, AC-4, AC-7, AC-8, AC-10, AC-11, AC-12, AC-13,+and round 12's AC-18, AC-19, AC-20, AC-21 — plus **AC-3**, whose remedy extends an existing+contracted route even though its surface is the spec, and **AC-9**, whose acceptance+needs a per-Agent read projection in `api.md` that does not exist yet (07-29, review+round 5 — AC-9 was previously listed as staying on v2). **Lane L1 authors the whole of+v3, in one coordinated commit** (§3's single-freeze ruling, 07-29 review round 4): it goes+through the orchestrator, sets `contract_version` to **3**, updates the mirror table,+sweeps the delivery language the push cut stranded (「v3 handoff notes」 below), and+states the client-visible delta in its PR description. **「The whole of v3」 means every+contract shape any §8 criterion requires, including criteria whose implementing lane is+L2 or L3** — AC-11's nullable `model_id` and AC-9's per-Agent projection are written by+L1 alongside its own, because the alternative is L2 and L3 each editing a frozen file+after the bump, which would make one version number name several incompatible contract+states. Later lanes then implement against a contract that is settled, and edit nothing+under `model-hub-contracts/` at all. Several of these narrow what already validates — AC-10 and AC-18 add a+`pattern`, AC-19 closes an enum, AC-11 forbids `system` on a backend-scoped kind — so+a payload a v2 serializer emits today can stop validating, which is exactly the+client-visible delta the bump exists to announce. AC-20 is the opposite shape and is+deliberately **not required**, so no frozen example is invalidated by it. **AC-5 and+AC-6 stay on v2**: their surface is the spec, and they change guard and+record semantics no contract file states. AC-6 stays there **because of its downgrade**+— the round-8 remedy would have needed an affected-backend field on+`resolution-event.schema.json` and pulled the criterion into v3; recording once and+deriving impact needs no field, so the frozen event shape is unchanged. **AC-14 to AC-17 are not a version event+either** — their surface is this document, and lane L0 discharged them before any+lane opened. AC-5 and AC-8 are the same guard from two sides, and under the single-freeze+ruling that split is now between *lanes*, not within one: **L1's v3 lands AC-8's `api.md`+half, and L2 implements both guards against it** — which is why L2 must read AC-5's spec+text and AC-8's contract text as one criterion even though only one of them is frozen.| AC | Sev | Finding | Surface | Owed by | Owner call needed || --- | --- | --- | --- | --- | --- |-| **AC-1** | P1 | Define provenance for Direct-mode turns | `turn-provenance.schema.json` | L2 (contract + route) with L7 scenario | no |-| **AC-2** | P1 | Reconcile irreversible native re-auth before returning failure | `api.md` | L1 (re-auth orchestration) + L4 (confirm copy) | **yes — product decision** |-| **AC-3** | P1 | Allow blocked sources to be re-tested after user action | `model-hub.md` | L2 (route + state clearing) with L7 scenario | no |-| **AC-4** | P2 | Represent canceled turns in provenance | `turn-provenance.schema.json` | L2 (contract) with L7 scenario | no |-| **AC-5** | P1 | Protect the menu-side model in deletion guards | `model-hub.md` | L2 (guard) with L7 scenario | no |-| **AC-6** | P1 | Resolve source events for every affected backend | `model-hub.md` | L2 (event fan-out) with L7 scenario | no |-| **AC-7** | P1 | Represent chain and probe for Direct-mode backends | `api.md` | L2 (route scoping) + L4 (drawer affordance) with L7 scenario | no |-| **AC-8** | P2 | Exclude disabled mapping rows from the protected set | `api.md` | L2 (guard) with L7 scenario | no |-| **AC-9** | P2 | Fan out source events only through Agents that use the affected model | `model-hub.md` | L2 (event fan-out) with L7 scenario | **yes — zero-scope fallback** |-| **AC-10** | P2 | Constrain `ProbeResult.source_id` to the canonical `src_*` format | `probe-result.schema.json` | L2 (contract + serializer guard) | no |-| **AC-11** | P1 | Route `system`-emitted source events from their source | `resolution-event.schema.json` | L2 (schema + delivery) with L7 scenario | no |-| **AC-12** | P2 | Reconcile a failed old-credential revocation | `api.md` | L2 (repair invariants) | no |-| **AC-13** | P1 | Give the `force` override a request contract on both repair routes | `api.md` | L2 (routes) + L4 (confirm dialog) with L7 scenario | **yes — via AC-2** |--**Three ACs wait on an owner call, not on engineering** (07-29, review round 11): AC-2-outright, plus the half of AC-13 and of AC-9 that each one's own criterion already says-a decision governs. AC-13's re-auth confirmation is one of the two answers AC-2's-decision picks between; AC-9's narrowing makes a menu-only failure resolve to zero-scopes by construction, so the standing zero-scope fallback decision settles whether-that failure is announced anywhere outside the feed and the 「模型」 page. Both keep an-implementable half that can land first — AC-13's declared override field on-`PUT …/credential`, and AC-9's fan-out narrowing itself — so only AC-2 blocks a lane-outright. The other ten are implementable as written. Four groups must be owned+| **AC-1** | P1 | Define provenance for Direct-mode turns | `turn-provenance.schema.json` | **L1 v3** (contract) + L3 (record + route), with L6 scenario. **No UI lane** | **settled 07-29 14:03 — record + API truth only; no chat surface, Web or IM** |+| **AC-2** | P1 | Reconcile irreversible native re-auth before returning failure | `api.md` | **L1 v3** (re-auth flow contract, **including a server-enforced acknowledgement** — see below) + L2 (orchestration) + L5 (confirm copy) | **settled 07-29 10:44 — confirm before the irreversible login** |+| **AC-3** | P1 | Allow blocked sources to be re-tested after user action | `model-hub.md` + `api.md` (extend the existing `POST /api/models/sources/<id>/test`) | **L1 v3** (the blocked-source semantics on the existing test route) + L2 (route + state clearing) + **L5 (the Models-page action that invokes it)** with L6 scenario | **settled 07-29 — the scenario drives the page action, not the route**; **route settled 07-29 17:09 — extend the existing test route, no second recovery path** |+| **AC-4** | P2 | Represent canceled turns in provenance | `turn-provenance.schema.json` | **L1 v3** (contract) + L3 (emission, via the turn-lifecycle seam) with L6 scenario | **settled 07-29 — cancellation is FSM truth, never transport inference** |+| **AC-5** | P1 | Protect the menu-side model in deletion guards | `model-hub.md` | L2 (guard) with L6 scenario — **stays on v2** | no |+| **AC-6** | P1 | Record a source event once; derive per-backend impact | `model-hub.md` | L3 (event record) with L6 scenario — **stays on v2** | **settled 07-29 — reduced to the record half at 10:54, then downgraded to a single unattributed record (orchestrator ruling, owner-vetoable)** |+| **AC-7** | P1 | Represent chain and probe for Direct-mode backends | `api.md` | **L1 v3** (route scoping + Direct-mode payload) + L3 (route) + **L4 (the Direct-mode drawer gate — withdrawing 试跑一次 and the chain view — with its UI test; 07-29 15:07 ruling: a status surface, per the razor in §3's L4 row)** with L6 scenario | no |+| **AC-8** | P2 | Exclude disabled mapping rows from the protected set | `api.md` | **L1 v3** (`api.md` half) + L2 (guard) with L6 scenario | no |+| **AC-9** | P2 | Resolve affected Agents from their effective models | `model-hub.md` + `api.md` | **L1 v3** (per-Agent read projection) + **L1 (projection assembler)** + L3 (record grain) + L2 (`SupplyGap.agents`) + **L4 (the page attribution that consumes the projection, and its UI test)** with L6 scenario | **settled 07-29 14:39 — the attribution consumer is L4's; the earlier cell assigned no UI lane and left L6 to discover a failure nobody could fix**; **producer settled 07-29 16:50 — the assembler is L1's too: it already owns `service.py`'s agents payload and the resolver state the projection reads (`supply_status` derivation, effective-model resolution), so contract and producer sit in one lane** |+| **AC-10** | P2 | Constrain `ProbeResult.source_id` to the canonical `src_*` format | `probe-result.schema.json` | **L1 v3** (contract) + L3 (serializer guard) | no |+| **AC-11** | P1 | Shape `system`-emitted source events from their source | `resolution-event.schema.json` | **L1 v3** (schema, incl. the nullable `model_id`) + L3 (emission) with L6 scenario | **settled 07-29 10:54 — reduced to the shape half** |+| **AC-12** | P2 | Reconcile a failed old-credential revocation | `api.md` | **L1 v3** (credential invariants) + L2 (repair implementation) | no |+| **AC-13** | P1 | Give the `force` override a request contract on both repair routes | `api.md` | **L1 v3** (request contract) + L2 (routes) + L5 (confirm dialog) | **settled 07-29 10:44 — via AC-2's shape; guard scoped to the Hub path by orchestrator ruling** |+| **AC-14** | P2 | Split AC-8's guard mutations across fresh fixtures | `model-hub-implementation.md` | L0 (applied), enforced by L2's test build | no |+| **AC-15** | P2 | Use a legal backend/model fixture for AC-9 | `model-hub-implementation.md` | L0 (applied), enforced by L3's test build | no |+| **AC-16** | P2 | Remove the nonexistent Agent from AC-5's assertion | `model-hub-implementation.md` | L0 (applied), enforced by L2's test build | no |+| **AC-17** | P2 | Make notification counts independent of the open recipient policy | `model-hub-implementation.md` | L0 (superseded — recipient policy cut) | **settled 07-29 10:54 — by removal of the policy** |+| **AC-18** | P2 | Constrain resolution-event source references | `resolution-event.schema.json` | **L1 v3** (contract) + L3 (API-boundary guard) + **L4 (the deleted-source feed state and its UI test — 07-29 15:07 ruling, same razor)** | no |+| **AC-19** | P2 | Close the eligibility reason-key vocabulary | `agent-supply.schema.json` | **L1 v3** (contract) + **L4 (`ui/src/i18n/{en,zh}.json` for the eligibility-reason keys — 07-29 15:07 ruling: the reasons render in L4's source rows and drawer gray-outs, and L1's scope holds no `ui/` file)** | no |+| **AC-20** | P2 | Enforce the hub-mode half of the mode invariant | `agent-supply.schema.json` | **L1 v3** (contract) | no |+| **AC-21** | P2 | Make the mirror registry encode its promised checks | `model-hub-contracts/README.md` | **L1 v3** (registry + checker) | no |++**Read the 「Owed by」 column as contract-then-implementation** (07-29, review round 5).+Where a cell begins **L1 v3**, the frozen-file edit that criterion needs is authored by+L1 inside the single coordinated bump, and the lanes named after it implement and test+against the result — they do not edit `model-hub-contracts/**` themselves. Only AC-5 and+AC-6 carry no L1 term, because their surface is the spec and neither changes a contract+shape. This is the §3 single-freeze ruling applied row by row, and it is what makes+「zero contract edits after L1 merges」 checkable rather than aspirational: any later+lane's PR that touches a file under `model-hub-contracts/` contradicts a cell in this+table and escalates for a targeted v4 instead.++The last column takes exactly two values, and round 11's mechanical check reads it that+way: `no` means the criterion never turned on an owner decision, and a **settled** cell+names the ruling that closed one it did. The check — an AC whose criterion mentions an+owner decision must not read `no` — therefore still bites after a ruling lands, because+「settled」 is not 「no」. Nine criteria carry a settled cell (AC-1, AC-2, AC-3,+AC-4, AC-6, AC-9, AC-11, AC-13, AC-17); the other twelve never depended on a call+(corrected 07-29, review round 15 — the inventory read 「six」 and 「fifteen」, which+misfiled AC-1, AC-3 and AC-4 as criteria that never turned on a decision, in the very+paragraph that describes the mechanical check). Several of the nine were settled by an+orchestrator ruling rather than an owner one — AC-6's downgrade and AC-13's guard scoping+among them; every such cell is recorded as owner-vetoable and named as such in its+criterion, which is why they read 「settled」 and not `no`.++**No AC waits on an owner call any more** (07-29, rulings 10:44 and 10:54). Round 11+recorded three that did: AC-2 outright, plus the half of AC-13 and of AC-9 that each+one's own criterion said a decision governs. AC-2 is settled — confirm before the+irreversible login — and AC-13's re-auth confirmation is that same shape rather than a+second answer to the question. AC-9's half is settled **by removal**: the zero-scope+fallback only mattered because something was being delivered, and delivery is cut. All+twenty-one criteria are implementable as written. Five groups must still be ownedtogether, because each is one question on more than one surface and independent answerswill disagree:- **AC-1 + AC-4** — both touch `turn-provenance.schema.json`; 「which terminal statesexist」 is the same question twice.- **AC-1 + AC-7** — what a Hub-shaped contract says about a backend that is not on Hub.-- **AC-6 + AC-9 + AC-11** — all three are the action-required delivery rule: which- backends are affected, which Agents inside them are, and who receives an event no- backend emitted. AC-6 narrows the first hop, AC-9 the second, AC-11 fixes the case- where the emitter is `system`.-- **AC-2 + AC-13** — one repair path. AC-13's 「resumable confirmation for re-auth- completion」 is exactly where AC-2's 「pre-login confirmation that can still abort」- would live, and AC-2's owner decision picks between them.+- **AC-6 + AC-9 + AC-11** — all three are the **event record**: how many records a+ source failure writes, which Agents a supply gap names, and what shape an event+ carries when the emitter is `system`. Until the 10:54 ruling they were the delivery+ rule, and recording was the half that survived it — the half the feed, the status+ pills and the confirm dialogs actually read. AC-6 fixes the record at **one,+ unattributed** and moves per-backend impact to live derivation, AC-9 defines the+ Agent set the guards carry, AC-11 fixes the `system` emitter. They must be owned+ together because AC-11's 「affects something」 and AC-9's 「names an Agent」 both read+ their grain off AC-6's answer.+- **AC-2 + AC-13** — one repair path. AC-13's confirmation of a refused `force` is+ where AC-2's pre-login irreversibility warning lives; the owner's ruling made them+ one shape, so building them apart re-splits a decision that is closed.+- **AC-19 + AC-20** — both narrow `agent-supply.schema.json` on the same payload, and+ both were missed instances of round 3's sweeps; landing one without the other leaves+ a half-swept file that reads as fully swept.**AC-5 + AC-8** are also the same guard from two sides — the namespace of the protected-set and its membership — so whoever fixes one should re-read the other's test.+set and its membership — so whoever fixes one should re-read the other's test. **AC-14+to AC-17** are not implementation work: lane L0 applied them to the blocks they repair,+and they are listed so the repairs are traceable to the findings that caused them.++### v3 handoff notes — delivery language the push cut stranded in frozen files++Lane L0 could not fix these: editing a frozen file **is** the version event (above), so+a docs-only spec-sync PR that touched them would have published `contract_version: 3`+by accident. They are listed here for **L1** to sweep inside its coordinated bump. None+of them changes a shape — each is description or prose text asserting a delivery layer+that no longer exists, and the fix is to restate it as feed/UI semantics (spec §4.5).++| File | Where | What it still asserts |+| --- | --- | --- |+| `resolution-event.schema.json` | `severity` description | 「proactive IM push」, 「the push layer MUST key off this field」, 「recipients are resolved AT DELIVERY」 |+| `resolution-event.schema.json` | `agent` description | `system` 「expands to no Agent and therefore to no recipient」 (also AC-11's surface), and the same §4.5 heading reference as `turn-provenance` |+| `agent-supply.schema.json` | `supply_status` / `model_supply` descriptions | 「feed only, NEVER an IM push」 and 「`severity: action_required`, proactive push」 |+| `agent-chain.schema.json` | `supply_state` descriptions | a 「suppressed action-required push」 as the reason a value exists |+| `source.schema.json` | `state` description | a source 「owed an `action_required` push」 |+| `turn-provenance.schema.json` | `model_supply_state` description | points at §4.5 「Who receives an action-required push」, a heading that no longer exists |+| `README.md` | mirror-registry prose | the blast radius of a vocabulary described in push terms |+| `README.md` | the round-7 note (`:178`, `:228`) | 「§4.5's recipient rule now expands in two hops, backend → enabled Agents → scopes」 and 「expands to no Agent and therefore to no recipient」 — the two-hop recipient resolution the 10:54 cut superseded |+| `api.md` | events feed row (`:43`) | 「the IM push layer keys off `severity == "action_required"`」, 「recipients are resolved at push time … against the live routing table」 |+| `api.md` | mechanical-guard table (`:755`) | 「a push whose 「去处理」 lands on a row that renders nothing」 |+| `api.md` | `POST /sources/<id>/test` recover rule (`:559`) | 「severity promotion can push it to the user as news」 — the stated *reason* the unconditional `recover` emit is wrong, so L1 must restate the reason (a 「已恢复」 line in a feed with nothing to recover from) rather than delete the sentence and lose the rule |+| `api.md` | `supply_interrupted` worked payload (`:685-693`) | 「always ELIGIBLE for a proactive push and never feed-only」, `agent: "codex"` as 「the addressing input」, 「the push layer resolves it to the scopes whose routing currently selects a Codex Vibe Agent」, and 「resolving at delivery rather than at emit」 as the kind's rationale |++**The table above is a seed list, not a census — corrected twice, and that is the point+(07-29, review rounds 5 and 6).** Round 4 said 「8 sites」, round 5 raised it to 「12 sites,+six of them dangling cross-references」, and round 6 found both the count and one+attribution still wrong: the dangling 「Who receives an action-required push」 reference+this table placed on `turn-provenance.schema.json`'s `model_supply_state` is actually in+its **`agent` description (`:22`)**, and at least six further delivery-semantics passages+sit outside the twelve — `resolution-event.schema.json` `:49`, `:83`, `:94` and+`README.md` `:98`, `:109`, `:145-146`.++A hand-counted list of a moving target has now generated a finding in three consecutive+rounds, so **L1 must not treat this table as the sweep.** The sweep is mechanical and its+result, not this table, is the completion condition of the v3 bump. Run both from+`docs/plans/model-hub-contracts/`:++```+grep -rn 'Who receives an action-required push' .+grep -rniE 'push|IM 推送|notif|alert|interrupt the user|proactive' .+grep -rnE 'IM surfaces?|IM 平台|conversation surface' .+```++The first must return **zero** hits when v3 is frozen — the heading no longer exists. The+**third was added in review round 7**, because the second misses a whole class: it greps+`IM 推送`, not bare `IM`, so `README.md:258` — which still lists `turn-provenance.schema.json`+as consumed by 「IM surfaces (per-turn detail)」 — survives it untouched, and would have+frozen into v3 a consumer promise the Web-only ruling (AC-1, above) means no lane in this+batch owes. That is a **surface-ownership** promise rather than delivery semantics, which+is why the delivery-semantics pattern never saw it. Its two current hits are both seeds:+that README row, and `turn-provenance.schema.json:5`'s 「the conversation surface reveals on+demand」. **Both are now outright wrong rather than merely loose** (owner ruling 07-29 14:03):+provenance has no chat surface at all, so v3 must delete the consumer promise and the+rendering phrasing rather than narrow either to Web. The second grep returns a superset+that still needs judgement: `interrupted`/`supply_interrupted`+are state names the design keeps, and 「never pushes」 phrasing may legitimately survive as+a statement of the cut. What must not survive is any passage a later lane could read as+licence to build proactive delivery, or any pointer into a deleted heading. The rows above+are the seeds — the ones already read and characterised — and they save L1 the reading,+not the sweeping.++**L1's v3 mandate includes purging ALL delivery-semantics text the sweep returns**, not+just the rows that also change a shape. The distinction matters because these files are+the normative contract: a frozen description that still says 「always ELIGIBLE for a+proactive push」 will be read by L2/L3 as licence to build the push the owner cut, and a+dangling §4.5 reference sends the reader to a heading that no longer exists — a+transcription defect either way. None of them changes a *shape*; the fix is to restate+each as feed/UI semantics (spec §4.5), inside the same coordinated bump.++One entry changes meaning rather than just wording, per AC-6's downgrade — and with it+the **root the expansion starts from** (07-29, review round 2). The+`resolution-event.agent` description's 「consumers MUST expand: backend → Vibe Agents →+scopes」 was a *recipient* rule anchored at the event's own backend. Leaving live+derivation anchored there would rebuild the exact one-backend defect AC-6 exists to+remove: an event carrying `agent: "claude"` because Claude's turn discovered the failure+can never reach Codex, however many Codex chains the source sits in. L1 restates the+rule so that for a **source-scoped** kind the derivation starts from **`from_source`** —+a backend is affected when that source is **blocking now** and appears in the capability+chain of one of its protected models, both evaluated against current state rather than+against the event (§4.5, and AC-6's acceptance) — while `agent` stays what it says it+is, the discovering context. The+`backend → Vibe Agents → scopes` hop keeps its original root only for **backend-scoped**+`supply_interrupted`, where the backend genuinely is the event's subject rather than a+consequence of it. No field is added to that schema (AC-6).### AC-1 — Define provenance for Direct-mode turns@@ -297,7 +784,15 @@ Review round 8, P1, on `docs/plans/model-hub-contracts/turn-provenance.schema.js**Spec action at round 8.** `model-hub.md` §4.5 「Turn provenance」 now states that the frozen interface covers Hub-mode turns and names this as AC-1; the schema is unchanged.-**Acceptance.** A successful Direct-mode turn is inspectable without any `Source` row existing: either the response validates against a documented no-source representation, or `GET …/provenance` answers a documented 「此回合无中枢记录」 error and the per-turn affordance renders that state. A test asserts a post-feature Direct turn never yields a payload that fails `turn-provenance.schema.json`, and never yields a fabricated `src_*` id.+**Acceptance.** A successful Direct-mode turn is inspectable **through the contracted route** without any `Source` row existing: either the response validates against a documented no-source representation, or `GET …/provenance` answers a documented 「此回合无中枢记录」 error. **The tests assert route behavior, not UI** (owner ruling 07-29 14:03 — see below). A test asserts a post-feature Direct turn never yields a payload that fails `turn-provenance.schema.json`, and never yields a fabricated `src_*` id. **An exactly-attributable-Hub turn with no record must not answer like a turn nobody ever saw** (07-29 17:41 ruling, closing round 16's `3672822511`): the write rule declines to write for concurrent same-scope turns and for mixed tracked/untracked use, and the only contracted absence today is `turn_not_found` — which is also the answer for an unknown `turn_id`, so the two collide on precisely the indistinguishability `model-hub.md` forbids on the Direct branch. The route answers these two **distinguishably**, and the server **derives it live** at read time — the turn is known to the session store and no provenance row exists — rather than storing a marker for a record it deliberately did not write. **Which code name carries it is part of this criterion's existing L1 v3 call**, not a second one, and the `model-hub.md` every-turn promise is scoped to exact attribution to match. A test asserts an ambiguous Hub turn is not answered with `turn_not_found`. **Attempt-to-turn attribution is not assumed, and where it cannot be had it is not invented:** `failed_attempts` is only meaningful if each attempt is known to belong to *this* turn, which the **process-scoped** gateway credential establishes at launch (07-29 round-7 ruling as amended 14:04, replaced 14:39, **settled 15:07** and cut back to invariants 16:20, §3) rather than at the gateway, where a per-backend token cannot tell two concurrent sessions apart. **The write rule is: record only when attribution is exact.** So this criterion carries an **anti-guess leg**, restated 15:42 as *ambiguous-leg-absent plus control-leg-present* (this sentence still carried the superseded 15:07 pair through round 12 — the §3 and AC-4 restatements landed and this one was missed): under deliberate same-cwd concurrency, a test asserts that **neither turn's provenance contains the ambiguous attempt**, and **the same fixture run sequentially** — no concurrency — **must produce the record**. **A third, named case — *mixed use* — covers the guard the write rule gained at 16:35** (§3): one FSM-tracked Web turn and one **untracked** IM/CLI turn sharing a single process scope, where the tracked turn's provenance must not contain the untracked caller's attempt. It is a distinct fixture from the concurrency case, not a variant of it — there the FSM sees two turns and declines; here it sees exactly one and would attribute confidently, which is why 「exactly one tracked turn」 alone is not a safe test to write against. An implementation that picks one of the two live turns fails the first leg; one that quietly discards everything fails the control; one that reads only the FSM's count fails mixed use. Both legs are needed for the same reason as before — guessed attribution is worse than no record, but a silent drop is not the same thing as an honest absence — while asserting **nothing about the event log**, which the 15:42 ruling deleted from this pairing: events trace transitions, healthy attempts are silent by design, and an unattributable attempt legitimately leaves no trace. The turn linkage is filled server-side at record time and **no request-path contract field carries it**; `turn_id` stays **required**, and L1's v3 owes **no attribution-grain term** — it was retracted at 15:07 (§3), because every written record is turn-exact by construction.++**Which surface — none. Owner ruling 07-29 14:03, superseding the round-6 orchestrator ruling.** The round-6 ruling scoped 「the per-turn affordance」 to the Web conversation surface's turn detail, owned by L5, with IM deferred to v2.1. **The owner has now cut the surface entirely, on both.** The reasoning is a product one and it moves the whole criterion: users should be **unaware of supply machinery**, so provenance inspection is a **debug affordance, not a user feature**, and a per-turn detail hanging off the transcript is exactly the machinery leaking into the surface it should stay behind.++So **AC-1 reduces to record + API truth**: the record is written, the contracted route answers, and Direct mode is represented **honestly at the contract level** — 「no hub record」 becomes an explicit API-level semantic instead of a rendered conversation state. Every conversation-rendering assertion is deleted from this criterion, and **no UI lane owes anything for AC-1**. What survives untouched is everything that is not inspection: the record, the route, the in-turn **error** copy (error UX, the surfacing mechanism the owner endorsed), and L1's v3 contract terms — a debug record still has to be **true** data, which is also why the session-scoped correlation ruling below stands.++**The record's coverage in v2 is bounded, and the criterion says so** (07-29 15:42 ruling): provenance is written only for turns the turn FSM tracks, because the write rule needs FSM truth to be exact, and **no FSM truth → no record**. IM and CLI turns therefore write **no** provenance in v2. Their failures and switches are still traced, because the source-grained resolution-event feed covers every channel, which is what makes the gap debug-marginal rather than a hole in the story. So AC-1's fixture (like AC-4's) drives a turn on an **FSM-tracked dispatch path** — L3's design note enumerates them, and the avibe/Web path is the one in v2 — and it carries **one consistency assertion**: the same fixture driven through a non-FSM path writes **nothing** — not a partial record, not a record with a synthesized `turn_id`. **v2.1 candidate**: extend FSM registration to the IM/CLI dispatch paths; provenance follows for free, since the write rule is path-agnostic and needs no restatement when coverage widens.++If provenance ever gets a surface, it is the **请求日志 / 诊断 page** in the Models page's 高级 area, and that page is a **v2.1 candidate owed by no lane in this batch** (cut list, §3). The 高级 row ships as designed either way.### AC-2 — Reconcile irreversible native re-auth before returning failure@@ -309,7 +804,11 @@ Review round 8, P1, on `docs/plans/model-hub-contracts/api.md`, [thread](https:/**Spec action at round 8.** `api.md` invariant 5 now scopes invariant 3's guarantee on this channel to its weak sense and forbids presenting a post-re-auth refusal as though the prior supply were intact; the remedy is deliberately not chosen there.-**Acceptance.** For a `native_cli` source, no path leaves the persisted `models`/`state` describing an account the CLI no longer holds. Whichever remedy the owner picks, a test drives a re-auth whose post-login discovery fails and asserts the observable end state matches the chosen semantics — a pre-login confirmation that can still abort, or a committed swap whose response reports the resulting gaps. Silent divergence between row and store fails the test.+**Owner ruling (2026-07-29 10:44) — confirm before the irreversible act.** Of the two remedies, the owner picked the first: native re-auth shows an explicit irreversibility warning **before** the login starts — it replaces the current login immediately, there is no rollback, and a failed new login means re-authenticating the original account — and the flow can still be aborted at that point. Failure states then render honestly: the old login is gone, and a retry entry is offered rather than a screen implying the previous account is still there. **Hub-channel `api_key` replacement is unaffected** and stays transactional, carrying **no irreversibility warning**, because it is reversible. The exemption is from *that* confirmation only (07-29, review round 2): an elective replacement that would narrow supply still meets the `source_last_supplier` refusal and its explicit `force` override (AC-13). That one is the **conditional supply-gap** confirmation, and it is computable on this channel precisely because discovery precedes commit — the property native re-auth lacks. Reading 「no confirmation step」 as blanket is how L2/L5 would drop the force dialog. AC-13's `force` confirmation reuses this shape rather than inventing a second one.++**Acceptance.** For a `native_cli` source, no path leaves the persisted `models`/`state` describing an account the CLI no longer holds. A test drives a re-auth whose post-login discovery fails and asserts the ruled semantics: the irreversibility confirmation was presented before the login and could abort it, and after the failure the response reports the resulting gaps instead of presenting the prior supply as intact. The confirmation is **unconditional** — it does not consult a supply guard, which pre-login is uncomputable (AC-13). A second test asserts the Hub-channel `api_key` path shows no such **irreversibility** confirmation, and a third holds the guard that path does keep: an elective replacement of a healthy key that would narrow supply is still refused with `source_last_supplier` until `force` (AC-13). Skipping the unconditional warning is not skipping the conditional supply-gap confirmation. Silent divergence between row and store fails all three.++**The confirmation has to be enforced server-side, and v3 owes the term (07-29, review round 7).** As contracted today, `POST /api/models/sources/<id>/reauth` takes no request body (`api.md:31`), so the acknowledgement exists only in the UI: a direct API caller, a scripted client, or a UI regression that drops the dialog starts the irreversible login unacknowledged — and every test above still passes, because they all drive the UI path. The requirement, not the mechanism, is that the route cannot begin an irreversible login it cannot prove was acknowledged. **L1's v3 authors how** (a validated acknowledgement field on the request, or a prepare/confirm transition — L0 does not choose), and a **negative route test** that calls the endpoint without the acknowledgement and asserts the login never started joins AC-2's evidence, owed by L2.### AC-3 — Allow blocked sources to be re-tested after user action@@ -321,7 +820,7 @@ Review round 8, P1, on `docs/plans/model-hub.md`, [thread](https://github.com/av**Spec action at round 8.** `model-hub.md` §4.5 retracts the claim that a topped-up balance is 「re-checked on the next probe or turn」 and states why both paths exclude the source; the recovery route is deliberately not frozen.-**Acceptance.** A source that is the ONLY supplier of a model, sitting in `balance_exhausted`, returns to service after the user tops up and takes the documented action — without deleting and re-adding the source, and without a credential change. Scenario `model_hub_blocked_source_recovery` (new) covers exactly that sequence and fails on the round-8 behaviour, where the state can never clear.+**Acceptance.** A source that is the ONLY supplier of a model, sitting in `balance_exhausted`, returns to service after the user tops up and takes the documented action — without deleting and re-adding the source, and without a credential change. Scenario `model_hub_blocked_source_recovery` (new) covers exactly that sequence and fails on the round-8 behaviour, where the state can never clear. **The scenario drives the Models-page action, not the route** (07-29 ruling): calling the recovery endpoint directly would pass while the button that reaches it does not exist, which is the exact gap this criterion was reopened to close — 「the user tops up and takes the documented action」 is only true if the action is reachable from the page. **The action reaches the existing route, and a second one is not added** (07-29 17:09 ruling, which replaced round 8's 「the recovery route is deliberately not frozen」 with a decision): `api.md:33` already contracts `POST /api/models/sources/<id>/test` as re-discovery, `ModelHubService.test_source` already re-discovers that one source and clears its state to `standby`, and **AC-11's acceptance already names that endpoint as THE non-turn re-discovery path** — so a second recovery route beside it is the duplicated-mechanism class this batch deletes on sight, and it would let the Models-page action be wired to a path AC-11 does not test. What L1's v3 owes is therefore the **blocked-source semantics on that route**, not a new term: the page affordance and AC-11's path are the same endpoint by construction and cannot diverge. One fewer v3 term.### AC-4 — Represent canceled turns in provenance@@ -333,7 +832,7 @@ Review round 8, P2, on `docs/plans/model-hub-contracts/turn-provenance.schema.js**Spec action at round 8.** `model-hub.md` §4.5 names this as AC-4 alongside AC-1; `turn-provenance.schema.json` keeps its four outcomes at round 8.-**Acceptance.** A turn settled by Stop/cancel produces a provenance record that is not `served`, not `exhausted`, not `failed_terminal` and not `no_candidate` — i.e. the vocabulary grew — and an attempt that was in flight when the cancel landed is recorded without inventing a failure reason for it. Cancelling mid-stream must not produce a record that claims a source failed.+**Acceptance.** A turn settled by Stop/cancel produces a provenance record that is not `served`, not `exhausted`, not `failed_terminal` and not `no_candidate` — i.e. the vocabulary grew — and an attempt that was in flight when the cancel landed is recorded without inventing a failure reason for it. Cancelling mid-stream must not produce a record that claims a source failed. **The classification comes from the turn FSM's terminal state** (07-29 ruling, §3): a test drives a real Stop through `SessionTurnManager` and asserts the canceled outcome, and a second drives a dropped connection on an otherwise identical turn and asserts it is *not* recorded as canceled. Both legs are required, because an implementation that infers cancellation from the transport passes the first and fails the second — and it is the second that decides whether this record can be trusted. **Both legs presuppose that the in-flight attempt can be tied to the turn at all** — which is what the **process-scoped** gateway credential plus the FSM's active-turn lookup delivers (07-29 round-7 ruling as amended 14:04, replaced 14:39, and **settled 15:07**, §3). Without it, a concurrent same-backend turn's attempt can be recorded against the canceled turn and the second leg passes for the wrong reason — so **both legs run on the unambiguous fixture**, one active turn for that scope, where the attribution is exact. A **third leg** covers the case that fixture excludes, restated 07-29 15:42 so that it asserts only against what the frozen contracts already carry — **ambiguous-leg-absent plus control-leg-present**: two turns deliberately concurrent in the same cwd, one canceled, and **neither turn's provenance contains the interrupted attempt**; then **the same fixture run sequentially**, without concurrency, **must** produce the provenance record. It fails an implementation that resolves the ambiguity by picking — which would let a cancellation record blame an attempt that belonged to the turn still running — and equally one that drops silently, since the control leg would come up empty. The 15:07 wording's second half (「the resolution-event log does contain its source-level outcome」) is deleted: events trace transitions, healthy attempts are silent by design, and an unattributable attempt legitimately leaves no trace — the control leg carries the anti-dropping burden without contracting a new kind or reason. The earlier 14:39 wording (「recorded at the coarse grain, marked as such」) is superseded: `turn-provenance.schema.json` requires `turn_id`, so no such record could be written. The classification itself is unchanged: still FSM terminal state, never transport.### AC-5 — Protect the menu-side model in deletion guards@@ -345,7 +844,7 @@ Review round 8, P1, on `docs/plans/model-hub.md`, [thread](https://github.com/av**Spec action at round 8.** FIXED IN SPEC at round 8: `model-hub.md` now protects the menu-side `builtin_id` of every mapping row, matching `api.md`'s single definition of the guard. No implementation debt — this criterion exists so the fix cannot regress.-**Acceptance.** With a single mapping `claude-opus-4-6 → glm-5.2` and one source supplying the target, DELETE of that source is refused without `force`, and the confirm copy names the Agent that would break. A guard that compares resolved ids against menu identifiers matches nothing and must fail this test.+**Acceptance** (repaired 07-29, review round 12 — see AC-16; fixture pinned 07-29, review round 5). With a single mapping `claude-opus-4-6 → glm-5.2`, one source supplying the target, and **no Agent selecting either model — explicitly or by inheritance**, DELETE of that source is refused without `force`, and the refusal names the affected pair with `SupplyGap.agents: []`. 「Or by inheritance」 is what the fixture must pin, not merely state: ruling #4 counts an Agent that runs a model through `agents.<backend>.default_model` as using it, so a fixture that only says 「no Agent selects either model」 while leaving the backend default at `claude-opus-4-6` puts every enabled Claude Agent in `SupplyGap.agents` and makes the expected empty list wrong. **The fixture therefore sets `agents.claude.default_model` to a third model that is outside the pair and not supplied by the source under test** — so the inheriting Agents run something this DELETE does not touch, and they stay out of the gap for the right reason rather than by accident. Pinning the default is the repair that preserves the fixture's intent; adding an Agent to the expected list would not, because the whole point is to isolate the mapping-namespace term. The empty list is the point: assigning an Agent here would protect the model through the Agent-selection term instead, and the test would stop isolating the mapping-namespace defect — it is also the exact case AC-9's recorded text depends on. Agent-facing confirmation copy is tested in its own fixture, where an Agent does select the model. A guard that compares resolved ids against menu identifiers matches nothing and must fail this test.### AC-6 — Resolve source events for every affected backend@@ -355,9 +854,27 @@ Review round 8, P1, on `docs/plans/model-hub.md`, [thread](https://github.com/av>> When a hub API-key source appears in multiple backends' `sources.order`, a failure discovered on Claude changes the source-global health for Codex as well. Expanding only the event's single backend therefore omits Codex-routed scopes from the required push, contradicting the preceding rule that source-scoped events affect every Agent whose order contains the source. Resolve source-scoped events from `from_source` across all backend orders (or emit one event per affected backend), while retaining backend-only expansion for `supply_interrupted`.-**Spec action at round 8, narrowed at round 9.** FIXED IN SPEC: `model-hub.md` §4.5 defines the affected backends as a SET — for source-scoped kinds, every backend the failed source actually supplies; for `supply_interrupted`, the named backend. Round 8 wrote 「actually supplies」 as `sources.order` membership, and round 9 corrected it to the (backend, model) chain grain the supply guard already uses, because a `follow` order holds every eligible source: an API-key source that no chain on that backend can run would otherwise interrupt its scopes. No implementation debt; guards the fix.+**Spec action at round 8, narrowed at round 9, reduced at 10:54, DOWNGRADED 07-29 (orchestrator ruling — owner-vetoable).** The finding's remedy — expand the record across every affected backend — was built for a push that no longer exists, and carrying it into the record layer created a criterion no conforming record could satisfy: `resolution-event.schema.json` has no field for a backend SET (`agent` is a single enum), so closing it would have required a frozen-schema edit and moved this criterion into the v3 set. **The ruling is that the record layer stays single-grained.** A source-scoped event is recorded ONCE, unattributed: `agent` keeps its current semantics — the discovering context, or `system` — and the record makes no claim about which backends are affected. Per-backend impact is **derived live by the consumers** from current per-agent orders, using the (backend, model) chain test the supply guard already computes: the feed renders source events as unattributed lines, and the agent status pills evaluate the question at render time. Derivation is not a downgrade of the round-8/9 reasoning but its correct home — a set frozen into the record goes stale the first time a user reorders a backend, while the derived answer cannot. **No schema change, and this criterion stays on v2.**++**Acceptance** (rewritten 07-29 to the downgrade; the round-8 and round-9 wording it replaces is the delivery-era text). One hub API-key source that sits in both Claude's and Codex's `sources.order` **and supplies a protected model on each** fails once, and **exactly one source-state failure record is written** — no per-backend fan-out, no backend list on the record, `agent` naming only the discovering context. The count is over the failure record, not over the event stream (07-29, review round 2): when a fallback covers the failure, `resolution-event.schema.json:104` requires the pair 「one `switch`, info + one `needs_action`, action_required」, each true about its own subject, so the companion `switch` is conforming traffic that does not count toward this assertion — a test written as 「exactly one event total」 would reject the contract's own behaviour and pressure the implementation into suppressing the feed's switch line. Both backends' status surfaces nevertheless report the failure — **computed from the source's CURRENT blocking state against each backend's current order and chains, never from the retained record** (corrected 07-29, review round 8: the earlier 「computed from that single record against their current orders」 wording put the normative sentence in direct conflict with the derivation-input paragraph below, and an implementer following this line alone could pass the failure leg while leaving both backends stuck at 需处理 until the record aged out) — and the negative case still holds through the derivation rather than through the record: the same source in Codex's order but in no Codex chain (a GLM-only key while Codex runs `gpt-5.6`) leaves Codex's surface unaffected. An implementation that emits one `needs_action` per affected backend fails the count assertion; one that renders only the discovering backend fails the derivation assertion.-**Acceptance.** One hub API-key source that sits in both Claude's and Codex's `sources.order` **and supplies a protected model on each** fails once: every scope routed to an Agent on EITHER backend receives exactly one push. A one-hop implementation notifies only the discovering backend's scopes and must fail this test. The round-9 half is the negative case — the same source in Codex's order but in no Codex chain (a GLM-only key while Codex runs `gpt-5.6`) must produce NO push to Codex-routed scopes, which a raw-order implementation fails.+**The derivation input is live state, never the retained record (07-29, review round 6).**+The paragraph above says the surfaces are 「computed from that single record against their+current orders」, which read literally licenses exactly the sticky status §4.5 forbids: a+source that recovers on its own — a cooldown lapsing, a quota window resetting — would+stay marked 需处理 on both surfaces until the record aged out, because the record is what+was queried. It is the wrong input. A record answers 「what happened」 and belongs to the+最近切换 feed; a status answers 「what is true now」 and reads the source's **current**+blocking state against each backend's **current** order and chains (spec §4.5, and+`model-hub.md`'s 「source and agent status read live state, not events」). The record is+what makes the failure *visible in the feed*; it is not what makes the status *true*.++So the acceptance has a recovery leg, and it is not optional: after the same source+returns to a non-blocking state, **both** backends' status surfaces clear on the next read+with **no new event required to unstick them**, while the original failure record stays in+the feed unchanged. An implementation that derives status by querying the event log passes+the failure half and fails this one — which is the whole reason the leg exists, because+the failure half alone cannot tell the two designs apart.### AC-7 — Represent chain and probe for Direct-mode backends@@ -381,7 +898,7 @@ Review round 10, P2, on `docs/plans/model-hub-contracts/api.md`, [thread](https:**Spec action at round 10.** RECORDED, not fixed. The premise checks out on all three sides: `agent-supply.schema.json` requires `enabled` on every mapping row and its frozen example carries `enabled: false`; `resolver.py` applies a row only when `item.enabled`; and term 2 of the protected set says 「every model that owns a mapping row」 with no filter. **The direction is not open, though** — the same paragraph already rejects over-protection in its own words: treating models nobody selected as protected 「trains the user to pass `force=true` reflexively and hollows out the whole guard」. A disabled row is exactly that case, so this is the guard's own principle applied to the term it was written next to.-**Acceptance.** One backend, one mapping row `claude-opus-4-6 → glm-5.2` with `enabled: false`, `claude-opus-4-6` selected by no Agent and not the backend default, and one source supplying `glm-5.2`. DELETE of that source succeeds **without** `force`, and an elective `PUT …/credential` onto a narrower key is not refused. Flipping the row to `enabled: true` must make both refuse with `source_last_supplier` — the same test run twice, which fails an implementation that reads mapping rows without their flag and equally fails one that drops mapping protection altogether.+**Acceptance** (repaired 07-29, review round 12 — see AC-14). Four **independent** fixtures, one per (route × `enabled`) combination, each built from the same shape: one backend, one mapping row `claude-opus-4-6 → glm-5.2`, `claude-opus-4-6` selected by no Agent and not the backend default, and one source supplying `glm-5.2`. With `enabled: false`: DELETE of that source succeeds without `force` (fixture 1), and an elective `PUT …/credential` onto a narrower key is not refused (fixture 2). With `enabled: true`: both refuse with `source_last_supplier` (fixtures 3 and 4). The fixtures cannot be phases of one run — the successful DELETE consumes the source the credential assertion needs, and running the narrowing PUT first mutates the capabilities the DELETE assertion is meant to inspect, so each assertion must start from the intended initial state. Together they fail an implementation that reads mapping rows without their flag and equally fail one that drops mapping protection altogether.### AC-9 — Fan out source events only through Agents that use the affected model@@ -391,9 +908,37 @@ Review round 10, P2, on `docs/plans/model-hub.md`, [thread](https://github.com/a>> When a source appears only in the chain of an unassigned `menu.checked` entry, an unused mapping, or an unused backend default, this rule marks the backend affected; the preceding two-hop rule then notifies every scope routed to every enabled Agent on that backend. That recreates the irrelevant action-required pushes this round is intended to eliminate, because the protected-model union deliberately includes models with `SupplyGap.agents: []`. Resolve affected named Agents from their effective models and fan out only through those Agents, leaving menu-only failures in the feed/settings surface.-**Spec action at round 10.** RECORDED, not fixed — and it is the round-9 narrowing one level deeper, on the hop round 9 did not touch. Round 9 narrowed hop 1 (which backends are affected) from `sources.order` membership to the chain of a protected model; this narrows hop 2 (which Agents inside an affected backend) to the Agents whose effective model is the one that lost supply. The second hop is still too wide because the protected set is *deliberately* wider than the live selections — it protects a model the user ticked and assigned to nobody, which is right for refusing a delete and wrong for sending a push, which is why `SupplyGap.agents` is allowed to be empty. **This reverses nothing already ruled:** the two hops still run from every affected backend, and `SupplyGap.agents` still includes the Agents that inherit the backend default — those Agents do use the model, so they stay recipients. **It does interact with the standing open decision:** once the recipient set is narrowed this way, a menu-only failure resolves to zero scopes by construction, so whichever way the owner settles the zero-scope fallback decides whether it is announced anywhere outside the feed and the 「模型」 page. Implement the two together or they will disagree.--**Acceptance.** Two cases from independent fixtures, not two phases on one (corrected 07-29, review round 11: a failed source stays `needs_action` until the user acts and its health is source-global, so round 10's 「fail X again」 produces no second transition to observe). Case A: a backend with one enabled Agent running `gpt-5.6`, plus an OpenCode-menu model the user ticked and assigned to no Agent, supplied only by source X. X fails: the scope routed to that Agent receives **no** action-required push, while the failure still appears in the feed and on the 「模型」 page. Case B: the same fixture with that Agent pointed at the ticked model — from fresh state, or after X is explicitly repaired and recovered — and X fails: that scope receives exactly one push. An implementation that fans out over every enabled Agent on the affected backend passes B and fails A.+**Spec action at round 10, settled 07-29 10:54.** RECORDED, not fixed — and it was the round-9 narrowing one level deeper, on the hop round 9 did not touch. Round 9 narrowed hop 1 (which backends are affected) from `sources.order` membership to the chain of a protected model; this narrows hop 2 (which Agents inside an affected backend) to the Agents whose effective model is the one that lost supply. The second hop was too wide because the protected set is *deliberately* wider than the live selections — it protects a model the user ticked and assigned to nobody, which is right for refusing a delete and wrong for announcing an interruption, which is why `SupplyGap.agents` is allowed to be empty. **With push cut, the finding's delivery half is void and its grain half survives intact.** There is no recipient set to narrow; what remains is the distinction between 「a model some Agent actually runs lost supply」 and 「a ticked-but-unassigned menu model lost supply」, which the feed, the row's status pill and the agent-facing 需处理 state must still tell apart — a menu-only failure must not render an Agent as interrupted. Ruling #4 stands unchanged: `SupplyGap.agents` includes the Agents inheriting `agents.<backend>.default_model`, because they do use the model; it is guard and confirm payload — the *rule* for resolving 「谁受影响」, which the UI applies to answer the same question from `agent-supply`, not a payload the UI receives on a source failure. The standing open decision this block used to defer to (zero-scope fallback) no longer exists.++**Acceptance** (delivery half deleted 07-29 10:54; fixture repaired per AC-15). Two cases from independent fixtures, not two phases on one (corrected 07-29, review round 11: a failed source stays `needs_action` until the user acts and its health is source-global, so round 10's 「fail X again」 produces no second transition to observe). The backend is **OpenCode with prefixed selections**, because a fixed-menu backend cannot own an OpenCode menu and a bare `gpt-5.6` is not a legal OpenCode selection under `api.md`'s identifier rules. **The assertions are on the live projection, not on the record** (07-29, review round 3): `SupplyGap` is contracted as a **mutation-refusal** payload (`api.md`, the DELETE/PUT guard responses), and `resolution-event.schema.json` carries no gap field, so 「the recorded gap names Agent Y」 asserts a shape no source-failure record has — the same record-vs-derivation confusion AC-6 was downgraded to remove. What a source failure produces is one unattributed record; who it is *about* is read from `agent-supply`'s per-Agent `supply_status` and the 「模型」 page's attribution. Case A: one enabled Agent running `openai/gpt-5.6`, plus a menu model `zhipuai/glm-5.2` the user ticked and assigned to no Agent, supplied only by source X. X fails: that Agent's `supply_status` stays `ok`, the 「模型」 page attributes the failure to the **menu model and no Agent**, and the failure still appears in the 最近切换 feed. Case B: the same fixture with that Agent pointed at `zhipuai/glm-5.2` — from fresh state, or after X is explicitly repaired and recovered — and X fails: that Agent's `supply_status` becomes `interrupted` and the page names exactly that Agent. `SupplyGap.agents` is asserted where it is actually returned — **AC-5's DELETE refusal**, which is the contracted home of the empty-list case and already carries that assertion. An implementation that resolves affected Agents over every enabled Agent on the affected backend passes B and fails A.++**Remedy surface, added 07-29 review round 5 — L1's coordinated v3.** Round 3 retargeted+these assertions onto a per-Agent projection that **no contracted read payload serves**, so+the acceptance above cannot be executed as written: `GET /api/models/agents` returns one+`AgentSupply` per *backend*, whose `selected_by_agent` and `supply_status` are singular,+and `SupplyGap.agents` — the only per-Agent shape in the contract — is returned solely by+mutation refusals. The retarget was still correct in direction (the record layer genuinely+has no gap field, per AC-6's downgrade); it just landed on a projection that has to exist+first. **Shape intent for L1: `api.md` gains a minimal per-Agent read projection on the+existing `GET /api/models/agents` response — a list of the **enabled** named Agents on+that backend, each with the model it effectively runs and its own `supply_status`** —+scoped to enabled Agents (added 07-29, review round 9) because a disabled Agent cannot+take a turn, so it has no live capability to report, and `api.md`'s protected set+already excludes disabled Agents on exactly that ground; a disabled Agent whose model is+ALSO the backend default stays protected there through the default term, and is still+absent from this projection. Computed from the+same effective-model rule ruling #4 already fixed. **It cannot reuse the `SupplyGap.agents`+entry shape, and round 5 was wrong to say so (corrected 07-29, review round 7):**+`SupplyGap` is `{backend, model_id, agents: string[]}` (`api.md:301`), so an entry there is+a bare Agent name and carries neither an effective model nor a `supply_status`. The+projection needs its own object with all three fields; **L1 authors and versions that+object in v3** — L0 records the requirement and the three fields it must carry, not the+schema. Reusing the name `agents` for a differently-shaped list would be worse than+inventing one, so L1 should also pick a name that cannot be mistaken for `SupplyGap.agents` (explicit selection, or+inheritance of `agents.<backend>.default_model`). That is the projection Case A and Case B+above read, and the one the 「模型」 page needs to attribute a failure to an Agent rather+than to a backend. L0 records the requirement and does not edit `api.md`; until v3 lands,+read this AC's two cases as specifying the intended behavior.### AC-10 — Constrain `ProbeResult.source_id` to the canonical `src_*` format@@ -415,9 +960,24 @@ Review round 10, P1, on `docs/plans/model-hub-contracts/resolution-event.schema.>> When an action-required source event is produced by a Web UI/settings mutation, its historical emitter can legitimately be `agent: "system"`, but this description says every such event expands to no Agent and therefore no recipient. That contradicts the normative delivery rule in `model-hub.md`, which says source-scoped events derive affected backends from `from_source` and that Web mutations and mid-turn failures resolve recipients identically, so following this schema text drops the required push. Reserve the zero-recipient interpretation for events with no affected source, route source-scoped `system` events from their source, and disallow `system` on backend-scoped `supply_interrupted`.-**Spec action at round 10.** RECORDED, not fixed, and this is the one round-10 finding where the two texts are flatly opposed. The schema says `system` 「expands to no Agent and therefore to no recipient」; §4.5 says 「a Web UI mutation and a mid-turn failure resolve their recipients identically」 and derives a source-scoped kind's affected backends from the failed source. A key the user revokes on the settings page is source-scoped with a `system` emitter, so the two rules disagree about whether its `needs_action` push is delivered — and the schema's reading is the one that drops it. §4.5 is the normative side: `agent` was never the addressing key (round 7 made it a backend identifier consumers must expand), and the zero-recipient sentence is right only for the case it was written for — an event with no affected source, such as a manual recovery that changed nothing about supply.--**Acceptance.** Drive it from a declared non-turn path: `POST …/sources/<id>/test` re-discovers a source that is the last supplier of a protected model and finds it dead, producing a `needs_action` event with `agent: "system"` and `from_source` set to that source (corrected 07-29, review round 11: round 10 drove it from a Web-UI revocation, which `api.md` documents as an agent-scoped `supply_interrupted` with `from_source: null` and `reason: "no_enabled_source"` — a trigger that never emits the event under test, and `system` appears nowhere in that file). Every scope routed to an Agent that uses the affected model receives exactly one action-required push — the same recipients and the same count as when the identical failure is discovered mid-turn, and that equality is the assertion. A `supply_interrupted` event carrying `agent: "system"` is rejected by the schema. An implementation that reads the current description literally delivers zero pushes for the re-discovery case and fails.+**Spec action at round 10, reduced 07-29 10:54.** RECORDED, not fixed, and this was the one round-10 finding where the two texts were flatly opposed. The schema says `system` 「expands to no Agent and therefore to no recipient」; §4.5 said 「a Web UI mutation and a mid-turn failure resolve their recipients identically」 and derives a source-scoped kind's affected backends from the failed source. §4.5 is the normative side: `agent` was never the addressing key (round 7 made it a backend identifier consumers must expand), and the zero-recipient sentence is right only for the case it was written for — an event with no affected source, such as a manual recovery that changed nothing about supply. **With push cut, 「recipient」 drops out of both texts and what is left is the event shape**: the schema's `system` sentence still tells a consumer that such an event affects nothing, which is false for a settings-page revocation and would leave that failure out of the feed and out of the 「模型」 page's 需处理 state. The two remedies the finding asks for are unchanged and are both shape rules: reserve the zero-expansion reading for events with no affected source, and disallow `system` on backend-scoped `supply_interrupted`. Note the grain this now works at, per AC-6's downgrade: 「affects something」 means the record carries a `from_source` the consumers can derive impact from — not that the record itself names backends, which it never does.++**Acceptance** (delivery half deleted 07-29 10:54; the event-shape half is the whole criterion). Drive it from a declared non-turn path: `POST …/sources/<id>/test` re-discovers a source that is the last supplier of a protected model and finds it dead, producing a `needs_action` event with `agent: "system"` and `from_source` set to that source (corrected 07-29, review round 11: round 10 drove it from a Web-UI revocation, which `api.md` documents as an agent-scoped `supply_interrupted` with `from_source: null` and `reason: "no_enabled_source"` — a trigger that never emits the event under test, and `system` appears nowhere in that file). The record this path writes is **equal in kind, `reason`, `from_source` and `severity`** to the one the identical failure writes when discovered mid-turn — record equality between the two paths is the assertion, replacing round 10's recipient equality — so the consumers derive the same state either way and the feed and the 「模型」 page agree regardless of who noticed. Equality is asserted on the record's own fields, not on a backend set, per AC-6's downgrade. A `supply_interrupted` event carrying `agent: "system"` is rejected by the schema. An implementation that reads the current description literally records the re-discovery as affecting nothing and fails.++**Remedy surface, added 07-29 review round 5 — L1's coordinated v3.** The fixture above is+unbuildable against the frozen shape, and this is the defect rather than the fixture: `POST+…/sources/<id>/test` takes **no model input** — it re-probes a source — while+`resolution-event.schema.json` lists `model_id` in `required` as a bare `{"type":+"string"}`. A source that supplies several models therefore leaves the implementation three+bad options: fabricate one model, emit one event per model (which breaks AC-6's 「recorded+ONCE, unattributed」 rule), or invent a sentinel string the consumers must special-case.+**Shape intent for L1: `model_id` becomes nullable (`["string", "null"]`) for+source-scoped events, with `null` meaning 「this event is about the source, not about one+model」** — the same distinction `from_source`/`to_source` already encode as nullable, so it+adds no new concept. The conditional that keeps model-scoped kinds non-null, and the+consumer rendering for a null model, are L1's to write with the rest of v3; L0 records the+requirement and does not edit the file. Until that lands, read this AC's fixture as+specifying the intended behavior, not a payload that validates today.### AC-12 — Reconcile a failed old-credential revocation@@ -439,12 +999,117 @@ Review round 10, P1, on `docs/plans/model-hub-contracts/api.md`, [thread](https:>> When an elective replacement of a healthy credential discovers a narrower model set, this branch requires the client to retry with `force=true`, but the declared credential request is only `{key}`, the re-auth route has no request body, and the status poll is read-only. The UI therefore has no contracted way to confirm `source_last_supplier`—especially after an OAuth flow has already completed—so implementations must either strand the repair or invent incompatible wire semantics. Add the override to the request contract and define a resumable confirmation path for re-auth completion.-**Spec action at round 10.** RECORDED, not fixed. Verified against the route table: `PUT …/sources/<id>/credential` declares `{key}`, `POST …/sources/<id>/reauth` declares no request body, and `GET …/oauth/status/<flow_id>` is a poll. The elective branch nevertheless refuses 「unless `force=true`」 using DELETE's refusal shape — a shape DELETE can carry because DELETE takes a query parameter and these two routes have nowhere to put one. The key half is a one-field addition. **The re-auth half is the hard one, and it is not a naming problem:** by the time the refusal is computed the user's login has already been replaced, so 「retry with `force=true`」 cannot mean 「send the request again」 — re-running OAuth on `native_cli` is the irreversible act AC-2 is about. It needs a confirmation that resumes the completed flow, which is why this criterion and AC-2 belong to one lane: AC-2's 「pre-login confirmation that can still abort」 and this criterion's 「resumable confirmation after the fact」 are two answers to one question, and the owner's AC-2 decision picks which one gets built.+**Spec action at round 10.** RECORDED, not fixed. Verified against the route table: `PUT …/sources/<id>/credential` declares `{key}`, `POST …/sources/<id>/reauth` declares no request body, and `GET …/oauth/status/<flow_id>` is a poll. The elective branch nevertheless refuses 「unless `force=true`」 using DELETE's refusal shape — a shape DELETE can carry because DELETE takes a query parameter and these two routes have nowhere to put one. The key half is a one-field addition. **The re-auth half is the hard one, and it is not a naming problem:** by the time the refusal is computed the user's login has already been replaced, so 「retry with `force=true`」 cannot mean 「send the request again」 — re-running OAuth on `native_cli` is the irreversible act AC-2 is about. It needs a confirmation that resumes the completed flow, which is why this criterion and AC-2 belong to one lane: AC-2's 「pre-login confirmation that can still abort」 and this criterion's 「resumable confirmation after the fact」 were two answers to one question. **The owner picked the first (2026-07-29 10:44):** re-auth confirms before the irreversible login, so this criterion's `force` confirmation reuses that shape rather than adding a resumable post-hoc one. The key half — a declared override field on `PUT …/credential` — is unaffected and still owed.++**The two halves take different confirmations** (orchestrator ruling, 07-29 — review round 1 of the L0 PR): the re-auth confirmation is **unconditional**, and the computed `would_interrupt` guard belongs **only to the `api_key`/Hub path**. The reason is that the guard is not computable on the native path: which models a narrower account can reach is knowable only *after* the login, and the login is the irreversible act. Requiring a computed guard before it would make the confirmation depend on a fact that does not exist yet — so what the owner ruled was a flat irreversibility warning, shown every time, not a supply prediction. The Hub path has the opposite shape: discovery precedes commit, so there the guard is real and the refusal is computed from it.++**Acceptance** (re-auth half settled 07-29 10:44 by AC-2's ruling; guard scope fixed 07-29 by the ruling above). An elective `PUT …/credential` onto a narrower key is refused with `source_last_supplier` + `would_interrupt`, and the identical request carrying the documented override commits and reports `interrupted_pairs` — with the override travelling through a declared request field, not a query string the contract never mentions. For re-auth, the assertion is the **unconditional** one: every `native_cli` re-auth presents AC-2's irreversibility confirmation before the login starts and can be aborted there, **regardless of what the new account will turn out to supply**, and no path reaches a completed OAuth flow that then needs a second round trip to confirm. A UI that must re-run the OAuth flow to confirm fails this test; so does one that lets the login complete and only then discovers it cannot commit; and so does one that tries to gate the confirmation on a pre-login supply computation, which cannot be performed.++### AC-14 — Split AC-8's guard mutations across fresh fixtures++Review round 12, P2, on `docs/plans/model-hub-implementation.md`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273196). Verbatim:++> **Split the guard mutations across fresh fixtures**+>+> This acceptance sequence cannot exercise both routes twice on the same fixture: in the disabled-mapping case, the successful DELETE removes the source before the credential request or enabled-mapping phase can use it, while running the narrowing credential PUT first changes the source capabilities that the DELETE phase is supposed to inspect. Use independent fixtures for each combination of route and `enabled` value so all four assertions test the intended initial state.++**Disposition.** Repairs **AC-8's acceptance block**, applied above. Four independent fixtures, one per (route × `enabled`) combination, replacing the single fixture whose successful DELETE consumes the source the credential phase needs. Same class as round 11's AC-9 repair. AC-8's criterion is unchanged, and so is the guard semantics it tests — this is a defect in how the test was specified, not in what it asserts.++**Acceptance.** Contract/integration layer, owed by **L2** with the AC-8 tests it repairs. The four assertions run from four independent fixtures and each observes the state AC-8 describes; a suite that chains them onto one fixture cannot even reach the second assertion, because the source is gone. Fails today: AC-8's block, before this repair, specified exactly that unrunnable sequence.++### AC-15 — Use a legal backend/model fixture for AC-9++Review round 12, P2, on `docs/plans/model-hub-implementation.md`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273198). Verbatim:++> **Use a valid backend/model fixture for AC-9**+>+> The fixture combines a bare `gpt-5.6` selection with an “OpenCode-menu” entry on the same backend, but `api.md`'s identifier rules require OpenCode selections to use prefixed `vendor/model` IDs, while a fixed-menu Codex backend cannot also own an OpenCode menu. Consequently Case B cannot point this Agent at the described ticked model without changing backend/menu semantics; define the fixture as OpenCode with a prefixed selection such as `openai/gpt-5.6`, or use a fixed-menu-only scenario.++**Disposition.** Repairs **AC-9's acceptance fixture**, applied above: one OpenCode backend with prefixed selections (`openai/gpt-5.6` running, `zhipuai/glm-5.2` ticked-but-unassigned). The previous fixture asked a fixed-menu backend to own an OpenCode menu, which `api.md`'s identifier rules forbid, so Case B could not be reached at all. AC-9's criterion and the round-9/round-10 narrowing rulings are unchanged. Independent of the 10:54 push cut — it repairs the fixture, which the surviving grain half still needs.++**Acceptance.** Contract/integration layer, owed by **L3** with the AC-9 tests it repairs. Every identifier in AC-9's fixture validates against `api.md`'s identifier rules for the backend that owns it, and Case B is constructible without changing backend or menu semantics mid-test. Fails today: `gpt-5.6` unprefixed on an OpenCode-menu backend is rejected by those rules, so the fixture cannot be built as written.++### AC-16 — Remove the nonexistent Agent from AC-5's assertion++Review round 12, P2, on `docs/plans/model-hub-implementation.md`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273200). Verbatim:++> **Remove the nonexistent Agent from AC-5's assertion**+>+> This setup declares only a mapping and a source, yet requires the confirmation to name an Agent that would break. Mapping rows are intentionally protected even when assigned to no Agent, and the same section later relies on such menu-only gaps having `SupplyGap.agents: []`; assigning an Agent here would instead protect the model through the Agent-selection term and stop the test from isolating the mapping-namespace defect. Assert the affected pair with an empty Agent list here, and test Agent-facing copy in a separate fixture.++**Disposition.** Repairs **AC-5's acceptance block**, applied above, and closes a contradiction between two of this section's own criteria: AC-5's fixture declares no Agent, and AC-9's recorded text depends on exactly that case (`SupplyGap.agents: []`). AC-5 now asserts the refusal plus the empty Agent list; Agent-facing confirmation copy moves to its own fixture. The round-8 spec fix AC-5 guards is unchanged.++**Acceptance.** Contract/integration layer, owed by **L2** with the AC-5 tests it repairs. The mapping-namespace fixture asserts `SupplyGap.agents: []` and never names an Agent, and a separate fixture with a real Agent selection covers the Agent-facing copy. Fails today: AC-5's block, before this repair, asserted a name its own setup never declares — the assertion could only pass by adding an Agent that would mask the defect under test.++### AC-17 — Make notification counts independent of the open recipient policy++Review round 12, P2, on `docs/plans/model-hub-implementation.md`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273202). Verbatim:++> **Make notification counts independent of the open policy**+>+> This requires every routed scope to receive a push even though `model-hub.md` lines 571-578 explicitly leave unresolved whether recipients are all routed scopes or only recently active ones. Under the latter valid owner decision, an inactive routed scope makes this acceptance test fail despite correct delivery logic; mark every asserted scope recently active, or defer the exact count until that policy is settled. The same qualification is needed for the later AC-9 and AC-11 push assertions.++**Disposition. SUPERSEDED by the 07-29 10:54 push cut — recorded, not applied.** The finding is genuine and was correctly diagnosed: three push-count assertions (AC-6, AC-9 Case B, AC-11) silently assumed one branch of the then-unsettled recipient policy. Its remedy — qualify each fixture as 「recently active」 so the count holds under either branch — is now unbuildable and unnecessary, because the dependency closed by **removal** rather than by resolution: with no proactive delivery, `model-hub.md` §4.5 no longer contains a recipient policy, open or settled, and the three assertions it qualified have had their delivery halves deleted (AC-6 → affected-backend record, AC-9 → resolved-Agent set, AC-11 → record equality). None of the three now asserts a push count, so none can depend on how recipients would have been chosen. This block is retained rather than deleted so the finding is not rediscovered as a live gap; it is the second unsettled-decision leak found in this section (round 11 fixed the owner-call cells), and the class is what L6 should keep watching for.++**Acceptance.** Documentation layer, discharged by **L0** (this PR). Mechanically checkable in two parts. First, no **Acceptance** paragraph in this section asserts **proactive conversation delivery** — that is, a message arriving in a scope or conversation that the user did not act to produce: AC-6 asserts that exactly one unattributed failure record is written and that consumers derive impact from it, AC-9 the resolved Agent set and `supply_status`, AC-11 record equality between two emission paths — three assertions about stored state and its rendering, none about delivery. The check is deliberately narrowed to *proactive* delivery (07-29, review round 5): a blanket 「no Acceptance paragraph states what a user receives」 is false on its face and always was, because AC-2 requires a confirmation to be **presented**, AC-7 constrains drawer affordances, AC-9 specifies page rendering and AC-18 feed rendering. Those are pull surfaces — the user opened the page, or ran the turn — and they are exactly what the push cut left as the only way supply problems reach anyone, so a check that forbade them would forbid the design. What the cut removed is the unrequested interruption, and that is the only thing this check may look for. Second, no **Acceptance** paragraph defers to a policy `model-hub.md` leaves open, which is trivially satisfied now that §4.5 states no recipient policy at all. Where 「push」 or 「recipient」 still appears in those blocks it is in a verbatim finding or a dated 「what this used to say」 clause, never in the sentence a test is written from. Failed at the head this finding was filed against, where all three counted pushes. **The runtime half of the cut is not here**: this check only proves §8 stopped *asserting* delivery, and §3's 「Silence needs a negative assertion」 rule assigns L6 the scenario that proves the implementation stopped *doing* it — L6 checkpoints both.-**Acceptance.** An elective `PUT …/credential` onto a narrower key is refused with `source_last_supplier` + `would_interrupt`, and the identical request carrying the documented override commits and reports `interrupted_pairs` — with the override travelling through a declared request field, not a query string the contract never mentions. For re-auth, a completed flow whose guard refuses can be confirmed and committed without a second OAuth round trip, or is refused before the login it cannot undo, per AC-2's answer. A UI that must re-run the OAuth flow to confirm fails this test, and so does one that cannot confirm at all.+### AC-18 — Constrain resolution-event source references++Review round 12, P2, on `docs/plans/model-hub-contracts/resolution-event.schema.json`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273205). Verbatim:++> **Constrain resolution-event source references**+>+> `from_source` and `to_source` identify `Source` rows and the action-required path explicitly hands `from_source` to credential/reauth routes, but these fields accept any string rather than the canonical `^src_[a-z0-9]{8,}$` format enforced by `Source`, chains, and provenance. A serializer can therefore emit an event with `from_source: "direct"` that passes the contract but cannot be correlated with a source or opened by the remediation UI. Apply the canonical pattern to both string branches and add the same referential-existence guard required for probe source IDs.++**Disposition.** New criterion, and AC-10's defect in a second file — the same canonical id left unconstrained, found by the same reasoning. `^src_[a-z0-9]{8,}$` goes on the string branch of both `from_source` and `to_source`, with `null` retained on both (legitimately null for `supply_interrupted`); referential existence goes to the API boundary as in AC-10, because it sits outside draft-07 on the boundary this PR already declared. The existing examples (`src_claudepro1`, `src_anthkey01`) already satisfy the pattern, so no example is rewritten. **The push cut does not touch this** — the event is still recorded, and the feed's one-tap re-auth is exactly the consumer that needs `from_source` to name a real row. Frozen surface: joins the `contract_version: 3` set.++**Acceptance.** Contract layer, owed by **L1's v3** (the pattern constraint on both fields), with **L3** owning the API-boundary guard and the emission — corrected 07-29, review round 6, to match the AC table and §3's single-freeze rule; the earlier 「owed by L3」 wording predated that rule and would have had L3 editing `resolution-event.schema.json` after the freeze. `{"from_source": "direct", …}` and `{"to_source": "cli-anthropic", …}` are both rejected by `resolution-event.schema.json`; `null` on either field still validates for `supply_interrupted`; every example in the file validates after the v3 bump; and **every non-null endpoint must name an existing `Source` row at emission time** — the server-side guard rejects a `switch` whose `from_source` is well-formed but unknown *and* one whose `to_source` is (07-29, review round 2: checking only the origin lets a `switch` pass with a destination the feed cannot resolve or open, which is the same defect one field over) — with the mechanical checker asserting both are declared in `api.md`'s guard table. **The guard is on emission, not on retention** (07-29, review round 3): sources are deletable, `force=true` deletes one the guard would otherwise refuse, and the events feed is bounded by count rather than by source lifetime, so a retained row can legitimately reference a source that no longer exists — re-validating retained rows would make a legal DELETE retroactively invalidate the record of what happened before it, or push the implementation into rewriting history to keep the feed valid. Neither the record nor the schema changes when a source is deleted; what changes is the **rendering**. **Where the remembered name comes from was left unstated until 07-29, review round 9** — the event carries ids, not a display-name snapshot, so 「the remembered display name」 named nothing the feed could reach. It is the **recorded human strings**: `human_zh` / `human_en` are **required on every event** (`resolution-event.schema.json:7`) and are composed at *record* time with the source display name already embedded — the file's own example, `「Claude Code:Claude Pro 本周期额度用完 → 已切到 Anthropic API Key(按量)」` (:168), names both endpoints inside the sentence. **The recorded strings ARE the snapshot; no schema field is added** (orchestrator ruling, 07-29 15:07, verified against the schema before transcription). So: **the feed renders the recorded human string verbatim**, and the 「(已删除)」 marker is **derived at render time** from the id failing to resolve against live sources, with the one-tap re-auth affordance withdrawn because there is nothing left to re-auth. The corollary binds the emission side, **scoped to the kinds that have a source subject** (corrected 07-29, review round 10): every kind whose endpoints name a source — `switch`, `channel_switch`, `recover`, `cooldown`, `needs_action`, `skip` — must name that source in its string template, and a template that does not is a defect in the template, fixed in this spec, never by adding a field. It cannot bind the two kinds that have no source subject, and read over them the round-9 wording asked the emitter to fabricate one: `supply_interrupted` pins **both** endpoints to `null` by conditional — the chain emptied, nothing switched — and `mapping_applied` is decided at §4.3 step 1 before any candidate exists, so its line names models rather than sources (「claude-opus-4-6 → glm-5.2(经映射)」, the schema's own note). Excluding them costs the snapshot nothing: neither references a source, so neither can outlive one's deletion. Acceptance covers both halves — emission of an unknown id is rejected, and a feed rendered after its referenced source is deleted still loads, still shows the line, and offers no dead action. Fails today: both fields accept any string.++### AC-19 — Close the eligibility reason-key vocabulary++Review round 12, P2, on `docs/plans/model-hub-contracts/agent-supply.schema.json`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273208). Verbatim:++> **Close the eligibility reason-key vocabulary**+>+> When `eligible` is false, this branch accepts any nonempty `reason_key`, although the contract names three distinct remedies and the UI must resolve the value through its locale files. A typo or invented value therefore validates but leaves the ineligible row without translatable copy or an actionable remedy. Constrain this branch to the declared `subscription_wrong_client`, `opencode_api_key_only`, and `consent_required` keys, extending the enum alongside locale support when a new eligibility cause is introduced.++**Disposition.** New criterion. `enum: ["models.eligibility.subscription_wrong_client", "models.eligibility.opencode_api_key_only", "models.eligibility.consent_required"]` on the ineligible branch — **fully qualified**, because that is what the frozen contract actually emits (`agent-supply.schema.json:94`, `api.md:214`); the finding's bare short names are the causes, not the wire values, and an enum written from them would reject every conforming payload. With the extension rule — a new cause ships its enum member and its locale copy in the same change — stated where the enum lives. **Missed instance of a class this PR swept in round 3** (closed vocabularies), which is why it carries the extension rule rather than just the enum: an enum with no stated extension path is the reason the sweep left instances behind. Frozen surface: joins the v3 set.++**Acceptance, split across two lanes** (corrected 07-29, review round 11 — it read as wholly owed by L1, which the 15:07 i18n ruling had already made impossible: L1 has no UI locale scope and L4 depends on L1, so L1 could not have satisfied its own v3 gate without crossing the no-touch boundary or waiting on its dependent). **The contract half is L1's**, which also carries the v3 bump: `{"eligible": false, "reason_key": "models.eligibility.subscription_wrong_clint"}` is rejected; so is the unqualified `"subscription_wrong_client"`; each of the three declared fully-qualified keys validates. **The locale half is L4's**, whose surfaces render those reasons and whose lane row already owns the keys: `ui/src/i18n/{en,zh}.json` contain a key for **every member of the frozen enum**, checked mechanically against the schema so the two cannot drift. The extension rule spans both — a new cause ships its enum member (L1's file) and its locale copy (L4's) in the same change — and the mechanical check is what makes that rule enforceable rather than advisory. Fails today: any nonempty string validates, so the typo above passes the contract and renders as a raw key.++### AC-20 — Enforce the hub-mode half of the mode invariant++Review round 12, P2, on `docs/plans/model-hub-contracts/agent-supply.schema.json`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273210). Verbatim:++> **Enforce the hub-mode half of the mode invariant**+>+> The schema pins all Hub-only projections to null in Direct mode but never enforces the converse, so a response with `mode: "hub"` and present-but-null `selected_model_id`, `sources`, `supply_status`, and `model_supply` still validates even after the API-boundary presence checks land. Such a payload leaves the Hub drawer without an order or selected model and makes the chain/probe defaults unusable while claiming Hub mode. Add a Hub branch that constrains these fields to their non-null shapes; it can remain non-required here so the frozen v1 examples that omit the fields still validate.++**Disposition.** New criterion. A `hub` branch constraining **the four projections the finding names** — `selected_model_id`, `sources`, `supply_status`, `model_supply` — to their non-null shapes, **not required**, so the frozen v1 examples that omit them still validate. Exactly those four, and no more: `selected_by_agent` and `current` are declared `["string","null"]` / `["object","null"]` and are legitimately null in Hub mode (no Agent has selected, nothing is current), so pinning them non-null would reject conforming payloads — the invariant is about Hub projections that must exist for the drawer to function, not about every nullable field in the file. The four deliberately mode-independent fields (`mappings`, `menu`, `builtin_models`, `standard_vendors`) stay out of both branches. **Missed instance of the partial-predicate class**, also swept in round 3 — and it is the exact shape that sweep named: a `then` whose `properties` never bite because nothing requires the field. Note the interaction with the `required` guard in `api.md`'s mechanical-guard table: this branch is a **declared exception** to it, deliberately non-required, so the checker must recognise it as such rather than flag it. Frozen surface: joins the v3 set.++**Acceptance.** Contract layer, owed by **L1**. Every fixture below is built from an **otherwise-valid** Hub payload, varying only the projections under test (07-29, review round 2): `backend`, `mode` and `menu_kind` are the file's top-level `required` set, so a fixture that omits them is rejected today for a reason this branch has nothing to do with, and a test copied from it would pass vacuously while all four null projections stayed accepted. `{"backend": "claude", "mode": "hub", "menu_kind": "fixed", "selected_model_id": null, "sources": null, "supply_status": null, "model_supply": null}` is rejected, and rejected *by the Hub branch* — the same payload with the four projections carrying their non-null shapes validates, which is what proves the rejection came from the branch and not from a missing required field; the frozen v1 examples that omit those fields still validate; a Hub payload with `selected_by_agent: null` and `current: null` still validates, since those are not part of the branch; the four mode-independent fields validate identically under both modes; and the mechanical checker records this branch as a declared non-required exception instead of reporting it as a partial predicate. Fails today: that payload validates, and the Hub drawer receives it with no order and no selected model.++### AC-21 — Make the mirror registry encode its promised checks++Review round 12, P2, on `docs/plans/model-hub-contracts/README.md`, [thread](https://github.com/avibe-bot/avibe/pull/1081#discussion_r3670273212). Verbatim:++> **Make the mirror registry encode its promised checks**+>+> The table cannot drive two checks the surrounding text promises: M4 labels the non-self-healing reason-to-`detail_key` relation as `none` even though `api.md` requires a mechanically checked bijection, and M6 omits `resolution-event.agent` from its Mirrors cell even though lines 226-230 say that exact superset is checked as the home set plus `system`. A harness generated from these rows can therefore skip both relations while reporting the registry complete. Give M4 an executable bijection rule and list `resolution-event.agent` in M6 with its declared extra.++**Disposition.** New criterion, and the sharpest of the four contract findings: the registry exists so a harness can be *generated* from it, so a row that under-declares its relation is not a documentation nit — it silently removes a check while the registry reports itself complete. M4 gets an executable `bijection` rule naming both directions — **and the pairs themselves, in a machine-readable field** (07-29, review round 3). 「Bijection」 alone constrains only the two *sets*: any permutation of the reasons against the `detail_key`s satisfies it, so a mapping that renders 「订阅客户端不符」 for a consent failure passes a generated harness while being wrong in exactly the way the mirror exists to catch. The registry therefore carries the ordered pairs (a `pairs` list of `[reason, detail_key]`, one line per member), and 「bijection」 becomes what the harness *asserts about that list* — total, injective, and pairwise-matching the two files — rather than the whole of what the row says. M6's Mirrors cell gains `resolution-event.agent` with its declared extra `system` inline, so the row alone determines the check. The invariants themselves already hold in the schemas — only the registry under-declares them. Frozen surface: joins the v3 set.++**Acceptance.** Contract layer, owed by **L1**. A harness generated purely from the registry rows — with no hand-written supplements — runs both relations: the reason ↔ `detail_key` bijection in both directions, and `resolution-event.agent` ⊆ home set ∪ `{system}`. Three mutations are caught by that generated harness: deleting one `detail_key` from either side; **swapping two `detail_key`s between reasons in one file while leaving M4's `pairs` list alone** (07-29, review round 3 — the case a set-only bijection cannot see, and the one that ships wrong copy to a real user); and adding an undeclared value to `resolution-event.agent`, whose enum already holds four, `claude`/`codex`/`opencode`/`system`, so the test adds a fifth. Fails today: M4 reads `none` and M6 omits the field, so a faithful generator emits neither check and still reports the registry fully covered.## 7. Kickoff checklist (orchestrator)+**This is the v1 kickoff and it is spent.** It ran: its surveys are on disk+(`model-hub-engine-survey.md`, `model-hub-tos-review.md`), the contracts dir was+authored and frozen from them, and the v1 build shipped dormant. Its `L1/L2/L4` are+**v1** lane IDs, not the v2 ones in §3. Do not run it again — the v2 kickoff is §3's+merge order: L0 lands, then L1 with the `contract_version: 3` bump, then L2/L3/L4 in+parallel, then L5, then L6. Kept below as the record of how the effort opened.+- [ ] Owner approves this plan (lanes, sequencing, gates).- [ ] design.pen saved; V4 frames re-exported into a stable reference dir.- [ ] S1–S3 dispatched (S1/S3 codex, S2 research either).diff --git a/docs/plans/model-hub.md b/docs/plans/model-hub.mdindex 3595db3ab..fda645d09 100644--- a/docs/plans/model-hub.md+++ b/docs/plans/model-hub.md@@ -55,6 +55,34 @@ consequences, both folded into this revision:decision is being changed, on the ruling above, and gated on a fidelity spikerather than adopted outright.+**Addendum — proactive push is cut (owner ruling 2026-07-29 10:54).** No resolution+event is delivered to any conversation. Supply problems surface in the turn that hits+them and on the 「模型」 page; events stay recorded for the 最近切换 feed, while source+and agent **status reads live blocking state rather than the event log** (07-29, review+round 4 — §4.5 carries the reasoning), and `severity` becomes feed/UI metadata rather+than a delivery trigger. 「Surface in the turn」 means the turn that supply **broke**: a+turn a fallback carried says nothing, because it succeeded. §4.5 is+rewritten accordingly, and with it two decisions this spec had carried as settled or+open are **superseded**: the round-5/7 recipient resolution (two-hop expansion from+backend to named Agents to scopes) and the standing open decision on a 「home」-scope+fallback plus recency filtering. Both answered "who gets the message"; there is no+message. The 07-29 10:44 ruling that `SupplyGap.agents` includes the Agents inheriting+a backend default **stands** — it was never about delivery, and it is the payload of+the delete guard and the confirm dialogs.++A third decision follows from the same cut but needed its own ruling, because it was+about the record rather than the delivery: round 8's 「a source event names every+backend it affects」 is **superseded** (orchestrator ruling, 07-29 — owner-vetoable).+Source **state** events are recorded **once, unattributed** — the traffic kinds (`switch`,+`channel_switch`, fallback-return `recover`) stay backend-attributed, because there the+backend is the event's own subject rather than an impact claim (§4.5, and AC-18's frozen+example opens 「Claude Code:」 on exactly that ground; scoped 07-29, review round 15).+Per-backend impact is derived live+by the consumers from current per-agent orders, which is both what the shipped feed+frames already render and the only answer that stays true after an order changes.+No schema field is added, and no contract version moves for it; §4.5 carries the+reasoning.+Subscriptions are untouched by all of this: they stay bound to their own vendor'sbackend in both channels (S2/ToS, §4.4).@@ -400,8 +428,8 @@ chain contract has always counted it WITH `needs_action` in the branch that makechain `interrupted` (`agent-chain.schema.json`). What we could not classify is the**cause**; that is never a promise about **recovery**. Read as 「unknown」 it left onetransition unrepresentable — the last runnable source of a chain landing in `error` —-which is an interruption the notification rule below owes the user a push for, while-the event vocabulary had no cause that could carry it. The emitter's only options were+which is an interruption the surfacing rule below owes the user an explanation for,+while the event vocabulary had no cause that could carry it. The emitter's only options wereto borrow a cause nobody had established or to stay silent about the state weunderstand least. So the vocabulary gained a fifth non-self-healing cause rather thanthe obligation being quietly dropped: that transition is announced as@@ -409,8 +437,8 @@ the obligation being quietly dropped: that transition is announced asof `state.detail_key: models.source.error.unclassified`. It is not a new event kind —「a source went dead and stays dead until someone acts」 is what `needs_action` alreadymeans, and *which* way it died is what `reason` is for — and not a widening of-`supply_interrupted`, which nulls both endpoints and would strip the push of the one-source it needs to open. The five non-self-healing source keys and the five+`supply_interrupted`, which nulls both endpoints and would strip the feed row of the+one source it needs to open. The five non-self-healing source keys and the fivenon-self-healing event causes are a bijection, checked mechanically rather thanpromised (`api.md` → 「Mechanical guards the schemas cannot carry」).@@ -457,13 +485,13 @@ list looks populated, yet *this* agent has nothing left to call. The UI shows「当前无可用来源」 with a cause breakdown and exactly two exits — fix the`needs_action` items, or add a source.-`waiting` exists to keep the notification rule below consistent. An agent whose+`waiting` exists to keep the surfacing rule below consistent. An agent whosesources are *all* mid-cooldown has nothing runnable, but nothing is owed either —-it heals itself in minutes. Collapsing that into `interrupted` would push the user-an alert about a problem that resolves before they can read it, which is exactly-what the self-healing tier is supposed to prevent. Its copy states the recovery-time, not a fault; `current` is null in both states, so neither ever renders a-stale 使用中.+it heals itself in minutes. Collapsing that into `interrupted` would tell the user to+go fix a problem that resolves before they finish reading the sentence, which is+exactly what the self-healing tier is supposed to prevent. Its copy states the+recovery time, not a fault; `current` is null in both states, so neither ever renders+a stale 使用中.**Two grains, one taxonomy.** `supply_status` above is the **agent** rollup, and itanswers for that backend's *currently selected* model. The same three classes are@@ -484,98 +512,198 @@ is empty **or at least one blocker needs the user**, `waiting` only when every bis a cooldown. The asymmetry is deliberate and load-bearing — `interrupted` is theOR-branch, `waiting` the AND-branch, so a chain holding one cooling source and onerevoked key is `interrupted`. Reading it as "every member needs the user" leaves that-mixed chain matching neither value and, worse, drops the alert the user is owed for the-revoked key on the grounds that something else in the chain is merely cooling.+mixed chain matching neither value and, worse, hides the action the user is owed for+the revoked key behind the fact that something else in the chain is merely cooling.-**Notification tiers** (the colleague test: interrupt only when action is owed):+**Surfacing tiers** (the colleague test: ask for action only when action is owed):-| Class | Surface |+| Class | Where the user meets it || --- | --- |-| self-healing (`cooldown`, `waiting`, recovery, in-turn switch) | 最近切换 feed only — never an IM push |-| `needs_action`, `error`, `interrupted` | proactive IM push, colleague voice, e.g. 「relay 余额不足,已切备用;点此处理」 |+| self-healing (`cooldown`, `waiting`, recovery, in-turn switch) | 最近切换 feed and the row's status pill — **and nothing in the turn when the turn survived** (07-29, review round 4 ruling): a fallback that worked is not news, and announcing it inside a turn that succeeded is exactly the interruption the push cut exists to prevent. In-turn copy appears only when the turn did **not** proceed transparently: the retry form when §4.3 forbids the transparent retry, the `waiting` form when nothing is runnable but every blocker is timed |+| `needs_action`, `error`, `interrupted` | the in-turn copy of the turn that hit it — the **interrupted** form's cause breakdown plus a pointer to 「模型」 — and 需处理 state on the 「模型」 page until cleared. A blocker left behind by a turn that **succeeded** is page-and-feed only, by the row above |`error` is named in the second row explicitly (07-29, review round 6). It wasimplicitly there all along — it is a blocker, and blockers are what the row is about —but leaving it unnamed while the status table called it 「unknown」 is how a reviewerends up asking, correctly, which tier an unclassified failure belongs to.-Resolution events therefore carry `severity: info | action_required`, and the push-layer keys off that field rather than re-deriving urgency from `kind`. The two-tiers are cause-based, never count-based: "zero runnable candidates" is not by-itself a reason to interrupt anyone.--**Who receives an action-required push** (07-29, review round 5). The tier says an-interruption is owed. It does not say to whom — and with several IM platforms,-per-channel Agent overrides, and state changes made from the Web UI, that is not-self-evident. Two shapes were available: carry recipients on the event, or resolve-them at delivery. **Recipients are resolved at delivery, and the event carries no-recipient, channel, platform, or audience field:**--- the event names an **Agent** (a source-scoped kind resolves to the Agents on the- backends the failed source actually supplies — the fan-out bullet below states that- test once and normatively), and Avibe already routes each scope to a- selected Vibe Agent — so the recipient set is *every scope whose routing currently- selects an affected Agent*, computed at push time against the live routing table-- **the expansion is two hops, because 「Agent」 on the event and 「Agent」 in routing- are different grains** (07-29, review round 7): `resolution-event.agent` is a- BACKEND identifier — its enum is `claude` / `codex` / `opencode` (plus `system`) —- while routing selects a NAMED Vibe Agent such as `pm`. Normatively, then:- **recipients resolve by expanding each affected backend into the Vibe Agents currently- enabled on that backend, then into the scopes whose routing selects any of those- Agents.** Both hops read live state at push time. The gap hid because the default- Agent of each backend happens to be named after it, so a one-hop reading works until- a user renames an Agent or enables a second one on the same backend — at which point- it silently addresses nobody. This sentence fixes only the expansion; **whether a- zero-scope result falls back to a 「home」 scope, and whether long-idle scopes are- filtered out, remain the standing open owner decision below** and are deliberately- not answered here-- **「Each affected backend」 is a SET, and it is not always the one the event names**- (07-29, review round 8): a **source-scoped** kind affects every backend the failed- source actually supplies, because source health is a property of the source, not of- the backend that happened to discover it. One hub key shared by Claude and Codex- fails once and starves both; reading `agent` as the whole affected set would push to- the discovering backend's scopes and silently drop the other's from a notification- this section already promised them. **「Actually supplies」 is the chain grain, not- order membership** (07-29, review round 9): round 8 wrote the test as 「every backend- whose `sources.order` contains `from_source`」, and a `follow` order holds every+**No proactive delivery** (owner ruling 2026-07-29 10:54; supersedes the recipient+machinery this section carried through review rounds 5, 7, 8 and 9). **No resolution+event is pushed anywhere.** Avibe does not open a conversation to report supply state:+an interruption is surfaced **in the turn that hit it**, and otherwise waits on the+「模型」 page for the user to come looking. That is the colleague test read strictly — a+colleague who cannot do the work says so when you ask them to do it; they do not+message every channel they belong to the moment their key expires. It also dissolves+the recipient problem the earlier rounds kept narrowing without closing (which scopes,+which grain of 「Agent」, what a zero-scope result means): with nothing delivered, there+is nobody to address.++What survives the cut, so the removed text is not read back in:++- resolution events are still **recorded**, unchanged in kind, cause and shape. They+ feed **the 最近切换 feed**; **source and agent status read live state, not events**+ (07-29, review round 4 — the earlier wording said the status UI reads events too,+ which contradicts the derivation rule below and would leave a recovered source marked+ affected until its event aged out of the bounded feed). A record answers 「what+ happened」; a status answers 「what is true now」, and only one of those changes when a+ source recovers silently. Recording was never the delivery mechanism; it is the record.+- `severity: info | action_required` survives as **feed/UI metadata only**: it sorts+ and styles the feed and decides whether a row reads 需处理. Nothing keys off it to+ send anything.+- the two tiers stay **cause-based, never count-based**: "zero runnable candidates" is+ not by itself a reason to put an error in front of anyone.+- **the record stays single-grained; per-backend impact is derived, not recorded**+ (orchestrator ruling, 07-29 — **supersedes** review round 8's 「expand every affected+ backend」 sentence, which existed to address a notification that no longer gets sent).+ A source-**STATE** kind — the source-health family, `cooldown` / `needs_action` /+ `skip`, and the availability form of `recover` — is recorded **once**, unattributed+ to backends: `agent` keeps its existing semantics — the discovering context, or+ `system` when nothing discovered it — and nothing in the record claims a set of+ affected backends. Source health is a property of the source, so the fan-out was+ never information the record held; it is a **live derivation** the consumers already+ have to do anyway, because per-agent orders change after the event is written and a+ frozen set would go stale the moment one does. The feed renders those state lines+ unattributed (「relay.example 连续超时 → 暂停使用 1 小时」, as the V4/V6 frames already+ show them). **The TRAFFIC kinds are outside this rule and must not be swept into it**+ (corrected 07-29, review round 10): `switch`, `channel_switch` and the fallback-return+ form of `recover` are one backend's traffic moving, and the frozen schema states that+ two-family split itself (`resolution-event.schema.json` → `from_source`: 「TRAFFIC+ events say where the traffic went … STATE events name the one source they are+ about」). Naming the backend there is the event's own subject, not an impact claim+ about a source — which is why AC-18's frozen example legitimately opens 「Claude+ Code:」 while a shared source's failure line does not. The round-9 wording 「the feed+ renders source events as unattributed lines」 was too wide: read over the traffic+ family it contradicted a frozen example this PR does not touch.+ The status surfaces answer 「what is affected」 by asking the current question+ against current orders — **at two grains, which must not be collapsed** (corrected+ 07-29, review round 9). The SOURCE grain: **a backend has affected supply when a+ source that is blocking *now* appears in the capability chain of at least one of its+ protected models** — the (backend, model) test `api.md`'s supply guard already+ computes from its four-fact union. The AGENT grain is narrower, and is what an agent+ status pill reads: **the chain it evaluates is the chain of the model that Agent+ effectively runs** — its explicit `agents.<name>.model`, or the+ `agents.<backend>.default_model` it inherits (ruling #4's effective-model rule) —+ never the protected union. **A grain says which chain to read; it never says which+ class comes out** (corrected 07-29, review round 10). The class is the taxonomy's,+ and this paragraph now says so **without restating it** (corrected again 07-29, review+ round 12 — the round-10 wording claimed not to restate the predicate and then restated+ it, as 「nothing runnable and at least one blocker needs the user」, which silently+ dropped the OR-branch's other half: a **structurally empty** chain has no blocker at+ all, so a forced deletion or an emptied order would have fallen out of `interrupted`+ and lost the 需处理 state and the in-turn explanation the user is owed. The table and+ `agent-chain.schema.json` both carry the empty-chain case; a restatement that has to be+ kept in sync with two of them is the defect, not the wording). **Read the class off the+ table above** — that is the same 「point back rather than restate」 rule every contract+ carrying either grain already follows. Round 9 wrote blocking-source *membership* as the test,+ which reported `interrupted` for the ordinary fallback — source A revoked, source B+ still serving — where the table says `degraded` and the turn goes straight through.+ Membership is not exhaustion, and the one place the predicate lives is that table.+ The union is deliberately wider than the live selections, so evaluating it at the+ Agent grain would render an Agent affected over a ticked-but-unassigned menu model,+ which is exactly the case AC-9's Case A forbids (`model-hub-implementation.md`, AC-9). Both halves are+ current-state reads, and both are load-bearing+ (07-29, review round 3): chain membership alone folds a *historical* event against a+ *current* chain, and since a recovered source normally stays in the same orders and+ chains, and the failure event stays in the bounded feed, that predicate would pin the+ pill to 「affected」 for as long as the event is retained — a recovery could never+ clear it. The event is what the **feed** renders; it is not what the **pill** reads.+ The pill reads the source's live blocking state — the same **contracted** facts the+ resolver consults when it picks a candidate: `state.status` and, for a cooling-down+ source, `state.retry_at` (`source.schema.json`), surfaced per chain entry as+ `runnable` (`agent-chain.schema.json`). **No `blocked_until` field exists anywhere in+ the contracts** (corrected 07-29, review round 9: the earlier+ `blocked_until` / disabled / credential-invalid wording named a field the frozen+ schemas never defined, and a source-level `disabled` the frozen source contract does+ not express at all — `state.status` admits only `active | standby | cooldown |+ needs_action | error`, of which `cooldown`, `needs_action` and `error` are the blocking+ ones, and `source.schema.json` carries no enablement field (corrected again 07-29,+ review round 15: the round-9 text named `disabled` as a `state.status` value, inviting a+ `status == "disabled"` predicate that never matches)) — so a source that has recovered+ stops contributing to any pill on the next render, with no event written to say so and+ none needed. That test is the+ consumer's, evaluated at render time; it is not a field.+ Note that the chain grain is what makes it right: a `follow` order holds everyeligible source — an API-key source is eligible for every backend — so a GLM-only key- sits in Codex's order while appearing in no chain Codex can run. Failing during a- Claude turn, it would have interrupted every Codex-routed scope over a source that- could never have served or disrupted them, and an alert that arrives for supply you- do not use teaches the user to dismiss the ones that matter. The test is the one- `api.md`'s supply guard already computes at the (backend, model) grain: **a backend is- affected when the failed source appears in the capability chain of at least one of its- protected models** (that document's four-fact union). Order membership is necessary- and not sufficient — a source absent from the order is in no chain either — so this- narrows over-notification without dropping anyone the round-8 rule protected. It- refines which backends are affected and nothing else: the two hops still run from- every backend in the resulting set, and `SupplyGap.agents` still includes the Agents- that inherit the backend default. A **backend-scoped** kind (`supply_interrupted`,- whose cause is that backend's own order or selection) affects exactly the backend it- names. The two hops above then run from every backend in that set, deduped per scope- as below-- delivery is **once per scope**, deduped: one revoked key that starves three Agents- sharing a channel is one message naming the source, not three-- an event caused by a settings mutation has no originating conversation, and that is- not a special case here, because origin was never the addressing key. A Web UI- mutation and a mid-turn failure resolve their recipients identically-- resolving to **zero scopes is a correct outcome, not a dropped alert**: nothing is- routed to that Agent right now, so nothing is interrupted right now. The state- still shows on the 「模型」 page and still lands in the feed--Carrying recipients on the event would have frozen a routing snapshot into an-append-only feed: a scope re-pointed at a different Agent afterwards would still be-addressed by the old event, and a scope added later would never be. The feed is a-record of what happened to supply; it is not an outbox.--**Open decision for the owner, deliberately not settled here** (delivery-layer-policy — neither answer changes the event contract or the feed): whether an-action-required event resolving to zero scopes should fall back to a designated-「home」 scope, so a key revoked while nothing is routed there is still announced-rather than waiting to be discovered; and whether *every* scope routed to an affected-Agent is a recipient, or only recently-active ones — a channel configured months ago-is technically routed, and pushing a credential problem into it may read as noise-rather than as a colleague speaking up.+ sits in Codex's order while appearing in no chain Codex can run, and treating order+ membership as impact would mark a backend degraded over supply it could never have+ used. A **backend-scoped** kind (`supply_interrupted`, whose cause is that backend's+ own order or selection) still names exactly the one backend it is about, because+ there the backend *is* the subject of the event rather than a consequence of it.+ If some later consumer genuinely needs a recorded affected-set, it gets a field then,+ with the evidence that derivation was insufficient — not speculatively now.+- **which named Agents an interruption is about** is narrower still, and it is now a+ question the delete guard and the confirm dialogs ask rather than a delivery one:+ `SupplyGap.agents` resolves the Agents whose **effective** model is the one that+ loses supply — including the Agents that inherit the backend default, since those+ Agents do use the model — and it is **allowed to be empty**, because the protected+ set is deliberately wider than the live selections: it protects a model the user+ ticked and assigned to nobody, which is right for refusing a delete. An empty list is+ a correct answer, not a missing one.++The event carries no recipient, channel, platform, or audience field — it never did,+and after this ruling nothing would want one. The feed is a record of what happened to+supply; it is not an outbox.++**In-turn error copy is the normative surfacing mechanism, and silence is its first+case** (07-29, orchestrator ruling on review round 4 — this **supersedes** round 2's+action tail and the 「已自动换线」 in-turn line). A turn supply affected either says+nothing at all, or says exactly one of three **classes** — never a fourth story, and never+a tail appended to one of them. The `interrupted` class carries **two copy variants**+(below), so three classes are four message forms; what is forbidden is a fourth *story*,+not a fourth string (clarified 07-29, review round 15 — the count read 「three things」+after the 16:35 split created the second variant, and read literally it would have forced+one required form to be merged away):++- **survived transparently → silent.** A fallback that carried the turn produces **no+ in-turn copy whatsoever**. The turn worked; the user asked for work and got it, and+ interrupting a successful answer to narrate the plumbing is the same restraint failure+ the push cut removed one layer up — it is a push, merely delivered in-band. The switch+ is recorded and surfaces where a record belongs: the 最近切换 feed and the row's+ 已切换 state. **This includes the case where the switch left a real problem behind** —+ a revoked key a second source covered is filed as its usual two records+ (「one `switch`, info + one `needs_action`, action_required」), and the `needs_action`+ half surfaces as 需处理 on the 「模型」 page, not as a line on a turn that succeeded.+ Round 2 reached the opposite conclusion by asking 「where else would the user hear+ about it」 and answering 「nowhere」; the page is that somewhere, and it is the surface+ the cut deliberately kept for exactly this class. Note the implementation consequence,+ which is why the ruling went this way: a successful turn returns through the normal+ result path and never reaches the failure emitter, so **every form below is on the+ failure path** and the copy has one home rather than two.+- **self-healing** — supply moved and the turn could **not** proceed transparently:+ 「下一回合已自动换线,直接重试即可」 when §4.3 forbids the transparent retry. It names+ no fault and asks for nothing, because the user's next action is one retry. This is+ the whole of the form now: the surviving-turn line above moved to silence.+ **Confirmed by the orchestrator, 07-29**: the tail is dropped from *this* case too, not+ just from the silent one — the retry moment's action is the retry itself, and+ residual-blocker guidance lives in the interrupted copy and the 「模型」 page. Keeping a+ tail here would leave one exception whose only argument — 「the user is already being+ interrupted, so one more line is free」 — is the argument the whole section rejects.+- **waiting** — nothing runnable *right now*, but every blocker clears on a timer with+ no user action: the copy states **what it is waiting on and when it recovers**+ (「全部来源冷却中,约 12 分钟后恢复」), and asks for nothing. It is a distinct form+ rather than a variant of the other two, because the self-healing copy would be a lie+ (the turn did not survive) and the interrupted copy would be worse than one (it would+ send the user to 「模型」 to fix something that fixes itself). A turn whose blockers+ are mixed — some timed, some needing action — is `interrupted`, not `waiting`: the+ AND/OR taxonomy above decides that, and the presence of one user-actionable blocker+ is what makes the third form the wrong one.+- **interrupted** — this class has **two entries, and they need different copy**, because+ the taxonomy's OR-branch admits a case with nothing to break down.+ - *blocked* — nothing runnable and at least one blocker needs the user: a **cause+ breakdown** at the grain that actually failed (which model, which sources, and which+ blocker each of them is in), then a pointer to 「模型」, where the one-tap fixes live.+ This is the only place the user is told to act, so it carries the whole story rather+ than a truncated headline that forces a second question.+ - *structurally empty* — the chain has no candidate at all, so there is no source and no+ blocker to name. **The copy is owned by the lane that emits it** (L3, §3), and the+ exact strings land in that lane's design pass, which carries **its own owner approval+ step** — they are not written here (07-29 16:35 ruling). What this spec fixes is its+ **semantics**, and all three are already contracted: it **names the model** the turn+ asked for, it states the cause using the **event layer's own reason**+ (`no_enabled_source | no_eligible_source | model_unsupported`, below) **rendered+ through `vibe/i18n/` like every other backend-emitted string**, and it **points at+ 「模型」** like the blocked form. A generic error, or silence, satisfies+ none of the three.One asymmetry has to be named, because it is easy to implement wrong: an agent canenter `interrupted` with **no source changing state at all** — its last enabled@@ -596,7 +724,11 @@ model hits zero at once. **"Selected" is deliberately wider than 「已勾选/(07-29, review round 5): it is the union of an open menu's checked entries(`menu.checked` — 07-29, review round 9: round 5 wrote 「checked fixed-menu models」,which names state a fixed menu does not persist; `api.md` carries the scoping), **the-menu-side `builtin_id` of every mapping row**, `agents.<backend>.default_model`, and+menu-side `builtin_id` of every mapping row that is `enabled`** (07-29, review round 4:+a disabled row is one the resolver treats as identity, so protecting it refuses a delete+no live selection would break — the same over-protection this paragraph rejects two+sentences on; `api.md` carries the matching narrowing as AC-8, and the two normative+homes have to say the same thing), `agents.<backend>.default_model`, andeach enabled Vibe Agent's own `model`. Menu-side, not the mapping's target (07-29,review round 8): for `claude-opus-4-6 → glm-5.2` the protected identifier is`claude-opus-4-6`, because that is what an Agent can be running and what `api.md`'s@@ -609,12 +741,19 @@ and resolving by identity with no mapping row to find. `api.md` → DELETE carrifull set and the confirm copy names the affected **Agents**, since 「删除后 pm 将没有可用来源」 is actionable where a bare (backend, model) pair is not.-**Turn provenance.** Each turn records the model@source that served it, and that-record is inspectable from the conversation surface as per-turn detail — available-on demand, never noise in the transcript. Mid-stream failure, where no transparent-retry is permitted (§4.3), must say exactly 「下一回合已自动换线,直接重试即可」:-the user's next action is one retry, so the copy states that instead of describing-the fault.+**Turn provenance.** Each turn whose attribution is **exact** records the model@source+that served it — the write rule below is what 「exact」 means, and it is the promise's+scope, not a caveat on it — and that record is readable through a contracted route.+**It has no chat surface** (owner+ruling 2026-07-29 14:03, superseding the earlier 「per-turn detail in the conversation+surface」 phrasing): users should be unaware of supply machinery, so provenance+inspection is a **debug affordance, not a user feature**, and it appears neither in+the Web transcript nor on any IM platform. If it is ever surfaced, the place is the+请求日志 / 诊断 entry in the 「模型」 page's 高级 area — a v2.1 candidate, not v2. Mid-stream failure, where no transparent+retry is permitted (§4.3), must say exactly 「下一回合已自动换线,直接重试即可」 and+nothing further: the user's next action is one retry, so the copy states that instead+of describing the fault. A source the switch left needing repair surfaces as 需处理 on+the 「模型」 page, per §4.5 — not as a second line here.This promise needs an interface, not just a paragraph, so v2 freezes one:`turn-provenance.schema.json` + `GET /api/models/turns/<turn_id>/provenance`.@@ -625,6 +764,33 @@ this turn" is a billing question the user asks days later, not just live. A turnthat switched sources mid-flight lists every attempt in order, so the recordexplains the switch rather than merely naming the winner.+**The write rule is: record only when the attribution is exact** (07-29 15:07 ruling,+guarded 16:35). The gateway credential is minted per **process scope**, and the turn is+resolved from that scope through the turn FSM. When the scope holds exactly one active+turn **and no untracked caller is sharing it**, the attribution is a determination and the+record is written; concurrent turns — or any use of that scope the FSM cannot see, which a+shared transport makes possible — mean **no provenance record is written at all**. One+tracked turn is not the same as one user, and a rule that conflated them would license+exactly the misattribution this design exists to remove. Absence is honest, and it is all+that remains — a healthy attempt emits no transition event either. `turn_id` therefore+stays required, and nothing in this interface marks a degraded grain, because no record+has one. **The correlation mechanism itself — scope keys, token registry, the FSM+lookup — is designed and owned by L3** (07-29 16:20 ruling): see L3's design note,+bounded by the invariants in `model-hub-implementation.md` §3. This spec fixes what must+be true of the record, not how the attempt is tied to the turn.++**The same rule bounds which turns v2 records at all: no FSM truth → no record**+(07-29 15:42 ruling). Exactness is resolved through the turn FSM, so a turn the FSM+does not track cannot be recorded exactly — and v2 does not record it approximately.+**IM and CLI turns write no provenance in v2**, and this spec states that limitation+rather than implying a coverage it does not have. The loss is debug-marginal because+the *other* half of the trace is channel-independent: the source-grained+resolution-event feed covers every channel, so an IM turn's failures and switches still+appear in the feed even though its per-turn attempt list does not exist. **v2.1+candidate**: extend FSM registration to the IM and CLI dispatch paths — provenance then+follows for free, because the write rule above is path-agnostic and needs no change when+coverage widens.+**That interface covers Hub-mode turns** (07-29, review round 8): a `served` recordrequires a `source_id` matching `^src_`, and a Direct-mode turn runs from nativeconfiguration with no `Source` row to name — so 「每个回合都有记录」 is satisfiable@@ -632,8 +798,14 @@ inside Hub and unsatisfiable outside it without fabricating a source. Existing ustay in Direct until they migrate (§6), which makes this the common case rather thanan edge one, so it is named here instead of left to the implementer to discover.Whether a Direct turn gets a no-source provenance representation or the route answers-「此回合无中枢记录」, and what the per-turn affordance shows then, is an implementation-requirement recorded as **AC-1**. Two further terminal states the four outcomes below+「此回合无中枢记录」 is an implementation requirement recorded as **AC-1** — a question+about the record and the route only, since 14:03 left no affordance to render it.+**Neither branch licenses silence** (07-29, review round 8): the every-turn promise above+is scoped to Hub-mode turns by the paragraph that opens this one, and a Direct turn must+still answer the contracted route with a documented payload or a documented error — what+it may not do is come back indistinguishable from a turn whose provenance was never+written. **Which of the two branches v2 ships is L1's v3 contract call** (§8, AC-1), not a+choice each implementer resolves for itself. Two further terminal states the four outcomes belowcannot express — a user cancel, and an attempt interrupted by one — are **AC-4**.Four outcomes are recorded, not one: `served`; `exhausted` (fallback walked to the@@ -840,7 +1012,11 @@ nothing about how the engine is driven.UI: 「试跑一次」 in the agent drawer footer, **offered for Hub-mode backends only**(07-29, review round 9): a Direct backend has no source order to run the probethrough and no source id to name in the result, and what it should answer instead is- AC-7. Contract frozen in v2; implementation lands with the L2 rebuild.+ AC-7. Contract frozen in v2; **implementation lands with L3** (corrected 07-29,+ review round 11 — this line read 「the L2 rebuild」, a label that predates the lane+ split and now collides with it: `model-hub-implementation.md` §3 assigns the probe+ route to **L3**, while L2 owns repair paths and guards, so an executor reading the+ spec alone would have built it in the wrong lane).2. **Quota projection**: nullable `projected_exhaust_at` on subscription usage(linear projection over recent usage), driving a sub-line 「按近 7 天用量,预计周三用完」. Phased deliberately — the contract field is frozen in v2, the@@ -850,7 +1026,9 @@ nothing about how the engine is driven.v2.** It needs per-source metered spend attributable to fallback turnsspecifically; whether the engine's usage data can support that (with its usagefeed disabled for key-leak reasons, S1 gap ②) is unverified. Revisit once the- L2 rebuild shows what turn-level accounting we actually hold.+ L3 provenance work shows what turn-level accounting we actually hold (same+ round-11 correction: 「the L2 rebuild」 named no lane in the current split, and the+ turn record it waits on is L3's).4. **First-class cross-vendor menu entries for Claude Code / Codex — v2.1candidate, spike-gated** (owner ruling 2026-07-29 02:22). v2 already *supports*cross-vendor supply (§4.3); what it lacks is a natural way to **add** a model.@@ -890,16 +1068,21 @@ nothing about how the engine is driven.contracts README security invariant 3). A ChatGPT subscription never becomes asource for Claude Code, before or after this item ships.- Contract impact, recorded so nobody assumes v2 covers it: this needs an- `agent-supply` revision at `contract_version: 3` (a fixed-menu backend gains- user-added entries alongside `mappings`). v2 deliberately carries **no**+ `agent-supply` revision at a contract version **above** this batch's 3 — the next+ one available when it ships, not a number reserved here (a fixed-menu backend gains+ user-added entries alongside `mappings`; unpinned 07-29 17:41, review round 16: v2's+ coordinated freeze consumes 3, so naming 3 here would make one version describe two+ incompatible shapes). v2 deliberately carries **no**speculative fields for it.5. Remaining mocks (§5 pending): OpenCode drawer frame, empty state, Dark, copypass; plus deleting the rejected V5A/V5B/V5C frames from design.pen once theowner confirms. The §10.4 item, if it clears the spike, also needs a 模型菜单frame showing built-in core + user-added entries for a fixed-menu backend.-6. Implementation plan & lane split for v2 (separate doc; the v1- `model-hub-implementation.md` describes the shipped v1 and is superseded for- anything touching ordering).+6. ~~Implementation plan & lane split for v2.~~ **Closed 2026-07-29**:+ `model-hub-implementation.md` §3 now carries the approved v2 lane plan (L0–L6)+ and §8 the full 21-criterion acceptance ledger. The rest of that document still+ describes the shipped v1 and stays superseded for anything touching ordering —+ §3 and §8 are the two v2-current, binding sections, as its banner says.7. Naming final check in the EN locale: Hub / Direct, and now Follow / Custom for跟随推荐/自定义, in `en.json`.8. Deferred capability: engine-owned OAuth import (adapter rev) — prerequisite@@ -913,9 +1096,15 @@ nothing about how the engine is driven.- [ ] §4.2 recommendation rule is exactly what you want implemented verbatim.- [ ] §4.2 cooldown staying source-global rather than per-agent is right.- [ ] §4.4 eligibility moving to the server closes the `isSourceEligible` debt.-- [ ] §4.5 three-class state taxonomy plus the two-tier notification rule,- including `waiting` — an all-cooling agent stays in the feed and is never- pushed, because it fixes itself.+- [ ] §4.5 three-class state taxonomy plus the two-tier surfacing rule, including+ `waiting` — an all-cooling agent stays in the feed and never asks the user to+ act, because it fixes itself.+- [ ] §4.5 states your 07-29 10:54 ruling correctly: nothing is pushed, the failing+ turn carries the error, and the 「模型」 page holds the state until it is fixed.+- [ ] §4.5's silent-success rule is the one you want: a turn a fallback carried says+ **nothing** in-turn, even when the switch left a source needing repair — that+ blocker surfaces as 需处理 on the 「模型」 page instead. Every in-turn form is+ therefore on the failure path, and the round-2 action tail is gone.- [ ] §4.5 turn provenance gets a real read contract, not just a promise — includingthe turn that gave up before trying anything, which the record must be able tohold rather than skip.