Repository navigation
Commit 015546c
authored
fix(cli): read session history from the canonical store, not a retired file (#132185)
* fix(cli): read session history from the canonical store, not a retired file
`transcript-file-resolve` returns the session key as a process-local routing
token, but CLI history still treated it as a filesystem path: it resolved a
JSONL file, ran a runtime migration over it, and suppressed ENOENT by returning
an empty list. A session that lives only in SQLite therefore projected as an
empty conversation, and the runner fell back to the current prompt alone. Hook
history, reseed history, context-engine bootstrap, and the embedded fallback
marker all inherited that silent emptiness.
All five CLI callers now pass the session target they had already selected, and
the embedded attempt passes its own; cron shares its explicit per-prompt target
across user persistence and the CLI path. Presence comes from the transcript
watermark rather than a file's existence, and history comes from the canonical
bounded active-context reader, preserving raw-reseed eligibility, summary
pinning, and truncation notices.
The retired JSONL reader, its path resolution, and its runtime migration are
deleted rather than kept as a fallback: runtime consumes only the canonical
shape. Net production -348 lines.
* test(cli): assert the context engine receives the forwarded session target
The lifecycle test still encoded the retired storage premise, asserting the
loader was called with sessionFile/sessionKey/agentId. It now supplies a real
session target on the prepared fixture and asserts that exact target is
forwarded, which is the invariant the repair actually establishes.
* test(cli): name the synthetic fallback-history model fixture
Use vaporeon-alpha under the existing test provider in the persisted
assistant-message fixture. Production behavior and assertions are unchanged.
Validation: 59 attempt-execution tests passed, including SQLite assistant
history detection, abandoned branches, and reset boundaries.
* fix(cli): preserve canonical targets across dispatch and lifecycle
Carry the selected SQLite transcript target through embedded CLI dispatch and context-engine bootstrap/finalization. Keep custom-store transcript mirrors with that owner and retain the post-admission writer claim.
Extend real SQLite and lifecycle regressions for PR #132185. Local behavioral tests and autoreview pass. The full changed-files gate is blocked by missing playwright-core; the additional fault-sequence E2E setup is blocked by missing @lit/context.1 parent 4ecc93f commit 015546c
26 files changed
Lines changed: 844 additions & 1600 deletions
File tree
- config
- docs/gateway
- src
- agents
- cli-runner
- command
- embedded-agent-runner
- sessions
- commands
- cron/isolated-agent
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
1731 | | - | |
| 1731 | + | |
1732 | 1732 | | |
1733 | 1733 | | |
1734 | 1734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| |||
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| |||
296 | 306 | | |
297 | 307 | | |
298 | 308 | | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
| 309 | + | |
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
308 | | - | |
| 314 | + | |
309 | 315 | | |
310 | 316 | | |
| 317 | + | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
| |||
329 | 336 | | |
330 | 337 | | |
331 | 338 | | |
332 | | - | |
| 339 | + | |
333 | 340 | | |
334 | 341 | | |
| 342 | + | |
335 | 343 | | |
336 | 344 | | |
337 | 345 | | |
| |||
352 | 360 | | |
353 | 361 | | |
354 | 362 | | |
355 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
356 | 367 | | |
357 | 368 | | |
| 369 | + | |
358 | 370 | | |
359 | 371 | | |
360 | 372 | | |
| |||
0 commit comments