ADR: supersede ADR-0218 item 1 — os and os-backlog libraries take collaborators and paths as parameters, only bin/ reads process globals #716
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#716
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
ADR-0218 item 1 (2026-09-25, commit
8f279513) chose a spawn-env-hash-plus-Thread.currentshape forWorktree::CLI.start(env:)andBacklog::CLI.start(env:).That shape is the one ADR-0213 removed from
plugins/osone day earlier (2026-09-24, commit7714b9ce, "ENV fallbacks removed").It also contradicts ADR-0207 (only
bin/reads process globals into anInvocation; library collaborators take explicit parameters, no default) and ADR-0174 (Git::Repois the single class that spawns git, and it takes no env).plugins/os/lib/worktree/cli.rb:7-8,31-32setsThread.current[:worktree_cli_env]and falls back toENV.plugins/os/lib/worktree/finish_command.rb:14defaultsenv: ENVand threads@envthroughOpen3/systemcalls toConflictScan,Removal,RepoRoot, andUsageSweep.plugins/os-backlog/lib/backlog/cli_env_context.rb:6,21,26has the matching thread-local forBacklog::CLI, consumed byProjectsCommand/ConfigWriteCommandonly to computeProjectIndex.default_path(env:).No superseding ADR exists yet, so this repository currently holds two contradictory accepted decisions about the same shape.
Approach
Create an ADR with
/os-adr:createthat supersedes ADR-0218 item 1 only (items 2-4 of ADR-0218 stand: no ENV writes,SerializedChdir,parallelize_me!,RepoSeeder).The new ADR extends ADR-0174's single-git-owner rule and ADR-0207's
Invocationpattern toplugins/osandplugins/os-backlog:Required work:
plugins/os/libandplugins/os-backlog/libnever readsENVorThread.current; onlybin/worktree,bin/os-backlog, andbin/wakeup-pollread process globals, and they pass explicit parameters (agit:collaborator, astate_dir:/path:value, or anInvocation) into Thor config.plugins/osgets its ownWorktree::Gitcollaborator (a copy of os-sdlc'sAdapter::Git::Reposhape) because ADR-0025 item 4 forbids source coupling between plugins; note the resulting duplication is tracked by #699.ProjectShell-style commands supplied by a target project (a different call shape: a caller-provided command, not a library-internal git spawn), so this ADR does not reverse ADR-0205.Non-goals
This ticket is documentation only. It does not implement
Worktree::Git,Invocation, or any library change — those are ticket 1 (plugin/os) and ticket 2 (plugin/os-backlog), both blocked by this ADR.Check
After creating the ADR, confirm it exists and is indexed:
Origin
Session: 89876543-c418-46b0-b994-dd6dc6887802
Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/89876543-c418-46b0-b994-dd6dc6887802.jsonl
Trigger: review of #634/#707/#708 (commits
8ef12ae8,e2817ffe, ADR-0218)Improvised this session: none
Chain: env:/thread-local in lib ← ADR-0218 item 1 chose spawn-env-hash + Thread.current ← DESIGN (docs/adr/ADR-0218…, contradicts ADR-0213 and ADR-0207)
Root candidate: this ticket (the superseding ADR)
Blocks: #717, #718.
Resolution
Done: ADR-0220 created; ADR-0218 marked Superseded; index regenerated
Evidence: commit
b480696f, docs/adr/0220-*.mdFollow-ups: #717 and #718 implement the decision; none other