Quellcode durchsuchen

docs: close tool mode session restore todos

Problem: Todo 49 and its review follow-ups needed durable status, verification evidence, and risk closure before metrics work begins.

Risk: None; documentation records already verified behavior and the existing deprecation warning.
zhenyu.hu vor 2 Wochen
Ursprung
Commit
250387d468

+ 7 - 1
docs/plans/todo-49-tool-mode-ui-session-restore.md

@@ -1,11 +1,17 @@
 # Todo 49 Tool Mode UI and Session Restore Plan
 
-**Status:** in_progress
+**Status:** done
 
 ## Goal
 
 Make invocation mode and batch configuration visible/configurable in the debug UI, and restore a persisted direct-mode conversation with a provider-valid assistant/tool transcript.
 
+## Observe / Update
+
+- UI request and workspace/session snapshots preserve invocation mode, parallelism, and timeout configuration.
+- Direct-mode protocol history is persisted and restored provider-validly; follow-up Todos 49.1-49.3 closed atomicity, legacy repair, migration, and asynchronous replay races.
+- Final verification after follow-ups: `388 passed`, `node --check` and `git diff --check` pass; one pre-existing Starlette deprecation warning remains.
+
 ## UI
 
 - Add a mode selector with:

+ 7 - 1
docs/plans/todo-49.1-session-mode-and-atomic-transcript-safety.md

@@ -1,6 +1,6 @@
 # Todo 49.1 Session Mode and Atomic Transcript Safety Plan
 
-**Status:** in_progress
+**Status:** done
 
 ## Goal
 
@@ -45,3 +45,9 @@ Prevent session restoration from changing architecture semantics or persisting i
 - `node --check src/agent_lab/presentation/static/app.js`
 - `UV_CACHE_DIR=.uv-cache uv run pytest`
 - `git diff --check`
+
+## Observe / Update
+
+- Persisted mode mismatches fail before config overwrite.
+- Direct assistant tool calls and replies commit as one SQLite transaction; cancellation leaves no unresolved protocol group.
+- Concurrent migration, orphan/incomplete legacy transcript repair, focused tests (`138 passed`), and full suite (`385 passed` at this checkpoint) passed.

+ 7 - 1
docs/plans/todo-49.2-session-load-race-and-visible-repair.md

@@ -1,6 +1,6 @@
 # Todo 49.2 Session Load Race and Visible Repair Plan
 
-**Status:** in_progress
+**Status:** done
 
 ## Goal
 
@@ -34,3 +34,9 @@ Close reviewed session restoration races without changing the completed Todo 49/
 - `node --check src/agent_lab/presentation/static/app.js`
 - `uv run pytest`
 - `git diff --check`
+
+## Observe / Update
+
+- Superseded replay success/failure responses cannot mutate the selected session UI.
+- Whitespace-only protocol assistant records are hidden, while incomplete protocol records with visible text are restored without `tool_calls`.
+- Focused tests passed (`132 passed`); full suite passed (`387 passed`) before the directional token follow-up.

+ 7 - 1
docs/plans/todo-49.3-stale-replay-token-order.md

@@ -1,6 +1,6 @@
 # Todo 49.3 Stale Replay Token Order Plan
 
-**Status:** in_progress
+**Status:** done
 
 ## Goal
 
@@ -23,3 +23,9 @@ Make the replay generation guard directional: only a replay for the selected ses
 - `node --check src/agent_lab/presentation/static/app.js`
 - `uv run pytest`
 - `git diff --check`
+
+## Observe / Update
+
+- A replay for a non-selected session now exits before advancing the load generation or starting fetches.
+- Reverse-order executable JS regression passes alongside Todo 49.2 race coverage.
+- WebSocket tests passed (`78 passed`); full suite passed (`388 passed`) with the existing Starlette warning.

+ 4 - 4
docs/plans/todos.md

@@ -92,9 +92,9 @@
 | 48.1 | done | `docs/plans/todo-48.1-batch-canonical-replay-and-terminal-safety.md` | Canonicalize batch keys, make replay atomic and bounded, guarantee terminal grace after sibling timeout, enforce async timeout around sync handlers, and ensure termination has a farewell. | Canonical/in-flight replay, terminal grace, sync timeout responsiveness, farewell, and search two-answer regressions pass. |
 | 48.2 | done | `docs/plans/todo-48.2-outcome-cache-and-sync-resource-lifecycle.md` | Preserve full replay outcomes, generation-scope cleanup, invalid-key isolation, sync worker resource leases, and deduplicated result correlation/policy cardinality. | Outcome cache, scope invalidation, deferred sync resource leases, correlation, and single policy messages pass. |
 | 48.3 | done | `docs/plans/todo-48.3-strict-canonical-types-and-scope-token-cleanup.md` | Align canonical-key equality with strict JSON types and replace retained generation tombstones with unique releasable scope tokens. | Strict nested JSON types and 1000-cycle scope cleanup pass; final bounded gate APPROVED. |
-| 49 | in_progress | `docs/plans/todo-49-tool-mode-ui-session-restore.md` | Add UI mode selection, workspace/session restoration, and clear EventAgent applicability feedback. | Static/WebSocket tests prove requests, snapshots, loaded sessions, and audit context preserve the selected mode. |
-| 49.1 | in_progress | `docs/plans/todo-49.1-session-mode-and-atomic-transcript-safety.md` | Enforce persisted mode, atomically store direct tool rounds, repair incomplete legacy tails, serialize SQLite migration, and hide empty protocol bubbles. | Mode mismatches are rejected without config overwrite; disconnect cannot leave unresolved tool calls; concurrent migration succeeds; replay shows only visible assistant content. |
-| 49.2 | in_progress | `docs/plans/todo-49.2-session-load-race-and-visible-repair.md` | Prevent stale session loads from overwriting the selected session and preserve visible text while stripping incomplete tool protocol. | Out-of-order loads cannot mutate the active session UI; whitespace-only protocol bubbles stay hidden; incomplete tool rounds retain provider-valid visible content. |
-| 49.3 | in_progress | `docs/plans/todo-49.3-stale-replay-token-order.md` | Prevent a stale replay invocation from invalidating an already-running replay for the current session. | A late stale invocation exits before advancing the replay token; the current session still restores normally. |
+| 49 | done | `docs/plans/todo-49-tool-mode-ui-session-restore.md` | Add UI mode selection, workspace/session restoration, and clear EventAgent applicability feedback. | Static/WebSocket tests prove requests, snapshots, loaded sessions, and audit context preserve the selected mode. |
+| 49.1 | done | `docs/plans/todo-49.1-session-mode-and-atomic-transcript-safety.md` | Enforce persisted mode, atomically store direct tool rounds, repair incomplete legacy tails, serialize SQLite migration, and hide empty protocol bubbles. | Mode mismatches are rejected without config overwrite; disconnect cannot leave unresolved tool calls; concurrent migration succeeds; replay shows only visible assistant content. |
+| 49.2 | done | `docs/plans/todo-49.2-session-load-race-and-visible-repair.md` | Prevent stale session loads from overwriting the selected session and preserve visible text while stripping incomplete tool protocol. | Out-of-order loads cannot mutate the active session UI; whitespace-only protocol bubbles stay hidden; incomplete tool rounds retain provider-valid visible content. |
+| 49.3 | done | `docs/plans/todo-49.3-stale-replay-token-order.md` | Prevent a stale replay invocation from invalidating an already-running replay for the current session. | A late stale invocation exits before advancing the replay token; the current session still restores normally. |
 | 50 | pending | `docs/plans/todo-50-comparable-model-tool-metrics.md` | Record mode-aware model/tool spans and include EventAgent usage so both architectures can be compared fairly. | Persistence/API tests report agent, call kind, tokens, TTFT, tool latency, fallback usage, and total turn wall time without double counting. |
 | 51 | pending | `docs/plans/todo-51-comparison-matrix-closeout.md` | Add repeatable comparison fixtures, update project documentation, and close the experimental implementation. | Both modes pass the same scenario matrix; full tests, JS syntax, app import, and documentation checks pass. |