os-sdlc gate subprocess inherits the plugin's bundler env, so project tests cannot load their own gems #536
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#536
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?
Discovered in project hyperthrive-websites, ticket #37, in a git worktree at .claude/worktrees/ticket-37.
lib/os_sdlc/boot.rb(ADR-0166) setsENV["BUNDLE_GEMFILE"]to the plugin's Gemfile and callsrequire "bundler/setup". Bundler exportsBUNDLE_GEMFILEandRUBYOPT=-rbundler/setupinto the process env.lib/os_sdlc/runner/gate_evaluator.rb:22runs the gate withOpen3.capture3(command), which inherits that env.lib/os_sdlc/runner/gate_commands.rb:36builds the diff-test step as plainruby -I<test_path> -e ....Result: the child ruby loads the plugin's gem set, not the project's. Observed error, identical across dispatches 7, 8, 9:
cannot load such file -- webmock/minitest (LoadError)frommigrator/test/test_helper.rb:6. The same command run by hand from the project dir passes:19 runs, 43 assertions, 0 failures. The full project suite passes:401 runs, 0 failures.Consequence: the pipeline looped programmer-repair three times on a non-defect. The test-writer's gate accepted the LoadError as "red for the right reason", so the problem surfaced only at the programmer node. The operator had to abandon the pipeline and finish the ticket by hand.
Suggested fix (for the maintainer to judge): wrap the gate spawn in
Bundler.with_unbundled_env { ... }and passchdir: project_root; or build the command asbundle exec ruby ...when the project has a Gemfile. Also consider having the test-writer gate reject a LoadError as "red for the wrong reason".Discoverer: hyperthrive-websites, session 74ec3fb6-e8b1-4a36-8f40-cd104339836b, 2026-09-08. os-sdlc pipeline loops on bundler env isolation issue