Skip to content

power: retain bounded asynchronous battery evidence (#439) - #446

Merged
adrianwedd merged 3 commits into
masterfrom
fix/439-bounded-battery-evidence
Oct 24, 2026
Merged

adrianwedd merged 3 commits into
masterfrom
fix/439-bounded-battery-evidence

Conversation

@adrianwedd

@adrianwedd adrianwedd commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

2026-10-24 — Merged; combined master5b693601 CI verified. This is integrated source, not robot deployment or live hardware acceptance. Operator steps remain on #439.

Related to #439: bounded asynchronous diagnostic retention, not a shutdown fix. Keep the parent open.

Records timestamped raw/rounded ADC voltage and existing rejected/warmup/accepted branches through a bounded64-line queue, current+one older file capped256KiB each and512-byte appended records. Filesystem work stays on the existing background writer. Storage/drop counters remain best-effort; no fsync or decisive-last-sample guarantee. Existing battery decisions/schema, charging/shutdown policy and measured/derived trend labels are unchanged.

2026-10-24 repair: NaN/+infinity now record conversion_error before re-raising the original percentage-conversion exception. A pure AST-extracted actual poller boundary test proves retention and unchanged exception type; finite7.2 remains50 percent with no extra error event. No GPIO import or poller launch.

Final reviewed head dbb73415306342bc1f48d5421124d76ff74175b2: independent adversarial review PASS;18 focused offline tests pass; current Linux CI and Socket pass. Current master is integrated without the stale-base HAT/API/telemetry reversals; the diff is exactly the four intended files. Bootstrap installer PR#442 is independent.

Actual robot readback: HAT hold present, alive/battery units inactive with false start conditions. Live evidence acceptance waits for operator-authorised hardware recovery and natural ADC samples. Do not remove the marker, run diagnostics, start pollers, induce discharge or change shutdown policy to test this feature. No root, service, audio, hardware, live fault or deployment operation occurred. logs_test/backlog-446-20261024/ retains offline receipts. Source integration is within the active backlog goal; the earlier review-only boundary is historical.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Deploying spark with  Cloudflare Pages  Cloudflare Pages

Latest commit: dbb7341
Status: ✅  Deploy successful!
Preview URL: https://5115f71d.spark-e11.pages.dev
Branch Preview URL: https://fix-439-bounded-battery-evid.spark-e11.pages.dev

View logs

@adrianwedd
adrianwedd marked this pull request as ready for review October 24, 2026 08:15
@adrianwedd
adrianwedd merged commit 5b69360 into master Oct 24, 2026
4 checks passed
@chatgpt-codex-connector

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 🔄 Running since 2026-10-24T08:15:53.154629Z dbb7341 Draft marked ready
ℹ️ 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.

@adrianwedd

Copy link
Copy Markdown
Owner Author

2026-10-24 — Merged source and combined CI verified; no live battery operation. #446 merged as 5b693601bb1230d833bcdfec2bdded734d261c7a after independent pinned review and passing PR CI2343tests. Combined-master CI40077355507 now passes with both the trusted-installer and battery slices present. Local focused battery tests18passed, including actual AST-extracted conversion/error code with synthetic NaN/infinity. The original exceptions and decision policy remain unchanged; recording is best-effort evidence, not a brownout/shutdown fix.

The current hardware hold and both start-condition drop-ins are retained exactly. Last readback holds alive/battery inactive; no poller, GPIO/audio, discharge, fault induction, restart, root apply or state-policy change occurred. Source merge is not live ADC acceptance. Next #439 step is operator-authorised hardware recovery, then natural evidence collection and retention/readback before any safety-policy conclusion. The parent remains open. Current runtime checkout was observed at6a2aa588, not claimed upgraded by these merges.

Receipts: logs_test/backlog-446-20261024/ and logs_test/backlog-442-20261024/. Unrelated prototype files are hash-unchanged. Local master5b693601 and both remote source merges are integrated; no tracked WIP or temporary worktree remains.

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