Skip to content

Integrate recorder ring and bounded restart preservation - #25

Closed
RyanTheTide wants to merge 13 commits into
fix/playback-energy-grantsfrom
integration/recording-ring-preservation
Closed

RyanTheTide wants to merge 13 commits into
fix/playback-energy-grantsfrom
integration/recording-ring-preservation

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Integrates #22's bounded async recording ring with #23's restart preservation and archive-cap fix. The merged recorder keeps production create_async, refuses stale sidecars, and uses create_new so a failed preservation cannot truncate evidence. The helper counts incomplete archive bytes and makes room before moving any new segment; a failed deletion leaves an incomplete marker. Regressions cover repeated restarts after a partial move, failed deletion, and the production async constructor.

The Linux run also exposed a timing race in #22's missing-directory test. The worker can return BrokenPipe before create_async returns. The regression now accepts either timing and still checks that governing continues without recording.

Base and review order

This is stacked on #21 (fix/playback-energy-grants) because the default main branch has not yet received #21. The branch contains #22 and #23 by merge ancestry. Retarget to main after #21 lands; keep this PR draft until the combined review is complete.

Verification

No hardware, playback, deployment or running unit was changed.

@erikwb

erikwb commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Offline replay on the MacBook Air 13" M4 (J713), in case it's useful.

Setup: the J713 recording from #8 (https://weirdware.io/aurora/j713.rec.zst, format 3, 58 s of playback over 816 s, mostly loud test tones), replayed with --replay ... --model j713.

Both runs report governor asahi (recorded asahi). Neither certifies, as expected for a configuration that differs from the recording's.

#8 #25
hand-offs to the kernel 4 (model asks 8.5-15.6 dB) 0
playback at the kernel's level 2.0 s 0.0 s
card while playing, mean / p50 / p95 / max (dB) 3.5 / 0 / 1 / 99.5 15.6 / 15 / 18 / 18.5

Per 100 s of the recording, from the --csv output:

#8 tweeter dB (median) #8 tweeter coil max #25 tweeter dB (median) #25 tweeter coil max #25 woofer dB (median)
0-100 s 0 (max 99.5) 129.8 C 18.0 98.0 C 7.0
100-200 s 0 116.9 C 15.0 56.9 C 5.5
200-300 s 0 (max 99.5) 137.0 C 15.0 55.3 C 5.5

#25 fixes the short-sound cut-outs we saw live with #8 on the J713: the near-mute hand-offs at stream edges are gone.

In their place, the J413 profile holds the tweeters about 15 dB down and the woofers about 5.5 dB down for the whole recording. That happens while the replayed tweeter coil is around 55 C, far under the 140 C working limit. So the reduction doesn't look thermal; my guess is the onset-energy ceiling from #12/#15. If so, this recording at least would play noticeably quieter and duller on J413-family machines with this stack.

Caveats:

  • The recording is test tones, not program material.
  • I applied the J713 differences to the J413 profile myself.
  • Nothing here ran on the speakers.

If more information would help, I can share the CSVs.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #27: this PR's head is already contained in the 0.1.13 release candidate branch (fu-speakerguardd-rc), so it lands with that PR. Closing to keep one release PR (fewer, bigger PRs).

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.

2 participants