Commit Graph

7 Commits

Author SHA1 Message Date
kk0t9 50fdaab25b style(v0.4): rustfmt thermal/protocol/coprocessor/service/integration
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-25 15:44:10 +03:00
kk0t9 32ba1136c7 test(v0.4): integration — thermal-trip/abort + MCU fail-safe-cut (session-шина)
+ фикс B09-таймера: last_heartbeat Option<u64> вместо сентинела 0 (monotonic_secs() стартует
с 0 → первый heartbeat попадал на 0, guard !=0 ложно трактовал как «не было» → cut не срабатывал).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-25 15:42:20 +03:00
kk0t9 cd2442f672 feat(v0.4): проводка thermal+coprocessor циклов + D-Bus ThermalState/ThermalChanged + dev-mock
spawn_loops (thermal-монитор + coprocessor heartbeat/wait/safe-to-cut/B09) в main после
регистрации интерфейса; PowerService += thermal_state + хендлы fsm/thermal_state + mock(temp,copro);
dev-mock += SetTemp/HangSoc/McuLinkLoss; proxy.rs += thermal_state/thermal_changed. Existing
integration-тесты подогнаны под mock(temp,copro).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-25 15:36:19 +03:00
kk0t9 92a11c3c72 style(v0.3): rustfmt power FSM/service/integration
Прогон cargo fmt (гейт lint): многострочное форматирование match-веток FSM,
PowerMock/PowerService-литералов, integration-вызовов. Без изменений логики.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-24 23:22:12 +03:00
kk0t9 aaae0508b9 feat(v0.3): Power-сервис на FSM — dev-mock кормит события, grace+durable-barrier
P7.2: service.rs оборачивает PowerFsm — D-Bus state/signals из FSM; apply_event
исполняет действия (эмит сигналов, фоновый grace-таймер, durable-barrier sync).
dev-mock SetAcc/SetIgnition/TriggerShutdown/AbortShutdown кормят входы FSM.
FSM: AccOff → AccChanged(false)+ShutdownImminent (сохранён walking-skeleton-регресс).
Integration: ShutdownImminent + abort. zbus → tokio-executor (default-features=false,
features=["tokio"]) — иначе tokio::spawn в хендлере паникует (async-io). test-integration
--test-threads=1 (тесты владеют одним именем на шине).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-24 23:17:13 +03:00
kk0t9 bfe490e899 refactor(review): shell current-thread runtime + единый дефолт; PowerClient parse_enum; тесты на ipc::names
- shell: new_current_thread рантайм (без пула на холодном старте, #11); единый Initial::default().
- PowerClient: generic parse_enum (убрал 3 копии map_err).
- ipc::names::power::MOCK_IFACE; интеграционные тесты — через ipc::names (не хардкод).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-24 14:36:50 +03:00
kk0t9 ce525dd622 test(core): интеграция Settings/Power на session-шине (#[ignore])
Settings round-trip + Changed; Power state + fake-ACC AccChanged — на живой D-Bus.
just test-integration (dbus-run-session). #[ignore] → just ci (unit) не требует шины.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
2026-06-24 12:51:07 +03:00