Sdlc/Structural/EffectInModel: fix wrong and missed effect records #1351
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#1351
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
The recording cop
Sdlc/Structural/EffectInModelrecords wrong effects and misses real ones in ledgermodel/valuefiles.It is loaded only by
.rubocop-sweep.yml; it has 36 records in lib/.Found by the #1325 zero-false-positive audit (docs/plans/class-length-family/sdlc-cop-audit.md).
Observed
Sample file:
Wrong records:
File.fnmatch?(a),File.absolute_path?(b),Kernel.format(d),File.split(h) are pure.Missed record:
FileUtils.mkdir_p(c) is a real effect.Reproduce
n/a: matcher is
plugins/os-sdlc/lib/os_sdlc/cops/effect_in_model/effect_call.rb; run the cop on the sample above with amodelledger role.Approach
Fixes go in the cop matcher, never in a config Exclude list or a test-path exclusion.
Add
fnmatch,fnmatch?,absolute_path,absolute_path?, andsplitto the pure File methods.Record
Kernelonly for effect methods, notformat,Integer, orFloat.Add
FileUtilsto the effect constants.Required work:
FileUtilsand the pure File methods — check: presentFileUtilsinplugins/os-sdlc/lib/os_sdlc/cops/effect_in_model/effect_call.rbAcceptance criteria
File.fnmatch?(glob, path)in a model file, when the cop runs, then it records nothing.Kernel.format("%d", 1)in a model file, when the cop runs, then it records nothing.FileUtils.mkdir_p(dir)in a model file, when the cop runs, then it records an effect.Origin
VERDICT: CREATE
jared referenced this issue2026-11-02 21:49:06 +00:00