One test-directory candidate list; a spec-only project defaults test_path to spec #793
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#793
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
Three lists name candidate test directories: command/cli/project_config_command.rb:45
%w[tests test spec], model/project/flat_attrs.rb:37%w[tests test], and model/project/validation.rb:6CANDIDATE_TEST_DIRS = %w[tests test spec]. They disagree. A project with onlyspec/and notest_path:loads withtest.path == "tests", and then Validation reports thattestsdoes not exist and listsspec/as a candidate.Reproduce
Failing test: a tmp project with
name: widgets, notest_path:, and only aspec/directory.Project::Yaml.load(dir, target: nil).test.pathreturns"tests"today. Expected"spec".Approach
Files (5): adapter/project/yaml.rb (owns
TEST_DIR_CANDIDATES = %w[tests test spec]), model/project/flat_attrs.rb, model/project/validation.rb, command/cli/project_config_command.rb, tests/model/project_test_path_default_test.rb (add a case).ADRs cited: ADR-0074, ADR-0192 item 2 (Test defaults). None to supersede. The owner of the constant is a heuristic.
Required work:
Project::Yaml(T5 renames it toProject::Config). The other two sites read it. — check:grep -rn "%w\[tests test" plugins/os-sdlc/lib | wc -lprints 1ruby plugins/os-sdlc/tests/model/project_test_path_default_test.rbRejected: keep FlatAttrs's two-item list. It is the one that disagrees and causes the false Validation report.
Acceptance criteria
spec/and notest_path:, when it loads, thentest.pathisspec.tests/andspec/, when it loads, thentest.pathistests.project-config widgetsin a directory with onlyspec/, when it runs, then the yaml it writes hastest_path: spec(as today).Owner sketch
Non-goals
The rename (T5).
Origin
Work started on branch ticket-793 via /os-sdlc:implement (session bb36e383). #792 merged to main.
Resolution
Done: One test-directory candidate list, Project::Yaml::TEST_DIR_CANDIDATES (tests, test, spec), read by the project-config command, FlatAttrs, and Validation through its injected yaml collaborator; a spec-only project now defaults test_path to spec.
Evidence: os-sdlc implementation 58 on branch ticket-793: 10 dispatches, 0 retries, suite-check pass, contract-auditor pass; two LENS lines challenged by opus: both were code facts not lens gaps, fixed in
5f987ca1(Validation uses @yaml.test_dir_candidates, alias constant deleted); suite 1317 runs 0 failures; commits7ae416cf5f987ca1Follow-ups: #798 filed (inward-dependency lint misses qualified constant chains, skeptic CREATE); flat_attrs.rb reference to the adapter constant is retired with FlatAttrs in #795