Description
At src/openflight/iwr6843/lcmf.py:764 the accepted-status ternary tests shot.quality == "reject":
result = _result_from_track(
"accepted_track_quality_warning" if shot.quality == "reject" else "accepted",
shot,
)
But that case can never be reached: shot.quality == "reject" already returned rejected_track_quality earlier in the same function (lcmf.py:677-683). So the accepted_track_quality_warning status is unreachable — any log tooling filtering for it will never see a hit.
Meanwhile quality == "low" (set in shot.py:290) falls through to a plain "accepted" with no warning — which looks like what the dead branch may have meant to flag.
What did you expect to happen? Either the warning status is emittable for the case it was written for (presumably quality == "low"), or the dead branch is removed so the status vocabulary matches reality.
Was "low" the intent? Happy to PR whichever semantics you prefer, with a test pinning the chosen behavior (there is currently no test asserting the accepted-with-warning path, which is how the dead condition survived).
Steps to reproduce
Code inspection: compare lcmf.py:677-683 (early return on quality == "reject") with lcmf.py:764 (same condition tested again on the accepted path). A grep for accepted_track_quality_warning across the repo shows no test or consumer observing it.
Area
Radar / shot detection (IWR6843 LCMF estimator)
Hardware setup
N/A — found by code reading; no hardware required to confirm unreachability.
Description
At
src/openflight/iwr6843/lcmf.py:764the accepted-status ternary testsshot.quality == "reject":But that case can never be reached:
shot.quality == "reject"already returnedrejected_track_qualityearlier in the same function (lcmf.py:677-683). So theaccepted_track_quality_warningstatus is unreachable — any log tooling filtering for it will never see a hit.Meanwhile
quality == "low"(set inshot.py:290) falls through to a plain"accepted"with no warning — which looks like what the dead branch may have meant to flag.What did you expect to happen? Either the warning status is emittable for the case it was written for (presumably
quality == "low"), or the dead branch is removed so the status vocabulary matches reality.Was
"low"the intent? Happy to PR whichever semantics you prefer, with a test pinning the chosen behavior (there is currently no test asserting the accepted-with-warning path, which is how the dead condition survived).Steps to reproduce
Code inspection: compare
lcmf.py:677-683(early return onquality == "reject") withlcmf.py:764(same condition tested again on the accepted path). A grep foraccepted_track_quality_warningacross the repo shows no test or consumer observing it.Area
Radar / shot detection (IWR6843 LCMF estimator)
Hardware setup
N/A — found by code reading; no hardware required to confirm unreachability.