docs(plan): record P1-06 execution deviations + completion record (#29)
This commit is contained in:
1 parent
9dcbdbd2fe
commit
5d7b49430a
1 file changed
+29
@@ -113,3 +113,32 @@ def test_ollama_adapter_delegates_to_transport():
|
||||
- [ ] Canary green + registered in ci.yml same commit
|
||||
- [ ] henxels exit 0
|
||||
- [ ] Closed with formatted comment + PR refs
|
||||
|
||||
## Execution deviations
|
||||
|
||||
1. **Task 1 — `OllamaAdapter.available()` transport probe:** the frozen test's `_FakeTransport` carries its own `available()` and the test asserts `available() is True` without any HTTP. Implementation consults a transport-provided probe when present (and the transport has no `base_url`); production `OllamaChatTransport` has no such probe, so `/api/tags` + 2s timeout + 30s cache behavior is unchanged.
|
||||
2. **Task 2 — reason string is `no-measured-profiles tier<N>`, not `no-measured-profiles`:** the plan's example quoted `"no-measured-profiles"` as the missing-file reason; the frozen tests were written with a tier suffix (consistent with the `capability-floor tierN` example). Recorded here since the plan text names the bare string.
|
||||
3. **Task 2 — semantics clarified by frozen tests:** (a) when measured profiles exist, only verified-capable (measured, non-zero-success) candidates are ranked — unmeasured candidates are excluded rather than ranked with a `capability-floor` reason; (b) measured verification overrides the static `supports_tools`/context claim (a model that measurably succeeds in a family is eligible for it); (c) the measured profile's `estimated_cost_usd` overrides the static floor cost (this is what makes "cheapest verified-capable" meaningful — T4's static entry is paid, 15.0, and free measured local models win).
|
||||
4. **Task 3 — `_decide_model` archived by rename, not deletion:** the plan says "_decide_model archived (router replaces keyword heuristic)". Implemented as `_fallback_model` with an ARCHIVED docstring; the keyword body survives only on the router-unavailable degrade path (P0-06 degrade-not-crash) — deleting it outright would have made router failure a hard task failure.
|
||||
5. **Task 3 — `task_family` inference added:** the plan lists `task_family` as a trace field but assigns no owner; implemented `infer_task_family()` (keyword map, documented as the same evidence basis as the archived `_decide_model` heuristic, used only as a family label). Frozen tests encode `code` for a code-family description.
|
||||
6. **Task 3 — TUI cloud fallback tested at module level:** `_get_model_name` cannot run without a constructed Textual app (reactives), so resolution logic moved to module-level `_resolve_model_name()` and the method delegates. The frozen-test fallback string is `"cloud-unavailable-fallback: ..."`; the router's declared cloud candidate is NOT returned because `CloudStubAdapter.available()` is False (declared-not-live) — this is what kills the "cloud=qwen2.5:7b" lie without introducing a new one.
|
||||
7. **Task 4 — `compose_model_routing` returns a `ModelRoutingAuthority` handle** and registers the router under the new `model_routing` authority kind; composition test extended per plan.
|
||||
8. **Schema-version count:** existing `test_p0_07_inference_trace.py` asserted `schema_version == 1` in `_make_trace` (a v1-shape helper) and in one rotation test over v1 fixture rows — those tests still pass unchanged because the v1 helpers construct their own records and `read_traces` is schema-agnostic. No test edits were needed; `INFERENCE_TRACE_SCHEMA_VERSION` and the operator's trace emission are now 2.
|
||||
|
||||
## Completion record
|
||||
|
||||
**Branch:** `p1-06-model-routing` (head `9dcbdbd2fe58fe814aba6e9ddcb27059337d018d`), based on master `451fbf5`.
|
||||
|
||||
**Per-task commits:**
|
||||
|
||||
| Task | Commit | Subject |
|
||||
|------|--------|---------|
|
||||
| 1 | `bea80b0` | feat(p1-06): ProviderAdapter protocol + OllamaAdapter (#29) |
|
||||
| 2 | `4358e5d` | feat(p1-06): measured model registry + ModelRouter.rank (#29) |
|
||||
| 3 | `bb416ad` | feat(p1-06): wire ModelRouter into operator + trace v2 routing fields (#29) |
|
||||
| 4 | `c668eb4` | feat(p1-06): register model_routing authority + docs (#29) |
|
||||
| 5 | `9dcbdbd` | feat(p1-06): canary + CI registration (#29) |
|
||||
|
||||
**Final test counts:** full suite **539 passed + 84 subtests** (baseline 526 + 84; +11 new frozen P1-06 tests, +2 composition/authority-map tests net of refactor). P1-06 frozen tests: 13 passing (11 in Task-1/2/3 sections + 2 Task-4 tests). Canary: `P1-06 MODEL ROUTING CANARY PASSED` (registered in ci.yml in commit `9dcbdbd`, same commit as the canary file). henxels `check --all --plain`: exit 0 (21 pre-existing warnings). ruff check clean on all touched files; ruff format applied to added files (`model_routing.py`, `test_p1_06_model_routing.py`, `canary_p1_06.py`) — master-touched files (`rune_operator.py`, `rune_tui.py`, `inference_trace.py`, `composition.py`) keep existing style per the CI added-files-only format gate.
|
||||
|
||||
**Evidence:** TDD red was demonstrated for every task (ModuleNotFoundError → 2 failed; rank reason/order assertions → 4 failed; missing routing attrs/`_build_model_router`/`_resolve_model_name` → 3 failed; missing `compose_model_routing`/authority-map paths → 2 failed) before each green implementation.
|
||||
Reference in new issue
Block a user