Skip to content

[Cardputer-ADV][esp32sim] 审查探针 key esc 直接输入被 409 拒绝:导航键 Fn+反引号映射只在 QEMU 与 review-setup 路径生效 #357

Done

Description

@m5agent

固件与任务

  • 设备:Cardputer ADV(K132-Adv,ESP32-S3FN8,8 MiB flash,240×135 ST7789V2)
  • 固件:FeiyuOS for Cardputer Adv v0.7.5,feiyuos-v0.7.5-cardputer-adv.bin,3582736 B,版本 ID 2122136971566333954
  • 源 BIN SHA-256:057b1c7b1ac665d88e42ec10f8f2befea4bcedcbed9f5e461a7d21c73b67fcfb
  • 归一化组合镜像 SHA-256:537e53bbdf904931f43f4d9a80719e315854cc19fd174fca4d49a54456dddf81(8388608 B)
  • 审查任务:job-db3c2775f12c(lane=SIM_PARTIAL,status=manual_review,error_code=E_INTERACTION_INPUT_UNSUPPORTED)
  • 运行:runtime=esp32sim,board m5stack-cardputer-adv;runtime identity commit aafa4dfa7da9e36e9deacdbf2683b47d7d4588c9,binary SHA-256 3ba73039bfba29da51fc87c07416d6a1d3b273e477317f0594f7c9f9605c1fd4,service patch SHA-256 89b4ff2bedfadfe3c6cc198d244a7388d81c14313e1409c25ebe87ce10a6548b

现象

虚拟设备启动和运行正常,只有一条固件已声明的输入动作被服务端拒绝:

  • observation PASS:95.5 s 内 state=running;boot_and_ui PASS(frame_nonblank,240×135,非黑像素 32400,5 色);guest_health PASS;crash-diagnostics panic=null、repeated_resets=false、core_dump 未观测。因此本单不是启动失败、复位循环或固件崩溃。
  • 同一会话内 key ret tap、key a tap、chord fn+w、chord fn+h 均 accepted(其中 key ret 帧 SHA 变化)。
  • {"kind":"key","key":"esc","action":"tap","settle_seconds":1.0} → HTTP 409 not_supported_on_runtime:Input has no esp32sim board mapping。

审查服务将该失败归为 runtime_model_gap(phase=guest_observation,source=device_service_input,source_code=not_supported_on_runtime),即模拟器侧的运行时能力缺口,而不是固件结论。

该动作不是审查侧臆造:固件描述原文为「反引号键(Esc):取消当前任务」。Cardputer-ADV 的 Esc 是 Fn + 反引号键(UIFlow2 文档写明 FN + 反引号键 上报 ESC,键码 0x1B,https://uiflow-micropython.readthedocs.io/en/stable/controllers/cardputer-adv.html ),属于真实可执行的用户动作。因为该探针无法完成,审查任务以 E_INTERACTION_INPUT_UNSUPPORTED 收口 manual_review。

同一能力在其他路径可用

  • QEMU native 既有证据(docs/evidence/2026-11-16-cardputer-native-integration/targeted-summary.json):cardputer-adv 的 frequency 与 caplab 两个 sample 都接受 key:esc 并产出帧。
  • 浏览器输入 profile(platform/web/qemu-browser-profiles.json):cardputer-adv 的 inputs.keyboard 明确包含 esc。
  • esp32sim 的 review setup 路径(platform/tools/device_service.py:11828-11836):_inject_review_setup 已把 esc/left/right/up/down/delete 翻译成 fn + grave_accent 等 chord;本次网络 setup 的 Enter 走该路径并 PASS。
  • 只有直接 /input 路径落到 platform/tools/device_service_esp32sim.py 的 input_command:KEYS(L396)和 KEY_ALIASES(L399)都没有 esc/方向键,最终在 L593 抛 409。QEMU 路径的等价映射在 platform/tools/device_service_input.py:27-30、76-88。

也就是说,模型本身可以产生 Esc(fn + grave_accent chord 在本会话已 accepted),缺口在 esp32sim 直接输入的键名语义分派。

复现步骤

  1. POST /api/v1/artifacts 上传上述 BIN,再 POST /api/v1/firmware 用 {"device_id":"cardputer-adv","kind":"merged","artifact_id":"<sha256>"} 得到 firmware_id。
  2. POST /api/v1/sessions 建 {"device_id":"cardputer-adv","firmware_id":"<id>","runtime":"esp32sim"},等待 running。
  3. POST /api/v1/sessions/{id}/input 发 {"kind":"key","key":"esc","action":"tap","settle_seconds":1.0} → 409。
  4. 同一会话发 {"kind":"key","key":"ret","action":"tap"} 或 {"kind":"chord","target":"keyboard","keys":["fn","w"],"settle_seconds":1.0} → 200 accepted。
  5. 代码级最小复现:esp32sim.input_command("cardputer-adv", {"kind":"key","key":"esc","action":"tap"}) 在 L593 抛 not_supported_on_runtime。

期望行为

直接 /input 的语义 key esc 在 cardputer-adv 上应返回 200,并按与 review setup/QEMU 路径一致的 fn + grave_accent 映射注入;至少不应在模型实际支持该 chord 的情况下返回泛化的 "no esp32sim board mapping"。

影响范围

所有在 Cardputer/Cardputer-ADV 上声明 Esc 或方向键(left/right/up/down/delete)的审查任务,直接 /input 探针都会 409。本次 review-sta 计划固定探测 ret/esc,因此 Cardputer 系列会稳定命中;与具体固件无关。

关联但不同

#352 是 esp32sim 语义分派对 StopWatch 之外的 chord/double_click 不生效(StickC-Plus2,409/400),修复点在 Esp32SimDeviceSession.validate_input 的 StopWatch 条件。本单是键盘导航键名在 input_command 的映射缺口,即使把 #352 的分派泛化也不会自动修复本单。

证据等级与边界

  • 证据等级:virtual-device validation(job job-db3c2775f12c 的会话记录、409 receipt、observation/crash/guest_health)+ code-level verification(上述 file:line)。
  • NOT RUN:本 BIN 的 runtime=qemu 对照未重跑(引用的是同板历史 native 证据);真机键盘未验证;Enter 探针后帧转为全黑的现象未归因,不属本单范围。
  • 未修改任何代码。

Activity

  1. added
    bug
    on Dec 1, 2026
  2. m5agent commented on Dec 1, 2026

    @m5agent
    OwnerAuthor

    已修复 Cardputer / Cardputer ADV 的 esp32sim 直接导航键输入。直接 /input 与 review setup 共用板卡键盘映射和按键边沿分派,未映射的键会返回带键名的 HTTP 409。

    • 复测原版 FeiyuOS 0.7.5(源 BIN SHA-256 057b1c7b1ac665d88e42ec10f8f2befea4bcedcbed9f5e461a7d21c73b67fcfb,归一化 Flash SHA-256 537e53bbdf904931f43f4d9a80719e315854cc19fd174fca4d49a54456dddf81)。原请求 {"kind":"key","key":"esc","action":"tap","settle_seconds":1.0} 从 409 变为 200,回执为 120 ms 主机按住时间。
    • 用同一 ADV 模型、运行时、API 和请求复测已固定的 ADV 键盘例程。guest 从 TCA8418 的 FIFO 读到 83 81 01 03,对应 Fn 按下、反引号按下、反引号释放、Fn 释放。GPIO11 轨迹显示两键约有 100 ms 的模拟时间重叠。
    • 原版 FeiyuOS 在这次有界观测中未读取键盘 FIFO。其结果覆盖原请求是否受理,guest 矩阵与时序由同板键盘例程验证。未验证取消任务的应用行为和实体硬件。

    以上为虚拟设备验证。运行时 fork 为 a62c8769c144a402da672682bc4400e95988332b,主仓合并提交为 7121388fc10e4aac022efce7210886284c435350。主仓 PR · 复测证据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions