os-sdlc: exporting OS_SDLC_TARGET poisons the unit-test suite during gate runs #277
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#277
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
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.
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