Map tests under a second test folder of an os-sdlc target (os-me hooks/test) #1276

Open
opened 2026-10-23 18:59:38 +00:00 by jared · 1 comment
Owner

Problem

An os-sdlc target has one test_path. The os-me suite also loads plugins/os-me/hooks/test/*_test.rb (plugins/os-me/test/all.rb globs {,../hooks/test/}*_test.rb), but the diff-test gate maps only tests under plugins/os-me/test. A new test under hooks/test gets no red run, and the test-reviewer brief gets no diff for it. The run then fails, or a hook test goes in a folder that is not its home.

Observed

In implementation 135 (#1248), the test-writer put plugins/os-me/hooks/test/extract_launcher_test.rb next to the other hook tests. The test-reviewer (dispatch 1152) wrote: "test_changes has no diff content for plugins/os-me/hooks/test/extract_launcher_test.rb, and red_tests has no runner result for it (diff-test reported it unmapped and ran changed mapped tests only)". It returned verdict error, and the Runner returned implementation_failed.

Reproduce

n/a: needs a pipeline run with a new test under plugins/os-me/hooks/test; seen once in implementation 135.

Origin

  • Trigger: os-sdlc implement #1248, implementation 135, dispatch 1152
  • Improvised this session: moved the test path in the #1248 body to plugins/os-me/test/extract_launcher_test.rb and opened a new run (136), which passed.
  • Chain: implementation_failed ← test-reviewer error ← diff-test does not map hooks/test ← target config has one test_path (.sdlc/project.yaml os-me target). Stop at DESIGN (.sdlc/project.yaml, plugins/os-sdlc/lib/os_sdlc/project.rb).
  • Root candidate: none found; searched test_path, test_paths, hooks/test, diff-test, unmapped, test_changes, Brief::Facts, project.yaml
  • Where: .sdlc/project.yaml (os-me target test_path); os-sdlc diff-test test mapping
  • Session: 4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-1250/4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5.jsonl

VERDICT: CREATE

## Problem An os-sdlc target has one `test_path`. The os-me suite also loads `plugins/os-me/hooks/test/*_test.rb` (`plugins/os-me/test/all.rb` globs `{,../hooks/test/}*_test.rb`), but the diff-test gate maps only tests under `plugins/os-me/test`. A new test under `hooks/test` gets no red run, and the test-reviewer brief gets no diff for it. The run then fails, or a hook test goes in a folder that is not its home. ## Observed In implementation 135 (#1248), the test-writer put `plugins/os-me/hooks/test/extract_launcher_test.rb` next to the other hook tests. The test-reviewer (dispatch 1152) wrote: "test_changes has no diff content for plugins/os-me/hooks/test/extract_launcher_test.rb, and red_tests has no runner result for it (diff-test reported it unmapped and ran changed mapped tests only)". It returned verdict `error`, and the Runner returned `implementation_failed`. ## Reproduce n/a: needs a pipeline run with a new test under `plugins/os-me/hooks/test`; seen once in implementation 135. ## Origin - Trigger: os-sdlc implement #1248, implementation 135, dispatch 1152 - Improvised this session: moved the test path in the #1248 body to `plugins/os-me/test/extract_launcher_test.rb` and opened a new run (136), which passed. - Chain: implementation_failed ← test-reviewer error ← diff-test does not map `hooks/test` ← target config has one `test_path` (`.sdlc/project.yaml` os-me target). Stop at `DESIGN` (`.sdlc/project.yaml`, `plugins/os-sdlc/lib/os_sdlc/project.rb`). - Root candidate: none found; searched test_path, test_paths, hooks/test, diff-test, unmapped, test_changes, Brief::Facts, project.yaml - Where: .sdlc/project.yaml (os-me target test_path); os-sdlc diff-test test mapping - Session: 4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-1250/4f3f95ea-3c6f-4d23-a0ea-e349d6ab02a5.jsonl VERDICT: CREATE
Author
Owner

Occurrence: os-sdlc: tests outside a target's test_path are classed as code; the gate does not run them and the test-reviewer fails the run with error
Seen: plugins/os-sdlc/lib/os_sdlc/project/codebase.rb (Project::Codebase#test_path?, lines 46-48; code?, lines 28-30), plugins/os-sdlc/maps/poodr-ticket-implementation.yaml (test-reviewer error edge, line 93)
Run: implementation 293 (ticket #1762), dispatch 2905, 2026-11-13; session 2bb44e9c-522c-4c97-8449-bd46bed898e0
Adds: This is the second occurrence (the first was implementation 135, #1248). This time the changed tests were existing files, plugins/os-me/hooks/test/cli_appender_test.rb and plugins/os-me/hooks/test/prediction_recorder_test.rb, so a move of the test path in the ticket body is not a workaround. The test-writer gate ended green although the tests for acceptance criteria 3 to 16 never ran; the brief said "unmapped code files (no mapped test; diff-test ran changed tests only)" (plugins/os-sdlc/lib/os_sdlc/dispatch/brief/facts.rb:105-109). The cause in code: test_path? is @test.include?(path), so a file under hooks/test is a code file to the gate. plugins/os-sdlc/agents/test-reviewer.md:22-24 forbids the reviewer to read files and tells it to settle error with a MISSING: item; the map sends that error to implementation-failed with no repair path. Two acceptance statements are proposed: (1) a changed test file in a directory that the target's suite loads gets a diff and a red or green result in the brief, or implementation-open refuses a target whose suite loads tests outside test_path; (2) a test-reviewer error for missing evidence has a repair path, or the Runner payload names the cause. A count on 2026-11-13 of test files outside each target's test_path shows that os-me is the only affected target (3 files in plugins/os-me/hooks/test). The other 11 targets have 0 real tests outside: the os-sdlc count of 88 is 73 tests of the nested takedown target plus 15 production files with test-like names, and the takedown count of 4 is production files under lib/takedown. Runs 291 (#1233) and 292 (#1758) passed because all their tests were under plugins/os-me/test/. #1396 moves the os-me hook class files but does not name hooks/test and does not change os-sdlc.

Occurrence: os-sdlc: tests outside a target's test_path are classed as code; the gate does not run them and the test-reviewer fails the run with error Seen: plugins/os-sdlc/lib/os_sdlc/project/codebase.rb (`Project::Codebase#test_path?`, lines 46-48; `code?`, lines 28-30), plugins/os-sdlc/maps/poodr-ticket-implementation.yaml (test-reviewer `error` edge, line 93) Run: implementation 293 (ticket #1762), dispatch 2905, 2026-11-13; session 2bb44e9c-522c-4c97-8449-bd46bed898e0 Adds: This is the second occurrence (the first was implementation 135, #1248). This time the changed tests were existing files, `plugins/os-me/hooks/test/cli_appender_test.rb` and `plugins/os-me/hooks/test/prediction_recorder_test.rb`, so a move of the test path in the ticket body is not a workaround. The test-writer gate ended green although the tests for acceptance criteria 3 to 16 never ran; the brief said "unmapped code files (no mapped test; diff-test ran changed tests only)" (`plugins/os-sdlc/lib/os_sdlc/dispatch/brief/facts.rb:105-109`). The cause in code: `test_path?` is `@test.include?(path)`, so a file under `hooks/test` is a code file to the gate. `plugins/os-sdlc/agents/test-reviewer.md:22-24` forbids the reviewer to read files and tells it to settle `error` with a `MISSING:` item; the map sends that `error` to implementation-failed with no repair path. Two acceptance statements are proposed: (1) a changed test file in a directory that the target's suite loads gets a diff and a red or green result in the brief, or `implementation-open` refuses a target whose suite loads tests outside `test_path`; (2) a test-reviewer `error` for missing evidence has a repair path, or the Runner payload names the cause. A count on 2026-11-13 of test files outside each target's `test_path` shows that os-me is the only affected target (3 files in `plugins/os-me/hooks/test`). The other 11 targets have 0 real tests outside: the os-sdlc count of 88 is 73 tests of the nested takedown target plus 15 production files with test-like names, and the takedown count of 4 is production files under `lib/takedown`. Runs 291 (#1233) and 292 (#1758) passed because all their tests were under `plugins/os-me/test/`. #1396 moves the os-me hook class files but does not name `hooks/test` and does not change os-sdlc.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1276
No description provided.