Add Evidence::Probe#stdout; drop probe.run.stdout chain #1181
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#1181
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
Six sites in the Evidence concept call
probe.run.stdout. They reach through the probe into its memoized run result.Evidence::Probeowns its output. Ruling S78 addsProbe#stdout.The gate lints every file the change touches.
evidence/fingerprint.rbalready has 7 offenses on HEAD: ClassLength, AbcSize and PerceivedComplexity onsender_row_for, MethodLength onbuild_row, two ParameterThreadedThroughPrivateMethods (method_name,probes) and ParameterListSignalsMissingObject onbuild_row. The sender-row methods threadmethod_name,probes,sender_probeandsitesthrough private parameter lists. No object owns one method row.Reproduce
n/a: structure-wave reach-through answer, nothing to reproduce
Approach
Required work:
plugins/os-sdlc/lib/os_sdlc/evidence/probe.rb, adddef stdout = run.stdout.runstays memoized. — check: presentdef stdoutinplugins/os-sdlc/lib/os_sdlc/evidence/probe.rbprobe.run.stdoutwithprobe.stdoutatevidence/fingerprint/probe_output.rb:12and:18,evidence/probe/entries.rb:22and:36,evidence/direct_unit_entries.rb:26andevidence/fingerprint.rb:71. All paths are underplugins/os-sdlc/lib/os_sdlc/. — check: absentrun.stdoutinplugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/probe_output.rbEvidence::Fingerprint::SenderRowintoplugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/sender_row.rb. It takesmethod:,probes:,klass:androot:, holdssender_probeandsitesas memoized instance state, and answersentries, theSenderEntriesthatFingerprint#sender_row_forbuilds today. MoveNEVER_SWEPT,typed_row,location_key,build_row,escalation_fields,sweepable?,sender_sitesandunclassified_forfromevidence/fingerprint.rbinto 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 onevidence/fingerprint.rborevidence/fingerprint/sender_row.rb. — check: presentclass SenderRowinplugins/os-sdlc/lib/os_sdlc/evidence/fingerprint/sender_row.rbAcceptance criteria
stdoutis called twice, then the command runs once and both calls return the same text.run.stdout, then onlyProbe#stdoutmatches.Owner sketch
Non-goals
Callers that read
run.statuskeep callingrun. Add no test.SenderRowis proved by the existingtests/evidence/fingerprint_test.rb,fingerprint_candidates_test.rbandfingerprint_shared_runner_test.rb.Origin
VERDICT: CREATE
Work started on branch crc-os-sdlc-run-3 (structure-change map).
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 ind9cd1716and merged to main.Follow-ups: none