Skip to content

Remove false-positive debug assert hits against normative behavior. - #876

Open
gavin-dunlap-luminar wants to merge 1 commit into
pendulum-project:mainfrom
luminartech:fix/correct-normative-debug-assertion-failures
Open

Remove false-positive debug assert hits against normative behavior.#876
gavin-dunlap-luminar wants to merge 1 commit into
pendulum-project:mainfrom
luminartech:fix/correct-normative-debug-assertion-failures

Conversation

@gavin-dunlap-luminar

@gavin-dunlap-luminar gavin-dunlap-luminar commented Sep 1, 2026

Copy link
Copy Markdown

Description

Port::set_recommended_state asserts !default_ds.slave_only in the M1 | M2 arm. The assertion is wrogn and it panics debug builds of any slave-only instance on a conformant network. According to Figure 31 of IEEE 1588-2019, there is a connection from a BMC_MASTER recommendation to LISTENING. A slave-only instance is recommended M1 or M2 whenever it is the best clock in its domain (the only device powered up so far, or with an aged out grandmaster).

Impact

Release builds are unaffected. Debug builds of slave-only instances panic on the first BMCA cycle that finds no better master. This makes slave_only: true unusable unless debug assertions are disabled for the whole crate. Encountered in the wild while utilizing this crate.

@gavin-dunlap-luminar
gavin-dunlap-luminar force-pushed the fix/correct-normative-debug-assertion-failures branch 2 times, most recently from 07fba68 to fac1504 Compare September 1, 2026 18:51
@gavin-dunlap-luminar
gavin-dunlap-luminar force-pushed the fix/correct-normative-debug-assertion-failures branch from fac1504 to b27f9cf Compare September 1, 2026 18:52
@gavin-dunlap-luminar gavin-dunlap-luminar changed the title fix(statime): Remove false-positive debug assert hits against normative behavior. Remove false-positive debug assert hits against normative behavior. Sep 2, 2026
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.92%. Comparing base (9ce6055) to head (b27f9cf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #876      +/-   ##
==========================================
+ Coverage   63.70%   63.92%   +0.21%     
==========================================
  Files          62       62              
  Lines        8020     8096      +76     
==========================================
+ Hits         5109     5175      +66     
- Misses       2911     2921      +10     
Flag Coverage Δ
fuzz 11.30% <ø> (-2.60%) ⬇️
fuzz-message_sound 11.30% <ø> (-2.60%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@davidv1992

Copy link
Copy Markdown
Member

Thank you for noticing. I need to do a small pass on the CI before merging this, which may take a little while, but this looks good and I will get around to merging it.

@davidv1992

Copy link
Copy Markdown
Member

@gavin-dunlap-luminar Unfortunately your branch will need rebasing on main before I can merge it. Would you be able to do that or give me permissions to do that?

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