Repo-wide guard against forks of this repo's own bin/ executables in tests; hook-test harness runner calls in-process; hang-guard 30 s -> 5 s #642
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#642
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?
Map: #631
Blocked by #638, #639, #640, #641
Problem
Child of #631, split from the user's 631d so that each child routes to one pipeline. It mirrors plugins/os-sdlc/tests/lsp_probe_real_daemon_guard_test.rb (ADR-0205 item 5; commit
a295f828).Observed
Commit
8615acc9(#624, 2026-09-22) raisedTimeout.timeout(5)to 30 s in plugins/os-sdlc/tests/pipeline/post_tool_use_async_dispatch_test.rb:10 and post_tool_use_non_pipeline_async_dispatch_test.rb:9, 23, 37. Its message: "5 s Timeout around two ruby process boots in PostToolUse tests is a hang guard that load alone exceeded; raised to 30 s". Inside the guard, tests/support/post_tool_use_hook_test_case.rb forks bin/os-sdlc-runner throughrun_cli(line 37) andrun_subagent_start(line 42), and forks hooks/post_tool_use.rb (line 53). tests/pipeline/subagent_start_hook_test.rb:93 and subagent_stop_hook_test.rb:90,95 also fork the runner.Reproduce
Expected
One prose sentence: a guard test fails when any file under a plugin test tree spawns an executable under a plugins/**/bin/ directory and is not on its allowlist; the PostToolUse hang guard is 5 s around a single hook boot.
Origin
8615acc9masked the boot costOwner sketch
Acceptance criteria
Timeout.timeoutargument is 5.Approach
BINconstant and thecapture3call sit on different lines. Build the binary names fromDir.glob("plugins/**/bin/*"). A reference is a literalbin/<name>or a"bin", "<name>"join.ruby tests/all.rbload. #624 measured 5-6 s per runner boot under 12-way load. Measure the hook boot before the revert. If it is over 5 s, stop and report; do not raise the value again.Required work:
plugins/**/bin/*executable. (proven by AC 1, AC 2)PostToolUseHookTestCase's runner calls to run in-process viaInProcessRunnerCli, leaving only the hook script as a subprocess. (proven by AC 3)Timeout.timeoutguards from 30 to 5, only after measuring one hook boot under full-suite load at under 5 s. (proven by AC 4; check:grep -c 'Timeout.timeout(5)' plugins/os-sdlc/tests/pipeline/post_tool_use_async_dispatch_test.rb plugins/os-sdlc/tests/pipeline/post_tool_use_non_pipeline_async_dispatch_test.rb)Structural follow-through
Body before Required-work migration, 2026-09-23
Map: #631
Blocked by #638, #639, #640, #641
Problem
Child of #631, split from the user's 631d so that each child routes to one pipeline. It mirrors plugins/os-sdlc/tests/lsp_probe_real_daemon_guard_test.rb (ADR-0205 item 5; commit
a295f828).Observed
Commit
8615acc9(#624, 2026-09-22) raisedTimeout.timeout(5)to 30 s in plugins/os-sdlc/tests/pipeline/post_tool_use_async_dispatch_test.rb:10 and post_tool_use_non_pipeline_async_dispatch_test.rb:9, 23, 37. Its message: "5 s Timeout around two ruby process boots in PostToolUse tests is a hang guard that load alone exceeded; raised to 30 s". Inside the guard, tests/support/post_tool_use_hook_test_case.rb forks bin/os-sdlc-runner throughrun_cli(line 37) andrun_subagent_start(line 42), and forks hooks/post_tool_use.rb (line 53). tests/pipeline/subagent_start_hook_test.rb:93 and subagent_stop_hook_test.rb:90,95 also fork the runner.Reproduce
Expected
One prose sentence: a guard test fails when any file under a plugin test tree spawns an executable under a plugins/**/bin/ directory and is not on its allowlist; the PostToolUse hang guard is 5 s around a single hook boot.
Origin
8615acc9masked the boot costOwner sketch
Acceptance criteria
Timeout.timeoutargument is 5.Approach
BINconstant and thecapture3call sit on different lines. Build the binary names fromDir.glob("plugins/**/bin/*"). A reference is a literalbin/<name>or a"bin", "<name>"join.ruby tests/all.rbload. #624 measured 5-6 s per runner boot under 12-way load. Measure the hook boot before the revert. If it is over 5 s, stop and report; do not raise the value again.Structural follow-through
Work started on branch ticket-642 (session 557d47dd). Ticket is test-only, so it is hand-finished in the worktree rather than pipeline-routed (#665: the map has no route for test-file edits).
Deviation: hand-finished outside the pipeline (#665)
Problem. Every change in this ticket is a test-file edit: a new guard test, three hook tests converted from
Open3forks ofbin/os-sdlc-runnertoInProcessRunnerCli, and fourTimeout.timeoutarguments. The mappoodr-ticket-implementation.yamlroutes red diff-tests only toprogrammer, who may not edit tests, and the ticket body has no## Approachsection, soimplementation-openwould refuse it. #665 tracks the missing route.Solution. A Sonnet agent implemented the ticket in worktree
ticket-642red-first: the guard failed and named each offender, then the three os-sdlc hook tests were converted in-process until only allowlisted files remained. Result on main:adfb114c.Allowlist judgment. Seven os-backlog CLI contract tests are allowlisted because os-backlog has no in-process CLI seam (os-sdlc, os-aidd-lint, cc-architect got theirs from #638, #639, #641). Building one is outside this ticket. Two entries (
cops/bin_script_load_in_test_test.rb,lint/rubocop_report_fetcher_test.rb) are false positives: the bin path is fixture text, not a spawn.Resolution
Done: Guard test tests/own_binary_fork_guard_test.rb fails when a plugin test file spawns a plugins/**/bin/ executable outside its allowlist; PostToolUseHookTestCase and the subagent_start/subagent_stop hook tests call the runner in-process through InProcessRunnerCli, only hooks/post_tool_use.rb forks; all four PostToolUse hang guards are Timeout.timeout(5).
Evidence: main
adfb114c(branch ticket-642, fast-forward). os-sdlc suite 1431 runs, 3262 assertions, 0 failures, 0 errors, 40.1 s wall. rubocop 0 offenses on changed files. Hand-finished outside the pipeline because the change is test-only and the map has no test-file repair route (#665); write-up in the comment above.Follow-ups: os-backlog in-process CLI seam so its seven allowlisted contract tests leave the guard allowlist: dropped, no ticket-skeptic verdict yet and the allowlist already enforces the boundary; revisit when os-backlog tests are worked. Pipeline defect: #665 (already filed).