Repository navigation
Commit d40ac3c
fix(server): wire ServerConfig.cwd into Claude probe cache
Follow-up to the probe change earlier in this PR. probeKey accepted
an optional cwd but every call site passed undefined, so the cache
key collapsed to `${binaryPath}|` and the SDK never received the
active project directory — defeating the `.claude/skills/`
resolution the PR was supposed to enable.
- ClaudeProviderLive now resolves `cwd` once from `ServerConfig` at
layer construction and closes over it as `workspaceRoot`.
- Both Cache.get call sites pass `workspaceRoot` through the cache
key. The cache lookup already parses it back out and forwards it
into `probeClaudeCapabilities`.
- `probeKey` is renamed and exported as `claudeProbeCacheKey` so
the per-cwd contract is testable.
- Adds three unit tests covering distinct cwds, undefined/empty
equivalence, and distinct binaries.
ServerConfig.cwd is the same value serverRuntimeStartup already
treats as `workspaceRoot` (serverRuntimeStartup.ts:199), so no
new service surface is needed.
Refs #20481 parent 0a46fa9 commit d40ac3c
3 files changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
0 commit comments