Record fixtures for ProcessIO, Finding, Signal, StepOutcome, SourceTree, Location #1465

Closed
opened 2026-10-28 16:56:48 +00:00 by jared · 3 comments
Owner

Problem

Six lib records with required fields are hand-built in 9 to 23 test files each.
Each copy is a Mystery Guest.

  1. ProcessIO — 23 files; all five fields required; example plugins/os-sdlc/tests/boot_event_script_bind_test.rb:13.
  2. CollaboratorPass::Finding — 17 files; five required; example plugins/os-sdlc/tests/collaborator_pass/from_rows_test.rb:9.
  3. Detector::Signal — 16 files; eight required; example plugins/os-sdlc/tests/collaborator_pass/from_rows_test.rb:24.
  4. StepOutcome — 9 files; step, exit_status, output required; example plugins/os-sdlc/tests/implementation_lint_failures_test.rb:33.
  5. Evidence::SourceTree — 9 files; root required; example plugins/os-sdlc/tests/evidence_expected_new_test.rb:22.
  6. Daemon::Location — 9 files; path, line, column required; example plugins/os-sdlc/tests/daemon/location_test.rb:32.
    Project::Target has every field defaulted, so it needs no fixture (rule 3).

Approach

Add one <Record>Fixture module per class in plugins/os-sdlc/tests/support, each with build(**overrides).
Make one fast-batch finding per class.
The class's own unit test keeps calling .new.
This ticket depends on the WorkOrderFixture ticket only for the pattern.

Required work:

  1. ProcessIO — check: present module ProcessIOFixture in plugins/os-sdlc/tests/support/process_io_fixture.rb
  2. Finding — check: present module FindingFixture in plugins/os-sdlc/tests/support/finding_fixture.rb
  3. Signal — check: present module SignalFixture in plugins/os-sdlc/tests/support/signal_fixture.rb
  4. StepOutcome — check: present module StepOutcomeFixture in plugins/os-sdlc/tests/support/step_outcome_fixture.rb
  5. SourceTree — check: present module SourceTreeFixture in plugins/os-sdlc/tests/support/source_tree_fixture.rb
  6. Location — check: present module LocationFixture in plugins/os-sdlc/tests/support/location_fixture.rb

Acceptance criteria

  1. Given the migrated tests, when the os-sdlc suite runs, then it is green.
  2. Given each of the six classes, when its hand-built .new calls outside its own test are counted, then the count is 0.

Owner sketch

ProcessIOFixture
FindingFixture
SignalFixture
StepOutcomeFixture
SourceTreeFixture
LocationFixture

Route: fast-batch, six findings.

Origin

  • Trigger: tests/support inventory survey 2026-10-28 after fast-batch-21 (#1019)
  • Improvised this session: none
  • Chain: misnamed or hand-built test records ← convention adopted 2026-10-28 but only TicketFixture converted ← DESIGN (#1019 memo comment)
  • Root candidate: #1019
  • Where: plugins/os-sdlc/lib/os_sdlc/process_io.rb
  • Session: 2dd497e0-555e-4518-9cdd-c68461c32463
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2dd497e0-555e-4518-9cdd-c68461c32463.jsonl

VERDICT: CREATE

Parent: #1019

## Problem Six lib records with required fields are hand-built in 9 to 23 test files each. Each copy is a Mystery Guest. 1. `ProcessIO` — 23 files; all five fields required; example `plugins/os-sdlc/tests/boot_event_script_bind_test.rb:13`. 2. `CollaboratorPass::Finding` — 17 files; five required; example `plugins/os-sdlc/tests/collaborator_pass/from_rows_test.rb:9`. 3. `Detector::Signal` — 16 files; eight required; example `plugins/os-sdlc/tests/collaborator_pass/from_rows_test.rb:24`. 4. `StepOutcome` — 9 files; step, exit_status, output required; example `plugins/os-sdlc/tests/implementation_lint_failures_test.rb:33`. 5. `Evidence::SourceTree` — 9 files; root required; example `plugins/os-sdlc/tests/evidence_expected_new_test.rb:22`. 6. `Daemon::Location` — 9 files; path, line, column required; example `plugins/os-sdlc/tests/daemon/location_test.rb:32`. `Project::Target` has every field defaulted, so it needs no fixture (rule 3). ## Approach Add one `<Record>Fixture` module per class in `plugins/os-sdlc/tests/support`, each with `build(**overrides)`. Make one fast-batch finding per class. The class's own unit test keeps calling `.new`. This ticket depends on the WorkOrderFixture ticket only for the pattern. Required work: 1. ProcessIO — check: present `module ProcessIOFixture` in `plugins/os-sdlc/tests/support/process_io_fixture.rb` 2. Finding — check: present `module FindingFixture` in `plugins/os-sdlc/tests/support/finding_fixture.rb` 3. Signal — check: present `module SignalFixture` in `plugins/os-sdlc/tests/support/signal_fixture.rb` 4. StepOutcome — check: present `module StepOutcomeFixture` in `plugins/os-sdlc/tests/support/step_outcome_fixture.rb` 5. SourceTree — check: present `module SourceTreeFixture` in `plugins/os-sdlc/tests/support/source_tree_fixture.rb` 6. Location — check: present `module LocationFixture` in `plugins/os-sdlc/tests/support/location_fixture.rb` ## Acceptance criteria 1. Given the migrated tests, when the os-sdlc suite runs, then it is green. 2. Given each of the six classes, when its hand-built `.new` calls outside its own test are counted, then the count is 0. ## Owner sketch ```ruby ProcessIOFixture FindingFixture SignalFixture StepOutcomeFixture SourceTreeFixture LocationFixture ``` Route: fast-batch, six findings. ## Origin - Trigger: tests/support inventory survey 2026-10-28 after fast-batch-21 (#1019) - Improvised this session: none - Chain: misnamed or hand-built test records ← convention adopted 2026-10-28 but only TicketFixture converted ← DESIGN (#1019 memo comment) - Root candidate: #1019 - Where: plugins/os-sdlc/lib/os_sdlc/process_io.rb - Session: 2dd497e0-555e-4518-9cdd-c68461c32463 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/2dd497e0-555e-4518-9cdd-c68461c32463.jsonl VERDICT: CREATE Parent: #1019
Author
Owner

Work started on branch fast-batch-22.

Work started on branch fast-batch-22.
Author
Owner

fast-batch-22 ruling E0 (predicted, 82%): item 5 (SourceTreeFixture) is dropped. Evidence::SourceTree = Data.define(:root) has one required field. 14 of 17 test sites need a real temp dir and every caller names root, so a fixture would remove no invented data (#1019 ruling 1: builders only where a record is costly to write; same reasoning as Project::Target). Memo: docs/crc/os-sdlc/fast-batch-22/rulings/E0.md.

fast-batch-22 ruling E0 (predicted, 82%): item 5 (SourceTreeFixture) is dropped. Evidence::SourceTree = Data.define(:root) has one required field. 14 of 17 test sites need a real temp dir and every caller names root, so a fixture would remove no invented data (#1019 ruling 1: builders only where a record is costly to write; same reasoning as Project::Target). Memo: docs/crc/os-sdlc/fast-batch-22/rulings/E0.md.
Author
Owner

Resolution

Done: Record fixtures ProcessIOFixture, FindingFixture, SignalFixture (with params/edge/flay/use presets), StepOutcomeFixture (with failing), LocationFixture replace hand-built records. Item 5 (SourceTreeFixture) dropped by ruling E0.

Evidence: fast-batch-22 merged to main 5f32ca8f; commits 2cd5ab8d, d879593f, 20b90c8c, 47df5bf1, ab615b06. Hand-built sites: ProcessIO 26->1 (child-process source), Finding 20->0, Signal 16->0, StepOutcome 12->0, Daemon::Location 6->0. Full suite 2904 runs, 0 failures.

Follow-ups: none

## Resolution **Done:** Record fixtures ProcessIOFixture, FindingFixture, SignalFixture (with params/edge/flay/use presets), StepOutcomeFixture (with failing), LocationFixture replace hand-built records. Item 5 (SourceTreeFixture) dropped by ruling E0. **Evidence:** fast-batch-22 merged to main 5f32ca8f; commits 2cd5ab8d, d879593f, 20b90c8c, 47df5bf1, ab615b06. Hand-built sites: ProcessIO 26->1 (child-process source), Finding 20->0, Signal 16->0, StepOutcome 12->0, Daemon::Location 6->0. Full suite 2904 runs, 0 failures. **Follow-ups:** none
jared closed this issue 2026-10-28 19:00:13 +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#1465
No description provided.