Run os-backlog CLI tests in-process #1333
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
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
rule-proposal
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#1333
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?
Problem
SubprocessCliRunstarts the os-backlog bin as a subprocess.issue_create_ledger_origin_gate_cli_testuses it in 9 tests. About 4 s of the 15.4 s os-backlog suite goes to these spawns.Approach
Replace
SubprocessCliRunin the 9 tests withBacklog::CLI.start(ARGV, state_dir:, runner:)(cli.rb:7). Keepbin_missing_gems_guard_testas the smoke test: it proves the ADR-0123 missing-Thor exit.Behavior is unchanged. The existing suite is the proof. Each bin or hook keeps exactly one smoke test, in a file named
<bin>_bin_smoke_test.rb. The smoke test runs it as a subprocess to prove the plain-ruby boot and the shebang. Calls to external tools (git, rubocop) stay as subprocess calls.Required work:
issue_create_ledger_origin_gate_cli_testto callBacklog::CLI.startwith an injectedstate_dirandrunner.tests/support/subprocess_cli_run.rbwhen no test uses it.bin_missing_gems_guard_testtoos_backlog_bin_smoke_test.rband keep its missing-Thor assertion.SubprocessCliRuninplugins/os-backlog/tests/**/*.rbAcceptance criteria
*_bin_smoke_test.rbfile starts a pluginbin/orhooks/script as a subprocess.--helpor on empty valid input.Owner sketch
Backlog::CLI.start(argv, state_dir:, runner:).Origin
ruby plugins/os-sdlc/tests/all.rbtook 65.8 s against a 60 s budget. About 70% of summed test time is tests that start our own bin scripts with Open3.jared referenced this issue2026-10-25 19:49:02 +00:00
Work started in /os-sdlc:fast-batch fast-batch-15, branch fast-batch-15.
Resolution
Done: os-backlog tests call Backlog::CLI.start in-process through InProcessCliRun; SubprocessCliRun deleted; os_backlog_bin_smoke_test.rb.
Evidence: Finding E
4b6d0a63,115e3711; fix R171ae9c537. os-backlog suite 21.1 s to 0.96 s. Suites atc9f5db8f: os-sdlc 2701 runs 0 failures (53.1 s, budget 60 s), os 47, os-backlog 327, os-aidd-lint 491, os-adr 111, os-me 399, cc-architect plugin_config 106, all green. Merged to mainc9f5db8f, pushedbe5d2c5d. Batch state and rulings: docs/crc/os-sdlc/fast-batch-15/.Follow-ups: #1407 (Checkout reads ENV USER; one test stays a subprocess until then), #1408 (NewOffenseCheck false red), #1337 (cop).