Record fixtures for ProcessIO, Finding, Signal, StepOutcome, SourceTree, Location #1465
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#1465
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
Six lib records with required fields are hand-built in 9 to 23 test files each.
Each copy is a Mystery Guest.
ProcessIO— 23 files; all five fields required; exampleplugins/os-sdlc/tests/boot_event_script_bind_test.rb:13.CollaboratorPass::Finding— 17 files; five required; exampleplugins/os-sdlc/tests/collaborator_pass/from_rows_test.rb:9.Detector::Signal— 16 files; eight required; exampleplugins/os-sdlc/tests/collaborator_pass/from_rows_test.rb:24.StepOutcome— 9 files; step, exit_status, output required; exampleplugins/os-sdlc/tests/implementation_lint_failures_test.rb:33.Evidence::SourceTree— 9 files; root required; exampleplugins/os-sdlc/tests/evidence_expected_new_test.rb:22.Daemon::Location— 9 files; path, line, column required; exampleplugins/os-sdlc/tests/daemon/location_test.rb:32.Project::Targethas every field defaulted, so it needs no fixture (rule 3).Approach
Add one
<Record>Fixturemodule per class inplugins/os-sdlc/tests/support, each withbuild(**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:
module ProcessIOFixtureinplugins/os-sdlc/tests/support/process_io_fixture.rbmodule FindingFixtureinplugins/os-sdlc/tests/support/finding_fixture.rbmodule SignalFixtureinplugins/os-sdlc/tests/support/signal_fixture.rbmodule StepOutcomeFixtureinplugins/os-sdlc/tests/support/step_outcome_fixture.rbmodule SourceTreeFixtureinplugins/os-sdlc/tests/support/source_tree_fixture.rbmodule LocationFixtureinplugins/os-sdlc/tests/support/location_fixture.rbAcceptance criteria
.newcalls outside its own test are counted, then the count is 0.Owner sketch
Route: fast-batch, six findings.
Origin
VERDICT: CREATE
Parent: #1019
Work started on branch fast-batch-22.
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.
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; commits2cd5ab8d,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