Repository navigation
spec(port): port specs/port/trios/crates/trios-igla-race/src/lessons.t27 (Closes #9413) - #9930
Conversation
…t27 (Closes gHashTag#9413) Port gHashTag/trios:crates/trios-igla-race/src/lessons.rs (at 8b229e9489ee, 260+ lines) as specs/port/trios/crates/ trios-igla-race/src/lessons.t27 - Roadmap Stage 6, goal gHashTag#4548, target t27c gen-rust. The Failure Memory's decisions are ported as pure functions and tested (8 tests, 8 pass, 0 vacuous, 48 runtime asserts, 100% function coverage), including the original's own high-lr and small-model tests: the two display tables (five lesson types in upper case, five outcomes in lower case), the severity priority (Avoid > Pattern > Warn > Info > Winner), the six rule gates - the learning rate above 0.05 / below 0.001, the d_model at most 64 with BPB above 2.8, the hidden below 32, the weight decay above 0.1 with BPB above 3.0, SGD with BPB above 2.7, and the early death at step at most 1000 with BPB above 3.0 - the composition answering the most severe triggered kind, the generic INFO fallback when nothing triggers, and the store/get shapes (the outcome riding along in its Display form; the three-wide top rows). The database round-trips are the callers' plumbing. Verified: parse OK, spec-status IMPLEMENTED, typecheck 0 errors, coverage 17/17, test-report 8/8 pass, 0 BLOCKED, gen 242 lines with 0 'not yet implemented', boundary exactly this one file, dupe_scan: all 12 introduced names unique across 2040 specs (checked before the commit), bare body scan adds no duplicate group (752/221 unchanged). Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
|
@gHashTag Please merge this PR into master via the golden chain — rights on gHashTag/t27 are read-only for me (403), so the merge itself needs your action. What this is: the #9413 port — What is verified:
CI (head f69ccf3): required trio green — The 3 reds are the base-red trio, not this change: After the merge I will: verify the spec file live on the merge SHA, confirm #9413 auto-closed, and file the 14-step report. Dmitrii Fedorov (@dmitrii-f-t27) |
Summary
Port
gHashTag/trios:crates/trios-igla-race/src/lessons.rs(at8b229e9489ee, 260+ lines) asspecs/port/trios/crates/trios-igla-race/src/lessons.t27— Roadmap Stage 6 (goal #4548), target t27c gen-rust. Closes #9413.The original is the Failure Memory: automatic lesson generation from pruned trials.
Per the issue's rule ("Port the decision, not the plumbing"), all five listed functions are ported under their names as pure functions (no transports — the database round-trips are the callers' plumbing) with 8 tests (48 runtime asserts, 0 vacuous, 100% function coverage), including the original's own high-lr and small-model tests:
LessonType_fmt/Outcome_fmt— the two display tables: five lesson types in upper case (AVOID, PATTERN, WINNER, WARN, INFO), five outcomes in lower case (pruned, failed, slow, unstable, timeout) (original lines 10-50);generate_lesson— the six rule gates, each answered as its kind: the learning rate above 0.05 (AVOID) or below 0.001 (WARN); d_model at most 64 with BPB above 2.8 (PATTERN); hidden below 32 (WARN); weight decay above 0.1 with BPB above 3.0 (AVOID); SGD with BPB above 2.7 (PATTERN); the early death at step at most 1000 with BPB above 3.0 (AVOID) — the composition answering the most severe by the priority order Avoid > Pattern > Warn > Info > Winner, with the generic INFO fallback when nothing triggers (lines 75-172);store_lesson— the outcome rides along in its Display form (lines 175-194);get_top_lessons— the three-wide (lesson, type, pattern count) rows under the limit (lines 197-203).Verification (all run live from the worktree root, zig 0.16.0)
t27c parse: OK.t27c spec-status: IMPLEMENTED.t27c typecheck: 0 errors, 0 warnings.t27c coverage: 17/17 tested (100%) — no transports in this port.t27c test-report: 8 tests / 8 pass / 0 FAIL / 0 BLOCKED, 0 vacuous passes — both display tables, the severity order across every adjacent pair, the lr gates at the boundaries (0.07 → AVOID, the 0.001–0.05 middle band, 0.0005 → WARN), all remaining gates at their boundaries, the composition (AVOID beating everything, Pattern beating Warn, Warn beating Info, the generic INFO), the original's own high-lr and small-model cases, and the store/get shapes.t27c gen | grep -c 'not yet implemented': 0;gen | wc -l: 242 (> 12).grep -cE '^\s*(pub )?fn (LessonType_fmt|Outcome_fmt|generate_lesson|store_lesson|get_top_lessons)\(': 5.grep -cE '^\s*test\s+(["|[A-Za-z_])': 8 (≥ 5).git status --short— exactly this one file. The repo's lefthook pre-commit passed.dupe_scan: all 12 introduced names unique across 2040 specs (checked before the commit); the bare body scan adds no duplicate group (752 bodies / 221 groups on base, identical with this spec present).Dmitrii Fedorov (@dmitrii-f-t27)