Spec 0241 — Orchestrator: per-turn liveness — heartbeat thread, per-turn BaseException capture, whole-turn cap wrapping stream consumption; verifier I2.8
Frontmatter
Field
Value
kind
dev
spec
0241
slug
per-turn-liveness-heartbeat-exception-capture-and-stream-wrapping-cap
title
Orchestrator: per-turn liveness — heartbeat thread, per-turn BaseException capture, whole-turn cap wrapping stream consumption; verifier I2.8
type
new-feature
label
new-feature
version_bump
MINOR
target_version
TBD
status
deployed
depends_on
['0222', '0239']
complexity
M
created
2026-05-27
queued_at
started_at
2026-05-27T23:14:17Z
merged_at
2026-05-27T23:29:35Z
deployed_at
2026-05-27T23:33:06Z
pr
https://github.com/Lexiz/dual-research/pull/277
handover
handoffs/2026-05-28-spec-0241-per-turn-liveness-heartbeat-exception-capture-and-stream-wrapping-cap.md
failure_step
source_session
promoted_from_draft
disposition
ship
disposition_reason
Live re-run 20260527-200213 cleared phases 0-3 (parser fix worked, organic phase-2 convergence over 3 rounds, full draft-v1.md produced) then phase 4 issued turn_started -> turn_inputs and died silently with no terminal event, no tombstone, metrics.ended_at=None. Process was NOT killed by the user (verified). The existing 600s httpx timeout in anthropic_agent.py:79 / openai_agent.py:46 is request-establishment-only — does not bound mid-stream stalls. 0222's run-loop tombstone does not catch per-turn API-wrapper exceptions. Result: the orchestrator can die silently in any long-running streamed-agent turn, untraceable. This spec closes the per-turn liveness gap with one authoritative timeout, structured exception capture, and observable heartbeats.
Event timeline
When
Step
Data
2026-05-27T22:00:11Z
queued
{}
2026-05-27T23:14:20Z
in_progress
{}
2026-05-27T23:14:32Z
branched
{"branch": "spec/0241-per-turn-liveness-heartbeat-exception-capture-and-stream-wrapping-cap", "from": "main@a6c2bd2"}
2026-05-27T23:14:35Z
implementing_started
{}
2026-05-27T23:27:48Z
implement_complete
{"files_changed": 10, "commits": 0}
2026-05-27T23:27:50Z
tests_started
{}
2026-05-27T23:27:52Z
tests_green
{"passed": 2263}
2026-05-27T23:29:33Z
pr_opened
{"url": "https://github.com/Lexiz/dual-research/pull/277"}
2026-05-27T23:29:38Z
merged
{"pr": "https://github.com/Lexiz/dual-research/pull/277"}
2026-05-27T23:30:04Z
deploy_started
{}
2026-05-27T23:31:48Z
deployed
{"version": "1.56.0"}
2026-05-27T23:31:48Z
deploy_health_check_ok
{}
2026-05-27T23:33:06Z
handoff_written
{"path": "handoffs/2026-05-28-spec-0241-per-turn-liveness-heartbeat-exception-capture-and-stream-wrapping-cap.md"}
Links