• fix(web): close Heid pass-2 findings — stream vocab + disconnect catch (v0.16.1)

    vh released this 2026-05-27 21:04:34 -07:00 | 235 commits to main since this release

    Second Heid panel pass (thread 01KSPBMFRRQE) on the v0.16.0 tree:
    Gróa returned zero findings; Hulda surfaced two minor tightening
    items, both closed here.

    1. test-gap — TestStreamFullEventVocab drove only 8 of 11 Event types
      through the stream endpoint (omitted Error, Cancelled, AffectUpdate).
      Serialization for all 11 was already covered by the presentation-
      contract fixture tests; this was a stream-integration coverage gap.

      • Added AffectUpdate to the vocab stream (non-terminal, coexists
        with done).
      • Added dedicated test_error_terminal_event + test_cancelled_terminal_event
        (terminal events are mutually exclusive with done, so they can't
        share one stream).
    2. precision — the disconnect-cancel path caught bare except Exception: pass, silently swallowing real CancelFailed / transport errors. The
      contract intent is to swallow only the cooperative race
      (CancelAlreadyCompleted). Narrowed: swallow CancelAlreadyCompleted /
      CancelTurnNotFound as the no-op race; log unexpected cancel failures
      as a structured stderr line for diagnosability. Never re-raises (we're
      unwinding the cancelled generator and must not mask CancelledError).

    Tests: +2 (376 → 378). Patch per SemVer discipline — coverage +
    diagnosability tightening, no behavior change observable to callers.

    Downloads