feat: operator station with local MQTT, HEVC and integration guide - #1
Merged
Merged
Conversation
- Add V2 normalizer with explicit field mapping - Improve test organization and fixtures - Add protocol validation utilities - Format and lint fixes - All 62 verification scripts pass - All 125 tests pass
- Implement Rust MQTT runtime using rumqttc with bounded channels - Implement UDP3334 video frame reassembly (8-byte big-endian header) - Add network_guard enforcement at socket boundary (localhost-only for Simulator) - Add TauriMqttClient implementing existing MqttClientLike interface - Remove duplicate protocol decoder (src/lib/protocol/decoder.ts) - Add observable metrics for dropped messages and backpressure - Bounded memory: frame reassembly with global byte budget - Clean shutdown without reconnect after disconnect - Update simulator with deterministic mode and localhost validation - Official profile remains fail-closed (blocked) Rust validation: - cargo check: PASS - cargo clippy: PASS - cargo fmt: PASS TypeScript validation: - npm test: PASS (125 tests) - npm run lint: PASS - npx tsc -b: PASS - npm run build: PASS - npm run verify:all: PASS (62 checks) Architecture: MQTT: Rust rumqttc → Tauri → TauriMqttClient → existing adapter → ProtoCodec → normalizer → GameState UDP: Rust receiver → parser → bounded reassembler → completed HEVC frame bytes Dependencies cleaned: - Removed: prost, tracing, tracing-subscriber - Kept: tokio, rumqttc, bytes, thiserror
P0 Fixes Completed: - MQTT anti-loop regression test with deterministic fixtures - UDP frame reassembly requires exact shard sequence (0..N-1) - UDP global inflight budget checked before every fragment insertion - Rust unit tests: 16 tests covering MQTT/UDP edge cases - Frame completion validates received_bytes == total_frame_bytes exactly MQTT Tests: - Official profile authorization denial - Simulator localhost validation - Publish-when-disconnected error propagation - Reconnect backoff bounds verification UDP Tests: - Big-endian 8-byte header parsing - Single-shard frame assembly - Multi-shard out-of-order handling - Duplicate shard rejection - Missing middle shard prevents completion - Malformed packet rejection - Oversized frame rejection - Frame expiration eviction - Global inflight byte budget enforcement - Frame number wrap-around (65535 -> 0) - Exact payload length validation TypeScript MQTT Anti-Loop: - Deterministic test with known command ID - Self-delivery detection via command ID tracking - Prevents publish -> broker echo -> duplicate publish loop - 10 test cases covering edge cases Validation: - cargo fmt: PASS - cargo clippy: PASS (0 warnings) - cargo check: PASS - cargo test: PASS (16/16) - npm run lint: PASS - npx tsc -b: PASS - npm test: PASS (125 tests) - npm run build: PASS - npm run verify:all: PASS (62/62) No Co-Authored-By per project policy.
Fixes CI format check failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
操作台原先主要展示演示数据,桌面 MQTT 运行时与当前 V2 协议之间缺少可复现的联调入口。本次增加内置 localhost broker、V2 遥测投影和哨兵指令回执闭环,并将视频、地图、机器人状态和连接诊断整合到默认操作台。
使用 RM26_Client 的地图与角色图标,保留素材来源和许可。UDP HEVC 使用共享视频会话与有界帧队列;MQTT 等待实际连接确认,断线后恢复订阅,未知或过期字段显示为空。正式比赛网络保持锁定,本版本面向本机联调,尚未完成实机比赛验收。
README 已重写,包含 Windows 环境、启动步骤、模拟器、指令回环、图传、故障注入、诊断、构建与待完成的设备验收项目。
验证: