Lens proposal: A15 NOT-clause for published gem constants (decision-model #2) #1302

Open
opened 2026-10-23 23:03:40 +00:00 by jared · 1 comment
Owner

LENS line

LENS: A15 broken at lib/decision/model/option_score.rb:5 (also kappa.rb:5, confusion_matrix.rb:5) - BREAKS: top-level constants whose only library callers are in Evaluation; JUSTIFIED: yes, Kappa and ConfusionMatrix are gem public API for callers in other codebases; PROPOSAL: EDIT A15, add NOT: nesting a gem constant that is published API for callers in other codebases.

Challenge verdict

Heuristic holds; edit rejected. No other codebase calls Decision::Model::Kappa (cc-os plugins/os-me/eval/reply_shape/run.rb:95 has its own def kappa). Evaluation::Kappa would still be public. The clause would excuse every gem constant (fails checklist Q3 and Q4).


Discoverer: /home/jared/dev/ruby-gems/decision-model, session b6d48eed-a394-4b5d-ac38-c8bee60b0902, 2026-10-23. LENS line from an os-sdlc run, challenged against the code.

## LENS line LENS: A15 broken at lib/decision/model/option_score.rb:5 (also kappa.rb:5, confusion_matrix.rb:5) - BREAKS: top-level constants whose only library callers are in Evaluation; JUSTIFIED: yes, Kappa and ConfusionMatrix are gem public API for callers in other codebases; PROPOSAL: EDIT A15, add NOT: nesting a gem constant that is published API for callers in other codebases. ## Challenge verdict Heuristic holds; edit rejected. No other codebase calls Decision::Model::Kappa (cc-os plugins/os-me/eval/reply_shape/run.rb:95 has its own def kappa). Evaluation::Kappa would still be public. The clause would excuse every gem constant (fails checklist Q3 and Q4). -------- **Discoverer:** /home/jared/dev/ruby-gems/decision-model, session b6d48eed-a394-4b5d-ac38-c8bee60b0902, 2026-10-23. LENS line from an os-sdlc run, challenged against the code.
Author
Owner

Same mechanism seen again: a new contract audit proposes the A15 NOT-clause for a published gem constant. Discoverer line below.

LENS line (verbatim): LENS: A15 broken at lib/decision/model/error_kind.rb:5 - BREAKS: top-level ErrorKind has only one library caller concept (Batch), and A2 defect 3 says to nest it; JUSTIFIED: yes, the ticket owner sketch and error_kind_test fix the public constant Decision::Model::ErrorKind for gem consumers in other codebases, and nesting it changes the test contract (principle 7, public seam); PROPOSAL: EDIT A15, add NOT nesting a constant that the gem exports to other codebases as public API only because its in-repo callers are in one concept (Ousterhout ch. 4: the public interface is the module contract).

Challenge verdict (opus agent, lens-challenge-checklist.md): heuristic holds; reject the edit. No repository other than decision-model names ErrorKind (checked the ruby-gems and cc-os trees). The README does not name it. The library caller is lib/decision/model/batch/pass.rb:56; the other caller is test/decision/model/error_kind_test.rb:16. The clause would exempt every top-level object in every gem, which fails checklist Q3 and Q4. The real reason ErrorKind stays top-level is the planned second caller (Comparison, decision-model ticket #26); see the separate A2 lens proposal filed in the same run.


Discoverer: decision-model, session 6098efae-bfd3-433e-9752-524dfeb59c5c, 2026-11-12. os-sdlc implementation 7 (ticket #25), contract audit dispatch 77.

Same mechanism seen again: a new contract audit proposes the A15 NOT-clause for a published gem constant. Discoverer line below. LENS line (verbatim): LENS: A15 broken at lib/decision/model/error_kind.rb:5 - BREAKS: top-level ErrorKind has only one library caller concept (Batch), and A2 defect 3 says to nest it; JUSTIFIED: yes, the ticket owner sketch and error_kind_test fix the public constant Decision::Model::ErrorKind for gem consumers in other codebases, and nesting it changes the test contract (principle 7, public seam); PROPOSAL: EDIT A15, add NOT nesting a constant that the gem exports to other codebases as public API only because its in-repo callers are in one concept (Ousterhout ch. 4: the public interface is the module contract). Challenge verdict (opus agent, lens-challenge-checklist.md): heuristic holds; reject the edit. No repository other than decision-model names ErrorKind (checked the ruby-gems and cc-os trees). The README does not name it. The library caller is lib/decision/model/batch/pass.rb:56; the other caller is test/decision/model/error_kind_test.rb:16. The clause would exempt every top-level object in every gem, which fails checklist Q3 and Q4. The real reason ErrorKind stays top-level is the planned second caller (Comparison, decision-model ticket #26); see the separate A2 lens proposal filed in the same run. -------- **Discoverer:** decision-model, session 6098efae-bfd3-433e-9752-524dfeb59c5c, 2026-11-12. os-sdlc implementation 7 (ticket #25), contract audit dispatch 77.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1302
No description provided.