# cdp-input-invisible — REJECTED (test artifact)

**Date:** 2026-06-23
**Source claim:** Apparent CDP discriminator discovered in apen-mouse spike (round 1, this session)
**Hypothesis:** `page.mouse.move()` over CDP does not deliver `mousemove` DOM events to the page; vanilla Playwright does.

## 4-Test Framework

To distinguish a real signal from a test artifact, ran **4 conditions** instead of the 2-test pattern:

| Test | Mode | Synthetic input | Expected | Reason |
|------|------|-----------------|----------|--------|
| **A** | Vanilla (no CDP) | No | 0 events | Control: vanilla without input should be quiet |
| **B** | CDP-attached | No | 0 events | Sanity: CDP shouldn't fire phantom events on its own |
| **C** | Vanilla (no CDP) | Yes (10 mouse + 5 key) | ≥15 events | Control: vanilla with input should deliver events |
| **D** | CDP-attached | Yes (10 mouse + 5 key) | **0 events (if signal real)** | The actual test |

If **C > 0 AND D = 0** → signal confirmed.
If **C > 0 AND D > 0** → no signal (CDP delivers input normally).
If **C = 0** → test framework is broken (input not being delivered at all).

## Results

```
A. Vanilla, no input:     total=0   (control: 0)
B. CDP, no input:         total=0   (sanity: 0)
C. Vanilla + input:       total=25  (control: 10 mm + 5 kd + 10 pointer)
D. CDP + input:           total=25  (THE TEST: 25/25 delivered)
```

**Outcome:** C=25, D=25. CDP-attached Chrome **delivers all synthetic input correctly** to the page. The earlier "0 events" observation was a **test artifact** caused by:

1. **Viewport size difference.** Vanilla Playwright runs at 1280x720; CDP-attached Chrome runs at 780x441. The mouse-zone in the apen-mouse demo was at `x:190, y:324` for vanilla but `x:20, y:343` for CDP — different viewport positions.
2. **The CDP test was injecting mouse moves to a position computed from the vanilla viewport**, which was **outside the actual zone** in the CDP viewport. The cursor wasn't over the listener's target element.

## Verdict: REJECT SIGNAL

`page.mouse.move()` over CDP delivers `mousemove` events correctly. The cdp-input-invisible detector **does not exist**.

## What This Confirms

The validation gate works: 2-test would have left the false signal in place. 4-test (with explicit controls) caught the test artifact.

**Lesson for future CDP signal validation:**
- Always run a 4-test: A=no-input vanilla, B=no-input CDP, C=with-input vanilla, D=with-input CDP
- Inject input at positions computed **from the current viewport** (window.innerWidth/Height), not from assumed coordinates
- Verify cursor is over the target element with `document.elementFromPoint(x, y)` before declaring a delivery failure

## Apen-mouse Update

The apen-mouse spike validation in `VALIDATION-ROUND-1.md` is now **partially wrong** — its apen-mouse "CDP discriminator" finding was the same test artifact. That section needs to be revised to:
- VALIDATED as headless-vs-headful (ApEn < 0.3 + IEI CV < 0.2 fires identically on synthetic input from both vanilla and CDP)
- The "CDP discriminator" framing is **REJECTED** for the same viewport-coordinate reasons

The headless-vs-headful result still holds because both vanilla and CDP produce low entropy on synthetic input — that part was correct.

## Files

- `demo.html` — kept for reference; works correctly when used by a real human
- `test.py` — kept as the 4-test reference pattern for future CDP signal validation
- `VALIDATION-RESULTS.md` — this file
