Fork-guard test must inspect untracked test files so a new spawning test cannot pass the worktree gate and break main #701

Closed
opened 2026-09-24 20:09:19 +00:00 by jared · 1 comment
Owner

Problem

plugins/os-sdlc/tests/own_binary_fork_guard_test.rb finds candidate files with git ls-files. A test file that is new and untracked is invisible to it. The pipeline gates run in a worktree before the commit, so a new test file that forks a repo binary passes every gate. After the commit lands on main, the same test fails for every later run.

Observed

Ticket #633 (commit 7714b9ce) added plugins/os-sdlc/tests/lint_worklist_target_env_test.rb, which spawns a repo binary and is not in ALLOWED_FILES. Its own suite-check passed. On main the test fails: Expected ["plugins/os-sdlc/tests/lint_worklist_target_env_test.rb"] to be empty. The #625 run (implementation 30) inherited the red test. programmer-repair could not fix it without a test edit, the repair bound was exhausted, and the run escalated. Hand-fixed by adding the file to the allowlist on branch ticket-625.

Reproduce

In a worktree, create plugins/os-sdlc/tests/zz_spawn_test.rb containing Open3.capture3("ruby", "bin/os-sdlc-runner"). Do not git add it. Run ruby -Itests plugins/os-sdlc/tests/own_binary_fork_guard_test.rb. It passes. git add the file and rerun. It fails.

Origin

  • Trigger: implementation 30 on #625 escalated with bound_exhausted:programmer-repair/fail; the only red test was the fork guard.
  • Improvised this session: added lint_worklist_target_env_test.rb to ALLOWED_FILES on branch ticket-625.
  • Chain: main red after #633 merge ← guard test skips untracked files ← candidate_files uses git ls-files ← DESIGN (tests/own_binary_fork_guard_test.rb:42-46).
  • Where: plugins/os-sdlc/tests/own_binary_fork_guard_test.rb#candidate_files
  • Session: 91151d77-4146-4ff5-810f-055867c5c725
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/91151d77-4146-4ff5-810f-055867c5c725.jsonl
  • Skeptic: VERDICT: CREATE — the guard's git ls-files blind spot is the root cause; the allowlist edit was a workaround.
## Problem `plugins/os-sdlc/tests/own_binary_fork_guard_test.rb` finds candidate files with `git ls-files`. A test file that is new and untracked is invisible to it. The pipeline gates run in a worktree before the commit, so a new test file that forks a repo binary passes every gate. After the commit lands on main, the same test fails for every later run. ## Observed Ticket #633 (commit 7714b9ce) added `plugins/os-sdlc/tests/lint_worklist_target_env_test.rb`, which spawns a repo binary and is not in `ALLOWED_FILES`. Its own suite-check passed. On main the test fails: `Expected ["plugins/os-sdlc/tests/lint_worklist_target_env_test.rb"] to be empty.` The #625 run (implementation 30) inherited the red test. programmer-repair could not fix it without a test edit, the repair bound was exhausted, and the run escalated. Hand-fixed by adding the file to the allowlist on branch ticket-625. ## Reproduce In a worktree, create `plugins/os-sdlc/tests/zz_spawn_test.rb` containing `Open3.capture3("ruby", "bin/os-sdlc-runner")`. Do not `git add` it. Run `ruby -Itests plugins/os-sdlc/tests/own_binary_fork_guard_test.rb`. It passes. `git add` the file and rerun. It fails. ## Origin - Trigger: implementation 30 on #625 escalated with `bound_exhausted:programmer-repair/fail`; the only red test was the fork guard. - Improvised this session: added `lint_worklist_target_env_test.rb` to `ALLOWED_FILES` on branch ticket-625. - Chain: main red after #633 merge ← guard test skips untracked files ← `candidate_files` uses `git ls-files` ← DESIGN (tests/own_binary_fork_guard_test.rb:42-46). - Where: plugins/os-sdlc/tests/own_binary_fork_guard_test.rb#candidate_files - Session: 91151d77-4146-4ff5-810f-055867c5c725 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/91151d77-4146-4ff5-810f-055867c5c725.jsonl - Skeptic: VERDICT: CREATE — the guard's `git ls-files` blind spot is the root cause; the allowlist edit was a workaround.
Author
Owner

Resolution

Done: obsolete: the fork-guard test was deleted under ADR-0224, which forbids structure tests; no guard to fix

Evidence: commit 443f7c6f deleted plugins/os-sdlc/tests/own_binary_fork_guard_test.rb; no replacement exists on main

Follow-ups: none

## Resolution **Done:** obsolete: the fork-guard test was deleted under ADR-0224, which forbids structure tests; no guard to fix **Evidence:** commit 443f7c6f deleted plugins/os-sdlc/tests/own_binary_fork_guard_test.rb; no replacement exists on main **Follow-ups:** none
jared closed this issue 2026-09-28 16:46:44 +00:00
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#701
No description provided.