Replace hand-built ticket bodies and project.yaml Hashes in os-sdlc tests with fixtures #1461
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#1461
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?
Replace hand-built ticket bodies and project.yaml Hashes in os-sdlc tests with fixtures [capture]
Problem
16 os-sdlc test files hand-build a complete ticket body, and 6 hand-build a project.yaml Hash with targets.
TicketFixtureandProjectScenario#write_multi_target_project_yamlalready exist. The hand-built copies drift from the real record shape.Approach
Measurement, run from
plugins/os-sdlc(baseline atd5cf9f96isyaml=10 body=16):Required work:
TicketFixture.complete_body,without, orwith_required_work. Sites:tests/ticket_shape_parity_test.rb,tests/implementation_map_digest_test.rb,tests/support/design_placement_scenario.rb,tests/support/mutation_check_scenario.rb,tests/support/unchanged_check_scenario.rb,tests/command/required_work_typed_check_test.rb,tests/command/implementation/reroute_refresh_test.rb,tests/command/implementation/reroute_target_path_check_test.rb,tests/implementation/open_category_test.rb,tests/implementation/open_retired_tests_test.rb,tests/implementation/open_structure_change_test.rb,tests/implementation/open_design_base_test.rb,tests/implementation/open_map_name_test.rb,tests/implementation/open_flagged_ticket_shape_test.rb,tests/implementation/open_retires_file_entries_test.rb,tests/implementation/open_ticket_shape_test.rb— check: absentCOMPLETE_BODY =inplugins/os-sdlc/tests/implementation/*.rbwrite_multi_target_project_yaml. Sites:tests/crc_boot_entry_test.rb,tests/support/fast_gate_scenario.rb,tests/support/crc_census_scenario.rb,tests/project/config_test.rb,tests/project/config_load_selected_test.rb,tests/crc/placement_rulings_boot_test.rb— check: absent"targets" =>inplugins/os-sdlc/tests/crc_boot_entry_test.rbKeep a literal only where the text is the input under test, for example a body that a shape test must break on purpose. Record each kept literal as a kept row in the batch-state file.
Cop decision rule: after the first pipeline batch that writes tests following ticket 5, run the measurement again. If
yamlorbodyrises above the post-ticket-5 value, file a cop for that record through mine-lints. If both stay flat, file no cop and close #1019.Route: fast-batch. File the body finding and the yaml finding as separate findings.
Acceptance criteria
plugins/os-sdlcafter the change, thenbodyequals 0 plus the kept rows andyamlequals 4.Owner sketch
Non-goals
FakeRunnerfakes.Origin
VERDICT: CREATE
Parent: #1019
Depends on: #1459, #1460
Resolution
Done: 13 hand-built ticket bodies now come from TicketFixture and 6 hand-built project.yaml sites from ProjectScenario#write_multi_target_project_yaml. 12 literals kept as parser inputs (ticket_shape_parity_test 9 constants; open_ticket_shape_test NO_LISTED_CASE_BODY, CONTEXT_AS_PROBLEM_BODY; open_design_base_test). Duplicate success test in open_ticket_shape_test deleted (ruling R1, predicted 90).
Evidence: fast-batch-21 commits
94da30c78e635f3b+ fix list, merged to main70ecc103; measurement from plugins/os-sdlc: yaml=10→4 (all 4 in eval/ticket-takedown, owned by #1011), body=16→3 (kept files only); full suite 2903 runs 0 failures; memo docs/crc/os-sdlc/fast-batch-21/finding-c-body-and-yaml-copies.md with the kept-rows tableFollow-ups: none; the 4 eval sites are an occurrence on #1011; the cop re-measure is on #1019