Plugin code finds the home directory in 16 files: resolve known locations once at each entry #1650
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#1650
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
16 files in 6 plugins read the home directory themselves (
Etc.getpwuid.dir,Dir.home,ENV["HOME"]). They use it to find~/.claude,~/dev, transcripts, and repo links. Jared ruled on 2026-11-09 that paths are data, configured once in the codebase. Scattered lookups make the code brittle across machines. The filerepo_root_link.rbexists three times (plugins/os, os-adr, os-backlog). Two more files,os_git_link.rbandhandoff.rb, use the same fallback path.Observed
The command
grep -rn "Etc.getpwuid.dir\|Dir.home\|ENV\[.HOME.\]" plugins/*/lib plugins/*/bin plugins/*/hooksfound these lines on 2026-11-09.A review of the os-sdlc lint slice (commit
15964b911) found a recorded fixture that held/home/jaredpaths.Reproduce
n/a: design ticket. The grep above shows the problem.
Approach
The environment is external input (
.claude/rules/ruby-external-calls.md, ruling 88). Each entry (hook script,bin/script, CLI class) reads the home directory and the known locations once. It passes them in. Library code does not look them up.Required work: none beyond the acceptance criteria.
Orchestrator work: decide under ADR-0279 whether the three
repo_root_link.rbcopies move into a shared gem owned by the domain owner.Non-goals: Gemfiles are out of scope. ADR-0310 covers gem sources.
Acceptance criteria
Etc.getpwuid.dir,Dir.home, andENV["HOME"], then none is found.repo_root_link.rb, then one owner exists or a recorded ruling keeps the copies.Origin
15964b911), where a recorded fixture held/home/jaredpaths.claude/rules/ruby-external-calls.md, ruling 88)plugins/os/lib/os_hooks/repo_root_link.rb,plugins/os-adr/lib/adr/repo_root_link.rb,plugins/os-backlog/lib/backlog/repo_root_link.rbVERDICT: CREATE (ticket-skeptic, 2026-11-09): no open ticket covers home-directory lookups in plugin lib, bin, or hook code.