Repository navigation
power: retain bounded asynchronous battery evidence (#439) - #446
Draft
adrianwedd wants to merge 1 commit into
Draft
adrianwedd wants to merge 1 commit into
adrianwedd wants to merge 1 commit into
Conversation
Deploying spark with
|
| Latest commit: |
9e27f8d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cf5090a3.spark-e11.pages.dev |
| Branch Preview URL: | https://fix-439-bounded-battery-evid.spark-e11.pages.dev |
This branch has not been deployed
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.
Related to #439; prerequisite evidence retention only, not a shutdown fix. Do not close the parent issue.
Records timestamped unrounded ADC voltage, existing rounded voltage, and rejected_adc/warmup/accepted classification. Reuses StallProofLineWriter with a 64-line bounded queue and two files capped at 256 KiB each; appended lines capped at 512 bytes. No filesystem work on the new evidence producer path. Cumulative dropped/error counters become visible after recovery.
Charging detector, ADC floor, counters, battery.json schema, and shutdown policy are unchanged. No new dependencies or service changes. Best-effort only: no fsync; queued/partial final records can be lost at power failure. Existing synchronous state/health/alert paths are unchanged. Compatibility, limits, and a later operator verification recipe are in docs/operations/battery-evidence-retention.md.
Validation: 15 targeted tests passed (new synthetic storage/clock/voltage tests plus existing battery trend tests); bash -n bin/px-battery-poll and git diff --check passed. Slow storage is held blocked while the producer completes; ENOSPC, EACCES and EROFS are injected. The poller integration test parses AST only. No poller, hardware, GPIO, audio, sudo, service, deployment, or fault induction was executed. No live evidence or brownout diagnosis is claimed.
Self-reviewed exact four-file patch for scope and privacy. Reviewed commit and verified remote branch head: 9e27f8d. Open PR ownership rechecked; no overlap with existing PRs. Pending independent review and hosted checks; do not merge or deploy as part of this delivery.