Repository navigation
Add controlled Quran failure qualification harness - #45
Merged
Merged
Conversation
eirabie
force-pushed
the
codex/quran-failure-harness
branch
from
October 11, 2026 18:37
1ae6799 to
2607fe3
Compare
eirabie
marked this pull request as ready for review
October 11, 2026 19:23
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.
Summary
Controlled Quran failures need repeatable fixtures before attended hardware qualification. Add a private HTTPS fixture server and an isolated Waveshare maintainer profile that routes validated provider URLs through those fixtures while preserving the redirect policy and hostname verification.
Normal recordings now use 4 KiB writes with a five-second timeout per write, allowing a progressing slow reader to finish recordings that take longer than five seconds. Handshake/request limits, the eight-worker bound and intentional truncation/stall behavior remain intact. The fixtures also cover HTTP 503, malformed/oversized metadata, MIME/decode failures, forbidden redirects, redirect loops and untrusted/wrong-host certificates.
Qualification snapshots expose metadata stack and heap/PSRAM observations. Build/profile checks require isolated storage and disabled updates; release packaging rejects the qualification marker. The runbook describes device preflight, explicit recovery and application-only restoration.
Hardware impact
Uses the existing Waveshare Box V2 for later attended qualification.
Standalone impact
Production Quran, scheduling and offline controls retain their behavior. The transport/observation hooks compile only into the maintainer profile; normal builds retain the public certificate bundle and provider paths. The rebase preserves main's audio health and volume-transition handling.
Testing
Automated/local: all 135 pinned Python tests without skips, 20 UBSan CTests and 14 ESPHome configuration schemas passed after rebasing onto
mainatf12c15ecaa546edaae7267a74051e4b06598827f. The production Quran worker, Atom volume/Quran integration and qualification-routing UBSan executables also passed. The final diff was re-reviewed and whitespace checks passed.Real loopback TLS regressions use a generated, valid 4,802,394-byte host-only MP3 outside Git, normal FFmpeg validation and requested 16 KiB socket buffers. Eight seconds of slow reading followed by draining returns the declared length, identical payload and matching hash. The original whole-body writer fails under the same conditions. A stopped reader releases its worker within seven seconds; disconnect cleanup and concurrent/subsequent metadata requests pass. Existing TLS rejection, redirect, media-immutability, truncation and stall cases remain covered.
The host fixture correction adds no firmware code or dependency changes. Seven earlier matched pinned builds remain documented against their original
2cea368baseline; main's subsequently merged audio changes have separate measurements. Those results are historical comparisons, not new measurements of the rebased firmware. See the dated validation report.All 13 checks passed for the updated head
2607fe3ad1c3e298d514191eb8a08ee41294ad4ein the Linux CI workflow, including all 135 Python tests, browser tests and every firmware/capacity variant. The rebuilt qualification OTA image is 1,377,472 bytes, leaving 195,392 bytes of the 1.5 MiB application budget and 719,680 bytes in its 2 MiB slot; static RAM is 116,847 bytes. These are current CI measurements, separate from the earlier matched comparisons.Hardware: none accessed during this correction. The new profile, device TLS/decoder acceptance, fault recovery, runtime headroom and continuous real-provider soak remain physically unqualified. Generated host MP3s and compile-only CI images must never be installed or played on a device.
Licensing/media
No recording is bundled or downloaded. Actual device fixtures require an approved real MP3 outside Git and complete FFmpeg validation; fixture keys, logs and recovery evidence remain outside the repository.