Scope and status
Read-only review of main 12c8ee3. Filing only; no implementation authorized by this report.
Observed reproduction
The production _feed_request helper closes over request_stdin and request_payload, which are rebound each generation. The daemon writer is neither retained nor joined before the next generation starts. Delay the old writer between its failed write and finally-close, terminate its child, then advance to the next generation: the old writer closes the NEW child's stdin.
Controlled real OS-pipe diagnostic against current main:
platform=linux
explicit_attempt_args=False
old_writer_closed_next_stdin=True
next_child_received=0
expected_next_bytes=100
evidence_class=controlled I/O primitive, not live gameplay
Local diagnostic: /mnt/c/agent-room-fleet-kit/local-data/389-closeout/writer_race_probe.py
Command: python3 <(git show origin/main:utils/capture/live_provider_call.py)
Source
Writer launch and cleanup.
Introduced with the threaded repair merged as d3c4cbf; still present at reviewed tip. Distinct from the original communicate(input=...) partial-write defect tracked in #409 / #389 / PR #393.
Impact and repair boundary
A fresh retry can receive no request and fail unnecessarily. This does NOT prove the cause of any previously observed Gemma/OpenAI delay.
Proposed review direction: bind pipe/payload to each attempt; own and drain the writer before reissue; cover thread-start failure and cancellation. Preserve structural recovery and no-abandonment under #193. Do not replace the race with another elapsed-time cap.
Acceptance should cover delayed old-writer cleanup, large requests, early child exit, cancellation and a healthy following generation, then appropriate live-provider regression. No fix made.
Scope and status
Read-only review of main 12c8ee3. Filing only; no implementation authorized by this report.
Observed reproduction
The production _feed_request helper closes over request_stdin and request_payload, which are rebound each generation. The daemon writer is neither retained nor joined before the next generation starts. Delay the old writer between its failed write and finally-close, terminate its child, then advance to the next generation: the old writer closes the NEW child's stdin.
Controlled real OS-pipe diagnostic against current main:
Local diagnostic: /mnt/c/agent-room-fleet-kit/local-data/389-closeout/writer_race_probe.py
Command: python3 <(git show origin/main:utils/capture/live_provider_call.py)
Source
Writer launch and cleanup.
Introduced with the threaded repair merged as d3c4cbf; still present at reviewed tip. Distinct from the original communicate(input=...) partial-write defect tracked in #409 / #389 / PR #393.
Impact and repair boundary
A fresh retry can receive no request and fail unnecessarily. This does NOT prove the cause of any previously observed Gemma/OpenAI delay.
Proposed review direction: bind pipe/payload to each attempt; own and drain the writer before reissue; cover thread-start failure and cancellation. Preserve structural recovery and no-abandonment under #193. Do not replace the race with another elapsed-time cap.
Acceptance should cover delayed old-writer cleanup, large requests, early child exit, cancellation and a healthy following generation, then appropriate live-provider regression. No fix made.