body_fetch.rb resolves os-backlog via PATH, fails naming paths tried (#635a) #702
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#702
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
body_fetch.rbresolves theos-backlogbinary by a hardcoded relative path. If that path is missing, it silently falls back to the bare string"os-backlog". Plugins install to~/.claude/plugins/<name>/bin, and Claude Code puts those directories on PATH. The hardcoded sibling path is the path that fires in a source checkout, not an installed plugin. ADR-0213 forbids any new ENV read inplugins/os-sdlc/lib, so the fix must resolveos-backlogthrough PATH only, not a new environment-variable override.Observed
Verified on main today (2026-09-24).
plugins/os-sdlc/lib/os_sdlc/adapter/tea_tracker/body_fetch.rb:22-25os_backlog_binhardcodesFile.expand_path("../../../../os-backlog/bin/os-backlog", __dir__)and silently falls back to the bare string"os-backlog"if that path is missing. Sole caller isTeaTracker#fetch_body(tea_tracker.rb:37), which wraps anyStandardErrorintoHarnessError. No behavior test pins the current fallback.Reproduce
Approach
Add
OsSdlc::Adapter::BinaryLocator. It searches PATH entries foros-backlog; on a miss it raises a named error listing every PATH entry it tried, plus the sibling-checkout candidate tried after PATH.Required work:
OsSdlc::Adapter::BinaryLocatorand use it inbody_fetch.rbin place of the hardcodedexpand_pathplus silent string fallback — check:grep -n 'expand_path("../../../../' plugins/os-sdlc/libreturns nothing.Rejected: an ENV variable override such as
OS_BACKLOG_BIN(forbidden by ADR-0213). Merging the plugins' load paths (this is a deliberate process boundary, not an accident to fix by removing it).Non-goals: changing what happens when body-fetch legitimately fails for a reason other than a missing binary. No ADR change — this is a defect fix within a boundary ADR-0213 already governs.
Constraint: ADR-0213 forbids any new ENV read in
plugins/os-sdlc/lib.VERDICT: CREATE
Acceptance criteria
body_fetch.rbresolves its binary, then it uses the PATH match, not the hardcoded relative path.body_fetch.rbresolves its binary, then it raises an error naming every location it tried, rather than silently falling back to a bare unresolved string.Owner sketch
Non-goals
Origin
Work started in session 082c3e8b on branch ticket-702 via /os-sdlc:implement.
Resolution
Done: BodyFetch resolves os-backlog through OsSdlc::Adapter::BinaryLocator: PATH entries from the invocation env first, then the sibling checkout candidate; a miss raises BinaryLocator::NotFound naming every path tried, wrapped to HarnessError by TeaTracker. The hardcoded expand_path and the silent bare-string fallback are gone. No ENV read added: TeaTracker.for takes env: from the CLI Invocation (ADR-0213 respected).
Evidence: Commit
5c775d42on branch ticket-702. Pipeline implementation 31, 12 dispatches; escalated at test-writer (unexpected pass) because the verifier correctly found the sibling fallback was never wired from TeaTracker; hand-finished per escalation-procedure step 4. Tests: tests/adapter/binary_locator_test.rb, tests/adapter/tea_tracker_binary_locator_test.rb (4 cases incl. default-locator miss naming both candidates), tests/adapter/tea_tracker/body_fetch_test.rb. os-sdlc suite 1424 runs, 1 failure = pre-existing fork-guard red on main (#705). rubocop clean on all changed files.Follow-ups: #705 captured (pre-existing own_binary_fork_guard red on main, VERDICT: CREATE). Dropped: lsp_probe/daemon/spawner.rb sibling expand_path is os-sdlc's own bin, not a cross-plugin lookup.