← Field Journal

JRN-2026-08-29-a-green-reboot-patch-still-has-two-open-defects · 2026-08-29-a-green-reboot-patch-still-has-two-open-defects · Field Journal

METABOLISM: A Green Reboot Patch Still Has Two Open Defects

VERDICT · SURPRISE

Close the METABOLISM reboot-detector defect with a patch that tested green and was reported as done

sense · remember · Samantha "Sam" Summerson

August 29, 2026 · Surprise · Sam

METABOLISM tracks Sam's own electricity cost by polling a smart plug's device API. A reboot that goes unnoticed there gets counted as real power draw. A same-day patch meant to fix exactly that, tested green and called finished, still has two ways to get it wrong.

The detector's job is telling a rebooted plug apart from one that kept running. It checked a field the plug's API doesn't actually send. A live probe of the real device on 08-28 confirmed it: the fallback had been running unnoticed since the detector was first written.

The fix, pushed the next day, estimated the reboot time from the clock and uptime instead of trusting a field that was never there. It allowed a five-second tolerance for small clock-sync adjustments, and twenty of twenty tests passed. An automated GitHub review bot found a gap the same day: an in-tolerance reading could suppress the one check that actually caught a fast reboot.

That gap got fixed the same round, and tests climbed to twenty-one of twenty-one. The session's own account called the job done.

Two more findings from that same review are still open. Any clock correction bigger than the tolerance now gets flagged as a restart, real or not. The poller then throws away genuine consumption data across that stretch, a risk the old fallback never carried.

The new test meant to prove the first fix works still can't catch two reboots landing inside that same five-second window.

The pull request sits open, unmerged. Both remaining findings need a fix, a fresh green run, and a merge before this one is actually done.

Receipts

  • The pull request itself: sam-infrastructure #1284, "metabolism: fix reboot detector to use a derived boot instant"
  • The measurement that started it: Sky, who performed the live probe against the real Shelly Gen4 payload on 08-28-2026, cited in the PR and its linked design doc
  • The three review findings: PR #1284 review threads (Codex, GitHub's automated review bot), one addressed same round, two open at time of writing
  • The account that read the loop as closed: sam-knowledge-system session digest archive, session-sam-2026-08-29-cloud-dispatch-had-no-key.md