common: preserve case-only state value updates - #3630
Open
user01010111 wants to merge 2 commits into
Open
Conversation
Compare raw state values byte-for-byte so mutable updates such as device.contact changing from Operations to operations are retained and published. Preserve case-insensitive variable-name matching, immutable values, timestamps and metadata. Add common state-library regression coverage and an existing NIT dummy sequence check for both case transitions. Document the correction in NEWS. Closes: networkupstools#3622 AI assistance: OpenAI Codex with gpt-6-astra (x-high reasoning). The human contributor remains responsible for reviewing and submitting the change. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit f1bdaf5 is temporarily available: NUT-tarballs-PR-3630.zip. |
Stop statetest with a clear failure message if the required device.contact lookup returns NULL, before reading the node name or changing its flags. AI assistance: OpenAI Codex with gpt-6-astra (x-high reasoning). The human contributor remains responsible for reviewing and submitting the change. Signed-off-by: user01010111 <12504630+user01010111@users.noreply.github.com>
|
✅ Build nut 2.8.5.5254-master completed (commit 6619ffa177 by @user01010111)
|
|
✅ Build nut 2.8.5.5255-master completed (commit f4cda53beb by @user01010111)
|
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.
Changing a mutable
device.contactfromOperationstooperationscurrentlyreturns unchanged, keeps the old value and suppresses the driver's SETINFO
publication. The server uses the same comparison when storing received updates.
Compare raw values byte-for-byte so the replacement is stored and published.
Variable-name matching and tree ordering remain case-insensitive. Immutable
values still reject replacements, and timestamps and metadata retain their
existing behavior. Drivers producing case-varying values will now publish those
changes; identical repeats remain suppressed. This is separate from the
IMMUTABLE propagation proposal in #2549.
Adds a regression linked to the actual common state library, an existing NIT
dummy sequence check for both case transitions, and a NEWS entry.
Closes: #3622
Validation:
2caa3c875for stale case-only values and passed after the fix. It covers flags, immutable
values, metadata, timestamps, tree/name behavior, lengths and escaping.
warnings and -Werror passed, including real dummy-ups/snmp-ups builds and
13/13 and 14/14 configured tests respectively. Apple Clang 21.0.0 passed
9/9 macOS tests; its unrelated
default-directory warning required a targeted compiler suppression.
libraries under ASan/UBSan with leak detection, and under Valgrind with no
reported errors or leaked blocks.
8 passing checks. A separate real dummy-ups/upsd/upsc run observes timed
publication, server/client capitalization, authenticated simulated SET VAR
changes, and suppression of identical repeats on macOS and Linux.
in the extracted Linux build. A forced missing-node lookup against the real
library exits with status 1 and a clear diagnostic before dereferencing.
make distcheck-lightpasses, including the extracted build, tests,install/uninstall and cleanup. All five packaged files match the final patch.
Full spellcheck, source style, shell syntax and diff whitespace checks pass.
NEWS renders with one unchanged baseline linkman macro warning.
No physical UPS hardware was available for testing. Validation covered common
state-library regressions, compiler and memory checks, existing configured
tests, and real localhost dummy-ups/upsd/upsc integration with timed updates,
observed publication and simulated SET VAR round trips, plus distribution and
documentation checks. Physical UPS models, firmware versions, hardware write
behavior, and hardware combinations were not tested. The MGE mapping establishes
software applicability; no actual MGE write or publication is claimed.
Relevant checklist:
AI assistance: OpenAI Codex with gpt-6-astra (x-high reasoning).
The human contributor remains responsible for reviewing and submitting
the change.