Repository navigation
Persist speaker state with fail-closed cross-boot handling (review draft) - #24
Closed
RyanTheTide wants to merge 1 commit into
Closed
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
RyanTheTide
commented
Oct 27, 2026
RyanTheTide
left a comment
Contributor
Author
There was a problem hiding this comment.
Independent safety review of 6fb4618: BLOCK pending the following fixes/proofs. No hardware or playback was used.
- Cross-OS ownership:
src/guard.rs:723-752accepts an old Linux checkpoint without proving no intervening macOS playback. A saved 50°C model remains ~50°C even if macOS heated the speakers before the next Linux boot. Under a conservative 150°C coil/magnet shutdown bound and 30 s of silence, the J616/J316 woofer V/I model is still 138.4°C coil / 135.9°C magnet (tweeter 117.6°C / 116.4°C). This is numerically no worse than speakersafetyd's ambient cold-start baseline, but that baseline does not prove this transition safe. Require a continuity marker covering every boot route, or use a conservative hot-start envelope on unknown/missing state and prove the ramp. - Clock credit:
src/checkpoint.rs:84-103comparesCLOCK_REALTIMEand RTC, but the former may have been initialized from the latter. A paired forward step passes and can award arbitrary extra cooling. Backwards and divergent steps are handled; paired error and drift are not. Cross-boot credit needs a proven lower bound on real silent time, otherwise zero credit/hot start. - Deployed-line equivalence: Base
9b54f813is one commit past the installed2f7d16db0313. It changes low-resistance detection from ratio 1.35 immediate to 1.6 after 1 s, and power-factor fault detection at 0.3–0.5 Vrms from immediate to up to 2 s. The PR RPM includes this outside the PR diff. Rebase the five PR commits onto the installed commit and preserve its detectors, or separately qualify the changed thresholds with a missed-energy bound. - Unclean bound:
src/state.rs:331-350conservatively charges 11 s of full gain only if playable time since the previous save is at most 11 s.src/guard.rs:1538-1546schedules after a completed tick and 10 s since the prior completed save; it has no hard maximum-latency/disarm rule. Include the 250 ms interlock and 500 ms queue tail in a deadline proof and fault-injection tests. - Artifact identity: I downloaded the successful fc45 CI RPM for this head; its SHA-256 is
45b5791547a57c92c37805e679939fd7feedc207c140ce205fb2387646ca7838, matching CI's checksum file, but the task brief says45b55791…. Reconcile before installation.
The exact exponential zero-power cooling formula matches the configured two-node model, and the fixed-name temporary file + file/directory sync provides atomic, bounded-size checkpoints. The 10 s schedule implies ~8,640 durable writes/day (~3.15 million/year) plus startup/suspend/stop writes; confirm SSD wear/performance on the target. CI passed; no device validation is claimed.
RyanTheTide
force-pushed
the
fix/instant-boot-thermal-state
branch
from
October 27, 2026 10:52
6fb4618 to
9746850
Compare
RyanTheTide
changed the base branch from
unified/rework-20261024
to
fix/pr8-deployed-base-2f7d16d
October 27, 2026 10:52
RyanTheTide
force-pushed
the
fix/instant-boot-thermal-state
branch
from
October 27, 2026 11:17
df0d10d to
c29bd93
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
This draft is based directly on the deployed pr8 commit
2f7d16db0313and preserves its V/I fault-detector thresholds. It replaces the V/I cold-start hard mute with a governed hot start while retaining the J700 latch./var/lib/speakerguardd/stateevery 9 s, on suspend, and after a clean stop. A 10 s maximum playable checkpoint age and 11 s unclean full-gain charge bound missed playback.CLOCK_BOOTTIMEand nonnegative realtime. A matching clean Linux shutdown record may resume within 90 s across boots, with zero cooling credit. Other cross-boot, missing and damaged records start from the profile's cross-OS design envelope.ExecStartPreline and retains all other admission and ownership gates.Host verification
CI run 40495092212 passed all 230 Rust tests, the recording-helper tests, and Fedora 44/45 RPM jobs at
c29bd9385e8be9a327001837be81eff487539ecd. The fake-card first governed handover was 0.171 s on J316, J413 and J616. In the 120 s host-model pink and max-power sweep checks, the independent peak coil/magnet temperatures stayed below the 140 °C working ceiling. The attenuation curves are indocs/deployment-boot-state.md.speakerguardd-0.1.10-15.pr8.c29bd9385e8b.fc44.aarch64.rpm824cca93243338de32d32e9daac7a716b463343f89b9695acb0af975ef8e196bspeakerguardd-0.1.10-15.pr8.c29bd9385e8b.fc45.aarch64.rpm043c8738302e1bc370272068e73958efa55583f20e2281cfa3bc8c3b76455921The downloaded RPM hashes match CI's
SHA256SUMS. This branch has no hardware playback, reboot, install or local override change. The orchestrator must verify the profile, effective owner policy, local-moverrides, card handover time, thermal behavior and rollback on each device before deployment. The short clean-reboot marker is an operational fast-restart signal; it cannot independently exclude an intervening OS.