Skip to content

dummy-ups: preserve alarm descriptions during recorder playback - #3867

Open
user01010111 wants to merge 3 commits into
networkupstools:masterfrom
user01010111:fix/recorder-alarm-playback
Open

user01010111 wants to merge 3 commits into
networkupstools:masterfrom
user01010111:fix/recorder-alarm-playback

Conversation

@user01010111

Copy link
Copy Markdown
Contributor

Replaying a nut-recorder sequence with dummy-ups now restores recorded alarm descriptions. The recorder quotes each description, repeats it when the status changes, and records an empty assignment when the description disappears. After a failed poll it keeps affirmative readings during WAIT and defers clearing a missing description until the device supplies an explicit value or leaves WAIT.

Hand-written ALARM instructions still accumulate messages and clear them together. Older recordings omit a clear, so playback uses the loss of the ALARM status token to recognize removal of a recorded description. An older sequence cannot distinguish a deletion when the token stays set. A connected upsd can still misreport a changed string containing a double quote or backslash until it receives the full driver state again.

Validation

  • Ran the recorder explicitly under dash on Linux with a disposable dummy-ups, upsd, and upsc. Playback restored initial, raised, changed, retained, and cleared descriptions. The unmodified driver omitted the description at all four active observations.
  • Verified a 255-byte recorded description and a 127-byte hand-written alarm, including their last characters. Checked status and description changes independently across polling failures and recovery, including complete and partial WAIT observations.
  • Compared readings from an already-connected upsd with a fresh driver-state transfer. The sequence file preserved spaces, literal hashes, quotes, and backslashes. Unmodified and updated drivers showed the same existing limitation for a quoted message sent to an already-connected server.
  • Built with GCC and compiled the driver with Clang in GNU89 mode. Project checks, style and spelling checks, and make distcheck-light passed. Verified the installed manual pages, their HTML links, and all five edited files in the distribution archive.

OpenAI Codex used gpt-6.2-astra for implementation and review and gpt-6.2-sol for validation and drafting. Claude Code (claude-opus-5-5) independently reviewed the patch.

Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 957a4aa is temporarily available: NUT-tarballs-PR-3867.zip.

…l syntax [networkupstools#3867]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@github-actions github-actions Bot deleted a comment from AppVeyorBot Dec 3, 2026
@AppVeyorBot

Copy link
Copy Markdown

✅ Build nut 2.8.5.6143-master completed (commit 84201fb95b by @jimklimov)

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.

3 participants