chore(memory): BDR-116 amendment, LRN-216, EVAL-047, TODO + journal, router-downgrade-cap contract + plan
This commit is contained in:
1 parent
e8186409df
commit
ab963e97dc
7 files changed
+304
No files matched your search
@@ -1801,3 +1801,7 @@ Rule: when editing a doctrine file under structure locks, grep the test's lock s
|
||||
## LRN-215 — helper extracted from a `set -e` function must be called as a plain statement; `helper || …` / `if helper` switches errexit OFF inside it
|
||||
- **Context**: code-clean B5/B7/B9 split enable_tool / enable_skill / cmd_show out of `set -euo pipefail` scripts. r2 executor rule said `|| return $?`; confirmation lens: that form disables errexit inside the helper, so a failed `mv` (toggle-external.sh:273) would print `ok …` rc 0 instead of aborting — a path no golden capture sees. Plain call keeps `return 1` → errexit in caller → exit 1 as today.
|
||||
- **Apply**: split rule for -e scripts: plain calls only, never `||`, `&&`, `if`, `!` around an extracted helper. Golden capture (stdout + stderr + rc + fixture tree) before/after for every moved arm when the suite discards output. Links [[LRN-214]], [[EVAL-046]].
|
||||
|
||||
## LRN-216 — Capping a main-loop model switch = cap the COLD READ (context − target's warm prefix), never the context size; the warm record must be written on EVERY main step
|
||||
- **Context**: model-router downgrade cap 2026-10-13. r1 compared context size to cap → after N coding turns sonnet warm, fable cold; context crosses cap → next coding turn starts on fable (cold) and cheap re-down refused = worst outcome. r2 fixed measure, but wrote `served` only on routed steps → unrouted steps on session model invisible → return to fable refused above 200k (confirmation pass BLOCKER). Per-model prefix cache (LRN-204): cost of switch INTO M = tokens − tokens at M's last step if within TTL, else all; context smaller than record = history rewritten (compaction) = cold.
|
||||
- **Apply**: any "switch model when cheap" logic: (1) keep `{at, tokens}` per model id, written at every step of the loop whatever the routing; (2) cost = delta vs that record within TTL, whole context otherwise or when record > current; (3) unknown size = blocked; (4) no special-case "return to session model" bypass, the measure covers it. A guess-sourced route ranks vs the SESSION model, not the current one, or a breaker fallback walks down to the cheapest tier. Links [[BDR-116]], [[LRN-204]], [[EVAL-047]].
|
||||
Reference in new issue
Block a user