os-sdlc: exporting OS_SDLC_TARGET poisons the unit-test suite during gate runs #277

Closed
opened 2026-08-05 18:24:28 +00:00 by jared · 1 comment
Owner

Context

During the /os-sdlc:implement run of #276 (self-hosted, cc-os target os-sdlc): red-assert ran the suite with OS_SDLC_TARGET=os-sdlc exported, as skills/implement/SKILL.md instructs. The env var leaks into unit tests that build single-target fixture configs — 37 spurious failures/errors (TargetSelectionError: 'project.yaml has no targets: key') vs 3 true reds without the var. Any multi-target run's red/green-asserts are contaminated. Fix candidates: gate scrubs OS_SDLC_TARGET from env when spawning the test command; or tests isolate env in test_helper. Workaround used in the run: pass --target explicitly, never export.

## Context During the /os-sdlc:implement run of #276 (self-hosted, cc-os target os-sdlc): red-assert ran the suite with OS_SDLC_TARGET=os-sdlc exported, as skills/implement/SKILL.md instructs. The env var leaks into unit tests that build single-target fixture configs — 37 spurious failures/errors (TargetSelectionError: 'project.yaml has no targets: key') vs 3 true reds without the var. Any multi-target run's red/green-asserts are contaminated. Fix candidates: gate scrubs OS_SDLC_TARGET from env when spawning the test command; or tests isolate env in test_helper. Workaround used in the run: pass --target explicitly, never export.
Author
Owner

Resolution

Done: Verified fixed: tests/test_helper.rb deletes OS_SDLC_TARGET at load time (with a with_target_env helper for tests that need it), so the exported var can no longer poison single-target fixture unit tests.

Evidence: Full suite run on 2026-08-06 with OS_SDLC_TARGET=os-sdlc exported: ruby tests/all.rb -> 739 runs, 1998 assertions, 0 failures, 0 errors. The 37 spurious TargetSelectionError failures from the ticket no longer reproduce.

Follow-ups: none

## Resolution **Done:** Verified fixed: tests/test_helper.rb deletes OS_SDLC_TARGET at load time (with a with_target_env helper for tests that need it), so the exported var can no longer poison single-target fixture unit tests. **Evidence:** Full suite run on 2026-08-06 with OS_SDLC_TARGET=os-sdlc exported: ruby tests/all.rb -> 739 runs, 1998 assertions, 0 failures, 0 errors. The 37 spurious TargetSelectionError failures from the ticket no longer reproduce. **Follow-ups:** none
jared closed this issue 2026-08-06 20:00:24 +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#277
No description provided.