Skip to content

fix(ziggurat): Keep router children out of the child table backup - #78

Merged
puddly merged 3 commits into
devfrom
puddly/router-children-not-aged
Oct 31, 2026
Merged

puddly merged 3 commits into
devfrom
puddly/router-children-not-aged

Conversation

@puddly

@puddly puddly commented Oct 31, 2026

Copy link
Copy Markdown
Member

Fixes #77.

Per the spec, children can be both routers and end-devices. These were streamed out during network backup and ended up in zigpy's child table (which should be just end device children) and were restored back as such. This is a bug. I've also added a runtime fix to flip the device type of a child if a link status is received.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 15:43

Copilot AI 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.

🟡 Changes recommended

Router promotion leaves the receiver flag unset, causing traffic to remain queued for nonexistent polls, and deterministic regression tests for child expiry and scheduling are missing.

2 open issues
What changed in this PR

This PR addresses #77 by separating router children from end-device keepalive handling and backup exports.

Changes:

  • Restricts keepalive eviction and deadline scheduling to end-device children.
  • Reclassifies restored end-device entries as routers when they send Link Status.
  • Excludes router children from protocol child exports.
File Description
crates/​ziggurat-zigbee/​src/​nwk/​neighbors.rs Filters keepalive handling by device type and corrects router classification on Link Status.
crates/​ziggurat-protocol/​src/​bridge.rs Exports only end-device children for backup.

Review effort: Balanced

@puddly puddly changed the title Do not age router children with the end device keepalive timeout fix(ziggurat): Keep router children out of the child table backup Oct 31, 2026
@puddly
puddly merged commit f50265c into dev Oct 31, 2026
1 check 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.

Restored router children are incorrectly evicted by the end-device keepalive timeout

2 participants