Skip to content

fix(#111): stage4 I4.1 — check the java child's /dev/input fds, not bwrap#130

Merged
aradanmn merged 1 commit into
mainfrom
fix/111-stage4-input-isolation
Jul 22, 2026
Merged

fix(#111): stage4 I4.1 — check the java child's /dev/input fds, not bwrap#130
aradanmn merged 1 commit into
mainfrom
fix/111-stage4-input-isolation

Conversation

@aradanmn

Copy link
Copy Markdown
Owner

Part of the pre-HW-2 test-harness batch. Hardware-gated — validated by tests/hardware/run_all.sh stage4 on the Deck (HW-2), not in CI (tests/hardware/ is Deck-only).

Problem

HW-1 (2026-07-19) recorded I4.1 failing ×4 (expected=2 actual=0) on every healthy slot. Two stale assumptions:

  1. it counted /dev/input fds on the bwrap supervisor — but the device fds live in the java child (.slots[slot].pid, not .slots[slot].bwrap_pid);
  2. it expected an event+js pair (2) — but under the MCSS_RAW_BINDING=1 default only the jsN node is dev-bound, so the count is mode-dependent.

Fix

Read the ground-truth set of input nodes bwrap actually bound for the slot from its argv (mode-agnostic — jsN under raw, event+js under legacy, virtual pair under the future #38 proxy), then assert the java process's open /dev/input fds are non-empty and all within that bound set (no cross-slot leakage). Every path logs the java pid, bound nodes, and observed fds so a Deck run is self-diagnosing. I4.2/I4.3/I4.4 untouched.

Closes #111 (on the green stage4 run).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hm7DmagTa2EttH8aHxGji2

The old I4.1 counted /dev/input fds on the bwrap SUPERVISOR and expected
exactly 2 (an event+js pair) -> 4x false 'expected=2 actual=0' fails on
healthy slots in HW-1. Two stale assumptions:
  1. the device fds live in the JAVA child (.slots[slot].pid), not the
     bwrap supervisor (.slots[slot].bwrap_pid);
  2. under the MCSS_RAW_BINDING=1 default only the jsN node is dev-bound
     (event+js only under the legacy virtual-mapper), so the count is
     mode-dependent, not a fixed 2.

Rewrite: read the ground-truth set of input nodes bwrap actually bound for
the slot from its argv (mode-agnostic), then assert the java process's open
/dev/input fds are non-empty and all within that bound set (no cross-slot
leakage). Every path logs java pid + bound nodes + observed fds so a Deck run
is self-diagnosing. I4.2/I4.3/I4.4 untouched.

Validated: tests/hardware/run_all.sh stage4 on the Deck (HW-2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hm7DmagTa2EttH8aHxGji2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hw stage4 I4.1 stale: counts /dev/input fds on bwrap (expects event+js pair) — raw-binding binds js only, fds live in the java child

1 participant