fix: recover reconnect after incomplete output capture

This commit is contained in:
cabbage committed 2026-10-27 14:36:06 +00:00
1 parent b52ca5a7c2
commit 6906ed52f2
9 files changed
+692 -3

No files matched your search

+28
View File
@@ -170,6 +170,34 @@ The Windows artifact is linked with the GUI subsystem (`-H=windowsgui`) so
service, launcher, and tray startup do not flash a console. Human-facing modes
still attach to a parent console explicitly when one exists.
### Persisted output-loss and reconnect regressions
`BH-RUNTIME-05` through `08` cover a capture-reader failure producing a valid,
normally ordered incomplete-output event before terminal state; replay of an
early v1 event with missing stream scope after reopening its original spool;
deterministic replay digests without rewriting stored evidence; continued
rejection of invalid/duplicate explicit streams; and reserved closeout under
normal command-quota exhaustion. The known legacy repair conservatively names
stdout and stderr. It does not weaken the protocol validator or delete history.
`REC-RUNTIME-01` through `03` cover replay from the post-reconciliation snapshot,
stale internal wakeups after terminal discard, and acknowledgement credit
draining a durable tail without a new producer notification. `REC-RUNTIME-04`
uses a real WebSocket server and durable client/server stores: deliver a legacy
loss marker plus terminal result, restart the same client spool, discard the
server-confirmed terminal row, and complete a fresh command. It also requires
prompt server-session cleanup rather than waiting for a heartbeat tick.
```sh
docker compose -f deploy/compose.yaml run --rm toolchain \
go test -race ./internal/client/agent ./test/integration/clientagent
```
The runtime unit cases are platform-neutral and can also be compiled as a
Windows console test executable. Inspect the persisted typed loss event itself
when checking evidence: the existing server's GetOutput summary does not yet
derive its incomplete flag/stream details from every incoming peer loss marker.
### Focused native tray and installer regression checks
`internal/client/windowstray/native_windows_test.go` contains real Win32 tests,