Boot parses argv for Lint::Remediation so ArgvOption can move under Boot #1147

Closed
opened 2026-10-18 23:30:49 +00:00 by jared · 2 comments
Owner

Problem

lib/os_sdlc/lint/remediation.rb:12 reads argv itself through OsSdlc::ArgvOption.
That one Lint caller is why ArgvOption cannot nest under Boot.
CRC run 2 rulings R89 and Q30 kept it top-level with a deviation line.
Standing-rules Precedence 3 says the entry layer parses and passes the value in.

Reproduce

n/a: design.

Approach

Required work:

  1. The entry for lint-worklist (plugins/os-sdlc/bin/lint-worklist, the only caller of Remediation; no Boot command spec exists for it) parses --target NAME and passes the value to Lint::Remediation.run as target:. — check: present Boot::ArgvOption.take!(ARGV, "--target NAME") in plugins/os-sdlc/bin/lint-worklist
  2. Lint::Remediation.run takes target: (default nil) and stops naming ArgvOption. — check: present def self.run(argv:, cwd:, target: nil) in plugins/os-sdlc/lib/os_sdlc/lint/remediation.rb
  3. No Lint file names ArgvOption. — check: absent ArgvOption in plugins/os-sdlc/lib/os_sdlc/lint/**/*.rb
  4. Move argv_option.rb to lib/os_sdlc/boot/argv_option.rb as OsSdlc::Boot::ArgvOption (a structure-only move; the Boot callers resolve it by nesting). — check: present module ArgvOption in plugins/os-sdlc/lib/os_sdlc/boot/argv_option.rb
  5. Move tests/argv_option_test.rb to tests/boot/argv_option_test.rb and point it at OsSdlc::Boot::ArgvOption; the assertions stay the same. — check: absent OsSdlc::ArgvOption in plugins/os-sdlc/tests/**/*.rb

Acceptance criteria

  1. No ArgvOption reference exists under lib/os_sdlc/lint/.
  2. grep -rn 'ArgvOption' plugins/os-sdlc/lib shows only boot/.
  3. The suite reports 0 failures.
  4. The eager load is silent.

Owner sketch

class OsSdlc::Boot
  module ArgvOption
    def self.take!(argv, spec)
    end
  end
end

class OsSdlc::Lint::Remediation
  def self.run(argv:, cwd:, target: nil)
  end
end

Origin

  • Session: ca7a7686-22a8-4463-86d5-c542e7d9f215
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/ca7a7686-22a8-4463-86d5-c542e7d9f215.jsonl
  • Where: plugins/os-sdlc/lib/os_sdlc/lint/remediation.rb:12; lib/os_sdlc/argv_option.rb; lib/os_sdlc/boot/commands.rb
  • Root candidate: none found; searched ArgvOption, Remediation argv, Precedence 3
  • Run: CRC refactor run 2, docs/crc/os-sdlc (HANDOFF.md, deviations.md)
    VERDICT: CREATE
## Problem lib/os_sdlc/lint/remediation.rb:12 reads argv itself through OsSdlc::ArgvOption. That one Lint caller is why ArgvOption cannot nest under Boot. CRC run 2 rulings R89 and Q30 kept it top-level with a deviation line. Standing-rules Precedence 3 says the entry layer parses and passes the value in. ## Reproduce n/a: design. ## Approach Required work: 1. The entry for lint-worklist (`plugins/os-sdlc/bin/lint-worklist`, the only caller of Remediation; no Boot command spec exists for it) parses `--target NAME` and passes the value to `Lint::Remediation.run` as `target:`. — check: present `Boot::ArgvOption.take!(ARGV, "--target NAME")` in `plugins/os-sdlc/bin/lint-worklist` 2. `Lint::Remediation.run` takes `target:` (default nil) and stops naming ArgvOption. — check: present `def self.run(argv:, cwd:, target: nil)` in `plugins/os-sdlc/lib/os_sdlc/lint/remediation.rb` 3. No Lint file names ArgvOption. — check: absent `ArgvOption` in `plugins/os-sdlc/lib/os_sdlc/lint/**/*.rb` 4. Move argv_option.rb to lib/os_sdlc/boot/argv_option.rb as `OsSdlc::Boot::ArgvOption` (a structure-only move; the Boot callers resolve it by nesting). — check: present `module ArgvOption` in `plugins/os-sdlc/lib/os_sdlc/boot/argv_option.rb` 5. Move tests/argv_option_test.rb to tests/boot/argv_option_test.rb and point it at `OsSdlc::Boot::ArgvOption`; the assertions stay the same. — check: absent `OsSdlc::ArgvOption` in `plugins/os-sdlc/tests/**/*.rb` ## Acceptance criteria 1. No `ArgvOption` reference exists under lib/os_sdlc/lint/. 2. `grep -rn 'ArgvOption' plugins/os-sdlc/lib` shows only boot/. 3. The suite reports 0 failures. 4. The eager load is silent. ## Owner sketch ```ruby class OsSdlc::Boot module ArgvOption def self.take!(argv, spec) end end end class OsSdlc::Lint::Remediation def self.run(argv:, cwd:, target: nil) end end ``` ## Origin - Session: ca7a7686-22a8-4463-86d5-c542e7d9f215 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/ca7a7686-22a8-4463-86d5-c542e7d9f215.jsonl - Where: plugins/os-sdlc/lib/os_sdlc/lint/remediation.rb:12; lib/os_sdlc/argv_option.rb; lib/os_sdlc/boot/commands.rb - Root candidate: none found; searched ArgvOption, Remediation argv, Precedence 3 - Run: CRC refactor run 2, docs/crc/os-sdlc (HANDOFF.md, deviations.md) VERDICT: CREATE
Author
Owner

Work started on branch crc-os-sdlc-run-3 (persistent worktree, run 3 collaborator round), structure-change map.

Work started on branch crc-os-sdlc-run-3 (persistent worktree, run 3 collaborator round), structure-change map.
Author
Owner

Resolution

Done: ArgvOption moved to OsSdlc::Boot::ArgvOption (lib/os_sdlc/boot/argv_option.rb, tests/boot/argv_option_test.rb). Lint::Remediation.run takes target:; bin/lint-worklist parses --target NAME. Merged to main.

Evidence: 052849c5, 0d04165e (old-path deletions the Runner commit left staged). Gate green on dispatch 790: required-work, lint, test-lint, suite 47.7 s, unchanged.

Follow-ups: Recorded in docs/crc/os-sdlc/HANDOFF.md for the close-out skeptic: Runner commit leaves git mv deletions staged and uncommitted (dirty_paths); tests/all.rb measures suite wall time with Time.now, which counts machine suspend (use CLOCK_MONOTONIC).

## Resolution **Done:** ArgvOption moved to OsSdlc::Boot::ArgvOption (lib/os_sdlc/boot/argv_option.rb, tests/boot/argv_option_test.rb). Lint::Remediation.run takes target:; bin/lint-worklist parses --target NAME. Merged to main. **Evidence:** 052849c5, 0d04165e (old-path deletions the Runner commit left staged). Gate green on dispatch 790: required-work, lint, test-lint, suite 47.7 s, unchanged. **Follow-ups:** Recorded in docs/crc/os-sdlc/HANDOFF.md for the close-out skeptic: Runner commit leaves git mv deletions staged and uncommitted (dirty_paths); tests/all.rb measures suite wall time with Time.now, which counts machine suspend (use CLOCK_MONOTONIC).
jared closed this issue 2026-10-20 01:39:51 +00:00
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#1147
No description provided.