You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The public TaskCompleted boundary does not explicitly guarantee that the task's API conversation history is visible to a fresh extension host. A consumer can observe completion, stop or restart the host, and then find no api_conversation_history.json to restore.
This is a candidate additional root cause under #1279. It is separate from the hydration, stale-writer, and resume/eviction hazards addressed by PR #1319.
Evidence
Mocked E2E run 33292570133 observed TaskCompleted, then immediately found no persisted API conversation history during the restart-persistence create phase.
The normal mocked E2E suite passed; only the separate restart-persistence phase failed.
The failure could not be reproduced in 120 local repetitions, so the exact concrete interleaving remains unproven.
Alloy model PR [Fix] Task history can disappear when users restart after completion #1452 demonstrates that the abstract current contract permits completion and host shutdown before history is restart-visible. A durability-gated contract removes the counterexample within the checked bounds without preventing successful completion.
Contract decision
Choose and document one production contract:
TaskCompleted means the task is safe to close or restart, so required UI/API history writes must be restart-visible before the event is emitted; or
TaskCompleted means only that completion was accepted, and production exposes a separate persistence-ready acknowledgment for restart-sensitive consumers.
Polling only in the E2E test is not sufficient unless the production event contract explicitly excludes persistence readiness.
Acceptance criteria
Add a deterministic regression that controls the completion-versus-persistence ordering.
Define the public completion and persistence-ready semantics in code and tests.
Ensure a host stopped after the relevant readiness boundary can restore API conversation history.
Define behavior for failed or indefinitely delayed history writes.
Preserve successful completion when persistence succeeds.
Verify the create and fresh-host restart phases end to end.
Non-goals
Power-loss or filesystem fsync durability beyond visibility to a fresh extension host.
Problem
The public
TaskCompletedboundary does not explicitly guarantee that the task's API conversation history is visible to a fresh extension host. A consumer can observe completion, stop or restart the host, and then find noapi_conversation_history.jsonto restore.This is a candidate additional root cause under #1279. It is separate from the hydration, stale-writer, and resume/eviction hazards addressed by PR #1319.
Evidence
TaskCompleted, then immediately found no persisted API conversation history during the restart-persistence create phase.Contract decision
Choose and document one production contract:
TaskCompletedmeans the task is safe to close or restart, so required UI/API history writes must be restart-visible before the event is emitted; orTaskCompletedmeans only that completion was accepted, and production exposes a separate persistence-ready acknowledgment for restart-sensitive consumers.Polling only in the E2E test is not sufficient unless the production event contract explicitly excludes persistence readiness.
Acceptance criteria
Non-goals
fsyncdurability beyond visibility to a fresh extension host.