Repository navigation
feat(router): PATTERNS v2 vendor-canon integration — hook stamp, --patterns CLI, synthesis protocol, brief templates [t_234de1e7] - #60
Open
maximalang wants to merge 3 commits into
Conversation
…ng, catalog-verified terra rung [t_698a054c] scripts/model_router.py = byte-identical QA-passed v3 router (sha256 5d24308d8057b62b728dde0196ae61062b7581d2ad46564aee6941408e9be2ae, 401 lines, VERSION 3.0.0, engine v4, rules_sha ed86d983fcf6; selftest: 18 cases + 7 structural checks, exit 0, 0 network). Delivered by t_91e8ce45 (fleet-ops board), independent QA t_8c502715 verdict 40/40 PASS against this exact sha. Repo copy was frozen at v2.2 in PR #55 (d5c15f3) and the activation apply of 06.10 03:48 copied that stale v2.2 over the live v3; this PR restores repo==canon parity for the v1.2.36 router line. Docs (synced with --print-rules, sha256 in parentheses): - ROUTING.md v3 (c42fb7bed85c41b1b56df5581a1d2da3fbb43e69b141bc3b2b9f9e4bd51d3aa7) - ROUTES-V3-CHANGELOG.md, v2.2->v3 diff + evidence (7c1330dc465bc02c844df5d82274ad6dc65f15c9022443649e5e4d7edb12f021) - LADDER-PROVIDERS.md: + terra catalog verification note (t_4e47fef0, 05.10.2026, HTTP 200 both pool rows, exact id gpt-5.6-terra present) v3 substance: T1-only rails (custom/zai/openai-codex); provider diversity (adjacent different, <=2 per provider, first-two not same-provider, strategic exempt); GPT tiering (sol strategic+review-backup, astra manual-pin only, luna/terra economical rungs); new classes brief/creative (owner directive 04.10); terra rung catalog-verified, brief/creative only, never top-2; R7 all-rails-down degradation to PROFILE_DEFAULT with explicit degrade line; routes_version field added to card JSON (additive, hook contract of SPEC v5.1 intact). Live-file replacement stays behind the owner gate (QA PASS exists; decision pending) — this PR changes repo copy only.
- version pins 1.2.36 -> 1.2.39 (pyproject.toml, root plugin.yaml, integrations plugin.yaml, src/fleet_policy/__init__.py, uv.lock, tests/test_hardening_v121.py); 1.2.37/1.2.38 are claimed by open PRs #56/#57, so the next free version is taken per the collision rule. - tests/test_v1236_router_hook.py: ROUTER_LIVE_SHA pin follows the canonical router bytes (v2.2 1ae2e34d... -> v3 5d24308d...). - CHANGELOG.md: new [1.2.39] section documenting the ROUTES v3 repo copy. Local CI rehearsal on this tree: pytest tests/ 913 passed; uv lock --check OK; compileall OK; drift-check ok:true; build-bundle + verify-bundle ok:true (84 files); fleet-policy --version 1.2.39; router selftest on the exact blob ALL PASS (18 cases + 7 structural, exit 0).
… --patterns CLI, hook stamp v2 block, synthesis protocol + brief templates [t_234de1e7]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PATTERNS v2 + интеграция во все поверхности диспатча [t_234de1e7]
Stacked на PR #58 (ROUTES v3, head 45fa2c0) — merge order: #58 → этот PR. Версия 1.2.41 (1.2.37–1.2.40 заняты открытыми PR #56/#57/#58/#59).
Что сделано
scripts/model_router.py(VERSION 3.1.0, rules_shaed86d983fcf6→64d839805a07): 9 записей, каждая — 6-строчный блок (как брифовать / требовать строго / страховка / анти-паттерн / канонические настройки / источники), СТРОГО по mapping-таблицеPATTERNS-SOURCES-v2.md(research t_108caa9b, сверка 2026-10-04, sha25676e68e7c…, 33 официальных URL); каждая запись traceable к вендорной цитате, флот-канон помечен. Новые модели:deepseek-v4-flash(§8; паттерн есть, в ROUTES НЕ входит — LADDER правило 1),gpt-5.6-terra— маркер «только флот-канон» сохранён + каталог-верификация t_4e47fef0. ROUTES/engine не тронуты (линия родителя).router_bridge.apply_override— первая строка формата v1.2.36 сохранена, добавлен блокPATTERN v2 (<model>):+ 6 строк. JSON-контракт hook не изменён (decision.pattern— строка). E2E-батареяtests/test_v1236_router_hook.py25/25 (пинROUTER_LIVE_SHAпереставлен на v2-артефактe4770503…).--patterns [MODEL]— детерминированный JSON-контракт (patterns_version/source/rules_sha/models/patterns; неизвестная модель → exit 2; stdlib-only, 0 сети). Контракт задокументирован в ROUTING.md §Provenance; шаблоныtemplates/BRAIN-BRIEF.md,templates/HANDS-DELIVERABLE.md,templates/DELEGATION-CONTEXT.md— каждый агентный бриф несёт официальный паттерн целевой модели.docs/fleet-ops/model-routing-20261003/): intake→декомпозиция→синтез в более широкую профессиональную форму→вопросы одной формой→диспатч с паттерном модели→отчёт человеческим языком; расширяет kanban-card-authoring skill (пропатчен company 04.10).--patternsи потребители; §Паттерны и §CLI синхронизированы с v2.Evidence
python scripts/model_router.py --selftest→ ALL PASS exit 0: 18 ROUTES-кейсов + 5 новых v2-паттерн-кейсов + 9 структурных проверок.--patternsдемонстрация (kimi-k3 целиком, all-models, unknown→exit 2, детерминизм cmp) — в ACCEPTANCE-вложении карты.uv run --frozen pytest tests/ -q→ 913 passed; worker-environment прогон — тот же набор.uv lock --checkok;compileallok;drift-check {"missing": [], "ok": true};fleet-policy --version {"version": "1.2.41"}.build-bundle85 файлов /verify-bundle ok:true(84);uv build→ sdist+wheel 1.2.41.scripts/model_router.py(LF):e47705039a2669de7791ae550326613718d71bb06062280273ed9b712eb09023, 477 строк.Deviations (на ack company/owner)
deepseek-v4-flashдобавлен только в PATTERNS (в ROUTES не входит — bans карты запрещают менять ROUTES-логику).Next
Card: t_234de1e7. Parents: t_108caa9b, t_698a054c, t_9eb08cc4.