diff options
| author | Adam Malczewski <[email protected]> | 2026-06-24 04:02:48 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-24 04:02:48 +0900 |
| commit | 13eb34133d8fe64f9c73f8d394e0af790b54c6e5 (patch) | |
| tree | c2f6946e0529a38e94d3d1c0e505711667749213 | |
| parent | b180cc1e03f90a139c90ef498d1c1fb449508fd7 (diff) | |
| download | dispatch-13eb34133d8fe64f9c73f8d394e0af790b54c6e5.tar.gz dispatch-13eb34133d8fe64f9c73f8d394e0af790b54c6e5.zip | |
docs: task 2 (system-prompt cwd reconstruction) done
| -rw-r--r-- | notes/pending-issues.md | 2 | ||||
| -rw-r--r-- | tasks.md | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/notes/pending-issues.md b/notes/pending-issues.md index 7dc1022..7e12332 100644 --- a/notes/pending-issues.md +++ b/notes/pending-issues.md @@ -16,7 +16,7 @@ ## 2. System context builder — referenced files not loaded -**Status:** PENDING. +**Status:** DONE (commit `b180cc1`). **Symptom:** The system context builder does not load referenced files that live in the conversation's working directory. Concrete reproduction: the orchestrator @@ -5,7 +5,24 @@ > Keep this lean and current; do not let it re-accrete a step-by-step changelog. ## Status (current) -`tsc -b` EXIT 0 · biome clean · **1405 vitest** green. +`tsc -b` EXIT 0 · biome clean · **1411 vitest** green. + +## System-prompt stale on cwd change (DONE) +Bug: the system-prompt service constructed the resolved prompt once on the first +turn and reused it via `get()` on subsequent turns (cache-safe design). But the +prompt is cwd-sensitive (`[file:AGENTS.md]`, `[prompt:cwd]` variables). When a +conversation's cwd changed after the first turn, the cached prompt was stale — +referenced files from the new cwd were not loaded. +- **Wave 1 — `system-prompt`:** added `getWithMeta(conversationId)` returning + `{ prompt, cwd }` — reads both `resolved:<id>` and a new `resolved-cwd:<id>` + sibling key. `construct()` now also stores the cwd. All additive, no existing + method signature/behavior changed. +5 tests. +- **Wave 2 — `session-orchestrator`:** subsequent turns call `getWithMeta`, + compare stored cwd vs `effectiveCwd ?? process.cwd()`, and `construct` if they + differ (or if no stored prompt exists). Compaction path (always constructs) + and warm path (no system prompt) unaffected. +1 test. +- [x] Verified: `tsc -b` EXIT 0, biome clean, **1411 vitest** pass; both in-lane. +- No FE handoff needed (backend-only fix; no contract version bump). ## Workspace tab issue — conversation.open drops workspaceId (DONE) Cross-repo additive fix: `conversation.open` / `conversation.statusChanged` WS |
