Lens proposal: A15 NOT-clause for published gem constants (decision-model #2) #1302
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#1302
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?
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.
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.