Skip to content

Fix probationary Observe delivery and quiesced cleanup - #71

Merged
QuiteYellow merged 1 commit into
QuiteYellow:mainfrom
Moballo-LLC:codex/observe-lifecycle-followups
Aug 29, 2026
Merged

Fix probationary Observe delivery and quiesced cleanup#71
QuiteYellow merged 1 commit into
QuiteYellow:mainfrom
Moballo-LLC:codex/observe-lifecycle-followups

Conversation

@Jason-Morcos

@Jason-Morcos Jason-Morcos commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Deliver a complete optionless initial 2.05 through on_notification while the Observe relation remains probationary.
  • Keep same-MID retransmissions suppressed and require a later different-MID packet before promoting the relation to the legacy notification path.
  • Re-read a blockwise probationary response before delivering it, using the existing bounded refetch worker.
  • Preserve Observe relation metadata across quiesce_for_close() so the later orderly close() can pace exact deregistration requests before close-notify.

Why

This follows up on the post-merge findings in #67, #68, and #69.

Some appliances answer an Observe registration once without an Observe option and may never send a second packet. The first representation is still useful state, but it should not falsely confirm a lasting relation. This keeps those two decisions separate: the payload is delivered, while the relation remains probationary until a later different-MID packet proves the legacy behavior.

The two-phase shutdown path also needs the same explicit observer cleanup as a direct close(). quiesce_for_close() remains the immediate signal that wakes waiters and stops application work. It additionally retains the relation metadata needed for cleanup; after workers have joined, close() uses a teardown-only paced send path for deregistration and then flushes close-notify. Ordinary requests remain rejected after quiescence.

Validation

  • 80 focused Observe/lifecycle tests
  • 577 full tests on Python 3.14
  • 577 full tests on Python 3.11 with the declared dependency floors
  • 1,730 LocalThings tests with this exact branch imported
  • wheel and sdist content checks plus isolated imports
  • share-safety and diff checks

@Jason-Morcos
Jason-Morcos force-pushed the codex/observe-lifecycle-followups branch from a11e493 to eadb2f9 Compare August 29, 2026 17:58
@QuiteYellow
QuiteYellow merged commit 1a47754 into QuiteYellow:main Aug 29, 2026
8 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.

2 participants