Skip to content

Commit 361afa6

Browse files
feat(dso-kknz): batch 8 — update dso shim + template to .claude/dso-config.conf
Update .claude/scripts/dso and templates/host-project/dso to read dso.plugin_root from .claude/dso-config.conf instead of workflow-config.conf. Migrate existing shim tests and smoke tests to use the new config path. RED tests from dso-jfy3 now pass GREEN. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 31d524a commit 361afa6

File tree

8 files changed

+71
-27
lines changed

8 files changed

+71
-27
lines changed

.claude/scripts/dso

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# DSO_ROOT resolution order:
88
# 1. $CLAUDE_PLUGIN_ROOT environment variable
9-
# 2. dso.plugin_root key in workflow-config.conf at the git repo root
9+
# 2. dso.plugin_root key in .claude/dso-config.conf at the git repo root
1010
# 3. Exit non-zero with an error naming the config key and file
1111
#
1212
# Install this file as .claude/scripts/dso in your host project and
@@ -21,11 +21,11 @@ if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
2121
DSO_ROOT="$CLAUDE_PLUGIN_ROOT"
2222
fi
2323

24-
# (2) Fall back to workflow-config.conf in the git repo root
24+
# (2) Fall back to .claude/dso-config.conf in the git repo root
2525
if [ -z "$DSO_ROOT" ]; then
2626
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || REPO_ROOT=""
27-
if [ -n "$REPO_ROOT" ] && [ -f "$REPO_ROOT/workflow-config.conf" ]; then
28-
DSO_ROOT="$(grep '^dso\.plugin_root=' "$REPO_ROOT/workflow-config.conf" 2>/dev/null | cut -d= -f2-)"
27+
if [ -n "$REPO_ROOT" ] && [ -f "$REPO_ROOT/.claude/dso-config.conf" ]; then
28+
DSO_ROOT="$(grep '^dso\.plugin_root=' "$REPO_ROOT/.claude/dso-config.conf" 2>/dev/null | cut -d= -f2-)"
2929
fi
3030
fi
3131

@@ -44,7 +44,7 @@ if [ -z "$DSO_ROOT" ]; then
4444
printf 'dso: DSO plugin root not configured.\n' >&2
4545
printf 'dso: Set the CLAUDE_PLUGIN_ROOT environment variable, or add\n' >&2
4646
printf 'dso: dso.plugin_root=<path-to-plugin>\n' >&2
47-
printf 'dso: to workflow-config.conf in your git repository root.\n' >&2
47+
printf 'dso: to .claude/dso-config.conf in your git repository root.\n' >&2
4848
exit 1
4949
fi
5050

.tickets/.sync-state.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@
449449
"last_synced": "2026-03-19T18:38:35Z",
450450
"local_hash": "14c516947a151a3db8bdec4010e2fd6e"
451451
},
452-
"last_pull_timestamp": "2026-03-20T05:23:45Z",
453-
"last_sync_commit": "e0183be0f300215baeb253f2fa959520e0695ab5",
452+
"last_pull_timestamp": "2026-03-20T14:54:38Z",
453+
"last_sync_commit": "31d524a9f30808d338ff72e0b339ad347f1f2dac",
454454
"w21-5cqr": {
455455
"jira_hash": "bce29d76f01c58613ee99cb1dd03920d",
456456
"jira_key": "DIG-61",

.tickets/dso-6trc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: dso-6trc
3-
status: in_progress
3+
status: closed
44
deps: [dso-c2tl, dso-opue]
55
links: []
66
created: 2026-03-20T03:32:37Z

.tickets/dso-tuz0.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: dso-tuz0
3-
status: open
3+
status: in_progress
44
deps: [dso-jfy3]
55
links: []
66
created: 2026-03-20T03:33:02Z
@@ -52,3 +52,29 @@ Also update:
5252
Verify: grep -q '\.claude/dso-config\.conf' $(git rev-parse --show-toplevel)/templates/host-project/dso
5353
- [ ] .claude/scripts/dso active lines do not reference workflow-config.conf
5454
Verify: grep -v '^\s*#' $(git rev-parse --show-toplevel)/.claude/scripts/dso | grep -v 'workflow-config\.conf'
55+
56+
## Notes
57+
58+
**2026-03-20T05:25:42Z**
59+
60+
CHECKPOINT 1/6: Task context loaded ✓
61+
62+
**2026-03-20T05:25:54Z**
63+
64+
CHECKPOINT 2/6: Code patterns understood ✓
65+
66+
**2026-03-20T05:26:10Z**
67+
68+
CHECKPOINT 3/6: Tests written (RED tests exist from dso-jfy3) ✓
69+
70+
**2026-03-20T14:47:42Z**
71+
72+
CHECKPOINT 4/6: Implementation complete ✓
73+
74+
**2026-03-20T14:48:52Z**
75+
76+
CHECKPOINT 5/6: Tests GREEN — 9 passed, 0 failed ✓
77+
78+
**2026-03-20T15:09:51Z**
79+
80+
CHECKPOINT 6/6: Done ✓ — AC verify: 4/5 AC pass. AC 'tests/run-all.sh passes' blocked by dso-setup.sh (safeguard file, requires user approval): test_setup_dso_tk_help_works fails because setup writes to workflow-config.conf but shim now reads .claude/dso-config.conf. Tracking ticket dso-5p5i created.

.tickets/dso-zlih.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
id: dso-zlih
3+
status: open
4+
deps: []
5+
links: []
6+
created: 2026-03-20T05:22:09Z
7+
type: task
8+
priority: 3
9+
assignee: Joe Oakhart
10+
---
11+
# Update pre-bash-functions.sh to remove CLAUDE_PLUGIN_ROOT/workflow-config.conf lookup
12+
13+
14+
## Notes
15+
16+
**2026-03-20T05:22:16Z**
17+
18+
pre-bash-functions.sh lines 155-159 still use CLAUDE_PLUGIN_ROOT/workflow-config.conf for config file lookup — same anti-pattern fixed in config-paths.sh (dso-6trc). Should be migrated to use read-config.sh resolution (WORKFLOW_CONFIG_FILE or git root .claude/dso-config.conf) consistently. Parent epic: dso-uc2d.

templates/host-project/dso

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# DSO_ROOT resolution order:
88
# 1. $CLAUDE_PLUGIN_ROOT environment variable
9-
# 2. dso.plugin_root key in workflow-config.conf at the git repo root
9+
# 2. dso.plugin_root key in .claude/dso-config.conf at the git repo root
1010
# 3. Exit non-zero with an error naming the config key and file
1111
#
1212
# Install this file as .claude/scripts/dso in your host project and
@@ -21,11 +21,11 @@ if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
2121
DSO_ROOT="$CLAUDE_PLUGIN_ROOT"
2222
fi
2323

24-
# (2) Fall back to workflow-config.conf in the git repo root
24+
# (2) Fall back to .claude/dso-config.conf in the git repo root
2525
if [ -z "$DSO_ROOT" ]; then
2626
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || REPO_ROOT=""
27-
if [ -n "$REPO_ROOT" ] && [ -f "$REPO_ROOT/workflow-config.conf" ]; then
28-
DSO_ROOT="$(grep '^dso\.plugin_root=' "$REPO_ROOT/workflow-config.conf" 2>/dev/null | cut -d= -f2-)"
27+
if [ -n "$REPO_ROOT" ] && [ -f "$REPO_ROOT/.claude/dso-config.conf" ]; then
28+
DSO_ROOT="$(grep '^dso\.plugin_root=' "$REPO_ROOT/.claude/dso-config.conf" 2>/dev/null | cut -d= -f2-)"
2929
fi
3030
fi
3131

@@ -44,7 +44,7 @@ if [ -z "$DSO_ROOT" ]; then
4444
printf 'dso: DSO plugin root not configured.\n' >&2
4545
printf 'dso: Set the CLAUDE_PLUGIN_ROOT environment variable, or add\n' >&2
4646
printf 'dso: dso.plugin_root=<path-to-plugin>\n' >&2
47-
printf 'dso: to workflow-config.conf in your git repository root.\n' >&2
47+
printf 'dso: to .claude/dso-config.conf in your git repository root.\n' >&2
4848
exit 1
4949
fi
5050

tests/scripts/test-dso-shim-plugin-root.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ test_shim_preserves_claude_plugin_root_when_preset() {
7272
local preset_value="/expected/plugin/path"
7373
local config_path="/config/different/plugin/path"
7474

75-
# Create a fake git repo with a workflow-config.conf pointing to a different path.
75+
# Create a fake git repo with a .claude/dso-config.conf pointing to a different path.
7676
# When the shim is run from this repo WITHOUT CLAUDE_PLUGIN_ROOT set in the
7777
# environment, DSO_ROOT resolves to config_path and the shim exports
7878
# CLAUDE_PLUGIN_ROOT=config_path. The caller's pre-set value is therefore lost.
7979
local fake_repo="$TMPDIR_BASE/fake-preserve-test"
80-
mkdir -p "$fake_repo"
80+
mkdir -p "$fake_repo/.claude"
8181
git -C "$fake_repo" init -q
82-
printf 'dso.plugin_root=%s\n' "$config_path" > "$fake_repo/workflow-config.conf"
83-
git -C "$fake_repo" add workflow-config.conf
82+
printf 'dso.plugin_root=%s\n' "$config_path" > "$fake_repo/.claude/dso-config.conf"
83+
git -C "$fake_repo" add .claude/dso-config.conf
8484
git -c user.email=test@test.com -c user.name=Test -C "$fake_repo" commit -q -m "init"
8585

8686
# Simulate: caller pre-sets CLAUDE_PLUGIN_ROOT, then calls the shim.
@@ -202,7 +202,7 @@ test_shim_preserves_claude_plugin_root_when_preset() {
202202

203203
# ── test_shim_does_not_clobber_preset_with_config_value ──────────────────────
204204
# The shim must not overwrite a pre-set CLAUDE_PLUGIN_ROOT with the value from
205-
# workflow-config.conf when the config path DIFFERS from the env var value.
205+
# .claude/dso-config.conf when the config path DIFFERS from the env var value.
206206
#
207207
# RED: This test specifically constructs a scenario where the unconditional
208208
# re-export at lines 32-36 would overwrite the caller's value. It does this by:
@@ -220,10 +220,10 @@ test_shim_does_not_clobber_preset_with_config_value() {
220220
local config_path="/workflow/config/plugin/path"
221221

222222
local fake_repo="$TMPDIR_BASE/fake-clobber-test"
223-
mkdir -p "$fake_repo"
223+
mkdir -p "$fake_repo/.claude"
224224
git -C "$fake_repo" init -q
225-
printf 'dso.plugin_root=%s\n' "$config_path" > "$fake_repo/workflow-config.conf"
226-
git -C "$fake_repo" add workflow-config.conf
225+
printf 'dso.plugin_root=%s\n' "$config_path" > "$fake_repo/.claude/dso-config.conf"
226+
git -C "$fake_repo" add .claude/dso-config.conf
227227
git -c user.email=test@test.com -c user.name=Test -C "$fake_repo" commit -q -m "init"
228228

229229
# Test: CLAUDE_PLUGIN_ROOT pre-set to preset_value, shim must not change it.

tests/scripts/test-shim-smoke.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,18 @@ test_shim_error_names_missing_script() {
102102

103103
# ── test_shim_resolves_dso_root_from_config ───────────────────────────────────
104104
# When CLAUDE_PLUGIN_ROOT is unset, the shim must read dso.plugin_root from
105-
# workflow-config.conf in the git repo root and use that path to find scripts.
105+
# .claude/dso-config.conf in the git repo root and use that path to find scripts.
106106
test_shim_resolves_dso_root_from_config() {
107107
if [[ ! -x "$SHIM" ]]; then
108108
assert_eq "test_shim_resolves_dso_root_from_config" "0" "shim-missing"
109109
return
110110
fi
111-
# Create a minimal git repo with a workflow-config.conf pointing at the real plugin
111+
# Create a minimal git repo with a .claude/dso-config.conf pointing at the real plugin
112112
local fake_repo="$TMPDIR_BASE/fake-repo"
113-
mkdir -p "$fake_repo"
113+
mkdir -p "$fake_repo/.claude"
114114
git -C "$fake_repo" init -q
115-
printf 'dso.plugin_root=%s\n' "$DSO_PLUGIN_DIR" > "$fake_repo/workflow-config.conf"
116-
git -C "$fake_repo" add workflow-config.conf
115+
printf 'dso.plugin_root=%s\n' "$DSO_PLUGIN_DIR" > "$fake_repo/.claude/dso-config.conf"
116+
git -C "$fake_repo" add .claude/dso-config.conf
117117
git -c user.email=test@test.com -c user.name=Test -C "$fake_repo" commit -q -m "init"
118118

119119
local exit_code=0

0 commit comments

Comments
 (0)