Commit 7950359
Fix non-hermetic Pi config test that passed locally but failed CI (XDG_CONFIG_HOME)
The Pi config loader resolves the user config base as
(XDG_CONFIG_HOME ?? <HOME>/.config)/cortexkit/..., but loadPiConfig's tests wrote
the user fixture under <HOME>/.config and set only HOME — never pinning
XDG_CONFIG_HOME. On a dev machine where XDG_CONFIG_HOME is unset the fallback hits
the temp HOME and the tests pass; on CI (which exports its own XDG_CONFIG_HOME)
the loader looks there instead, finds no fixture, and reads schema defaults, so
ctx_reduce_enabled/memory.enabled/env-substitution assertions failed. This was
introduced with the CortexKit config-location cutover and only surfaced in CI
(the local full gate was a false green because this machine has XDG unset).
withHome() now also pins XDG_CONFIG_HOME to <HOME>/.config and afterEach restores
it. The OpenCode config test already pinned XDG; this brings Pi to parity.
Verified the suite passes with XDG_CONFIG_HOME both set (CI shape) and unset.
Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>1 parent b6619b4 commit 7950359
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
58 | 70 | | |
59 | 71 | | |
60 | 72 | | |
| |||
0 commit comments