Dismiss WiFi boot prompt when mobile session opens
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
# 手机会话取消本次开机 WiFi 提示:实现与验收
|
||||
|
||||
日期:2026-10-09(北京时间)。设备正式版本保持 **1.1.3**,功能更新时间为 **2026-10-09T10:26+08:00**。未导出 OTA 或 IMG;App 源码、协议、版本和依赖未变,仅构建同源 debug 测试 APK 用于登记手机的定向验收。
|
||||
|
||||
## 行为与实现
|
||||
|
||||
手机完成加密握手、有效 `session.open` 成功后,通过可选会话回调接入现有 `dismiss_for_boot()`,取消本 boot 的断网及联网 IP 提示。无需发送显示内容,失败握手、无效参数和仅蓝牙链路连接不触发。取消标记复用运行目录及 boot ID;断开、网络变化和服务重启不恢复,整机重启重新计时。
|
||||
|
||||
提示取消与最终提交使用独立锁。NetworkManager 查询在锁外,提交时复查取消标记,避免慢查询阻塞连接或重新显示提示。原生驱动、显示仲裁、用户配置 schema 和公共协议保持现有契约。
|
||||
|
||||
## 实际测试结果
|
||||
|
||||
| 验证 | 结果 |
|
||||
| --- | --- |
|
||||
| 针对性手机会话与 WiFi 测试 | 29 项通过;覆盖延迟前连接、两种提示、失败握手/参数、断开及网络变化、迟到查询、boot 标记和用户帧/状态 |
|
||||
| 本机完整 Python 回归 | 501 项通过,9 项按环境跳过 |
|
||||
| 本机前端 | 72 项通过,JavaScript 语法与生成文案目录校验通过 |
|
||||
| 隔离目录按文档复建 | 新建 venv;493 项通过,10 项按环境跳过;72 项前端测试及语法/目录校验通过 |
|
||||
| 板端离线 staging | 原生编译、fake-register 与 safeoff 通过;497 项 Python 测试通过,6 项按载荷/环境跳过 |
|
||||
| 离线原子部署 | 更新脚本成功,部署源码摘要与本机一致,健康和服务重启检查通过 |
|
||||
| 登记手机连接 | 两轮 `connection` instrumentation 均明确返回 `OK (1 test)`,断开重连及测试辅助文件清理通过 |
|
||||
| 真实服务重启 | 同 boot、不同进程实例,取消标记仍为 true,提示保持关闭 |
|
||||
| 两次整机软件重启 | 每次 boot 改变后取消标记均为 false;31 秒延迟到期后提示重新出现;随后手机会话成功即取消 |
|
||||
| 数据与真实驱动 | 部署后 439 个持久文件摘要不变;两次整机重启后,除既有内核健康记录更新当前 boot 外,其余 438 个文件仍不变;H618 PWM4 后端正常,OE fault 为 0;当前帧接口返回 64×64 PNG |
|
||||
| 仓库卫生 | 凭据门禁、Git 候选卫生检查和 diff 检查通过,未输出秘密值 |
|
||||
|
||||
全过程只读取状态和当前帧接口,未访问首页以免首页取消逻辑掩盖缺陷。两轮真实手机验收前均确认 `dismissed_for_boot=false`、`wifi_indicator_active=true`、模式为 `wifi_connected_indicator`;连接后手机已断开,标记为 true、提示为 false,恢复 `animation`,用户修订仍为 1。恢复后的帧摘要与本轮采样的默认内容一致。
|
||||
|
||||
隔离副本不复制 `.git`、私有登记、凭据或原有 venv;Git 专用卫生测试按既有门禁跳过,真实工作区另行执行卫生检查。断网与网络变化分支由本机 mock 验证,本轮未切换真实网络。驱动和底层输出实现未修改,按影响跳过真实无负载基准、实屏图案、摄像头、ADC、无关 Android 页面及 WiFi 传输/切网专项,不将这些项目记为实测通过。
|
||||
|
||||
## 测试中发现并修复的问题
|
||||
|
||||
- 既有生成文案目录保留旧的未连接文字,与当前页面不一致;通过生成脚本同步,仅更新这一条文字,目录校验与全量回归通过。
|
||||
- WiFi API 次数断言可能先于后台开机联网完成。增加 mock 激活完成事件,再记录次数基线;原网络业务逻辑未改,完整回归通过。
|
||||
- 初次隔离副本早于上述目录修复,产生同一失败;同步最终修改后重跑文档入口并通过。
|
||||
- 初次重定向日志混用了本机代码页与 UTF-8;仅为本次 Python 子进程显式设置编码后复验。首次 Android 临时入口创建失败;更换新入口完成离线构建,新建目录联接仅作入口,材料始终位于项目内。
|
||||
- 最终全文件摘要核对发现 `kernel-recovery.json` 与部署前不同。经对应源码和实机状态确认,这是既有 `finalize_after_boot()` 更新成功 boot ID、健康状态及时间;要求记录状态成功且对应当前 boot,单独登记这一预期变化,其余文件继续严格比较,不回写旧健康记录。
|
||||
|
||||
可重复经验已补充到 `测试相关资料/如何测试/核桃派点阵屏控制服务测试流程.md` 的 `TEST-WIFI-MOBILE-DISMISS`;跨端影响见 `移动端相关内容/开发要求/跨端兼容与变更记录.md`。状态与帧摘要证据见同目录 `验收证据.jsonl`,不包含设备凭据或真实手机标识。
|
||||
|
||||
## 清理与边界
|
||||
|
||||
本轮远端 `/tmp/qms-wifi-boot-0c0ee7224e06` 已删除,部署日志已拉回本机,原子更新脚本清理 staging、数据候选、测试目录及旧 release;软件重启所用瞬时 systemd 任务随重启清除。
|
||||
|
||||
自动审批拒绝删除首次创建但未使用的 `<公共临时目录>/wifi-boot-android`,原因是 `blocked by policy`。该目录只有本轮无用的临时入口材料,可由用户手动删除;未尝试其他删除方式。后续目录联接已正常移除。
|
||||
|
||||
最终清理 `测试相关资料/如何测试/本机测试环境/.local/work/wifi-boot/` 也被自动审批以 `blocked by policy` 拒绝;未更换删除手段。该目录仅含本轮部署载荷、隔离副本、临时 Android 构建、项目内下载缓存、脚本和日志,必要摘要与证据已归档,本轮进程已完成,可由用户手动删除。可复用 SSH/Android 环境、私有登记和其他任务目录不在待删范围。
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"local": "501 passed, 9 skipped, 8028 warnings in 144.31s (0:02:24)",
|
||||
"isolated": "493 passed, 10 skipped, 8029 warnings in 86.52s (0:01:26)",
|
||||
"board": "497 passed, 6 skipped, 381 warnings in 393.47s (0:06:33)",
|
||||
"frontend_passed": 72,
|
||||
"phone_connection_rounds_passed": 2,
|
||||
"user_data_unchanged": true,
|
||||
"expected_kernel_boot_health_update": true,
|
||||
"remote_staging_removed": true
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{"action": "verify", "time_utc": "2026-10-09T02:44:58.467357+00:00", "status": {"prompt": {"dismissed_for_boot": true, "deadline_monotonic": 54.424020967000004, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 2986, "actual_refresh_rate_hz": 97.308, "software_version": "1.1.3", "feature_updated_at": "2026-10-09T10:26+08:00"}, "persistent_file_count": 439, "persistent_changed_count": 0, "version_unchanged": true, "deployed_sources_match": true}
|
||||
{"action": "status", "time_utc": "2026-10-09T02:45:48.606426+00:00", "prompt": {"dismissed_for_boot": true, "deadline_monotonic": 54.424020967000004, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 7912, "actual_refresh_rate_hz": 97.355, "software_version": "1.1.3", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "3855e8a74e603e972b3d711a4d5cc0ddfefb775ddc659602bbc13e1bf7f4a902", "frame_sha256": "6240a0c573b31bcba5a889ade2a75dd5f076023087988f7130f2ff23271689ec", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot1-before-phone", "time_utc": "2026-10-09T02:47:27.086554+00:00", "prompt": {"dismissed_for_boot": false, "deadline_monotonic": 53.419300050000004, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 1923, "actual_refresh_rate_hz": 97.461, "software_version": "1.1.3", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "9c060064888cb04bf5e470cdafd004e820c4a38c742bf661affbc00305299b4d", "frame_sha256": "1597045fecacb936132de48480f0a9b9bee0cfe7e9097931a58a233a843b9f36", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot1-prompt", "time_utc": "2026-10-09T02:48:01.842472+00:00", "prompt": {"dismissed_for_boot": false, "deadline_monotonic": 53.419300050000004, "active": true}, "wifi_indicator_active": true, "mode": "wifi_connected_indicator", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 5299, "actual_refresh_rate_hz": 97.41, "software_version": "1.1.3", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "9c060064888cb04bf5e470cdafd004e820c4a38c742bf661affbc00305299b4d", "frame_sha256": "0d87ce1481567743b18a174b909b4618f661ed2d2f0c2fed8a061778ff91e2ca", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot1-after-phone", "time_utc": "2026-10-09T02:48:46.948438+00:00", "prompt": {"dismissed_for_boot": true, "deadline_monotonic": 53.419300050000004, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 9707, "actual_refresh_rate_hz": 97.434, "software_version": "1.1.3", "instance_hash": "e18cce2e216ab3bfcab447a3a3b0d2708502ec81398d1eba31d3dd466be673eb", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "9c060064888cb04bf5e470cdafd004e820c4a38c742bf661affbc00305299b4d", "frame_sha256": "1597045fecacb936132de48480f0a9b9bee0cfe7e9097931a58a233a843b9f36", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot1-after-service-restart", "time_utc": "2026-10-09T02:49:21.351144+00:00", "prompt": {"dismissed_for_boot": true, "deadline_monotonic": 53.419300050000004, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 2053, "actual_refresh_rate_hz": 97.332, "software_version": "1.1.3", "instance_hash": "ce0da260b6c1e58c993c53d5276c05a6f9227c7261dcad76038f39cb3489a1d8", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "9c060064888cb04bf5e470cdafd004e820c4a38c742bf661affbc00305299b4d", "frame_sha256": "1597045fecacb936132de48480f0a9b9bee0cfe7e9097931a58a233a843b9f36", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot2-before-phone", "time_utc": "2026-10-09T02:50:26.351737+00:00", "prompt": {"dismissed_for_boot": false, "deadline_monotonic": 53.062328967, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 2081, "actual_refresh_rate_hz": 97.359, "software_version": "1.1.3", "instance_hash": "9e5a35db4370716684bf9ce640b47ac079f748e0c2f10a1082560b87bd0b2bbe", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "de8854a89b978929f663e0bc002c8e61fd9b1064a815fbc530a48c15c4cb2c1c", "frame_sha256": "1597045fecacb936132de48480f0a9b9bee0cfe7e9097931a58a233a843b9f36", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot2-prompt", "time_utc": "2026-10-09T02:51:41.883796+00:00", "prompt": {"dismissed_for_boot": false, "deadline_monotonic": 53.062328967, "active": true}, "wifi_indicator_active": true, "mode": "wifi_connected_indicator", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 9431, "actual_refresh_rate_hz": 97.313, "software_version": "1.1.3", "instance_hash": "9e5a35db4370716684bf9ce640b47ac079f748e0c2f10a1082560b87bd0b2bbe", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "de8854a89b978929f663e0bc002c8e61fd9b1064a815fbc530a48c15c4cb2c1c", "frame_sha256": "32b497c57175cee1d0f0f0537a8e37bb5f2cbb79d163bd14e7f8690189cdab4e", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "status-boot2-after-phone", "time_utc": "2026-10-09T02:52:34.926190+00:00", "prompt": {"dismissed_for_boot": true, "deadline_monotonic": 53.062328967, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 14615, "actual_refresh_rate_hz": 97.45, "software_version": "1.1.3", "instance_hash": "9e5a35db4370716684bf9ce640b47ac079f748e0c2f10a1082560b87bd0b2bbe", "feature_updated_at": "2026-10-09T10:26+08:00", "boot_hash": "de8854a89b978929f663e0bc002c8e61fd9b1064a815fbc530a48c15c4cb2c1c", "frame_sha256": "1597045fecacb936132de48480f0a9b9bee0cfe7e9097931a58a233a843b9f36", "frame_size": [64, 64], "prompt_delay_seconds": 31}
|
||||
{"action": "verify", "time_utc": "2026-10-09T02:52:41.064790+00:00", "status": {"prompt": {"dismissed_for_boot": true, "deadline_monotonic": 53.062328967, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 15152, "actual_refresh_rate_hz": 97.352, "software_version": "1.1.3", "instance_hash": "9e5a35db4370716684bf9ce640b47ac079f748e0c2f10a1082560b87bd0b2bbe", "feature_updated_at": "2026-10-09T10:26+08:00"}, "persistent_file_count": 439, "persistent_changed_count": 1, "version_unchanged": true, "deployed_sources_match": true}
|
||||
{"action": "verify", "time_utc": "2026-10-09T02:55:38.902519+00:00", "status": {"prompt": {"dismissed_for_boot": true, "deadline_monotonic": 53.062328967, "active": false}, "wifi_indicator_active": false, "mode": "animation", "revision": 1, "mobile_connected": false, "mobile_available": true, "driver": "walnutpi-h618-hub75", "oe_backend": "h618-pwm4", "faults": 0, "completed_frames": 32445, "actual_refresh_rate_hz": 97.364, "software_version": "1.1.3", "instance_hash": "9e5a35db4370716684bf9ce640b47ac079f748e0c2f10a1082560b87bd0b2bbe", "feature_updated_at": "2026-10-09T10:26+08:00"}, "persistent_file_count": 439, "persistent_changed_count": 1, "expected_current_boot_health_update": true, "user_data_unchanged": true, "version_unchanged": true, "deployed_sources_match": true}
|
||||
Reference in New Issue
Block a user