Repository navigation
feat(interaction): multi-ref press plan lowered through the ordinary press lane #4296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e8630b0
feat(interaction): multi-ref press plan as one ADR 0014 logical command
strzhao d99e73e
docs(adr): amend 0014 for the multi-ref plan, and restore the lost te…
strzhao 2a6c4be
docs(adr): amend 0014 for the multi-ref plan, and restore the lost te…
strzhao fd7ae21
docs: scope the plan paragraph and fix the plan docs contracts
strzhao 2e8fbd3
docs(command-surface): name all three plan recovery fields in the pre…
strzhao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
104 changes: 104 additions & 0 deletions
104
docs/evidence/multi-ref-plan-ios-simulator-2026-11-12.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # Multi-ref press plan on an iOS simulator PIN pad, 2026-11-12 | ||
|
|
||
| Evidence for #4296 (built and run from the contribution worktree, daemon | ||
| restarted clean). The plan is one logical command that resolves and admits | ||
| every member against the active frame and then dispatches the admitted | ||
| points in order; this run exercises that lowering on real simulator dispatch: a PIN pad page served | ||
| to Safari on the booted iPhone 17 Pro simulator (`C1C05FFF-29AD-40D8-94E5-D9CBB25EC6BB`, | ||
| iOS 26.5), whose digit keys are real accessibility buttons (`1` `2` `3` `4` `C`) | ||
| and whose state row (`ENTERED=... RESULT=...`) plus dot row (`●●●●`) give a | ||
| machine-readable oracle for what landed. | ||
|
|
||
| ## Positive: `press @e12,@e13,@e12,@e13` — the repeated-digit PIN | ||
|
|
||
| Fresh `snapshot -i`, then one command (timed): | ||
|
|
||
| ```json | ||
| { | ||
| "sequence": { | ||
| "pressed": 4, | ||
| "refs": ["@e12", "@e13", "@e12", "@e13"], | ||
| "points": [ | ||
| { "x": 111, "y": 300 }, | ||
| { "x": 201, "y": 300 }, | ||
| { "x": 111, "y": 300 }, | ||
| { "x": 201, "y": 300 } | ||
| ] | ||
| }, | ||
| "ref": "e13" | ||
| } | ||
| ``` | ||
|
|
||
| Wall time `2104ms`. The page's own state after the run: | ||
| `●●●●` and `ENTERED=1212 RESULT=PASS` — the repeated ref pressed the same | ||
| key twice, and the screenshot (`positive-final.png`) shows four dots with the | ||
| pass row. Every member resolved and admitted once against the snapshot frame | ||
| before key 1; the four dispatches then ran against the admitted points, which | ||
| is why the run costs about what four presses cost and not less. | ||
|
|
||
| ## Negative: a member the frame cannot resolve | ||
|
|
||
| Fresh snapshot, then `press @e13,@e999` (`@e999` names nothing), at the | ||
| resolve-once head: | ||
|
|
||
| ```json | ||
| { | ||
| "success": false, | ||
| "code": "COMMAND_FAILED", | ||
| "message": "Ref @e999 not found", | ||
| "details": { | ||
| "dispatched": "no", | ||
| "refPlanKey": "@e999", | ||
| "refPlanPending": [], | ||
| "ref": "e999" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Every member resolves before key 1, so the whole plan refuses pre-dispatch: | ||
|
strzhao marked this conversation as resolved.
Resolved
|
||
| `dispatched: 'no'`, no key sent, and the page held `ENTERED=-`. An earlier | ||
| iteration of this PR resolved members lazily at dispatch time; there the same | ||
| command sent key 1 first and disclosed `dispatched: 'unknown'` with | ||
| `dispatchedSteps: 1` — the ledger-owned post-dispatch disclosure the request | ||
| boundary still carries for backend failures. The refusal site moved with the | ||
| resolve-once shape; the disclosure contract did not. | ||
|
|
||
| ## Later-key mutation semantics, observed rather than claimed | ||
|
|
||
| Three page variants put a mid-plan mutation between key 1 and key 2 (a | ||
| removed key, a disabled key, a system alert raised 50ms after key 1). In all | ||
| three the second member dispatched onto whatever occupied the key's | ||
| snapshot-time point, and the command reported success. This is the | ||
| resolve-once contract working as specified: key 1 expires the ref frame, so | ||
| later keys tap where the snapshot showed them and no member re-resolves — | ||
|
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
|
||
| `press --count` has the same property across its repetitions. Callers whose | ||
| screen can move between keys take a fresh snapshot and rebuild the plan; | ||
| callers who need landed verification on a fixed key use `--settle`/`--verify`. | ||
|
|
||
| ## Wall time against the alternatives | ||
|
|
||
| Same page, same PIN, three routes: | ||
|
|
||
| | Route | Wall time | Outcome | | ||
| | --- | --- | --- | | ||
| | `press @e12,@e13,@e12,@e13` (one command) | 2104ms | PASS | | ||
| | `batch` with four `label=` selector steps | 3058ms | PASS | | ||
| | four `(snapshot; press)` caller rounds | 3724ms | PASS | | ||
|
|
||
| A fourth route — `batch` with four `ref` steps — failed at digit 2: | ||
| `Ref @e13 belongs to an expired ref frame` with `dispatched: 'unknown'`, | ||
| `executed: 2` (`batch.json`), because key 1's own mutation expires the frame | ||
| the next ref step resolves against. The comma-list plan resolves every member once before key 1 and then | ||
| dispatches the admitted points, so a repeated ref keeps working across | ||
| per-key mutations where a ref batch dies on the expired frame. | ||
|
|
||
| ## Notes | ||
|
|
||
| - iOS simulator, XCUITest dispatch; no web backend involved (the page is the | ||
| app surface Safari exposes). | ||
| - Sessions opened for the run were closed; the local HTTP server ended. | ||
| - Local `check:affected --run --base old-origin/main` passes every stage | ||
| except `unit`, which fails only `eager-closure-budgets` — this clone's | ||
| `origin` names a private fork, so the gate reads the wrong merge base; | ||
| pointed at the upstream head for one `pnpm run check:unit`, the chain exits | ||
| 0. CI on the pushed head is the authoritative run. | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.