Lesson relay: one default-lesson section that names every cop without a lesson #1424
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1424
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Lesson::Catalog#lessonreturns a copy of the_no-lesson-yetdefault for each key that has no lesson file, with that key filled in for{cop}.Lesson::Relay#renderremoves duplicate keys, but two cops without a lesson are two keys. So one gate reply carries the full default text once for each such cop. The agent reads the same steps many times, and the reply grows with no new information. Jared's design, 2026-10-27: collect the keys with no lesson, and render the default once with every such cop named in it.Reproduce
n/a: design change; any gate reply with two or more offenses from cops without a lesson file shows the default text twice.
Approach
The relay owns the decision that a key needs the default. The catalog only finds lesson files.
Catalog#lesson(key)returns nil for a missing file again. A newCatalog#no_lesson_yet(keys)reads_no-lesson-yet.ymlonce and fills{cops}with the key list. A missing_no-lesson-yet.ymlstill raises HarnessError naming the path.needs_lesson?rule from #1419 stays (no default for autocorrectable Layout/Style cops).seen_keysrule applies to the default as it does to each lesson: when every missing key was seen in an earlier reply, the section shows only the signal line with the cop names.Catalog#lesson(offense_directive.rb,gate/run.rb,detector/run.rb,dispatch/brief.rb). A caller that needs the default must get it through the relay orno_lesson_yet.Required work:
{cop}with{cops}in the default lesson file — check: present{cops}inplugins/os-sdlc/lint-lessons/_no-lesson-yet.ymlno_lesson_yetinplugins/os-sdlc/lib/os_sdlc/lesson/relay.rbRejected: keep a default copy per key — repeats the same steps in one reply.
Rejected: remove repeated default text inside the relay by comparing text — hides the design; the relay already knows which keys have no lesson.
Acceptance criteria
Catalog#lessonis called, then it returns nil._no-lesson-yet.ymland a batch with a cop that needs the default, when the relay renders, then it raises an error that names the missing path.Owner sketch
Origin
Catalog#lessonfills one default per key (plugins/os-sdlc/lib/os_sdlc/lesson/catalog.rb) ← DESIGN (#1414)plugins/os-sdlc/lib/os_sdlc/lesson/relay.rb,plugins/os-sdlc/lib/os_sdlc/lesson/catalog.rbVERDICT: CREATE
Work started on branch ticket-1424 through /os-sdlc:implement (poodr-ticket-implementation).
Resolution
Done: Lesson::Relay renders one no-lesson-yet section that names every cop without a lesson ({cops}); Catalog#lesson returns nil for a missing file; Catalog#no_lesson_yet(keys) reads the default once and raises HarnessError naming the path when it is missing; needs_lesson? rule kept; seen_keys shortens the default to its signal line.
Evidence: Implementation 189 merge-ready, branch ticket-1424; Runner commit plus orchestrator test fix
0874b58e(catalog tests moved to no_lesson_yet; seen-key refutes scoped to the default section). Full os-sdlc suite 2773 runs, 0 failures; suite gate green; contract-auditor pass.Follow-ups: Dropped: test_every_enabled_sdlc_cop_has_its_own_lesson_or_gets_the_default is now always true (no Sdlc cop is format-only); kept as the contract statement, no ticket. Workflow note for the session report: decomposition did not list catalog_test.rb as retired tests when Catalog#lesson changed its return contract.