Tracer records zero journeys silently when the trace subprocess fails #1434

Closed
opened 2026-10-27 17:58:14 +00:00 by jared · 2 comments
Owner

Problem

OsSdlc::SystemModel::Tracer#run_tests ignores the exit status and the output of the trace subprocess. When the target's tests cannot load, system-model build exits 0, prints drift: 0 rows, and writes no journeys directory. Nobody sees the cause.

Observed

Two different causes in one session (47f54f99), both silent:

  1. #1392, target os-me: the subprocess inherited the generator's BUNDLE_LOCKFILE and bundler preload, so decision/model failed to load (cannot load such file). Fixed in Tracer#environment.
  2. #1395, target os-backlog: the recorder required json before the target's bundle, so bundler/setup raised You have already activated json 3.1.0, but your Gemfile requires json 3.0.2. Fixed in recorder/target_bundle.rb.
    Each took a hand-run of the Tracer with a printing runner to diagnose.

Reproduce

In a target root with one use_case-tagged test whose test file raises at load, run plugins/os-sdlc/bin/system-model build <root>. Exit 0, no design/generated/journeys/.

Approach

When tagged test files exist and the runner's status is not success, or the journey file was not written, raise Boot::RefusalError with the subprocess output and exit 1.

Required work:

  1. Refuse on a failed trace subprocess with its output — check: present RefusalError in plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb

Acceptance criteria

  1. Given one tagged test file and a runner whose status is failure, when journeys runs, then it raises a refusal whose message holds the runner output.
  2. Given one tagged test file and a runner that succeeds but writes no journey file, when journeys runs, then it raises a refusal naming the missing file.
  3. Given no tagged test files, when journeys runs, then it returns an empty list without running the runner.

Owner sketch

class OsSdlc::SystemModel::Tracer
  def journeys; end
end

Origin

  • Trigger: #1395 hand-finish; second silent zero-journey build this session after #1392
  • Improvised this session: hand-run of the Tracer with a printing runner, twice
  • Chain: cause invisible ← build exits 0 with no journeys ← Tracer#run_tests discards status and output ← DESIGN (plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb:38)
  • Root candidate: none found; searched tracer, run_tests, journey, system-model, refusal
  • Where: plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb:38
  • Session: 47f54f99-e35c-4567-a3e6-581fecf54dc3
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-1392/47f54f99-e35c-4567-a3e6-581fecf54dc3.jsonl

VERDICT: CREATE

## Problem `OsSdlc::SystemModel::Tracer#run_tests` ignores the exit status and the output of the trace subprocess. When the target's tests cannot load, `system-model build` exits 0, prints `drift: 0 rows`, and writes no journeys directory. Nobody sees the cause. ## Observed Two different causes in one session (47f54f99), both silent: 1. #1392, target os-me: the subprocess inherited the generator's `BUNDLE_LOCKFILE` and bundler preload, so `decision/model` failed to load (`cannot load such file`). Fixed in Tracer#environment. 2. #1395, target os-backlog: the recorder required `json` before the target's bundle, so `bundler/setup` raised `You have already activated json 3.1.0, but your Gemfile requires json 3.0.2`. Fixed in `recorder/target_bundle.rb`. Each took a hand-run of the Tracer with a printing runner to diagnose. ## Reproduce In a target root with one `use_case`-tagged test whose test file raises at load, run `plugins/os-sdlc/bin/system-model build <root>`. Exit 0, no `design/generated/journeys/`. ## Approach When tagged test files exist and the runner's status is not success, or the journey file was not written, raise `Boot::RefusalError` with the subprocess output and exit 1. Required work: 1. Refuse on a failed trace subprocess with its output — check: present `RefusalError` in `plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb` ## Acceptance criteria 1. Given one tagged test file and a runner whose status is failure, when journeys runs, then it raises a refusal whose message holds the runner output. 2. Given one tagged test file and a runner that succeeds but writes no journey file, when journeys runs, then it raises a refusal naming the missing file. 3. Given no tagged test files, when journeys runs, then it returns an empty list without running the runner. ## Owner sketch ```ruby class OsSdlc::SystemModel::Tracer def journeys; end end ``` ## Origin - Trigger: #1395 hand-finish; second silent zero-journey build this session after #1392 - Improvised this session: hand-run of the Tracer with a printing runner, twice - Chain: cause invisible ← build exits 0 with no journeys ← Tracer#run_tests discards status and output ← DESIGN (plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb:38) - Root candidate: none found; searched tracer, run_tests, journey, system-model, refusal - Where: plugins/os-sdlc/lib/os_sdlc/system_model/tracer.rb:38 - Session: 47f54f99-e35c-4567-a3e6-581fecf54dc3 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-ticket-1392/47f54f99-e35c-4567-a3e6-581fecf54dc3.jsonl VERDICT: CREATE
Author
Owner

Work started in worktree branch worktree-agent-a9e50269bba75787b (tracer refuses on failed trace subprocess).

Work started in worktree branch worktree-agent-a9e50269bba75787b (tracer refuses on failed trace subprocess).
Author
Owner

Resolution

Done: Tracer fails loudly when the trace subprocess fails

Evidence: f73b779d; suite green (2913 runs, 0 failures)

Follow-ups: none

## Resolution **Done:** Tracer fails loudly when the trace subprocess fails **Evidence:** f73b779d; suite green (2913 runs, 0 failures) **Follow-ups:** none
jared closed this issue 2026-11-01 16:00:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1434
No description provided.