mustflow 2.116.0 → 2.116.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/source-anchors.js +11 -0
- package/package.json +1 -1
- package/templates/default/i18n.toml +72 -6
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +37 -11
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/SKILL.md +477 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-diagnostics-abi-linker-checklist.md +778 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-generators-properties-checklist.md +501 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/compiler-test-strategy-differential-checklist.md +498 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/debug-symbol-symbolication-checklist.md +412 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/ir-design-ssa-pass-pipeline-checklist.md +759 -0
- package/templates/default/locales/en/.mustflow/skills/compiler-engineering-review/references/miscompile-reduction-ir-checklist.md +434 -0
- package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/SKILL.md +55 -36
- package/templates/default/locales/en/.mustflow/skills/cross-platform-filesystem-safety/references/path-containment-handle-checklist.md +251 -0
- package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/SKILL.md +133 -32
- package/templates/default/locales/en/.mustflow/skills/file-upload-security-review/references/file-upload-parser-ssrf-resource-checklist.md +306 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/SKILL.md +310 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-concurrency-model-checking-smt-checklist.md +457 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-contracts-modeling-checklist.md +434 -0
- package/templates/default/locales/en/.mustflow/skills/formal-verification-review/references/formal-memory-bounds-ci-checklist.md +509 -0
- package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/SKILL.md +439 -0
- package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-harness-campaign-checklist.md +379 -0
- package/templates/default/locales/en/.mustflow/skills/fuzz-harness-review/references/fuzz-oracle-triage-ci-checklist.md +307 -0
- package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/SKILL.md +48 -28
- package/templates/default/locales/en/.mustflow/skills/idempotency-integrity-review/references/operation-ordering-stale-write-checklist.md +259 -0
- package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/SKILL.md +329 -0
- package/templates/default/locales/en/.mustflow/skills/input-boundary-validation-review/references/input-boundary-security-checklist.md +319 -0
- package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/SKILL.md +306 -0
- package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/input-session-state-checklist.md +298 -0
- package/templates/default/locales/en/.mustflow/skills/input-event-synchronization-review/references/remote-input-transport-interaction-checklist.md +328 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/SKILL.md +353 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-diagnostics-recovery-checklist.md +267 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-execution-closure-performance-checklist.md +428 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-gc-verification-checklist.md +457 -0
- package/templates/default/locales/en/.mustflow/skills/interpreter-engineering-review/references/interpreter-semantics-runtime-checklist.md +391 -0
- package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/SKILL.md +294 -0
- package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/modal-loop-reentrancy-checklist.md +290 -0
- package/templates/default/locales/en/.mustflow/skills/modal-loop-reentrancy-review/references/nested-modal-state-lifetime-checklist.md +297 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/SKILL.md +252 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/dns-network-resolution-checklist.md +394 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/language-symbol-resolution-checklist.md +282 -0
- package/templates/default/locales/en/.mustflow/skills/name-resolution-integrity-review/references/module-package-loader-resolution-checklist.md +352 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/SKILL.md +103 -17
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/cst-ast-lowering-checklist.md +260 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/lexer-tokenization-checklist.md +397 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-serialization-compatibility-checklist.md +164 -0
- package/templates/default/locales/en/.mustflow/skills/parser-engineering-review/references/tree-traversal-rewrite-checklist.md +209 -0
- package/templates/default/locales/en/.mustflow/skills/race-condition-review/SKILL.md +68 -11
- package/templates/default/locales/en/.mustflow/skills/race-condition-review/references/race-reproduction-memory-model-checklist.md +268 -0
- package/templates/default/locales/en/.mustflow/skills/routes.toml +151 -0
- package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/SKILL.md +343 -0
- package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-auth-stream-resume-checklist.md +413 -0
- package/templates/default/locales/en/.mustflow/skills/session-handoff-integrity-review/references/session-handoff-protocol-checklist.md +485 -0
- package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/SKILL.md +267 -0
- package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/admission-decision-recovery-checklist.md +308 -0
- package/templates/default/locales/en/.mustflow/skills/two-phase-transition-integrity-review/references/two-phase-transition-checklist.md +229 -0
- package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/SKILL.md +300 -0
- package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-affinity-event-loop-checklist.md +277 -0
- package/templates/default/locales/en/.mustflow/skills/ui-dispatch-lifecycle-review/references/ui-dispatch-lifecycle-checklist.md +292 -0
- package/templates/default/manifest.toml +115 -1
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# Input Session State Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist for platform-specific input ingestion, reduction, recovery, and replay details.
|
|
4
|
+
The authoritative contract remains the repository's current source and platform integration.
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
1. [Authority and envelope](#authority-and-envelope)
|
|
9
|
+
2. [Identity and order](#identity-and-order)
|
|
10
|
+
3. [Loss and lifecycle recovery](#loss-and-lifecycle-recovery)
|
|
11
|
+
4. [Keyboard state](#keyboard-state)
|
|
12
|
+
5. [Modifier and text composition](#modifier-and-text-composition)
|
|
13
|
+
6. [Immutable batches and consumers](#immutable-batches-and-consumers)
|
|
14
|
+
7. [Movement and coalescing](#movement-and-coalescing)
|
|
15
|
+
8. [Coordinates and mode changes](#coordinates-and-mode-changes)
|
|
16
|
+
9. [Drag and capture](#drag-and-capture)
|
|
17
|
+
10. [Wheel transactions](#wheel-transactions)
|
|
18
|
+
11. [Diagnostics and privacy](#diagnostics-and-privacy)
|
|
19
|
+
12. [Fault matrix](#fault-matrix)
|
|
20
|
+
13. [Invariants](#invariants)
|
|
21
|
+
14. [Skill handoffs](#skill-handoffs)
|
|
22
|
+
|
|
23
|
+
## Authority and envelope
|
|
24
|
+
|
|
25
|
+
Inventory each producer before changing handlers:
|
|
26
|
+
|
|
27
|
+
| Producer | Authority question |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| native keyboard or pointer | does it own physical state or only compatibility delivery? |
|
|
30
|
+
| framework event | is it synthesized from the native event already consumed elsewhere? |
|
|
31
|
+
| polled gamepad or device | which poll boundary creates one observation generation? |
|
|
32
|
+
| remote input | which sender epoch and sequence establish source order? |
|
|
33
|
+
| replay | can it be isolated from live input and preserve recorded identity? |
|
|
34
|
+
| accessibility or automation | is synthesis marked without being silently discarded? |
|
|
35
|
+
|
|
36
|
+
Freeze enough evidence at the earliest controlled ingress:
|
|
37
|
+
|
|
38
|
+
- source and device identity;
|
|
39
|
+
- control or pointer identity;
|
|
40
|
+
- source epoch and sequence;
|
|
41
|
+
- stable event ID;
|
|
42
|
+
- physical code and logical key or text meaning;
|
|
43
|
+
- press, repeat, release, cancel, or movement kind;
|
|
44
|
+
- modifier and button snapshots;
|
|
45
|
+
- absolute position, relative delta, coordinate space, and transform generation;
|
|
46
|
+
- native and ingress timestamps with named clock domains;
|
|
47
|
+
- composition, synthesis, coalescing, warp, replay, and recovery provenance;
|
|
48
|
+
- capture owner and generation when relevant.
|
|
49
|
+
|
|
50
|
+
Do not defer coordinate conversion, physical-key identification, or provenance capture until mutable
|
|
51
|
+
platform state has changed.
|
|
52
|
+
|
|
53
|
+
## Identity and order
|
|
54
|
+
|
|
55
|
+
Use `(source, epoch, sequence)` as an event identity when the source guarantees one sequence.
|
|
56
|
+
Otherwise assign identity at the earliest single ingress for that source and preserve the fact that
|
|
57
|
+
it is ingress order, not unknowable hardware chronology.
|
|
58
|
+
|
|
59
|
+
Independent sources usually form a partial order. Do not timestamp-sort keyboard, pointer, network,
|
|
60
|
+
and simulation streams into invented global causality.
|
|
61
|
+
|
|
62
|
+
For each source define:
|
|
63
|
+
|
|
64
|
+
- duplicate window and retention;
|
|
65
|
+
- bounded reorder window;
|
|
66
|
+
- behavior for an event older than the accepted window;
|
|
67
|
+
- behavior for a sequence gap;
|
|
68
|
+
- epoch creation and retirement;
|
|
69
|
+
- snapshot or reset recovery;
|
|
70
|
+
- late old-epoch rejection.
|
|
71
|
+
|
|
72
|
+
Payload equality is not duplicate identity. A user can intentionally produce identical input twice.
|
|
73
|
+
|
|
74
|
+
## Loss and lifecycle recovery
|
|
75
|
+
|
|
76
|
+
Treat these as state-changing control events:
|
|
77
|
+
|
|
78
|
+
- focus or visibility loss;
|
|
79
|
+
- app deactivation, suspend, shutdown, or remote-session loss;
|
|
80
|
+
- queue overrun or source reset;
|
|
81
|
+
- device disconnect or generation change;
|
|
82
|
+
- pointer cancel, capture loss, or pointer-lock loss;
|
|
83
|
+
- input mode change that invalidates baselines.
|
|
84
|
+
|
|
85
|
+
A control session ends with release or cancel. Release means the source observed a normal physical
|
|
86
|
+
end. Cancel means authority was lost and the application can no longer prove the physical state.
|
|
87
|
+
|
|
88
|
+
On a detected gap:
|
|
89
|
+
|
|
90
|
+
1. stop applying later deltas from that source;
|
|
91
|
+
2. mark the source state untrusted;
|
|
92
|
+
3. obtain a current snapshot when the platform provides an authoritative one;
|
|
93
|
+
4. otherwise emit ordered cancellation for active controls;
|
|
94
|
+
5. start a new epoch;
|
|
95
|
+
6. reject late events from the retired epoch.
|
|
96
|
+
|
|
97
|
+
Never keep the previous held state while merely logging the gap.
|
|
98
|
+
|
|
99
|
+
## Keyboard state
|
|
100
|
+
|
|
101
|
+
Represent continuous state and transitions separately:
|
|
102
|
+
|
|
103
|
+
| Current state | Event | Result |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| up | press | down plus Press |
|
|
106
|
+
| down | repeated down | down plus Repeat or Duplicate diagnostic |
|
|
107
|
+
| down | release | up plus Release |
|
|
108
|
+
| up | release | up plus orphan-release diagnostic |
|
|
109
|
+
| down | lifecycle loss | canceled plus Cancel |
|
|
110
|
+
| canceled | old-epoch event | unchanged and rejected |
|
|
111
|
+
| suppressed held | release | up without synthetic command |
|
|
112
|
+
| suppressed held | new press before release | platform-specific reject or reset |
|
|
113
|
+
|
|
114
|
+
Use physical identity for state pairing. Logical meaning can change between press and release because
|
|
115
|
+
layout and modifiers change.
|
|
116
|
+
|
|
117
|
+
Define command repeat policy explicitly:
|
|
118
|
+
|
|
119
|
+
- hold state reads current down state;
|
|
120
|
+
- repeatable command accepts Repeat;
|
|
121
|
+
- one-shot command accepts only initial Press;
|
|
122
|
+
- text editing follows the platform text and composition contract.
|
|
123
|
+
|
|
124
|
+
## Modifier and text composition
|
|
125
|
+
|
|
126
|
+
Track left and right physical modifiers independently. Derive aggregate modifier state from the set
|
|
127
|
+
of holders; never let one release clear another held modifier.
|
|
128
|
+
|
|
129
|
+
Keep separate models for:
|
|
130
|
+
|
|
131
|
+
- momentary modifiers held physically;
|
|
132
|
+
- toggles whose logical state survives release;
|
|
133
|
+
- accessibility latches that survive release until consumed;
|
|
134
|
+
- event-local modifier snapshots;
|
|
135
|
+
- current reducer-derived physical modifier state.
|
|
136
|
+
|
|
137
|
+
Use the event-local snapshot for a shortcut tied to that event, while retaining provenance when the
|
|
138
|
+
snapshot was reconstructed rather than supplied.
|
|
139
|
+
|
|
140
|
+
Handle AltGraph before interpreting a Control-plus-Alt shortcut when the platform exposes AltGraph
|
|
141
|
+
or an equivalent physical path.
|
|
142
|
+
|
|
143
|
+
During composition, keep physical key state tracking alive but route committed text through the
|
|
144
|
+
composition or input channel. Do not execute ordinary character shortcuts on intermediate
|
|
145
|
+
composition data unless an explicit allowlist owns that behavior.
|
|
146
|
+
|
|
147
|
+
## Immutable batches and consumers
|
|
148
|
+
|
|
149
|
+
At a frame or simulation boundary:
|
|
150
|
+
|
|
151
|
+
1. cut the ingress journal at one sequence boundary;
|
|
152
|
+
2. reduce only that immutable slice;
|
|
153
|
+
3. publish one immutable current-state snapshot and transition batch;
|
|
154
|
+
4. let every consumer read the same batch through its own cursor or projection;
|
|
155
|
+
5. retain or acknowledge journal entries according to the replay contract.
|
|
156
|
+
|
|
157
|
+
Do not expose a destructive `wasPressed()` read that clears shared state. Do not let a mid-tick
|
|
158
|
+
arrival change input already observed by earlier systems.
|
|
159
|
+
|
|
160
|
+
Define slow-consumer behavior. A cursor that falls behind retention needs a resnapshot or explicit
|
|
161
|
+
loss signal, not silent skipping.
|
|
162
|
+
|
|
163
|
+
## Movement and coalescing
|
|
164
|
+
|
|
165
|
+
Choose one compaction rule per semantic consumer:
|
|
166
|
+
|
|
167
|
+
| Input use | Safe reduction candidate |
|
|
168
|
+
| --- | --- |
|
|
169
|
+
| relative camera | sum deltas within the tick |
|
|
170
|
+
| drawing or handwriting | preserve ordered samples and pressure data |
|
|
171
|
+
| hover | retain latest absolute position plus boundary transitions |
|
|
172
|
+
| wheel scrolling | accumulate precision in the declared unit |
|
|
173
|
+
| press, release, cancel | never coalesce or drop |
|
|
174
|
+
| focus, capture, device, epoch | never coalesce or drop |
|
|
175
|
+
|
|
176
|
+
When a platform exposes one representative event and its underlying coalesced samples, process one
|
|
177
|
+
representation for one path. Processing both duplicates movement.
|
|
178
|
+
|
|
179
|
+
Do not overwrite a frame's accumulated relative delta with the last sample.
|
|
180
|
+
|
|
181
|
+
## Coordinates and mode changes
|
|
182
|
+
|
|
183
|
+
Name screen, window, client, viewport, canvas, logical, device-pixel, and world spaces. Record which
|
|
184
|
+
space an envelope uses and the transform generation that produced it.
|
|
185
|
+
|
|
186
|
+
Compare drag anchors and current points in one coordinate space and transform generation or migrate
|
|
187
|
+
both deliberately.
|
|
188
|
+
|
|
189
|
+
On absolute-to-relative, relative-to-absolute, pointer-lock, DPI, viewport, zoom, or window changes:
|
|
190
|
+
|
|
191
|
+
- retire invalid baselines;
|
|
192
|
+
- start a new movement generation when needed;
|
|
193
|
+
- mark synthetic cursor warps;
|
|
194
|
+
- suppress warp-generated compatibility movement;
|
|
195
|
+
- do not reinterpret old coordinates with the new transform.
|
|
196
|
+
|
|
197
|
+
## Drag and capture
|
|
198
|
+
|
|
199
|
+
Use an explicit gesture state machine:
|
|
200
|
+
|
|
201
|
+
`Idle -> Armed -> Dragging -> Released | Clicked | Canceled`
|
|
202
|
+
|
|
203
|
+
Measure the drag threshold from the original press anchor. Once click or drag is committed, do not
|
|
204
|
+
oscillate between them because of later noise.
|
|
205
|
+
|
|
206
|
+
Treat capture as routing ownership with `pointer + generation + owner`. Observe actual acquisition
|
|
207
|
+
and loss. An old component or gesture generation cannot release a newer owner's capture.
|
|
208
|
+
|
|
209
|
+
Distinguish the changed button from the current button bitmask. Use the snapshot to detect a missed
|
|
210
|
+
release, but do not manufacture Press when the current gesture never admitted one.
|
|
211
|
+
|
|
212
|
+
Route capture loss, target removal, pointer cancel, focus loss, and competing capture through the
|
|
213
|
+
same idempotent cancel transition.
|
|
214
|
+
|
|
215
|
+
## Wheel transactions
|
|
216
|
+
|
|
217
|
+
Preserve horizontal and vertical deltas, fractional precision, and the declared unit. Normalize only
|
|
218
|
+
at the consumer boundary with an explicit scale.
|
|
219
|
+
|
|
220
|
+
Bind a burst to one owner for the platform transaction or a bounded idle interval. Re-evaluating the
|
|
221
|
+
hover target after every layout change can split one physical gesture across consumers.
|
|
222
|
+
|
|
223
|
+
Wheel ownership is separate from pointer capture unless the platform contract explicitly unifies
|
|
224
|
+
them.
|
|
225
|
+
|
|
226
|
+
## Diagnostics and privacy
|
|
227
|
+
|
|
228
|
+
Keep a bounded circular journal containing:
|
|
229
|
+
|
|
230
|
+
- source, device, epoch, sequence, event kind, and physical control;
|
|
231
|
+
- dedupe, reorder, gap, cancellation, and rejection decisions;
|
|
232
|
+
- capture owner and generation changes;
|
|
233
|
+
- reducer state transitions and invariant failures;
|
|
234
|
+
- batch boundary and consumer cursor lag.
|
|
235
|
+
|
|
236
|
+
Avoid recording text, composed content, credentials, or sensitive application fields. Prefer
|
|
237
|
+
physical identifiers, hashes where justified, counters, and lifecycle metadata.
|
|
238
|
+
|
|
239
|
+
A success log emitted before reduction or batch publication is not proof that a consumer observed
|
|
240
|
+
the input.
|
|
241
|
+
|
|
242
|
+
## Fault matrix
|
|
243
|
+
|
|
244
|
+
Cover the relevant rows:
|
|
245
|
+
|
|
246
|
+
| Fault | Required observation |
|
|
247
|
+
| --- | --- |
|
|
248
|
+
| duplicate press | held count does not grow twice |
|
|
249
|
+
| missing release | lifecycle cancel clears the session |
|
|
250
|
+
| sequence gap | later deltas stop until snapshot or new epoch |
|
|
251
|
+
| late old-epoch release | current state is unchanged |
|
|
252
|
+
| left and right modifier overlap | releasing one preserves the other |
|
|
253
|
+
| two devices hold one control | removing one preserves remaining holder |
|
|
254
|
+
| repeat storm | one-shot command executes once |
|
|
255
|
+
| composition plus shortcut keys | text and command paths do not double-apply |
|
|
256
|
+
| raw plus synthesized movement | one physical movement applies once |
|
|
257
|
+
| representative plus coalesced samples | one representation is consumed |
|
|
258
|
+
| focus loss during drag | one Cancel ends capture and gesture |
|
|
259
|
+
| stale capture owner release | newer capture remains owned |
|
|
260
|
+
| transform change during drag | historical points are not reinterpreted |
|
|
261
|
+
| mid-tick arrival | all consumers retain one batch view |
|
|
262
|
+
| slow consumer beyond retention | explicit loss or resnapshot occurs |
|
|
263
|
+
|
|
264
|
+
Prefer deterministic fixtures and explicit ingress gates over arbitrary sleeps. Preserve the failing
|
|
265
|
+
envelope stream, epochs, batch boundaries, and invariant result for replay.
|
|
266
|
+
|
|
267
|
+
## Invariants
|
|
268
|
+
|
|
269
|
+
At minimum, choose applicable invariants:
|
|
270
|
+
|
|
271
|
+
- every active control terminates by release or cancel;
|
|
272
|
+
- one device cannot hold the same physical control more than once;
|
|
273
|
+
- aggregate held state equals the non-empty holder set;
|
|
274
|
+
- a retired epoch cannot mutate current state;
|
|
275
|
+
- applied source sequence is monotonic within one epoch;
|
|
276
|
+
- a sequence gap cannot be hidden by later delta application;
|
|
277
|
+
- every frame or tick consumer sees one immutable batch;
|
|
278
|
+
- one physical movement source is applied once;
|
|
279
|
+
- capture has at most one current owner per pointer;
|
|
280
|
+
- every drag reaches released, clicked, or canceled;
|
|
281
|
+
- composition does not duplicate committed text or invoke unintended shortcuts;
|
|
282
|
+
- diagnostic retention is bounded and excludes sensitive text.
|
|
283
|
+
|
|
284
|
+
## Skill handoffs
|
|
285
|
+
|
|
286
|
+
- Use `race-condition-review` for schedule control, happens-before, atomics, locks, and data races
|
|
287
|
+
inside ingress or reducers.
|
|
288
|
+
- Use `frontend-state-ownership-review` when normalized input is correct but UI state has multiple
|
|
289
|
+
competing owners.
|
|
290
|
+
- Use `state-machine-pattern` when a domain gesture or command lifecycle needs a reusable state
|
|
291
|
+
transition implementation.
|
|
292
|
+
- Use `frontend-accessibility-tree-review` for keyboard parity, focus behavior, semantic
|
|
293
|
+
activation, and non-pointer alternatives.
|
|
294
|
+
- Use `frame-render-performance-review` when input delay comes from long tasks, rendering, layout,
|
|
295
|
+
or main-thread scheduling rather than input-state correctness.
|
|
296
|
+
- Use `input-boundary-validation-review` for hostile remote-input payload validation before
|
|
297
|
+
admitted envelopes reach this protocol.
|
|
298
|
+
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Remote Input Transport and Interaction Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when normalized input crosses a process, host, network, injected-device, or
|
|
4
|
+
rendered-frame boundary. Keep transport facts version-scoped and derive application behavior from
|
|
5
|
+
the repository's semantic input contract rather than a protocol feature name.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
1. [Envelope and semantic delivery](#envelope-and-semantic-delivery)
|
|
10
|
+
2. [Deadlines, replacement, and recovery](#deadlines-replacement-and-recovery)
|
|
11
|
+
3. [Acknowledgment layers](#acknowledgment-layers)
|
|
12
|
+
4. [Latency, prediction, and queue debt](#latency-prediction-and-queue-debt)
|
|
13
|
+
5. [Origin lineage and loop prevention](#origin-lineage-and-loop-prevention)
|
|
14
|
+
6. [Ownership and arbitration](#ownership-and-arbitration)
|
|
15
|
+
7. [Reconnect and neutralization](#reconnect-and-neutralization)
|
|
16
|
+
8. [Interaction context](#interaction-context)
|
|
17
|
+
9. [Focus protocol](#focus-protocol)
|
|
18
|
+
10. [Composition and selection](#composition-and-selection)
|
|
19
|
+
11. [Clipboard protocol](#clipboard-protocol)
|
|
20
|
+
12. [Surface and coordinate generations](#surface-and-coordinate-generations)
|
|
21
|
+
13. [Causal diagnostics](#causal-diagnostics)
|
|
22
|
+
14. [Replay and fault injection](#replay-and-fault-injection)
|
|
23
|
+
15. [Invariants and repair](#invariants-and-repair)
|
|
24
|
+
16. [Skill handoffs](#skill-handoffs)
|
|
25
|
+
|
|
26
|
+
## Envelope and semantic delivery
|
|
27
|
+
|
|
28
|
+
Preserve at least the identities and authority tokens needed by the operation:
|
|
29
|
+
|
|
30
|
+
- protocol schema version;
|
|
31
|
+
- session, surface, path and focus epochs;
|
|
32
|
+
- source, device, pointer and press identity;
|
|
33
|
+
- event, root event, parent event and apply-context identity;
|
|
34
|
+
- source sequence and covered sequence range;
|
|
35
|
+
- capture monotonic time and component observation time;
|
|
36
|
+
- deadline and supersession key;
|
|
37
|
+
- state, transform, text, composition and clipboard versions;
|
|
38
|
+
- origin node, origin kind, hop path and propagation policy;
|
|
39
|
+
- semantic reliability class;
|
|
40
|
+
- frame identity when presentation evidence exists.
|
|
41
|
+
|
|
42
|
+
Classify by meaning, not by a transport's reliable or unreliable label:
|
|
43
|
+
|
|
44
|
+
| Semantic class | Preservation rule |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| absolute pointer or analog state | latest valid value supersedes older values |
|
|
47
|
+
| relative motion or wheel | preserve the covered-range sum |
|
|
48
|
+
| pen or touch path | preserve ordered shape, pressure and important turns |
|
|
49
|
+
| press or release boundary | idempotent admission and explicit application acknowledgment |
|
|
50
|
+
| focus, composition, clipboard or surface | ordered versioned interaction transaction |
|
|
51
|
+
| state snapshot | supersedes deltas only at a declared sequence boundary |
|
|
52
|
+
|
|
53
|
+
Do not place every class behind one ordered backlog. A stale high-rate movement stream must not
|
|
54
|
+
block a release or interaction-closing transaction.
|
|
55
|
+
|
|
56
|
+
## Deadlines, replacement, and recovery
|
|
57
|
+
|
|
58
|
+
Give every continuous input an explicit usefulness deadline and supersession relation. An expired
|
|
59
|
+
absolute position can be dropped when a newer position exists. An expired release cannot simply
|
|
60
|
+
vanish; reconcile it against current state and promote repair when necessary.
|
|
61
|
+
|
|
62
|
+
For delta ranges, carry the first and last source sequence plus the sum. Do not acknowledge a
|
|
63
|
+
covered range and later apply one of its original samples again.
|
|
64
|
+
|
|
65
|
+
Prefer current-state repair over replaying obsolete history:
|
|
66
|
+
|
|
67
|
+
- periodically or on anomaly, send a compact held-control and interaction digest;
|
|
68
|
+
- include pressed owners, modifiers, buttons, active pointers, relative accumulators, focus,
|
|
69
|
+
capture, composition, clipboard and surface versions as applicable;
|
|
70
|
+
- on a gap, compare the digest at a named sequence boundary;
|
|
71
|
+
- repair or open a new epoch instead of waiting for old continuous input.
|
|
72
|
+
|
|
73
|
+
Reset estimators and prediction generations when the path changes. Reject late input from a retired
|
|
74
|
+
path epoch even if the connection object remains alive.
|
|
75
|
+
|
|
76
|
+
## Acknowledgment layers
|
|
77
|
+
|
|
78
|
+
Name the layer represented by every acknowledgment:
|
|
79
|
+
|
|
80
|
+
| Acknowledgment | Meaning |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| receive | envelope admitted through framing and validation |
|
|
83
|
+
| apply | reducer accepted or idempotently replayed the semantic operation |
|
|
84
|
+
| present | a named displayed frame first contains the result |
|
|
85
|
+
| repair | an invariant repair closed the discrepancy |
|
|
86
|
+
|
|
87
|
+
Transport delivery evidence is not application acceptance. Stop redundant boundary-event carriage
|
|
88
|
+
only after the intended application layer confirms the stable event identity.
|
|
89
|
+
|
|
90
|
+
Link an apply acknowledgment to state version or state digest. Link present acknowledgment to a
|
|
91
|
+
render, encode, decode and presentation frame chain when the product claims visible latency.
|
|
92
|
+
|
|
93
|
+
## Latency, prediction, and queue debt
|
|
94
|
+
|
|
95
|
+
Use local prediction only for reversible presentation such as cursor position, drag outline, ink
|
|
96
|
+
preview, hover or press animation. Never feed predicted samples back into the authoritative input
|
|
97
|
+
journal or use them to commit irreversible commands.
|
|
98
|
+
|
|
99
|
+
Invalidate a prediction when the next authoritative sample or generation arrives. Reconcile the
|
|
100
|
+
presentation layer without creating another input event.
|
|
101
|
+
|
|
102
|
+
Limit queues by time debt: oldest still-useful event age, deadline miss, reorder depth and render
|
|
103
|
+
queue depth. Under pressure:
|
|
104
|
+
|
|
105
|
+
- discard superseded absolute samples first;
|
|
106
|
+
- fold relative ranges without losing their sum;
|
|
107
|
+
- simplify paths while preserving semantic turns;
|
|
108
|
+
- retain boundary and interaction transactions;
|
|
109
|
+
- isolate clipboard bodies, diagnostics and bulk data from latency-sensitive input flow.
|
|
110
|
+
|
|
111
|
+
Measure capture-to-present tail latency by named stages. Average network delay alone cannot prove
|
|
112
|
+
input responsiveness.
|
|
113
|
+
|
|
114
|
+
## Origin lineage and loop prevention
|
|
115
|
+
|
|
116
|
+
Preserve origin and causal lineage across normalization, serialization, injection, application,
|
|
117
|
+
derived command and rendered feedback. Transforming an event does not create a new root user action.
|
|
118
|
+
|
|
119
|
+
Separate local capture from remote application:
|
|
120
|
+
|
|
121
|
+
- capture path produces outbound user intent;
|
|
122
|
+
- inbound path validates and reduces a remote command;
|
|
123
|
+
- effect execution does not automatically produce a new outbound user intent;
|
|
124
|
+
- derived semantic or compatibility events inherit root identity and a non-propagating policy unless
|
|
125
|
+
an explicit rule permits another hop.
|
|
126
|
+
|
|
127
|
+
Prefer a dedicated injected device or exact platform marker and session token. Do not suppress
|
|
128
|
+
similar local input for a guessed time interval.
|
|
129
|
+
|
|
130
|
+
Replace a global `isApplyingRemote` boolean with an apply-context token propagated through async
|
|
131
|
+
continuations and task queues.
|
|
132
|
+
|
|
133
|
+
Stop propagation when the current node already appears in the path, the policy forbids forwarding,
|
|
134
|
+
or a bounded hop limit is exceeded. Record the rejection reason.
|
|
135
|
+
|
|
136
|
+
## Ownership and arbitration
|
|
137
|
+
|
|
138
|
+
Track held state by source owner and press identity. Aggregate physical state is the union of current
|
|
139
|
+
owners, not one shared boolean and not an opaque reference count.
|
|
140
|
+
|
|
141
|
+
Choose conflict policy per resource:
|
|
142
|
+
|
|
143
|
+
| Resource | Typical authority shape |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| independent modifier holders | owner-set union |
|
|
146
|
+
| text composition | one exclusive authority and generation |
|
|
147
|
+
| drag or pointer capture | one owner lease with fencing generation |
|
|
148
|
+
| absolute cursor | explicit local-first or current-controller policy |
|
|
149
|
+
| clipboard | version, origin and content-policy arbitration |
|
|
150
|
+
| surface control | one admitted controller for one surface epoch |
|
|
151
|
+
|
|
152
|
+
Local takeover increments the generation, cancels displaced ownership and rejects subsequent stale
|
|
153
|
+
owner input. Expiry alone is insufficient when an old owner can resume; the reducer must check the
|
|
154
|
+
generation.
|
|
155
|
+
|
|
156
|
+
## Reconnect and neutralization
|
|
157
|
+
|
|
158
|
+
Before admitting a new session or surface epoch:
|
|
159
|
+
|
|
160
|
+
1. pause new state-changing input;
|
|
161
|
+
2. cancel or reconcile old held controls, pointer capture, drag and composition;
|
|
162
|
+
3. retire old session, path, focus and surface generations;
|
|
163
|
+
4. exchange current state and interaction-context digests;
|
|
164
|
+
5. confirm neutral or explicitly transferred ownership;
|
|
165
|
+
6. confirm coordinate and target generations;
|
|
166
|
+
7. admit new-epoch input.
|
|
167
|
+
|
|
168
|
+
Reject late old-epoch releases, movement and composition updates. A new connection does not erase
|
|
169
|
+
the old connection's semantic tail.
|
|
170
|
+
|
|
171
|
+
## Interaction context
|
|
172
|
+
|
|
173
|
+
Keep one versioned snapshot containing applicable fields:
|
|
174
|
+
|
|
175
|
+
- operating-system activation;
|
|
176
|
+
- document visibility;
|
|
177
|
+
- active remote surface;
|
|
178
|
+
- focused logical target and focus generation;
|
|
179
|
+
- selection and text revision;
|
|
180
|
+
- composition ID, revision, range and status;
|
|
181
|
+
- clipboard version, origin and content metadata;
|
|
182
|
+
- viewport and transform generation;
|
|
183
|
+
- held-state and capture digest.
|
|
184
|
+
|
|
185
|
+
A command carries the context versions it assumes. Reject or reconcile it when those assumptions no
|
|
186
|
+
longer hold.
|
|
187
|
+
|
|
188
|
+
Do not collapse activation, visibility, surface selection and editing focus into one boolean.
|
|
189
|
+
|
|
190
|
+
## Focus protocol
|
|
191
|
+
|
|
192
|
+
Model focus as request, apply and confirmation:
|
|
193
|
+
|
|
194
|
+
1. sender requests a stable logical target and expected focus or surface generation;
|
|
195
|
+
2. authority validates target existence, ownership and policy;
|
|
196
|
+
3. authority applies actual focus or chooses an explicit safe fallback;
|
|
197
|
+
4. authority returns the new generation and actual target;
|
|
198
|
+
5. dependent composition or shortcut work starts only from that confirmed generation.
|
|
199
|
+
|
|
200
|
+
Coordinates and transient object paths are not stable target identity. A destroyed target must not
|
|
201
|
+
receive a late focus confirmation.
|
|
202
|
+
|
|
203
|
+
## Composition and selection
|
|
204
|
+
|
|
205
|
+
Choose one composition authority per editing session:
|
|
206
|
+
|
|
207
|
+
- local-authority mode sends versioned composition or text-edit operations, not both those results
|
|
208
|
+
and the physical keys that would reproduce them remotely;
|
|
209
|
+
- remote-authority mode sends admitted physical or language-switch intent and does not resend local
|
|
210
|
+
composition output.
|
|
211
|
+
|
|
212
|
+
Version composition with ID, revision, base text revision, target range, data classification and
|
|
213
|
+
open, committed or canceled status. Commit and cancel close it exactly once. Reject updates for a
|
|
214
|
+
closed composition or stale base text revision.
|
|
215
|
+
|
|
216
|
+
Close or transfer composition through a barrier before focus or surface changes.
|
|
217
|
+
|
|
218
|
+
Define one protocol text-index unit and convert at adapters. Do not exchange an unqualified numeric
|
|
219
|
+
selection range across runtimes that count text differently.
|
|
220
|
+
|
|
221
|
+
## Clipboard protocol
|
|
222
|
+
|
|
223
|
+
Treat clipboard state as a versioned multi-representation object:
|
|
224
|
+
|
|
225
|
+
- origin and change identity;
|
|
226
|
+
- content hash or equivalent stable identity;
|
|
227
|
+
- available representation types and sizes;
|
|
228
|
+
- sensitivity and automatic-transfer policy;
|
|
229
|
+
- expiry and user-approval requirements.
|
|
230
|
+
|
|
231
|
+
First advertise metadata. Transfer only a requested representation over a bounded lower-priority
|
|
232
|
+
path. Keep large images, files and rich data away from the input latency queue.
|
|
233
|
+
|
|
234
|
+
Reject an echo when a locally observed change is the version just written from remote. Synthetic
|
|
235
|
+
events alone are not proof that the system clipboard or target document changed.
|
|
236
|
+
|
|
237
|
+
Do not log or automatically synchronize secret fields, locked-session content, or disallowed
|
|
238
|
+
applications.
|
|
239
|
+
|
|
240
|
+
## Surface and coordinate generations
|
|
241
|
+
|
|
242
|
+
Treat a surface switch as an input barrier:
|
|
243
|
+
|
|
244
|
+
1. pause state-changing input;
|
|
245
|
+
2. close or cancel drag, capture, held buttons and composition;
|
|
246
|
+
3. increment the surface epoch;
|
|
247
|
+
4. publish size, scale, rotation, safe area and transform generation;
|
|
248
|
+
5. confirm target focus and first applicable frame;
|
|
249
|
+
6. resume input for the new epoch.
|
|
250
|
+
|
|
251
|
+
Carry transform generation on every coordinate-bearing event. Reject, reproject deliberately, or
|
|
252
|
+
request a new sample when it does not match current authority.
|
|
253
|
+
|
|
254
|
+
Split absolute baselines and relative accumulators across surface epochs.
|
|
255
|
+
|
|
256
|
+
## Causal diagnostics
|
|
257
|
+
|
|
258
|
+
Record the lifecycle stages relevant to the architecture:
|
|
259
|
+
|
|
260
|
+
`captured -> normalized -> queued -> serialized -> sent -> received -> validated -> deduplicated -> applied -> rendered -> presented -> acknowledged`
|
|
261
|
+
|
|
262
|
+
Also record `dropped` and `repaired` as decisions with machine-readable reason codes.
|
|
263
|
+
|
|
264
|
+
Preserve event, root, parent, trace, source, epoch, sequence, frame, thread or executor, queue age,
|
|
265
|
+
context versions and state hashes. Record state hash before and after reducer application and the
|
|
266
|
+
rule version that made the decision.
|
|
267
|
+
|
|
268
|
+
Keep source occurrence time and component observation time separate. Build order from source
|
|
269
|
+
sequence, process order and send/receive parent relationships. Clock offset estimates are latency
|
|
270
|
+
evidence with uncertainty, not causality.
|
|
271
|
+
|
|
272
|
+
Use a bounded low-overhead ring for high-rate data. Summarize paths and delta ranges; never sample
|
|
273
|
+
away boundary, generation, capture or invariant events. Redact text and clipboard content by
|
|
274
|
+
default.
|
|
275
|
+
|
|
276
|
+
## Replay and fault injection
|
|
277
|
+
|
|
278
|
+
Replay normalized envelopes against the production reducer with:
|
|
279
|
+
|
|
280
|
+
- a virtual monotonic clock;
|
|
281
|
+
- recorded receive order and causal parent links;
|
|
282
|
+
- path, session, surface and interaction epochs;
|
|
283
|
+
- network and application pause script;
|
|
284
|
+
- deterministic random seed;
|
|
285
|
+
- expected decision and state hash.
|
|
286
|
+
|
|
287
|
+
Inject burst delay, jitter, consecutive loss, reordering, duplication, path change, acknowledgment
|
|
288
|
+
delay, process or main-thread pause, hidden or suspend, reconnect, surface switch, capture theft,
|
|
289
|
+
composition focus loss and clipboard transfer pressure.
|
|
290
|
+
|
|
291
|
+
Compare a healthy and failing run by root event and find the first state-hash divergence rather than
|
|
292
|
+
the final visible symptom.
|
|
293
|
+
|
|
294
|
+
A reproducible bundle should version its schema and include build, feature flags, platform, layout,
|
|
295
|
+
scale, network fault plan, bounded event ring, state snapshots and seed. Keep sensitive content
|
|
296
|
+
redacted unless explicitly authorized.
|
|
297
|
+
|
|
298
|
+
## Invariants and repair
|
|
299
|
+
|
|
300
|
+
Choose applicable executable invariants:
|
|
301
|
+
|
|
302
|
+
- one stable event changes reducer state at most once;
|
|
303
|
+
- no old session, path, surface, focus, lease or composition generation changes current authority;
|
|
304
|
+
- every admitted press owner terminates by release, cancel or repair;
|
|
305
|
+
- one exclusive drag, capture or composition owner exists;
|
|
306
|
+
- apply acknowledgments match the recorded state version or digest;
|
|
307
|
+
- a closed composition cannot advance;
|
|
308
|
+
- clipboard echo does not create a new root action;
|
|
309
|
+
- an inbound applied effect cannot silently become outbound user intent;
|
|
310
|
+
- input applied to a frame uses the admitted surface and transform generation;
|
|
311
|
+
- queue debt cannot hide boundary events behind obsolete continuous input.
|
|
312
|
+
|
|
313
|
+
A watchdog creates an explicit non-propagating repair event with cause, prior state hash, action and
|
|
314
|
+
result. Repair is not fabricated user input.
|
|
315
|
+
|
|
316
|
+
## Skill handoffs
|
|
317
|
+
|
|
318
|
+
- Use `input-boundary-validation-review` for authentication, size, schema and hostile remote
|
|
319
|
+
envelope validation.
|
|
320
|
+
- Use `performance-measurement-integrity-review` for latency units, clock domains, tail metrics and
|
|
321
|
+
benchmark comparability.
|
|
322
|
+
- Use `adapter-boundary` for platform injection, capture and transport adapter isolation.
|
|
323
|
+
- Use `race-condition-review` for shared-memory interleavings inside capture, transport or reducer
|
|
324
|
+
code.
|
|
325
|
+
- Use `two-phase-transition-integrity-review` when controller or surface handoff has durable
|
|
326
|
+
admission and commit phases.
|
|
327
|
+
- Use `provenance-license-gate` before copying external protocol text, schemas or example code.
|
|
328
|
+
|