Repository navigation
Property::clearValue(): retract through the publish queue, and only once - #32
Merged
Merged
Conversation
The retraction now goes through queue_publish(), behind any value queued before it, so a stale value can no longer land after it. It is skipped when there is nothing to retract: no value held, none queued, and the last message sent was a retraction or nothing has been sent since boot. A value too long to memo now leaves the memo at -2, so a retraction after forget_value() on one is not skipped. Closes #30 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VUQ6asqTe3tYwnZR7GW2dn
dcj
force-pushed
the
fix/clear-value-queued
branch
from
November 14, 2026 17:40
961704c to
e3681df
Compare
Merged
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.
Closes #30.
Property::clearValue()now sends its retraction throughqueue_publish(), so it queues behind any value queued before it and a stale value can no longer land after it.It is skipped when there is nothing to retract:
A driver that retracts on every failed read therefore retracts once. A refused retraction is retried on the next call.
A value too long to memo now leaves the memo at -2 rather than -1, so -1 means only "nothing sent since boot", and a retraction after
forget_value()on such a value is not skipped.A port must implement
queue_publish(); the POSIX port and the ESP32 firmware do. The ESP32 queue sends a zero-length payload as a zero-length retained message.Tests:
test_property_publishhas five new cases: a repeat retraction, nothing to retract, ordering behind a queued value, a value too long to memo, and a refused retraction. The existing retraction test is updated for the queue.drive_and_retract.🤖 Generated with Claude Code
https://claude.ai/code/session_01VUQ6asqTe3tYwnZR7GW2dn