feat(router): confirm DexaFlow modes and expose the paired admin interface

This commit is contained in:
DCCONSTRUCTIONS
2026-11-21 20:58:25 +03:00
parent bed1db3508
commit 3ff43dd2af
37 changed files with 1462 additions and 63 deletions
+65
View File
@@ -684,3 +684,68 @@ Codex2026-11-10/vpn/work/router-observation-122-*.json и cleanup.json.
Регрессии: `test/routerMode.test.mjs` проверяет заданную агрегацию с прямым
резервом и тремя активными SIM, физическое соответствие каналов, неизвестное
состояние, pending, stale и совместимость прежнего адаптера.
## Результат команды Client API — 13.11.2026, Node 0.8.53-137
HTTP 202 означает ожидание. Для policy успех требует `persisted=true`,
`applied=true` и совпадения прочитанной policy с отправленной. Асинхронный
`failed/error=busy` проецируется в `router_busy`, конфликт ревизии/замещение —
в `router_conflict`; неизвестный текст прошивки не переносится в публичный
ответ. Причина и vendor operation ID остаются в результате, причина — в журнале.
Core и локальный Node используют одну форму. Результат расположен под кнопкой
своего действия. После повторного открытия он восстанавливается из ограниченных
квитанций Node (до 32, очистка при запросах спустя 10 минут); журнал событий
имеет отдельное хранение. Read-only inspect не заменяет результат изменения.
Черновик отмечен как неприменённый, а конфликт revision/boot требует обновления
формы. Смена runtime/устройства сбрасывает локальный черновик.
Потеря ответа запускает только чтение результата того же operation ID, без
повторной записи. Известный терминальный отказ не запускает лишнее ожидание.
При `busy` повторное применение остаётся явным действием пользователя; новый
запрос имеет новый ID и проверку актуальной ревизии. Автоматического обхода
блокировок DexaFlow или собственного контроллера переключения SIM нет.
Пакет 136 обновил backend, но финальная сверка выявила старый встроенный Node UI;
его заменил 137. `repack_runtime.py` теперь сверяет собранный `ui/dist` с
`web/dist` и проверяет index/entry JS непосредственно в ELF перед выпуском.
Проверка отклоняет как несинхронизированную папку, так и ранее скомпилированный
бинарник. Локальный HTTP UI борта проверяется по хешам после установки.
## Observatory router viewport (2026-11-13)
Operator job: monitor the actual cellular path during manual control without leaving
the observation deck. The user requested a Banana Pi viewport. Reuse the existing
dockable ObservationDeck panel (domain content in an admitted composition); opening
the Fleet router dialog was rejected because it hides the driving context. No new
navigation or shared visual primitive is introduced.
The viewport reads the selected vehicle's existing router snapshot and creates one
panel per discovered device identity. Three SIM channels use the physical slot map,
RouterSignal, compact Description/StatusBadge and the existing panel header. Actual mode comes
from routerMode; configured mode is not evidence of the live path. Signals are never
shown as current when the snapshot, device, or per-modem radio evidence is stale.
Offline panels show an explicit unavailable state; no controls change routing, SIMs,
or motion. Hide, dock, maximize, keyboard and saved layouts use the existing deck.
Acceptance: direct/aggregation/fallback/unknown, stale/absent/reconnected, multiple
devices, SIM ordering, compact/narrow layout and DEV independence.
### Field evidence, 2026-11-13 15:33–15:37 MSK
A complete DEV capture (23,928 records, no storage drops) separates network loss
from motor faults: 3,160 VESC samples had fault_code=0 and no CAN bridge error;
local delivery median/p95/max was 1/2/9 ms. At 15:36:06 the Node exhausted the
350 ms command-stream deadline; receipt resumed after an 874 ms gap. Core kept
sending datagrams during that interval (maximum sending gap 61 ms). Telemetry
round trips reached 1.30 s while endpoint processing remained around 1 ms. The
stop/recovery UI follows these expired command/telemetry observations; camera
health does not own the motor lease. This establishes a delivery-path problem,
not which of LTE, router or overlay VPN caused it. Do not relax safety deadlines
to hide the symptom. Raw evidence is private in .runtime/dev-router-observation-20261113.
DEV restart no longer requires downloading the previous operator-host capture.
The server retains the current bounded capture and three completed bounded
captures in RAM; the logs window selects their exports. Board close acknowledgement
is still required before starting another writer. Full board files remain on the
board. RAM captures expire on Core restart; the UI states this retention limit.
+34
View File
@@ -0,0 +1,34 @@
# Router administration through the board
The General tab's “Открыть админку через борт” action creates an isolated browser
origin on the operator's loopback interface. It uses the already paired Core–Node
mTLS channel on port 8781 and the currently acknowledged provider address. It
does not require SSH credentials, static board addresses, a new VPN route or a
new board listener. The direct LAN address remains separately labelled.
Node131 advertises admin_version=1. Older Nodes without this capability cannot enable the action. The
Node validates the current Core certificate, pairing and private channel on each
request, then resolves only a fresh, attached Ethernet router from its collector.
The existing on-link route, source-address and neighbour checks bind forwarding
to that router. No client-selected destination or port is accepted. Vendor login
is performed by the user; stored collector credentials are not injected.
Core creates up to eight isolated loopback sessions, with eight requests per
session, one MiB request bodies, eight MiB responses and bounded timeouts. Vendor
JavaScript never shares the Core page origin. A private launch token establishes
an HttpOnly, SameSite=Strict session cookie. A nonce-restricted bootstrap commits
the isolated origin before navigating to vendor content; direct cross-origin
and same-site requests remain blocked. Host, Origin and Fetch Metadata
checks reject foreign origins; only vendor-issued cookie names reach the router.
Logs omit URLs, cookies and form bodies. Idle sessions close after 30 minutes;
all sessions close when Core stops. The stable entry is the action in General;
the temporary browser address can change after a Core restart.
The forwarding adapter supports ordinary GET/HEAD/POST administration and
same-router redirects. Native POST commands may take up to 90 seconds; their
authenticated response deadline is extended without changing the shared listener.
No write is automatically retried after a timeout or lost connection. GET/HEAD
requests retain an eight-second router timeout. It is not a general proxy,
file-upload transport or firmware-update mechanism: oversized requests fail
closed. Node and Core packages include the same implementation. The selected
Ethernet/Wi-Fi route and aggregation policy are not changed by opening a page.