os-sdlc tests start 792 non-git processes: add adapters with fixtures, a runtime guard, two cops, and the lint lesson #1647
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#1647
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
After the tracker change (commit
737d2e13) the os-sdlc suite still starts 792 processes that are notgit. Ruling 88 and.claude/rules/ruby-external-calls.mdforbid each one. No check enforces the rule, so a new test can start a process and nobody sees it until mutation testing times out.Observed
A list run on 2026-11-09 recorded these starts:
ast-grep267 (12 test files;lib/os_sdlc/evidence/probe.rb228,evidence/resolution/token_query.rb100),ruby144 (1 test file;system_model/pattern_site/example_run.rb),grep82,ruby -e57,ruby -rrubocop52,trueandfalse68,os-backlog39,sh -c18.test/boot_unchanged_check_test.rbtakes about 10 s becauseLint::Run::Invocationruns the real lint command. That file causes 14 of the 22 mutation timeouts that remain inlib/os_sdlc/map. The other 8 mutants ran zero tests; they are a different fault.Reproduce
n/a: structure ticket.
Approach
In this order:
test/test_helper.rb. It fails a test that starts a process by any route (Process.spawn,system, backticks,IO.popen). It has no exception list and no baseline (ruling 92, predicted).lib/outside an adapter file; an adapter built outside the entry. Three default arguments build one today:tracker/backlog.rb:25,tracker/backlog/project_show.rb:6,crc/filing/backlog_client.rb:10./os-sdlc:smell-analysison these sites. The mutation timeout guidance points to it.Sdlc/Structural/OwnEntryPointSpawnedInTestand its lesson.test/support/fake_project_show_bin.rbwhen nothing uses it.Acceptance criteria
Origin
.claude/rules/ruby-external-calls.md)plugins/os-sdlc/test/test_helper.rb,plugins/os-sdlc/lib/os_sdlc/lint/run/invocation.rbVERDICT: CREATE (ticket-skeptic, 2026-11-09): ruling 88 is a stated requirement. #637 asks for a lib-side cop on process starts; the first cop here must absorb #637 or reference it.
Added scope (Jared, 2026-11-09: paths are data, no absolute paths in code or fixtures): the lint recordings must hold no machine path. At record time,
test/fixtures/lint_recordings/refresh.rbwrites the root as a placeholder and strips machine paths from backtraces;sweep/missing_gem.ymlholds 19 /home/jared lines now.test/agent/transcript_path_test.rbhas one more. Add a check that fails when a fixture holds an absolute home path. Testing RuboCop itself is out of scope by design: tests assert the request os-sdlc sends and replay recorded answers; refresh.rb is run by hand on a rubocop gem upgrade.Part A started (2026-11-09): worktree ticket-1647-adapters. Scope: adapters with recorded fixtures for every non-git process start in os-sdlc tests; fixture machine-path cleanup; fixture home-path check. Git calls stay for #1645.
Part B done on branch ticket-1647-lesson (commit
7f055cd1d, not merged). Two gate cops in plugins/os-sdlc/.rubocop.yml: ProcessStartOutsideAdapter (4 true positives: cc-architect/scripts/lib/validate_marketplaces.rb:36, os-sdlc db/mirror_tickle.rb:21, evidence/probe.rb:65, evidence/resolution/token_query.rb:41) and AdapterBuiltOutsideEntry (23 true positives, including the three default-argument sites and every ProjectShell constant call). 0 false positives over plugins/. OwnEntryPointSpawnedInTest lost SmokeTestPatterns, so 14 *_bin_smoke_test.rb files now fire; part A must delete or convert them. The gate lints only changed files, so these hits block only the commit that touches them.Status 2026-11-09: part B (cops, lessons, ruling-88 text) merged
7f055cd1; part A (non-git adapters, recordings with no machine path) merged7b6ee115. Suite starts 3,370 processes, all git; non-git starts 0. Remaining: the runtime guard and mirror_tickle.rb:21 move with #1645 (the guard can only be on when git starts are 0). Suite green: 3,684 runs, 20.3 s at load 1.5.Resolution
Done: Non-git adapters with recorded fixtures (project shell, code search, tracer, likec4, example run, backlog); fixtures hold no machine path; two cops and lessons; ruling-88 text deleted; runtime guard on in test_helper (landed with #1645); mirror_tickle adapter
Evidence: main
7f055cd1(part B),7b6ee115(part A),38b3284d(guard, #1645); suite 3,676 runs green with the guard on, 26.6 s at load 1.4; process starts 4,117 -> 0Follow-ups: Stale cop cache: existing #1173 (evidence added). Bundler env-scrub check lost with the deleted child-process tests: none, ruling 88