Skip to content

Fault lifecycle follow-ups deferred from the 2026-09-12 Codex review (write-timeout generation, lifecycle test, session-owned lifecycle) #200

Description

@mbreiser

Follow-ups from the Codex (gpt-6-astra) adversarial review of PR #198 (Studio v0.76, fw #50 campaign) on 2026-09-12. Reconciliation: docs/development/codex-review-2026-09-12-mode3-wedge.md (on the PR branch). Everything else from that review was fixed on the branch; these three were deliberately deferred.

  • A timed-out write does not cancel the write (js/arena-link.js _sendOne, the Promise.race against the response timer). The apply queue is released while the WritableStream may still deliver the bytes, so a late STOP (or a late 0x70) can cross the recovery boundary and confuse opcode-only reply matching. Fix: a transport generation that a write timeout invalidates — ordinary sends are refused until reconnect()/teardown; the post-mortem's quiet period + flushRx() stay as the second line. Did not affect night-1 evidence (the wedged controller ACKed writes and answered nothing).
  • Lifecycle integration test runner → run-log adapter → export: assert that the serialized terminal event carries stopAcked (the runner now emits it from finally, after the best-effort STOP) and that a CONTROLLER_FAULT run's commit is deferred until Studio.handleControllerFault finishes. Today the adapter test hand-supplies stopAcked and the deferral is exercised only in the browser.
  • Session-owned run lifecycle running → stopping → diagnosing → finalizing → idle inside ArenaSession, instead of HTML orchestration through Studio._pendingCommit / _activePostmortem globals. This is the right shape for the self-healing runner (Self-healing runner: detect controller wedge, reset, reconnect, resume with a trial gap #197, LAB-212): background pollers (telemetry ring, analog-in), UI actions and recovery all compete for one link and should take a lease from the session, not check flags.

Related: #197, #198, #199, reiserlab/LED-Display_G6_Firmware_Arena#50, LAB-212, LAB-149.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions