diff-test gate: a diffed test file runs itself #497
Labels
No labels
P0
P1
P2
P3
bug
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
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#497
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?
Context
#491 (merged
400cdfd) shipped DiffedTestPaths mapping only code-path files (lib -> test). A diffed test file is dropped, so a test-only change yields diff-test nil and relies on the suite gate. #491's task list explicitly named 'a diffed test file runs itself'.Task
Include diffed files under project.test_path in DiffedTestPaths#paths as-is. Cover with a test.
Origin
Insight from the 2026-08-24 #500 session (codebase freshly in context): implementation is where the ticket says, and small — DiffedTestPaths currently maps only code-path files (lib -> test) and drops files already under project.test_path; passing those through as-is is the whole change. Two things that make it easier now: (1) tests/support/ticket_fixture.rb (new in #500, commit
b25598e) seeds a fully offline repo: tracker so any pipeline-level test around gates runs network-free; (2) note the diff-test gate consumer is GateCommands#to_h with nil-on-empty-diff semantics — preserve nil when the diff contains ONLY non-test, non-code files, or the gate's skip behavior changes. Related: if #499 resolves as 'lint test files in the test-writer gate', a test-only diff will exercise both changes — worth landing #497 first so #499 has the diff-test behavior to build on.Work started 2026-08-24: implementing test-file passthrough in DiffedTestPaths, direct on main.
Resolution
Done: DiffedTestPaths#paths now unions diffed files under project.test_path as-is with the mapped code->test paths, deduped; GateCommands nil-on-empty diff-test skip preserved
Evidence: Commit
746753con main: diffed_test_paths.rb +8/-1, new tests/runner/diffed_test_paths_test.rb (3 cases: test-only, mixed-union, non-code-empty) + gate_commands_test.rb case; red-then-green shown; rubocop clean; full suite 1067 runs with only the 4 pre-existing ChangeInterpreterAgentTest baseline failuresFollow-ups: Test-fixture consolidation (near-identical *ProjectFixture classes in two test files) considered and dropped — premature until the pattern recurs. Otherwise none.