Skip to content

P0 reliability: generation-safe device recovery and independent-stream telemetry - #26

Closed
masarray wants to merge 25 commits into
mainfrom
feature/p0-recovery-state-clock-bridge-hardening
Closed

masarray wants to merge 25 commits into
mainfrom
feature/p0-recovery-state-clock-bridge-hardening

Conversation

@masarray

@masarray masarray commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Consolidated P0 engine work

Implement deterministic, generation-token-based device lifecycle policy with bounded retries, fail-closed endpoint loss, stale async event rejection, and stable-state persistence gating. Add provenance-correct capture/render counters with explicit dropped/missing frames for future split-stream adapter; these are NOT hardware driver xruns. All callback-facing operations use bounded atomics, no allocations/locks. Add native Release-active CTest coverage for recovery and split stream telemetry.

Scope and next gate

This is a P0 foundational PR, not completion of integrated native WASAPI independent capture/render streams, device auto-fallback or hardware listening FAT. Existing JUCE joined audio path untouched until the real adapter can be validated. GUI v0.8 and existing COPY FULL REPORT preserved. Require Windows MSVC + 8 native CTests and Chromium CI GREEN before merge.

P0 tracker: #15

Additional native transport added after initial review

  • IndependentClockPipeline exercises two independent callback timebases with bounded FIR bridge and frame-level telemetry in native CTest.
  • JuceIndependentDeviceAdapter implements source-only and render-only JUCE AudioDeviceManager instances. Capture callback feeds ASRC producer, render callback pulls and dispatches prepared PCM to host processor in bounded 8192-frame chunks; no heap or COM operations occur in callbacks. Adapter header is MSVC-compiled from LiveAudioEngine.h but intentionally not activated in the production callback path pending transactional device migration, automatic rollback and hardware verification.
  • P1 flapping endpoint review fixed: bounded retry for repeated device loss and stable budget resets only after 30 seconds. P2 zero-epoch healthy-timer issue fixed.

Remaining: device migration from joined JUCE into split sessions, AUTO/STABLE runtime selection, real render underrun provenance and complete hardware FAT. Issue #15 remains open; this PR is not a claim to finish P0 or eliminate physical crackling.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T13:29:58.114072Z 1ad5e9f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ad5e9f275

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread engine/device/DeviceRecoveryPolicy.h Resolved
Comment thread engine/device/DeviceRecoveryPolicy.h Resolved

Copy link
Copy Markdown
Owner Author

RECONCILIATION 2026-10-26 — Converted to DRAFT, not merged. Recovery/clock-bridge prototype branch diverges from current main and its old JuceIndependentDeviceAdapter/IndependentClockPipeline design is no longer the live integration: merged #35 uses JuceIndependentClockDevice, with recovery/watchdog/fail-closed route hardening from #39/#40/#45/#50/#55. Archive this for traceability; re-implement any demonstrated missing tests against current main (do not copy whole old CMake/LiveAudioEngine). P0 hardware acceptance remains OPEN at #15.

Copy link
Copy Markdown
Owner Author

Backlog reconciliation — archived as SUPERSEDED (NOT merged). Stacked device recovery helper overlaps #25/#29 and current lifecycle/epoch code. Preserve useful token/clock tests for hardware #15; do not merge obsolete CMake/LiveAudioEngine.

Current PRD v5 / ARD v5. Active owners: native #266 / epic #192, UI #265, physical #15, Show #180 and owner GUI #176. This PR's historical commits remain accessible, and no head is blindly merged into modern engine.

@masarray masarray closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant