Skip to content

Confirm suspicious power snapshots before publish - #38

Merged
ffrog8 merged 2 commits into
masterfrom
feature/power-snapshot-confirm-v2
Apr 17, 2026
Merged

ffrog8 merged 2 commits into
masterfrom
feature/power-snapshot-confirm-v2

Conversation

@ffrog8

@ffrog8 ffrog8 commented Apr 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • confirm suspicious power tuples with up to three full snapshot reads before publishing
  • skip power-derived publishes when all three confirmation reads stay invalid or suspicious
  • reduce the RS485 quiet gap default from 20ms to 10ms and keep diagnostics compact around the final confirmation decision
  • update host and E2E coverage for the new confirmation path and the stub scenarios it affects

Verification

  • bash -lc "cd /home/coder/git/Alpha2MQTT && timeout 1200 ./scripts/test_host_docker.sh"
  • bash -lc "tail -f /dev/null | docker exec -i arduino-cli-build bash -lc '/project/Alpha2MQTT/Alpha2MQTT/build.sh'"
  • bash -lc "cd /home/coder/git/Alpha2MQTT && timeout 1800 ./scripts/e2e.sh"

Supersedes the earlier stale-branch attempt in #37.

@ffrog8

ffrog8 commented Apr 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review now please

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 290fc26bfa

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Alpha2MQTT/src/main.cpp Resolved
Comment thread Alpha2MQTT/include/PowerSnapshot.h Resolved

ffrog8 commented Apr 17, 2026

Copy link
Copy Markdown
Owner Author

Addressed the two review findings in 4faf97f.

  • rejected 3-sample power confirmation no longer poisons the full ESS snapshot when there were no actual power-read errors
  • power snapshot subread counters now saturate instead of wrapping, with regression coverage

Local verification on 4faf97f:

  • host tests: 245/245 passed, 5473/5473 assertions
  • firmware build: passed
  • full E2E: 37/37 passed in 1150.215s

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ffrog8
ffrog8 merged commit 8455bf3 into master Apr 17, 2026
3 checks passed
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