Эх сурвалжийг харах

docs: close parallel event batch todos

Problem: Todo 48 and its replay/terminal/resource follow-ups remained open after the shared batch executor and policy flows passed final bounded gates.

Risk: timed-out worker threads cannot be force-killed; production side-effect ports must remain idempotent and tolerate late completion while resource leases remain held.
zhenyu.hu 2 долоо хоног өмнө
parent
commit
2b6b863952

+ 5 - 1
docs/plans/todo-48-parallel-event-batches.md

@@ -1,6 +1,10 @@
 # Todo 48 Parallel Event Batches and Result Policies Plan
 
-**Status:** in_progress
+**Status:** done
+
+## Result
+
+Added a shared policy-driven `EventBatchExecutor` used by direct and dual modes. It provides bounded parallelism, conflict serialization, per-event/batch timeout handling, stable ordered results, failure isolation, scoped replay/deduplication, terminal-last execution, and generic policy aggregation for silent, template, LLM, and terminate outcomes. Final full verification: `372 passed`, one existing warning.
 
 ## Goal
 

+ 5 - 1
docs/plans/todo-48.1-batch-canonical-replay-and-terminal-safety.md

@@ -1,6 +1,10 @@
 # Todo 48.1 Batch Canonical Replay and Terminal Safety Plan
 
-**Status:** in_progress
+**Status:** done
+
+## Result
+
+Added canonical normalized keys, atomic in-flight sharing, bounded/releasable scopes, terminal grace after sibling timeout, off-event-loop sync handlers, deterministic fallback farewell, and dedicated direct/dual web-search two-answer tests.
 
 ## Goal
 

+ 5 - 1
docs/plans/todo-48.2-outcome-cache-and-sync-resource-lifecycle.md

@@ -1,6 +1,10 @@
 # Todo 48.2 Outcome Cache and Sync Resource Lifecycle Plan
 
-**Status:** in_progress
+**Status:** done
+
+## Result
+
+Replay now preserves complete outcomes, released scopes cannot late-store, invalid arguments cannot inherit success, timed-out synchronous work retains conflict/concurrency leases until actual completion, and coalesced results retain correct IDs with one logical policy message.
 
 ## Goal
 

+ 5 - 1
docs/plans/todo-48.3-strict-canonical-types-and-scope-token-cleanup.md

@@ -1,6 +1,10 @@
 # Todo 48.3 Strict Canonical Types and Scope Token Cleanup Plan
 
-**Status:** in_progress
+**Status:** done
+
+## Result
+
+Canonical equality now uses strict recursive JSON types, and unique scope tokens are removed on release while still preventing old late tasks from storing into reused scopes. Final bounded gate approved.
 
 ## Goal
 

+ 4 - 4
docs/plans/todos.md

@@ -88,10 +88,10 @@
 | 47.1 | done | `docs/plans/todo-47.1-plugin-normalization-and-validation.md` | Share plugin normalization across invocation modes and harden negation, numeric, date/timezone, query, and adapter idempotency boundaries. | Direct/dual normalization matches; strict date/timezone/query validation and canonical adapter keys pass final gates. |
 | 47.2 | done | `docs/plans/todo-47.2-plugin-token-and-compatibility-boundaries.md` | Reject remaining negated/non-integer volume tokens, canonicalize integral JSON numbers, preserve fallback state, use standard date-time semantics, and restore positional dataclass compatibility. | Named negation/token cases, integral floats, fallback provenance, RFC3339, and positional compatibility pass. |
 | 47.3 | done | `docs/plans/todo-47.3-bare-volume-numeric-guard.md` | Apply malformed numeric rejection to the existing bare `volume to`, `volume at`, and `volume=` syntaxes. | Bare decimal/grouped tokens are rejected with no side effect; integer forms remain valid; bounded gate APPROVED. |
-| 48 | in_progress | `docs/plans/todo-48-parallel-event-batches.md` | Execute multiple flat events with bounded parallelism, failure isolation, aggregation, and a terminal barrier. | Runtime tests prove independent concurrency, stable result order, isolated failures, and termination after sibling completion or timeout. |
-| 48.1 | in_progress | `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. | Normalized equivalents coalesce safely; in-flight duplicates execute once; scopes release cache; terminal runs after sibling timeout; blocking sync work cannot block the loop; search two-answer and tool-only farewell regressions pass. |
-| 48.2 | in_progress | `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. | Invalid requests never inherit success; released scopes cannot late-store; timed-out sync work retains locks/slots until completion; terminal deadline flags replay exactly; duplicate payload IDs/messages stay correct and singular. |
-| 48.3 | in_progress | `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. | Enum/bool-like values never coalesce with integers; released scopes leave no retained token while late tasks still cannot store into a reused scope. |
+| 48 | done | `docs/plans/todo-48-parallel-event-batches.md` | Execute multiple flat events with bounded parallelism, failure isolation, aggregation, and a terminal barrier. | Direct/dual share bounded policy-driven batches with stable order, failure isolation, terminal barrier, and four built-in user flows; full suite passes (`372 passed`, one existing warning). |
+| 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 | pending | `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. |
 | 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. |