v0.2–v0.4 稳定性/安全/品类补齐:端到端加密 + BLE 短语音 + 备份/OCR/在线态 + 37 项回归夹具 - #7
Merged
Merged
Conversation
…-2/1-5) Camp link health (all ends honest about silent failures): - Android: BroadcastReceiver on ACTION_STATE_CHANGED shows an error status the moment Bluetooth turns off, auto-recovers on re-enable; sending with zero neighbors surfaces a delivery warning - iOS: BleMeshDelegate gains bleMeshDidUpdateState; MeshBus exposes onState/btAvailable; Camp shows red bar-button when Bluetooth is off and appends a system line when sending with no neighbors/BT off Ledger backup (G-LG-1): - Android LedgerStore export/import JSON + 备份 dialog (share / paste) - iOS LedgerStore exportJson/importJson + 备份 action sheet - Web backup.ts (magic/version-validated) + store importState action + Groups export-download/import-file buttons Fixture grows to 19 assertions: backup roundtrip deep-equality, corrupt/missing-magic rejection, activeGroupId fallback.
… G-DR-1) Signaling server (G-SEC-1): optional SIGNAL_TOKEN auth on join (4003 on mismatch), 80 msgs/10s per-connection rate limit (4008), 64KB message cap (4002), 32-connection per-IP cap (4001), and unjoined connections can no longer relay signals. Web client sends VITE_SIGNAL_TOKEN; .env.example documents both plus the wss reverse-proxy requirement. Convoy link health (G-DR-1): both native ends now show an amber banner when Bluetooth is off (位置无法共享) or no mesh neighbors are in range (同伴暂看不到你的位置) — Android refreshes on the 3s broadcast tick, iOS reacts to MeshBus onState/onPeers. Fixture grows to 23 assertions: spawns the real signaling server and verifies bad-token rejection, authed join, unauthed-relay block, and flood-triggered rate limiting.
… complete) MeshBus payloads are now sealed with AES-256-CBC + HMAC-SHA256 (encrypt-then-MAC, 16B truncated tag); keys derived from the team code via PBKDF2-HMAC-SHA256 (salt trailmate-mesh-v1, 10000 iters, cached per team). Envelope team stays cleartext for room filtering only; wrong-team, tampered, and legacy-plaintext blobs are all dropped. Byte-identical implementations: iOS MeshCrypto.swift (CommonCrypto — PBKDF2WithHmacSHA256 unavailable pre-API26, so) Android MeshCrypto.kt hand-rolls RFC2898 PBKDF2 over HmacSHA256; JS reference meshcrypto.mjs. A fixed cross-platform test vector is asserted in CI and embedded in both native sources for on-device comparison. Fixture grows to 33 assertions (roundtrip, wrong-team reject, 1-byte-tamper reject, version reject, plaintext reject, 100B-chat still single-chunk, fixed vector, 3-way constant drift checks). Requirements docs' security sections updated accordingly.
…G-VC-1) Camp short voice (closes the L1 claim/implementation gap two ways): - iOS & Android: hold 🎤 to record ≤10s AAC (16kHz mono 24kbps, ≤40KB guard), broadcast as KIND_VOICE=3 payload [u16 jsonLen][meta][m4a] — E2E-encrypted like all MeshBus traffic; receivers tap the message row to play. No-neighbor sends surface the same delivery warning. - Video is now explicitly online-only: web camp copy narrowed. Android voice changer: presets grow 6→9, aligned with iOS (adds 佩奇 1.7, 悟空 1.25, 机器人 via 40Hz PCM ring modulation). Fixture grows to 37 assertions: voice payload format roundtrip, 9KB (51-chunk) payload relayed intact through a middle node, kindVoice=3 dual-platform drift check.
Peer presence (both native ends): convoy markers fade to 45% alpha after 15s without a location update and are removed after 60s — Android checks on the 3s broadcast tick, iOS on a 5s timer; fresh updates restore full opacity. Android receipt OCR: 记一笔 gains a 选小票照片识别金额 button — ML Kit text recognition (bundled model, fully offline, no GMS needed) parses the photo and prefills the largest amount-looking number, mirroring the iOS/web heuristic.
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.
按《需求三部曲》路线图完成 E0(v0.2.0 稳定性收口)→ E1(v0.3.0 底线健壮)→ E2(v0.4.0 品类补齐)的全部代码工作,配套文档同步更新。
E0 · 稳定性与可测性收口
MeshBus改每类型单句柄(对齐 Android),消除 VC 重建句柄累积tests/mesh-fixture/内存回归夹具 +mesh-fixture.yml工作流——BLE 协议逐字节复刻(13B 帧头/180B 分片/TTL 泛洪/去重),协议常量三端防漂移E1 · 底线健壮
E2 · 品类补齐
KIND_VOICE=3加密广播,点按播放,双端互通;视频显式收窄为仅在线,文案同步验证
mesh-fixtureCI:37 项断言全绿(分片/去重/多跳/队伍过滤/结算/备份往返/信令鉴权限流/加密往返+篡改拒+固定向量/9KB 语音 51 片中继完整)android-native-build后台服务端规划(④)+ E4 服务端密文中继(哑中继,房间哈希路由) #11 /ios12-build#15 编译全绿并产出最新 APK / IPAdocs/REAL-DEVICE-TEST.md;三部曲状态见docs/requirements/🤖 Generated with Claude Code
https://claude.ai/code/session_01YSg1v3QaS7AYLHz4pfS3zh
Generated by Claude Code