发布

  • v1583 c453268002

    fix(mat): never triage a survivor with a heartbeat as Deceased (safety) (#926)

    frostbyte_neo 发布于 2026-06-03 07:37:09 +00:00

    Both triage paths in the Mass Casualty Assessment tool classified a
    survivor as Deceased (Black) on "no breathing + no movement" while
    completely ignoring the heartbeat signal:

    • domain TriageCalculator::calculatecombine_assessments(Absent, None)
      returned Deceased. That branch is in fact only reachable because a
      heartbeat makes has_vitals() true (breathing+movement absent alone →
      Unknown) — so every "Deceased" was a live person with a pulse.
    • detection EnsembleClassifier::determine_triage (the path used by
      classify()) returned Deceased on !has_breathing && !has_movement,
      also ignoring reading.heartbeat.

    A survivor with a detectable pulse but no sensed breathing/movement is in
    respiratory arrest — the most time-critical savable state. Reporting them
    Deceased would deprioritize a rescuable person. WiFi-CSI also cannot confirm
    death (no airway-repositioning step), so a pulse must override.

    Fix: in both paths, if the result would be Deceased but a heartbeat is
    present, return Immediate. Total absence of breathing, movement AND heartbeat
    is unchanged (domain → Unknown, ensemble → Deceased).

    2 safety regression tests added. Full MAT suite: 168 + 6 + 3 passed, 0 failed
    (existing test_no_vitals_is_deceased still green — no heartbeat → Deceased).

    下载附件