Audit takedown eval for duplicates of os-sdlc lib, move onto owners #1011
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#1011
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
The takedown eval (
plugins/os-sdlc/eval/ticket-takedown) re-implements behavior thatplugins/os-sdlc/lib/os_sdlcalready owns. The eval will merge into the os-sdlc lib later. Each duplicate adds code and tests that the merge must remove.Jared's ruling, 2026-10-15: "The eval project should reuse as much of the os-sdlc code as possible. It will be integrated into os-sdlc's lib once we have the kinks ironed-out anyway. So if the code it needs already exists, use it! The eval code should really only be the difference between the existing os-sdlc code and the customizations needed for the eval portion. So, it should be using the entire Project class - not necessarily just Project::Target and Project::Config. That should reduce the number of tests needed and new code required when we merge in the future."
An ADR records this rule. It is created in the same session as this ticket. See the ADR on takedown eval reuse of os-sdlc lib.
Observed
Verified on HEAD:
eval/ticket-takedown/lib/takedown/adapter/project_suites.rbdefinesPATH = File.join(".sdlc", "project.yaml"), reads it withYAML.safe_load_file, and reads raw section hashes. It wraps a singleOsSdlc::Project::Targetthroughfrom_section. Owners:OsSdlc::Project.from_data(lib/os_sdlc/model/project.rb) andOsSdlc::Project::Config(lib/os_sdlc/adapter/project/config.rb, which ownspath,read,document).File.join(@repo, ".sdlc", "project.yaml")repeats in eval tests:test/command/green_suite_test.rb:20,test/command/polish_test.rb:91,test/command/final_suite_test.rb:101and:208,test/controller/run_cli_test.rb:26. Seedocs/research/lint-lessons/sdlc-dry-repeated-literal-argument.md.Reproduce
n/a: audit and refactor ticket; nothing to reproduce.
Approach
Audit the whole eval, not only the instances above. For each duplicate, name the os-sdlc owner and move the eval onto it. Where the eval must differ, record the reason. The eval keeps only the difference from os-sdlc. This work needs at least one dedicated session.
Required work:
OsSdlc::Projectin the eval adapter — check: absentYAML.safe_load_fileinplugins/os-sdlc/eval/ticket-takedown/lib/**/*.rb".sdlc", "project.yaml"inplugins/os-sdlc/eval/ticket-takedown/test/**/*.rbAcceptance criteria
Owner sketch
Origin
VERDICT: CREATE (ticket-skeptic: explicit user request floor applies)
The rule this ticket applies is recorded in ADR-0296 (docs/adr/0296-the-takedown-eval-holds-only-its-difference-from-os-sdlc-lib-and-reuses-os-sdlc-owners-amends-adr-0293.md).
Correction: the ADR is ADR-0297 (docs/adr/0297-the-takedown-eval-holds-only-its-difference-from-os-sdlc-lib-and-reuses-os-sdlc-owners-amends-adr-0293.md). 0296 is taken on branch adr-gate.
Occurrence: Use ProjectScenario in the takedown eval tests
Seen: eval/ticket-takedown/test/command/green_suite_test.rb:20, command/polish_test.rb:91, command/final_suite_test.rb:38+228 (same two-target Hash twice), controller/run_cli_test.rb:26
Run: session 2dd497e0-555e-4518-9cdd-c68461c32463 (#1019 plan, 2026-10-28)
Adds: Required work step 2 is satisfied by reusing os-sdlc's test support rather than a new eval helper. Add two lines to eval/ticket-takedown/test/test_helper.rb: require_relative ../../../tests/support/home_and_start and ../../../tests/support/project_scenario (after #1460 splits HomeAndStart out). Do not push the whole os-sdlc tests/support dir: it eager-loads ~85 files that assume the os-sdlc test helper's DB connection and Open3 stubs. Replace each Hash+write with ProjectScenario.new(@repo, name:).write_multi_target_project_yaml(targets:). ADR-0297 is retired, so the boundary no longer forbids this. Measurement from plugins/os-sdlc should give yaml=0 afterwards (command on #1019 memo comment). Depends on #1460.
Occurrence done (fast-batch-22, main
5f32ca8f, commits97581502and4ae19f04): the takedown eval tests write project.yaml through ProjectScenario#write_multi_target_project_yaml (7 sites; final_suite_test had 4). The eval test_helper require_relatives home_and_start, project_scenario, and git_repo_scenario only. The #1019 measurement prints yaml=0. Eval suite 608 runs, 0 failures. The scenario also writes name: widgets; Takedown::ProjectSuites reads only targets (memo docs/crc/os-sdlc/fast-batch-22/finding-l-eval-project-scenario.md).