docs(perception): record clock route A/B/A and continuous LAN canary

This commit is contained in:
DCCONSTRUCTIONS
2026-09-02 22:14:58 +03:00
parent 59a74a3677
commit 75a5320756
3 changed files with 154 additions and 3 deletions
+11 -3
View File
@@ -1,6 +1,10 @@
# Observatory: четыре этапа создания полного real-time Perception-профиля
Дата: 2026-09-01; обновлено 2026-09-02 21:12 МСК. **Этап1 закрыт; этап2 продолжается. Инкремент16: двусторонний старт принят, непрерывный real-time canary FAIL.** Код `48835a0`: обе стороны прогревают часы до source anchor; явное подтверждение Worker и data grant обязательны до старта1×. Потерянный ACK не меняет уже предложенный/принятый anchor.241 local/198 Worker tests PASS,2 Worker-only skip локально;129 измеренных source hashes совпадают.
Дата: 2026-09-01; обновлено 2026-09-02 22:06 МСК. **Этап1 закрыт; этап2 продолжается. Инкремент17: непрерывность короткого LAN-прогона32/32 PASS; latency FAIL.** Код `59a74a3` добавляет только bounded clock-only диагностику. CPU A/B/A без моделей и scene: SSH/Tailscale48/96 ready → проверенный LAN94/96, непрерывно после warmup → Tailscale53/96. Все288 обменов независимо пересчитаны; ~100ms хвосты RPC остаются и без scene. Это не доказательство DERP relay, универсального ускорения LAN или конкретной причины transport tails.
Один полный32-кадровый1× LAN-canary:32/32 byte-exact/reference-exact результата, без WAIT, drops, sync skips и reconnect. Все50 обменов часов пересчитаны; после двух начальных warmup48 ready, uncertainty публикаций3.645–4.771ms при прежнем пределе5ms. p95/p99 source→consumer-ready205.864/213.751ms при бюджете125ms — FAIL. Полностью свежих scene12, доступных sensor pairs17;30 результатов до EOF. PeakVRAM2357MiB, не предел24GiB. Модели/effective config и129 прежних runtime/test source files не менялись; маршрут выбран только для этого запуска, не зашит в Docker и не назначен продуктовым default.245 local/202 Worker tests PASS,2 Worker-only skip локально,131 source hashes совпадают. [Отчёт](../experiments/perception/PERCEPTION_STREAM_STAGE2_LAN_ROUTE_2026-09-02.md),67 artifacts, manifest `2645a0faacb89b5af5d3756feea05550a12cc64820be926d32f2103b5f225caf`.
Предыдущий инкремент16: двусторонний старт принят, непрерывный real-time canary FAIL. Код `48835a0`: обе стороны прогревают часы до source anchor; явное подтверждение Worker и data grant обязательны до старта1×. Потерянный ACK не меняет уже предложенный/принятый anchor.241 local/198 Worker tests PASS,2 Worker-only skip локально;129 измеренных source hashes совпадают.
Один32-кадровый canary теперь принял начало0–5 и после WAIT/resync3031:8 результатов,1 compute discard,9 source WAIT и14 sync skips, без неучтённых кадров. p95/p99 до consumer-ready215.767ms,5 полных свежих scene,6 результатов до EOF. Все55 raw t1–t6 обменов независимо пересчитаны;41 ready. На работающем источнике uncertainty5.0315.667ms превысила неизменные5ms; RPC errors0, Worker telemetry33/33 PASS, lease1/PIDs сохранены. PeakVRAM2363MiB, не предел24GiB. [Отчёт](../experiments/perception/PERCEPTION_STREAM_STAGE2_JOINT_START_2026-09-02.md),53 artifacts, manifest `9cb369fe7ae185d1a92f6050bc1018a878483f5eec169267f100843245428691`.
@@ -18,7 +22,7 @@ CPU-only Mac↔Worker006 proof:72/72 timestamp-наблюдения незави
Граница доказательства: два контейнера одного Worker с проверенным общим Linux monotonic clock, временные штатные частоты2610/10251MHz; **не Mac↔Worker full-graph, не radio/live и не standalone**. История зависимых слоёв после gap закономерно отличается от uninterrupted reference. Все230 опубликованных scene/масок проверены на стороне приёмника и повторно сверены. [Подробный отчёт](../experiments/perception/PERCEPTION_STREAM_STAGE2_NETWORK_2026-09-02.md). Evidence236 artifacts: `.runtime/perception-stage2-network-graph-20260902T1541Z/manifest.json`, SHA-256 `d1bc7e26850a2d9050ee1d8f8a5ece2e6b8c53e2e7dba381cbd4445d68a5ec17`.
Следующий проверяемый результат этапа2: CPU-only attribution/A/B задержек clock/control loop при передаче/приёме scene; отделить application scheduling от транспортного участка, затем оптимизировать подтверждённую причину. Стартовый барьер реализован; сам по себе он не сделал clock readiness стабильным. Увеличение числа samples в прежних2s не устраняет наблюдённый WAIT даже offline. Пороги5ms/125ms и source1× не ослаблять, source clock после старта не переносить, backlog не догонять. После стабильного короткого full-graph canary — controlled cross-host gap/slow-consumer, длинный поток и standalone без developer/model mounts. Новая длительная GPU-нагрузка на проваленном baseline не запускалась. Этапы34/registry/UI cutover не открыты. Временные контейнеры/lease/collector/tunnel18561/key/bootstrap удалены, сервисы и GPU auto mode восстановлены; Ollama/Frigate exited/restart=no. Mac8000/Worker telemetry работают.
Следующий проверяемый результат этапа2: per-frame границы source packing/write → Worker ingress/decode/queue/publication → result read/parse и пересечение с control requests. Начать с bounded CPU transport checks, отделить очереди/сериализацию от оставшихся ~100ms хвостов завершения RPC, затем оптимизировать измеренную причину и выполнить один короткий full-graph recheck. CPU A/B/A уже показал, что общая обработка scene не является необходимой причиной clock WAIT; точный слой задержки пока не установлен. Пороги5ms/125ms и source1× не ослаблять, source clock после старта не переносить, backlog не догонять; не заменять модели ради неподтверждённой транспортной причины. Далее внутри этапа2 — controlled cross-host gap/slow-consumer, длинный поток и standalone без developer/model mounts. Измерительный latency FAIL не превращается в PASS, но сам по себе не запрещает разработку упаковки/общего runtime согласно принятому экспериментальному scope. Этапы34/registry/UI cutover не открыты. Временные контейнеры/lease/collector/tunnel18561/key/bootstrap удалены, сервисы и GPU auto mode восстановлены; Ollama/Frigate exited/restart=no. Mac8000/Worker telemetry работают.
Предыдущий инкремент12 (`0310592`, `1916122`): CPU-only gRPC/TLS proof Mac↔Worker,16/16 payload/reply; синтетический source clock и CPU sentinel, моделей0. Same-Mac RTT14.360/23.919/120.815ms min/median/max — не one-way age/FPS.105 local и20 Worker tests PASS, проверены bounded slow-reader/quarantine. Evidence `.runtime/perception-stage2-grpc-20260902T1500Z/manifest.json`, SHA-256 `adf5eaf092feaed6721f66e2adaceded0cdbf55754e1f9953f54623bfb52d331`.
@@ -249,6 +253,8 @@ EoMT — семейство ViT-моделей сегментации изобр
## Progress
- 2026-09-02 22:06 МСК: `59a74a3`, инкремент17. Bounded clock-only probe +10ms scheduling witness, без lease/grant/source/model authority. CPU A/B/A ready48/96 →94/96 →53/96; LAN после warmup непрерывен, ~100ms RPC tails сохраняются. Один полный LAN-canary32/32 exact без WAIT/drop/reconnect,30 результатов до EOF,12 полностью fresh из17 доступных sensor pairs. p95/p99 205.864/213.751ms —125ms FAIL; четыре resident PID/lease1 сохранены. Все338 raw clock exchanges (288 CPU +50 full) независимо пересчитаны.245 local/202 Worker tests PASS,2 Worker-only skip локально;131 source hashes, прежние129 без изменений.67 artifacts/manifest `2645a0faacb89b5af5d3756feea05550a12cc64820be926d32f2103b5f225caf`. Результат не standalone и не изменение постоянного маршрута. Ресурсы освобождены, сервисы/auto clocks восстановлены.
- 2026-09-02 21:12 МСК: `48835a0`, инкремент16. Joint startup PASS; 1× source начинается с0, anchor принят обеими сторонами. Full canary8/32 FAIL: compute discard6, source WAIT715, sync1629, результаты05/3031. Raw receipt exact8/8; до EOF6, полностью fresh5. Clock exchanges55/55 пересчитаны, readiness41/55; running uncertainty5.0315.667ms, host telemetry33/33 без ошибок. Lease1/4PID пережили WAIT, после End всё освобождено.241 local/198 Worker PASS;129 source hashes.53 artifacts/manifest `9cb369fe7ae185d1a92f6050bc1018a878483f5eec169267f100843245428691`. Следующий gate — CPU-only control/data scheduling attribution, не ещё один слепой GPU retry.
- 2026-09-02 20:37 МСК: `35b6cd9`, инкремент15. Full Mac↔Worker graph использует acknowledged clock bounds, uncertainty для слоёв/ячеек, WAIT и immutable source anchor. Исправлены EOF ordering, repeated clock read и ранний disconnect до OPEN;297 local/173 Worker/12 repeated reconnect PASS. Финальный canary2/32,13 source WAIT+17 sync skips, оба результата после EOF,143.881/155.743ms; real-time FAIL, пороги не ослаблены. Следующий пункт — совместный pre-start clock readiness обеих сторон, затем короткий повтор. Все попытки сохранены;198 artifacts, manifest `7b435cac111b3e0e789aa137ba064651e6d344a5f8fb8fa35b0abbd0e7cb1d74`. Temporary resources удалены, leases released, stock-clock lock снят, четыре сервиса восстановлены,8000/telemetry работают. Этап2 остаётся открытым, stages3–4 не начаты.
@@ -302,6 +308,8 @@ EoMT — семейство ViT-моделей сегментации изобр
## Surprises / открытые вопросы
- Инкремент17: clock readiness срывается в A/A2 даже при0 моделях/scene, поэтому общий scene event loop не является единственным достаточным объяснением. LAN улучшил короткий интервал ready, но не все RPC tails: Poll p95 A/B/A2 88.838/92.403/89.950ms, LAN ACK p95 98.266ms. Tailscale preflight показал direct LAN endpoint, а не доказанный DERP. Выбор маршрута относится к connection configuration, не к весам/профилю.32/32 выходов не равны32 свежим scene; локальные Worker accounting gates остаются unknown/false для внешнего источника, отдельный joined verifier доказывает отсутствие потерь. Нельзя складывать/вычитать p95 разных timing boundaries как стоимости независимых стадий.
- Инкремент16: согласованный старт и отсутствие RPC errors не означают непрерывную готовность часов. Running bounds вышли за5ms без GPU/owner failure; это условная uncertainty при500ppm budget, не измеренный физический drift. Offline добавление всех probes в прежних2s всё ещё даёт FAIL на тех же девяти samples. Для следующего изменения нужен timing trace scheduling/control/data, а не автоматическое расширение history или бюджета.
- 2026-09-02 13:55 → 14:22 МСК: два старых range_m расхождения 1.3877787807814457e-17 m воспроизведены и исправлены. Quaternion начинался на byte 24 общего pose buffer; адрес 8 mod 16 менял norm на один ULP в текущем NumPy runtime. Offsets 0/16/32/48 возвращают reference, 8/24/40/56 точно воспроизводят оба отклонения. Теперь quaternion — отдельная immutable 32-byte копия с проверенным 16-byte alignment; формулы и comparator прежние. Полный граф подтвердил 128/128 exact дважды. Это квалификация numeric layout текущего pinned runtime, не универсальное обещание bitwise равенства на любом CPU/NumPy.
@@ -360,6 +368,6 @@ EoMT — семейство ViT-моделей сегментации изобр
## Outcomes / retrospective
Этап1 завершён; этап2 продолжается. Инкремент16 закрыл двусторонний pre-start handshake и сохранил начало записи в настоящем full-graph запуске. Непрерывный real-time пока не принят:8/32, один input-gap discard,9 WAIT+14 sync skips, p95/p99 215.767ms.55 полных clock exchanges пересчитаны независимо: WAIT вызван превышением условной5ms uncertainty, не GPU telemetry/owner loss. Нужна CPU-only диагностика scheduling/transport и оптимизация подтверждённой причины, затем короткая полная перепроверка.241 local/198 Worker tests PASS;129 source hashes,53 artifacts. Одна GPU-проба без повторов. Исторические same-Worker128/128 не заменяют cross-host qualification; standalone/native-host inventory/radio/live не квалифицированы. Batch/registry/UI и этапы34 не начаты, actuation=false. Mac8000/telemetry работают,8765/temporary18561 закрыты, Ollama/Frigate exited/restart=no. Временные ресурсы удалены, lease released, четыре точных service IDs и GPU auto mode восстановлены; прежние service defects не объявлены исправленными.
Этап1 завершён; этап2 продолжается. Инкремент17 подтвердил короткую непрерывную Mac↔Worker обработку полного профиля через проверенный LAN-маршрут:32/32 byte-exact/reference-exact, без WAIT/потерь/reconnect. Это не real-time qualification: p95/p99 205.864/213.751ms выше125ms, полностью fresh только12 scene, два результата после EOF. CPU-only A/B/A отделил clock readiness от наличия моделей/scene;338 raw clock exchanges пересчитаны, конкретная причина оставшихся ~100ms RPC tails пока не установлена. Следующий участок — инструментирование упаковки/очередей/сериализации/входа-выхода и оптимизация подтверждённой задержки, без расширения бюджетов.245 local/202 Worker tests PASS;131 source hashes,67 artifacts. Одна GPU-проба без повторов; профиль/веса/config и129 прежних source files неизменны, постоянный маршрут не менялся. Standalone/native-host inventory/radio/live не квалифицированы. Batch/registry/UI и этапы34 не начаты, actuation=false. Mac8000/telemetry работают,8765/temporary18561 закрыты, Ollama/Frigate exited/restart=no. Временные ресурсы удалены, lease released, четыре точных service IDs и GPU auto mode восстановлены; прежние service defects не объявлены исправленными.
После этапа 4 здесь будут перечислены digest самостоятельного полного образа, измеренные статусы и ошибки по recordings, реально проверенные source/hardware/config комбинации, состояние сохранённого EoMT-варианта и оставшиеся physical-live/quality/vehicle-integration ограничения. Готовый Docker и готовая автономия не отождествляются.
@@ -887,3 +887,20 @@ inside the same2s horizon would not remove the measured WAIT.241 local/198 Worke
tests PASS,129 measured source hashes match code48835a0. Next investigate control-loop
scheduling/transport before another full-graph qualification, without budget widening.
[Detailed evidence](../../experiments/perception/PERCEPTION_STREAM_STAGE2_JOINT_START_2026-09-02.md).
## Stage 2 increment 17: transport-specific clock readiness (2026-09-02)
Clock-only A/B/A separates route effects from scene processing: SSH/Tailscale48/96,
strictly host-key-pinned SSH over confirmed LAN94/96 (only initial2 unready), return
to Tailscale53/96. All288 exchanges reconstruct; application handler/loop delays do
not alone explain ~100ms request tails. LAN is an observed connection option, not
a new model dependency, universal speedup or permanent product/default route change.
One full LAN canary returns32/32 byte-exact/reference-exact scenes at1x with no WAIT,
drop or reconnect;50 clock exchanges reconstruct,48 after initial warmup remain ready.
All129 prior runtime source files and the model/effective config remain unchanged.
Latency205.864/213.751ms p95/p99 still fails125ms; only12/32 scenes are fully fresh.
Do not equate complete output accounting with usable geometry/policy or autonomous
readiness. Next instrument data-plane stage boundaries before optimizing remaining
tails; no gate widening.245 local/202 Worker tests PASS,131 source hashes matched.
[Detailed route and full-profile evidence](../../experiments/perception/PERCEPTION_STREAM_STAGE2_LAN_ROUTE_2026-09-02.md).
@@ -0,0 +1,126 @@
# Stage 2 increment 17 — clock route A/B/A and continuous full LAN canary
2026-09-02,22:06 MSK. Code `59a74a3`. **32/32 continuity/reference PASS; latency FAIL.**
Stage2 remains open. No standalone release, Stage3/4 cutover or physical actuation.
## Diagnostic and architectural scope
Added `pilot_clock_route_probe.py`: bounded clock-only TLS endpoint/client and10ms
event-loop scheduling witness. It cannot issue a data grant, start a recording, own a
GPU lease or run models. Both raw monotonic interval windows are returned, and t1t6
plus Worker handler entry/finish times are retained. Scheduling observations are not
subtracted from timestamps or used to manufacture clock readiness.
Three sequential96-exchange CPU probes used the existing pinned image in runc mode,
1CPU/512MiB/noGPU. The Mac ran sparse control requests only, not a scene/load generator.
Both model/data processing and recorded-source traffic were absent from this A/B/A.
No durable service, host clock, SSH config, firewall or router setting changed.
A and A2 used the existing SSH/Tailscale route. B changed only the SSH HostName to the
confirmed Worker LAN address. The same `mission-gpu` host-key alias, pinned known-hosts
file and strict checking authenticated the host; returned hostname matched Worker006.
Tailscale preflight itself reported a direct LAN endpoint, not a proved DERP relay.
Do not describe this result as removal of an Internet relay.
| Sequential case | Joint clock-ready | First ready index | Ready continuously afterward | Median uncertainty |
| --- | --- | --- | --- | --- |
| A: SSH/Tailscale |48/96|3|No|5.001ms|
| B: SSH/confirmed LAN |94/96|2|Yes|4.107ms|
| A2: return to SSH/Tailscale |53/96|1|No|4.860ms|
All288 probe/report exchanges succeeded and both interval windows/readiness decisions
were independently reconstructed with integer arithmetic. A/A2 fail without any scene
processing, so the shared source/receiver event loop is not a sufficient explanation.
Mac scheduling-lag maxima A/B/A2:2.535/4.038/4.110ms; Worker maxima2.040/1.934/2.040ms.
Worker Poll handlers stay below0.217ms; Report handlers below0.257ms in these probes.
The LAN case improved the observed interval/availability, **not every latency tail**:
Poll p95 A/B/A2 is88.838/92.403/89.950ms; B report/ACK p95 is98.266ms. Approximately
100ms outliers remain even without models. These short measurements do not identify
their exact OS/gRPC/SSH/TCP/network source, certify hardware clocks or establish a
long-term route SLA. In particular, do not infer physical clock drift from the500ppm
conditional rate budget or attribute every stalled request to Mac Python scheduling.
## One full profile through the LAN route
After the CPU route comparison, one32-frame full canary (`lan32-worker`) used B.
Worker start18:57:32.273183Z; Mac source start18:57:42.275382Z. Source remains original
1x, stride1, incremental raw camera/points/pose; no full transfer/predecode or previously
computed perception inputs. The model container has no recording mount.
The previous129 staged runtime/test source files remain byte-identical. DDRNet-39
GOOSE, RF-DETR, LiDAR geometry/distance, motion, TRAVEL TGS/costmap/policy, model weights,
effective config and pinned dependency image are unchanged. DDRNet and detector each
execute32 times; no mask reuse/subsampling. One profile, serializedGPU,8CPU/8GiB,
temporary stock-clock2610/10251MHz,450W unchanged. This is still a mounted diagnostic
image, not a standalone image. Native host-process GPU exclusivity remains unproved;
the existing observer's admitted scope is `docker-gpu-access`.
32 released ->32 accepted ->32 Worker/Mac byte-exact results; no drop, synchronization
skip, source/clock RPC error or post-start WAIT. One anchor, one input epoch, lease1,
resident PIDs11/40/48/49. All32 decoded BGR, segmentation, proposals, observations,
tracks, threats, material, lineage, sensor binding and raw costmap comparisons match
the uninterrupted reference. Thirty results arrive before source-window EOF.
All50 full-profile clock exchanges reconstruct independently. First2 are pre-anchor
warmup; the remaining48 stay ready. Published uncertainty3.6454.771ms, with the
unchanged<=5ms gate,2s expiry,16 samples,500ppm/50us conditional envelope.
Same-Mac source-due -> consumer-ready: min86.598ms, median121.850ms,
p95/p99 205.864/213.751ms. **125ms latency gate FAIL**, not a general realtime pass.
The prior8-result sample is not a matched latency benchmark for these32 results.
Seventeen source sensor pairs are available; only12 received scenes are fully fresh.
Missing/aged source sensors and added processing/delivery age remain fail-closed.
Receiving every scene does not make every distance/policy result current or usable.
Source release lag max21.552ms; p95/p99 12.253/15.783ms. Peak reply440,369B,
tracked input14,611,263B (<16MiB), sampled VRAM2357MiB, cgroup3360.91MiB.
Mac source RSS62,865,408B,5.08s CLI wall. No24GiB exhaustion is demonstrated.
Worker host-control recorded32 accepted observations of33 requests,0 expired;
one request remains pending in its last EOF snapshot. Do not call this33/33 accepted.
No post-warmup envelope violation/input pause; control thread and collector close.
## What remains measurable, not assumed
Worker-local compute-start -> local receiver p95/p99 74.243/76.322ms; detector
p95/p99 18.301/21.848ms, DDRNet RPC19.633/21.304ms, decoder RPC18.447/23.343ms,
queue wait26.850/26.891ms. Worker mapped source-due -> local receiver157.266/160.027ms;
Mac source-due -> network arrival188.601/207.768ms. These intervals have different
boundaries and cannot be summed/subtracted as independent p95 stage costs.
The Worker performs diagnostic local parse/freshness assessment AFTER enqueuing a
network publication. Its local-receiver timing is not actual Mac receipt timing.
Its source accounting/release-lag fields intentionally remain externally owned, so
local `zero_drops_complete_accounting`/`source_release_lag_25ms` flags are false there;
the joined verifier proves zero losses and max release lag21.552ms. No report field
was rewritten to turn unknown worker-only evidence into network qualification.
Next Stage2 increment: instrument per-frame source packing/write, Worker ingress/
decode/queue/publication and result read/parse boundaries, plus control overlap.
Use bounded CPU transport checks first; separate queue/serialization costs from the
remaining ~100ms transport completion outliers. Optimize the measured cause, then one
short full-profile recheck. Keep budgets unchanged; no long GPU stress or blind model
replacement. Controlled gap/slow-consumer and standalone remain later Stage2 work.
Per-run connection routing belongs to Worker configuration, not the model Docker:
this test did not hard-code a LAN address into the profile or promote a product default.
## Verification, evidence and cleanup
245 focused local tests PASS,2 Worker-only cases skipped locally;202 Worker tests PASS,
including real TLS, malformed/stale bounds and Worker-only backpressure checks.
Ruff/check-format PASS;131 measured Python files match current source and code-v1.tgz.
The129 files from increment16 remain unchanged; new files add only bounded diagnostics.
CPU before/after snapshots preserve container IDs, restart policies and observed states.
Session `.runtime/perception-stage2-clock-route-20260902T1850Z`,67 artifacts.
Archive SHA256 `552e12ce24bdd2a246edf1559c1251c35400d455447fe14474bef079a5e572ee`.
Manifest SHA256 `2645a0faacb89b5af5d3756feea05550a12cc64820be926d32f2103b5f225caf`.
`verify_route.py` reconstructs288 CPU exchanges; `verify_clocks.py` reconstructs50
full-graph exchanges. `verify.py` reconciles all32 original frames, raw parity and
receipt freshness; `finalize.py` verifies source hashes and closed resources.
Temporary CPU/model containers, lease volume, collectors, tunnels, key/bootstrap files
are gone. GPU clock locks reset; auto210/405MHz observed,450W unchanged. Four exact
prior Mission Core service IDs restored, Triton200, TelegrafRunning. Ollama/Frigate
remain exited/restart=no. Mac8000 PID33360 and identity-matched Worker telemetry work,
8765/18561 absent. No legacy service repair, K1/motor action or external deployment.