Clear Sdlc/Structural edge-cop offenses in config and ticket_body files #1690

Open
opened 2026-11-11 07:04:43 +00:00 by jared · 0 comments
Owner

Problem

RuboCop reports 12 offenses of two Sdlc/Structural cops in seven untouched os-sdlc files.
The cops are Sdlc/Structural/DomainEffectInEdge and Sdlc/Structural/PrecedenceInEdge.
The Thor session left these files alone.
Ticket #1560 already covers five of the files (see Non-goals); this ticket covers the ones it does not.

Observed

Run in plugins/os-sdlc on main (commit 031244657) with bundle exec rubocop <files> --format emacs.
Offenses in files that no open ticket covers:

lib/os_sdlc/project/config/document.rb:36:11: C: Sdlc/Structural/DomainEffectInEdge: An edge turns what it read into a verdict, a selection of work, or a next step. Return the values it read; a decision object or the value that owns the data decides.
lib/os_sdlc/project/config/document.rb:67:29: C: Sdlc/Structural/PrecedenceInEdge: An edge picks which of two sources wins for one fact. Return both values in the resource's terms; a decision object or the value that owns the data picks.
lib/os_sdlc/project/config/document.rb:77:11: C: Sdlc/Structural/PrecedenceInEdge: An edge picks which of two sources wins for one fact. Return both values in the resource's terms; a decision object or the value that owns the data picks.
lib/os_sdlc/project/config_command.rb:29:7: C: Sdlc/Structural/PrecedenceInEdge: An edge picks which of two sources wins for one fact. Return both values in the resource's terms; a decision object or the value that owns the data picks.
lib/os_sdlc/collaborator_pass/command/ticket_body.rb:24:11: C: Sdlc/Structural/DomainEffectInEdge: An edge turns what it read into a verdict, a selection of work, or a next step. Return the values it read; a decision object or the value that owns the data decides.

Offenses in files that #1560 names (line numbers on main today; tracer.rb was :81 in #1560, and the test path was tests/):

lib/os_sdlc/system_model/extractor/scripts.rb:16:32: C: Sdlc/Structural/DomainEffectInEdge
lib/os_sdlc/system_model/overlay_check.rb:34:15: C: Sdlc/Structural/DomainEffectInEdge
lib/os_sdlc/system_model/tracer.rb:80:9: C: Sdlc/Structural/DomainEffectInEdge
test/system_model_catalog_test.rb:33:20, :45:20, :49:20, :61:20: C: Sdlc/Structural/DomainEffectInEdge

The session reported "lint offenses also exist in untouched files" and named extractor/scripts.rb and overlay_check.rb without the system_model/ directory; the paths above are the real ones.
The session did not run RuboCop on a clean main before the change; this run is on main.

Reproduce

cd plugins/os-sdlc && bundle exec rubocop lib/os_sdlc/system_model/extractor/scripts.rb lib/os_sdlc/system_model/overlay_check.rb lib/os_sdlc/project/config/document.rb lib/os_sdlc/project/config_command.rb test/system_model_catalog_test.rb lib/os_sdlc/collaborator_pass/command/ticket_body.rb lib/os_sdlc/system_model/tracer.rb --format emacs

Approach

Clear the five offenses in document.rb, config_command.rb, and ticket_body.rb through the lint lessons of the two cops (plugins/os-sdlc/lint-lessons/), one fix per offense, with no behavior change.
Use the cop-named fast path (docs/sdlc-fast-path.md).

Required work:

  1. Clear the offenses in the three files — check: absent rubocop:disable in plugins/os-sdlc/lib/os_sdlc/project/config/document.rb

Acceptance criteria

  1. Given the three files, when bundle exec rubocop runs on them, then it reports no offense.
  2. Given the test suite, when it runs, then it passes with no change in behavior.

Owner sketch

class OsSdlc::Project::Config::Document
  def initialize(...)
end

Non-goals (optional)

The five offenses in extractor/scripts.rb, overlay_check.rb, tracer.rb, and system_model_catalog_test.rb; ticket #1560 covers them (update its paths: tests/ is now test/, and tracer.rb:81 is now :80).
The RuboCop crash of ParameterThreadedThroughPrivateMethods (ticket #1102).

Origin

  • Trigger: the session ran RuboCop on its changed files and saw offenses in files it did not change.
  • Improvised this session: none
  • Chain: offenses in untouched files ← two edge cops (DomainEffectInEdge, PrecedenceInEdge) report code written before the cops existed ← no ticket covered these files (#1560 covers five of seven)
  • Root candidate: none found (ticket-skeptic)
  • Where: plugins/os-sdlc/lib/os_sdlc/project/config/document.rb, plugins/os-sdlc/lib/os_sdlc/project/config_command.rb, plugins/os-sdlc/lib/os_sdlc/collaborator_pass/command/ticket_body.rb
  • Session: a48658d5-b566-40ce-8257-ebeabf56f7e1
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/a48658d5-b566-40ce-8257-ebeabf56f7e1.jsonl

VERDICT: CREATE
REASON: Offenses existed before the Thor change; #1560 names other files and one other cop.

## Problem RuboCop reports 12 offenses of two `Sdlc/Structural` cops in seven untouched os-sdlc files. The cops are `Sdlc/Structural/DomainEffectInEdge` and `Sdlc/Structural/PrecedenceInEdge`. The Thor session left these files alone. Ticket #1560 already covers five of the files (see Non-goals); this ticket covers the ones it does not. ## Observed Run in `plugins/os-sdlc` on `main` (commit `031244657`) with `bundle exec rubocop <files> --format emacs`. Offenses in files that no open ticket covers: ``` lib/os_sdlc/project/config/document.rb:36:11: C: Sdlc/Structural/DomainEffectInEdge: An edge turns what it read into a verdict, a selection of work, or a next step. Return the values it read; a decision object or the value that owns the data decides. lib/os_sdlc/project/config/document.rb:67:29: C: Sdlc/Structural/PrecedenceInEdge: An edge picks which of two sources wins for one fact. Return both values in the resource's terms; a decision object or the value that owns the data picks. lib/os_sdlc/project/config/document.rb:77:11: C: Sdlc/Structural/PrecedenceInEdge: An edge picks which of two sources wins for one fact. Return both values in the resource's terms; a decision object or the value that owns the data picks. lib/os_sdlc/project/config_command.rb:29:7: C: Sdlc/Structural/PrecedenceInEdge: An edge picks which of two sources wins for one fact. Return both values in the resource's terms; a decision object or the value that owns the data picks. lib/os_sdlc/collaborator_pass/command/ticket_body.rb:24:11: C: Sdlc/Structural/DomainEffectInEdge: An edge turns what it read into a verdict, a selection of work, or a next step. Return the values it read; a decision object or the value that owns the data decides. ``` Offenses in files that #1560 names (line numbers on `main` today; `tracer.rb` was `:81` in #1560, and the test path was `tests/`): ``` lib/os_sdlc/system_model/extractor/scripts.rb:16:32: C: Sdlc/Structural/DomainEffectInEdge lib/os_sdlc/system_model/overlay_check.rb:34:15: C: Sdlc/Structural/DomainEffectInEdge lib/os_sdlc/system_model/tracer.rb:80:9: C: Sdlc/Structural/DomainEffectInEdge test/system_model_catalog_test.rb:33:20, :45:20, :49:20, :61:20: C: Sdlc/Structural/DomainEffectInEdge ``` The session reported "lint offenses also exist in untouched files" and named `extractor/scripts.rb` and `overlay_check.rb` without the `system_model/` directory; the paths above are the real ones. The session did not run RuboCop on a clean `main` before the change; this run is on `main`. ## Reproduce ``` cd plugins/os-sdlc && bundle exec rubocop lib/os_sdlc/system_model/extractor/scripts.rb lib/os_sdlc/system_model/overlay_check.rb lib/os_sdlc/project/config/document.rb lib/os_sdlc/project/config_command.rb test/system_model_catalog_test.rb lib/os_sdlc/collaborator_pass/command/ticket_body.rb lib/os_sdlc/system_model/tracer.rb --format emacs ``` ## Approach Clear the five offenses in `document.rb`, `config_command.rb`, and `ticket_body.rb` through the lint lessons of the two cops (`plugins/os-sdlc/lint-lessons/`), one fix per offense, with no behavior change. Use the cop-named fast path (`docs/sdlc-fast-path.md`). Required work: 1. Clear the offenses in the three files — check: absent `rubocop:disable` in `plugins/os-sdlc/lib/os_sdlc/project/config/document.rb` ## Acceptance criteria 1. Given the three files, when `bundle exec rubocop` runs on them, then it reports no offense. 2. Given the test suite, when it runs, then it passes with no change in behavior. ## Owner sketch ```ruby class OsSdlc::Project::Config::Document def initialize(...) end ``` ## Non-goals (optional) The five offenses in `extractor/scripts.rb`, `overlay_check.rb`, `tracer.rb`, and `system_model_catalog_test.rb`; ticket #1560 covers them (update its paths: `tests/` is now `test/`, and `tracer.rb:81` is now `:80`). The RuboCop crash of `ParameterThreadedThroughPrivateMethods` (ticket #1102). ## Origin - Trigger: the session ran RuboCop on its changed files and saw offenses in files it did not change. - Improvised this session: none - Chain: offenses in untouched files ← two edge cops (`DomainEffectInEdge`, `PrecedenceInEdge`) report code written before the cops existed ← no ticket covered these files (#1560 covers five of seven) - Root candidate: none found (ticket-skeptic) - Where: plugins/os-sdlc/lib/os_sdlc/project/config/document.rb, plugins/os-sdlc/lib/os_sdlc/project/config_command.rb, plugins/os-sdlc/lib/os_sdlc/collaborator_pass/command/ticket_body.rb - Session: a48658d5-b566-40ce-8257-ebeabf56f7e1 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/a48658d5-b566-40ce-8257-ebeabf56f7e1.jsonl VERDICT: CREATE REASON: Offenses existed before the Thor change; #1560 names other files and one other cop.
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#1690
No description provided.