Replace the which lookup in os-backlog inspect with a PATH check #852
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#852
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
InspectCommand#available?starts awhichprocess to find out ifteaorghis installed. It uses only the success flag. Ruby can do the same check by readingPATH, without a process and without a dependency onwhichitself.Callers:
tea_issues(line 77) andgh_issues(line 102). Each returns an "unavailable" result whenavailable?is false.Reproduce
n/a: behavior change with no defect to reproduce.
Approach
A small value object answers "is this executable on this PATH?".
InspectCommandreceives it through its constructor, so tests give it a fixed PATH in place of a fakewhichreply.Required work: none beyond the acceptance criteria.
Rejected: keep
whichbehind the runner — it is a process for a lookup thatFile.executable?does.Acceptance criteria
tea, when inspect runs, then the findings report tea as available.teaexecutable, when inspect runs, then the findings report tea as unavailable.teathat is not executable, when inspect runs, then the findings report tea as unavailable.whichcommand.Owner sketch
Non-goals
git remote -vcall in the same file. It has its own ticket (git gem).Origin
available?shells out towhich(inspect_command.rb:38) ← IMPROVISATION: no recorded reason to usewhich.Work started on branch ticket-852 (os-sdlc implement pipeline).
Skeptic DROP (one observed case): the ticket map has no node to fix a pre-existing test that a correct change exposes; contract-auditor returned error and implementation 16 failed. Hand-fixed in
677a7824. Reopen as a ticket if the pattern recurs.Resolution
Done: InspectCommand finds tea/gh through an injected Backlog::ExecutablePath (PATH lookup, File.executable?); no which process starts. Existing inspect tests build a fixed ExecutablePath, so none depends on the host PATH.
Evidence: Main
b44adce8(commit677a7824). Implementation 16: all gates passed through suite-check; contract-auditor returned error because the remaining fix was test-only; hand-finished. os-backlog suite 275 runs, 0 failures, with normal PATH and with a PATH that has no tea; rubocop clean on changed files.Follow-ups: #854 (worktree guard refuses stop payloads that contain the word git). Exposed-test map gap: skeptic DROP, noted in a comment on this ticket.