You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(contracts): make keyboard capability facts additive (#2459)
The keyboard family's facts builder took one required cell per operation, so an
operation only one owner implements still cost a hand-written denial in every
other owner. The builder now takes the family's denial once, as `unsupported`,
and every operation cell is optional: an owner names what it serves and omission
reports that denial verbatim, with the reason and hint the owner would otherwise
have repeated per cell.
Omission stays a classified refusal, never an unclassified cell and never an
implied success: `unsupported` is required, so a call that leaves the family
blank does not compile. An owner that names every operation still states the
family refusal, and it must refuse the family rather than one operation of it —
whatever the owner leaves unnamed reports that cell verbatim.
The shared unavailable-facts input collapses `keyboardStatus`/`keyboardDismiss`/
`keyboardEnter` into one required `keyboard` cell, so the owners that answered
the family with raw keys (webdriver, vega, linux, limrun's no-session binding)
now answer it through the builder, which is the family's one entry point.
Facts are unchanged for every owner, so the per-platform admission assertions
hold untouched. Two owner tests now assert the keyboard reason as well as the
availability, because one family cell reports one reason for all three
operations: the WebDriver inactive session and the stale Limrun identity.
Refs #2443
test('builds the exact keyboard operation fact catalog',()=>{
20
+
constavailable={available: true}asconst;
21
+
22
+
test('builds the exact keyboard operation fact catalog for an owner that names every operation',()=>{
23
+
constfamilyDenial={
24
+
available: false,
25
+
reason: 'unsupported-device-kind',
26
+
}asconst;
21
27
conststatus={available: true}asconst;
22
28
constdismiss={
23
29
available: false,
24
30
reason: 'unsupported-platform-leaf',
25
31
}asconst;
26
32
constenter={available: true}asconst;
27
-
expect(keyboardRuntimeOperationFacts({ status, dismiss, enter })).toEqual({
33
+
expect(
34
+
keyboardRuntimeOperationFacts({unsupported: familyDenial, status, dismiss, enter }),
35
+
).toEqual({
28
36
keyboardStatus: status,
29
37
keyboardDismiss: dismiss,
30
38
keyboardEnter: enter,
31
39
});
32
40
});
33
41
42
+
test('an operation the owner never names reports the denial the owner stated for the family, verbatim — omission is a classified refusal, never an unclassified cell and never an implied success',()=>{
43
+
constdenial={
44
+
available: false,
45
+
reason: 'unsupported-platform-leaf',
46
+
hint: 'Limrun iOS direct sessions do not expose keyboard actions.',
0 commit comments