Add four group C patterns to the catalog as loose patterns #1549
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#1549
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
docs/system-design-format/pattern-landscape.mdmarks Builder, Mapper, Factory and Domain Service asexpressible now, andcatalog/does not hold them. The detector cannot present these class-scale shapes.The group C threshold of 1 comes from run 3: group C never reached convergence 2, and GATE alone confirmed 5 of 6 findings (pattern-matching.md section 5). At threshold 1, every misfit of a strict pattern goes straight into the ranking. A scratch run with the four patterns strict changed these group C rows: os-backlog 6 (15 to 19), os-me 2 (12 to 13), os-sdlc 12 (66 to 77). The scratch rows from
Rule::BypassedFactoryandRule::CoupledSubsystemshave no review behind them, and a new strict flag on a GATE line also doubles the score of that line.Reproduce
n/a: this ticket adds catalog data; no defect exists to reproduce.
Approach
How the new patterns enter convergence. Each new pattern sets
strict?: false, under the entry rule fromcatalog-group-a.Convergence#flagsdrops the matches of a loose pattern, so a new pattern adds no group C row, adds no convergence count, and changes no score. Threshold 1 stays valid. A scratch run confirmed identical group C rows over os-backlog, os-me and os-sdlc.Effect on
present. The new patterns are loose, so their rows go to theloose_presentsection that #1548 adds. The scratch run gave these rows: os-backlog 28, os-me 6, os-sdlc 19. Nobody reviewed them. The rows of the current patterns stay the same.Order. Ship this ticket after
catalog-group-a. That ticket addsClassFacts#called_namespaces, and it replaces the test that says TXS is the one loose pattern.Pattern roles and rules. Each item quotes the
Revealing signalstext of the landscape row.BLD): "Class keeps state across two or more step methods (returnselfor set ivars) and a finalbuild/result/to_*that callsProduct.new." RoleBuilder. Rule R1 flags a construct outside the final method. The predicate leaves outto_*: withto_*,OpportunityScanfit the role, becauseto_hand a memoized ivar give the same facts. The predicate needspure?: without it,Daemon::LspSessionfit the role because its interface listsbuild. With both limits, no class in os-backlog, os-me or os-sdlc fits. That miss is acceptable.MAP): "A class calls two subsystems that do not call each other, and moves data between them." RolesMapper,Subsystem. Rule R1 flags a call between the two namespaces. No fact shows "moves data". The predicate requires a stateless pure class that calls exactly two namespaces.FTY): "A class or class method whose job is to build a complex object with its invariants: method stereotypefactory(new,build,for,from,create,parse); constructs two or more classes." RolesFactory,Client. The predicate leaves outnew, because every class answers it. It counts only factory construct sites (Construct#factory?). Rule R1 flags another class in the component that constructs a product of the factory.DSV): "A stateless, pure class named for an operation that works on two or more domain objects." RolesDomainService,Edge. Rule R1 forbids I/O, except onEdge. A role predicate cannot see the class name, so "named for an operation" is not measured. The landscape calls the P&F Filter predicate "near-identical", so this pattern must stay out of convergence until a review separates them.Required work:
id: "BLD"inplugins/os-sdlc/lib/os_sdlc/system_model/catalog/builder.rbid: "MAP"inplugins/os-sdlc/lib/os_sdlc/system_model/catalog/mapper.rbid: "FTY"inplugins/os-sdlc/lib/os_sdlc/system_model/catalog/factory.rbid: "DSV"inplugins/os-sdlc/lib/os_sdlc/system_model/catalog/domain_service.rbstrict?: falseinplugins/os-sdlc/lib/os_sdlc/system_model/catalog/domain_service.rbStrayConstruct = Data.defineinplugins/os-sdlc/lib/os_sdlc/system_model/pattern/rule/stray_construct.rbCoupledSubsystems = Data.defineinplugins/os-sdlc/lib/os_sdlc/system_model/pattern/rule/coupled_subsystems.rbBypassedFactory = Data.defineinplugins/os-sdlc/lib/os_sdlc/system_model/pattern/rule/bypassed_factory.rbCatalog.patterns— check: presentDomainServiceinplugins/os-sdlc/lib/os_sdlc/system_model/catalog.rbIDSin the catalog test — check: presentBLD MAP FTY DSVinplugins/os-sdlc/tests/system_model_catalog_test.rbOrchestrator work: add one History row to
docs/implementation-status/os-sdlc-system-model.md.Rejected: strict patterns at threshold 1 — each misfit enters the ranking with no review, and overlap with GATE doubles scores. Group C threshold 2 — run 3 never reached 2, so the threshold would remove the confirmed GATE findings.
Acceptance criteria
Convergencecounts the line, then the count is 1.opportunities --jsonoutput for os-backlog, os-me and os-sdlc before this ticket, when the command runs after this ticket, then thegroupsvalue of each plugin is the same.opportunitiesoutput before this ticket, when the command runs after this ticket, then thepresentrows of strict patterns are the same, and each row of a new pattern is in theloose_presentsection.shapesruns after this ticket, then the detail is stillconvergence A:3 C:0.initialize, three public messages includingbuild, and a construct, when theBLDBuilderrole tests it, then it fits.to_hand a memoized ivar and a construct, and nobuildorresult, when theBLDBuilderrole tests it, then it does not fit.Builderclass with a construct in a step method, whenBLDmatches the component, then R1 flags the line of that construct.MAPMapperrole tests it, then it fits.MAPmatches the component, then R1 flags the line of that call.buildand factory constructs of two classes, when theFTYFactoryrole tests it, then it fits.newand constructs two classes, when theFTYFactoryrole tests it, then it does not fit.FTYmatches the component, then R1 flags the line of that construct.DSVDomainServicerole tests it, then it fits.DomainServicewhen its I/O is removed and that is notEdge, whenDSVmatches the component, then R1 flags the I/O line.Owner sketch
Non-goals
Do not set any new pattern to strict. Do not change
Catalog.thresholds, the 0.05 threshold, orMatch#present?. Do not add a fact for memoized ivars.Retired tests
plugins/os-sdlc/tests/system_model_catalog_test.rb#test_the_added_patterns_are_in_the_class_group
Origin
docs/system-design-format/pattern-landscape.mdmarks four group C rowsexpressible now, andcatalog/holds only VIS, GATE and SPEC of group C.docs/system-design-format/pattern-matching.mdsection 5.plugins/os-sdlc/lib/os_sdlc/system_model/catalog.rbVERDICT: CREATE
Work started on branch ticket-1549.
Resolution
Done: Added four loose group C patterns and three rules.
Evidence: Implementation 233 merge-ready; suite gate and contract audit passed on branch ticket-1549.
Follow-ups: dropped: the Mapper precision gap the auditor noted, since the pattern is loose and gives no flags; review it in the calibration run