Add Evidence::Probe#stdout; drop probe.run.stdout chain #1181

Closed
opened 2026-10-19 22:35:02 +00:00 by jared · 2 comments
Owner

Problem

Six sites in the Evidence concept call probe.run.stdout. They reach through the probe into its memoized run result. Evidence::Probe owns its output. Ruling S78 adds Probe#stdout.
The gate lints every file the change touches. evidence/fingerprint.rb already has 7 offenses on HEAD: ClassLength, AbcSize and PerceivedComplexity on sender_row_for, MethodLength on build_row, two ParameterThreadedThroughPrivateMethods (method_name, probes) and ParameterListSignalsMissingObject on build_row. The sender-row methods thread method_name, probes, sender_probe and sites through private parameter lists. No object owns one method row.

Reproduce

n/a: structure-wave reach-through answer, nothing to reproduce

Approach

Required work:

  1. In plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb, add def stdout = run.stdout. run stays memoized. — check: present def stdout in plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb
  2. Replace probe.run.stdout with probe.stdout at evidence/fingerprint/probe_output.rb:12 and :18, evidence/probe/entries.rb:22 and :36, evidence/direct_unit_entries.rb:26 and evidence/fingerprint.rb:71. All paths are under plugins/os-sdlc/lib/os_sdlc/. — check: absent run.stdout in plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/probe_output.rb
  3. Extract Evidence::Fingerprint::SenderRow into plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/sender_row.rb. It takes method:, probes:, klass: and root:, holds sender_probe and sites as memoized instance state, and answers entries, the SenderEntries that Fingerprint#sender_row_for builds today. Move NEVER_SWEPT, typed_row, location_key, build_row, escalation_fields, sweepable?, sender_sites and unclassified_for from evidence/fingerprint.rb into it. Fingerprint#sender_row_for(method) becomes one line: SenderRow.new(method: method, probes: method_probes(method.name, method.line), klass: klass, root: @root).entries. Rubocop reports no offense on evidence/fingerprint.rb or evidence/fingerprint/sender_row.rb. — check: present class SenderRow in plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/sender_row.rb

Acceptance criteria

  1. Given the suite, when run after the change, then it passes with no new failures. The change keeps behavior; the existing suite is the proof.
  2. Given a probe, when stdout is called twice, then the command runs once and both calls return the same text.
  3. Given the Evidence files, when searched for run.stdout, then only Probe#stdout matches.

Owner sketch

class OsSdlc::Evidence::Probe
  def run
  def stdout = run.stdout
end

class OsSdlc::Evidence::Fingerprint::SenderRow
  def initialize(method:, probes:, klass:, root:)
  def entries
end

Non-goals

Callers that read run.status keep calling run. Add no test. SenderRow is proved by the existing tests/evidence/fingerprint_test.rb, fingerprint_candidates_test.rb and fingerprint_shared_runner_test.rb.

Origin

  • Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs)
  • Improvised this session: none
  • Chain: reach-through probe.run.stdout at 6 sites ← Probe exposes its run result and not its output ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S78)
  • Root candidate: none found; searched Probe#stdout, probe.run.stdout, run.stdout, Evidence::Probe, probe, stdout, chain
  • Where: plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb
  • Ledger: docs/crc/os-sdlc/ledger.tsv
  • Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv
  • Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl

VERDICT: CREATE

## Problem Six sites in the Evidence concept call `probe.run.stdout`. They reach through the probe into its memoized run result. `Evidence::Probe` owns its output. Ruling S78 adds `Probe#stdout`. The gate lints every file the change touches. `evidence/fingerprint.rb` already has 7 offenses on HEAD: ClassLength, AbcSize and PerceivedComplexity on `sender_row_for`, MethodLength on `build_row`, two ParameterThreadedThroughPrivateMethods (`method_name`, `probes`) and ParameterListSignalsMissingObject on `build_row`. The sender-row methods thread `method_name`, `probes`, `sender_probe` and `sites` through private parameter lists. No object owns one method row. ## Reproduce n/a: structure-wave reach-through answer, nothing to reproduce ## Approach Required work: 1. In `plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb`, add `def stdout = run.stdout`. `run` stays memoized. — check: present `def stdout` in `plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb` 2. Replace `probe.run.stdout` with `probe.stdout` at `evidence/fingerprint/probe_output.rb:12` and `:18`, `evidence/probe/entries.rb:22` and `:36`, `evidence/direct_unit_entries.rb:26` and `evidence/fingerprint.rb:71`. All paths are under `plugins/os-sdlc/lib/os_sdlc/`. — check: absent `run.stdout` in `plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/probe_output.rb` 3. Extract `Evidence::Fingerprint::SenderRow` into `plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/sender_row.rb`. It takes `method:`, `probes:`, `klass:` and `root:`, holds `sender_probe` and `sites` as memoized instance state, and answers `entries`, the `SenderEntries` that `Fingerprint#sender_row_for` builds today. Move `NEVER_SWEPT`, `typed_row`, `location_key`, `build_row`, `escalation_fields`, `sweepable?`, `sender_sites` and `unclassified_for` from `evidence/fingerprint.rb` into it. `Fingerprint#sender_row_for(method)` becomes one line: `SenderRow.new(method: method, probes: method_probes(method.name, method.line), klass: klass, root: @root).entries`. Rubocop reports no offense on `evidence/fingerprint.rb` or `evidence/fingerprint/sender_row.rb`. — check: present `class SenderRow` in `plugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/sender_row.rb` ## Acceptance criteria 1. Given the suite, when run after the change, then it passes with no new failures. The change keeps behavior; the existing suite is the proof. 2. Given a probe, when `stdout` is called twice, then the command runs once and both calls return the same text. 3. Given the Evidence files, when searched for `run.stdout`, then only `Probe#stdout` matches. ## Owner sketch ```ruby class OsSdlc::Evidence::Probe def run def stdout = run.stdout end class OsSdlc::Evidence::Fingerprint::SenderRow def initialize(method:, probes:, klass:, root:) def entries end ``` ## Non-goals Callers that read `run.status` keep calling `run`. Add no test. `SenderRow` is proved by the existing `tests/evidence/fingerprint_test.rb`, `fingerprint_candidates_test.rb` and `fingerprint_shared_runner_test.rb`. ## Origin - Trigger: os-sdlc CRC run 3, structure-ruling wave step 3 (reach-throughs) - Improvised this session: none - Chain: reach-through probe.run.stdout at 6 sites ← Probe exposes its run result and not its output ← DESIGN (docs/crc/os-sdlc/wave0/structure-rulings.tsv S78) - Root candidate: none found; searched Probe#stdout, probe.run.stdout, run.stdout, Evidence::Probe, probe, stdout, chain - Where: plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb - Ledger: docs/crc/os-sdlc/ledger.tsv - Rulings: docs/crc/os-sdlc/wave0/structure-rulings.tsv - Session: 2e167079-f404-4139-9cfa-6c0c937ce9f0 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-sdlc-run-3/2e167079-f404-4139-9cfa-6c0c937ce9f0.jsonl VERDICT: CREATE
Author
Owner

Work started on branch crc-os-sdlc-run-3 (structure-change map).

Work started on branch crc-os-sdlc-run-3 (structure-change map).
Author
Owner

Resolution

Done: Evidence::Probe#stdout added; Fingerprint and its collaborators send probe.stdout instead of probe.run.stdout; Evidence::Fingerprint::SenderRow extracted from Fingerprint#sender_row_for (required work item 3), which clears the 7 lint offenses fingerprint.rb had on HEAD.

Evidence: Runner commit 092a4785 (6 files incl. evidence/fingerprint/sender_row.rb), implementation 93, dispatch 779 gate green: required-work, lint, test-lint, suite, unchanged. Gate defect found on the way (unchanged step rejected an offense reduction, 98 to 91) fixed test-first in d9cd1716 and merged to main.

Follow-ups: none

## Resolution **Done:** Evidence::Probe#stdout added; Fingerprint and its collaborators send probe.stdout instead of probe.run.stdout; Evidence::Fingerprint::SenderRow extracted from Fingerprint#sender_row_for (required work item 3), which clears the 7 lint offenses fingerprint.rb had on HEAD. **Evidence:** Runner commit 092a4785 (6 files incl. evidence/fingerprint/sender_row.rb), implementation 93, dispatch 779 gate green: required-work, lint, test-lint, suite, unchanged. Gate defect found on the way (unchanged step rejected an offense reduction, 98 to 91) fixed test-first in d9cd1716 and merged to main. **Follow-ups:** none
jared closed this issue 2026-10-19 23:09:15 +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#1181
No description provided.