Repository navigation
Commit 2844b16
committed
test(acp): the dogfood server gets its own session dir, not the real one
The live-Kiro dogfood test keeps the developer's real HOME on purpose:
kiro-cli's auth and the installed `studyloop` agent live there, and running
against them is the point. The session DIRECTORY is a different axis. The
server it spawns resolves session_state.SESSION_DIR from
STUDYLOOP_SESSION_DIR, defaulting to the real ~/.config/studyloop, and the
conftest sets that variable per TEST in a function-scoped autouse fixture.
This server starts from a module-scoped fixture, before any test's fixtures
run, so `{**os.environ}` carried no override and every run wrote an
`acp-sql-<id>` directory (CLAUDE.md, the `studyloop` wrapper) into the
developer's real sessions folder. Nine had accumulated across the runs that
reached a verdict; the conftest's R-49d real-home guard named the tenth on
the first run after the trust-write and adapter fixes.
Every other spawned server gets its session dir from
_playwright_helpers._isolated_child_env; this launcher bypasses that helper
only to keep HOME, so it now sets the one variable itself (a fresh mkdtemp).
Verified live, twice, against real kiro-cli 2.29.0 after c1accbc:
run 1 (before this change) 1 passed in 47.6 s with the R-49d banner naming
the new real-home directory; run 2 (with it) 1 passed in 66.7 s, no banner,
no new entry under ~/.config/studyloop/sessions, one dir under TMPDIR.
Both runs also confirm the two fixes beneath them: ~/.claude/settings.json
was byte-identical (same SHA-256, size and mtime) across a real Kiro ACP
start and end, and the adapter teardown classified the 17 Sep
study-mentor.json.studyloop-backup as obsolete and left the installer's
symlink untouched (the discard itself hit this sandbox's EPERM on
~/.kiro/agents and was caught by cleanup._teardown_agent, so the session
end still completed; outside the sandbox it is removed).1 parent c1accbc commit 2844b16
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
185 | 194 | | |
186 | 195 | | |
187 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
163 | 176 | | |
164 | 177 | | |
165 | 178 | | |
| |||
0 commit comments