Run os-me spawning tests in-process #1332
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#1332
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
Seven os-me test files start our own bin and hook scripts with
Open3.capture3(RbConfig.ruby, BIN or HOOK). This slows the suite. It also stops the journey tracer (#1327) from tracing these tests, because it cannot trace a subprocess.Approach
The files are
extract_budget(5 tests),extract_launcher(4),one_thing_hook(2),route_cli(5),route_shadow_cli(4),confidence_extractor_run, androw_labels_run. The bins already have an entry:OsMe::CLI.start(['route', *ARGV])(cli.rb:8).test/cli_test.rb:19already usescapture_iowith it. The hooksone_thing.rbandrecord_prediction.rbare top-level script bodies. Extract a callable class that takes stdin, stdout, and the home dir. Theextract_launcher.rbhook wrapsOsMe::ExtractLauncher.new(store:, spawner:); call that.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:
OsMe::CLI.startinsidecapture_io.one_thing.rband ofrecord_prediction.rbinto classes that take stdin, stdout, and the home dir; the hooks call them.OsMe::ExtractLauncher.<bin>_bin_smoke_test.rbfile per bin and hook.Open3from the converted tests — check: absentOpen3inplugins/os-me/test/route_cli_test.rbBlocks: #1327
Acceptance criteria
*_bin_smoke_test.rbfile starts a pluginbin/orhooks/script as a subprocess.--helpor on empty valid input.Owner sketch
OsMe::CLI.start(['route', *ARGV]),OsMe::ExtractLauncher.new(store:, spawner:), and new classes for theone_thingandrecord_predictionhook bodies.Non-goals
The journey tracer (#1327) itself.
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-me tests call entries in-process; one_thing hook body and both eval harnesses moved to lib; smoke tests per entry, including record_prediction.
Evidence: Finding D
74961c73,79c0a276; rulings R558fea20a, R6745b425d. 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: #1388 (os-me-route KeyError), #1410 (OneThingPrompt::Hook swallows failures), #1337 (cop).