Skip to content

Commit 3fb3c60

Browse files
thymikeeclaude
andcommitted
chore(gates): register fold in the exports snapshot, coverage tables, and conformance tables
The contracts export snapshot names the new `fold-runtime` subpath, the six-platform coverage declaration and its Android evidence row classify the command, the runtime-binding conformance table resolves it, and the provider output guard drives it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 371df1d commit 3fb3c60

6 files changed

Lines changed: 48 additions & 0 deletions

File tree

‎scripts/layering/contracts-exports.snapshot.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@agent-device/contracts/durable-resource-envelope",
4646
"@agent-device/contracts/element-text-runtime",
4747
"@agent-device/contracts/focus-runtime",
48+
"@agent-device/contracts/fold-runtime",
4849
"@agent-device/contracts/gesture-admission",
4950
"@agent-device/contracts/gesture-input",
5051
"@agent-device/contracts/gesture-normalization",

‎src/__tests__/command-descriptor-timeout-policy.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ test('request envelopes deviating from the default are bounded, reviewed sets',
143143
reinstall: 180_000,
144144
install_source: 180_000,
145145
longpress: 210_000,
146+
// fold: one macOS helper press (30s) plus up to four bounded CoreDevice hinge reads (20s
147+
// each on a wedged host) can pass the default envelope; the policy covers that worst case.
148+
fold: 150_000,
146149
// #1774: base allocation budget (300s) + client/daemon race margin (30s).
147150
lease_allocate: 330_000,
148151
test: 'unbounded',

‎src/daemon/__tests__/runtime-binding-conformance.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { makeSession } from '../../__tests__/test-utils/session-factories.ts';
1616
import { makeSessionStore } from '../../__tests__/test-utils/store-factory.ts';
1717
import { resolveBoundBackRuntime } from '../back-runtime.ts';
1818
import { resolveBoundFocusRuntime } from '../focus-runtime.ts';
19+
import { resolveBoundFoldRuntime } from '../fold-runtime.ts';
1920
import { resolveBoundGestureRuntime } from '../gesture-runtime.ts';
2021
import { resolveBoundOrientationRuntime } from '../orientation-runtime.ts';
2122
import type { ResolvedGenericExecution } from '../request-generic-dispatch.ts';
@@ -100,6 +101,10 @@ export const conformedRuntimeBindings = {
100101
resolve: async (device, bindings) =>
101102
refusable(await resolveBoundBackRuntime({ device, ...bindings })),
102103
},
104+
fold: {
105+
resolve: async (device, bindings) =>
106+
refusable(await resolveBoundFoldRuntime({ device, positionals: ['open'], ...bindings })),
107+
},
103108
focus: {
104109
resolve: async (device, bindings) =>
105110
refusable(await resolveBoundFocusRuntime({ device, positionals: ['40', '90'], ...bindings })),

‎test/integration/command-coverage/declarations.ts‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
import {
1717
ANDROID_ACTION_BUTTON_RUNTIME_CONTRACT_EVIDENCE,
1818
ANDROID_APPLICATION_LIFECYCLE_CONTRACT_EVIDENCE,
19+
ANDROID_FOLD_RUNTIME_CONTRACT_EVIDENCE,
1920
ANDROID_HOVER_RUNTIME_CONTRACT_EVIDENCE,
2021
ANDROID_TV_REMOTE_RUNTIME_CONTRACT_EVIDENCE,
2122
ANDROID_VIEWPORT_RUNTIME_CONTRACT_EVIDENCE,
@@ -1329,6 +1330,37 @@ const COMMAND_COVERAGE_DECLARATIONS = {
13291330
'the exact-owner runtime fact refuses an Action Button press on the Linux desktop',
13301331
),
13311332
},
1333+
[C.fold]: {
1334+
androidEmulator: androidEmulator.contract(
1335+
ANDROID_FOLD_RUNTIME_CONTRACT_EVIDENCE,
1336+
'the Android runtime fact refuses a foldable hinge pose on every kind',
1337+
),
1338+
iosSimulator: iosSimulator.contract(
1339+
'packages/platform-apple/src/runtime.test.ts',
1340+
'classifies the fold fact for the %s leaf',
1341+
'the iOS simulator leaf advertises the hinge pose and binds it; a single-panel simulator is refused by the operation itself',
1342+
),
1343+
macos: macos.contract(
1344+
'packages/platform-apple/src/runtime.test.ts',
1345+
'classifies the fold fact for the %s leaf',
1346+
'the exact-owner runtime fact refuses fold on the macOS host leaf, which is not a simulator',
1347+
),
1348+
tvos: tvos.contract(
1349+
'packages/platform-apple/src/runtime.test.ts',
1350+
'classifies the fold fact for the %s leaf',
1351+
'the exact-owner runtime fact refuses fold on the tvOS leaf, which has no hinge',
1352+
),
1353+
web: web.contract(
1354+
'packages/platform-web/src/runtime.test.ts',
1355+
'clipboard, the app switcher, app events, settings and alerts carry no web bucket',
1356+
'the exact-owner runtime fact refuses a hinge pose on the web target',
1357+
),
1358+
linux: linux.contract(
1359+
LINUX_RUNTIME_EVIDENCE.path,
1360+
LINUX_RUNTIME_EVIDENCE.test,
1361+
'the exact-owner runtime fact refuses a hinge pose on the Linux desktop',
1362+
),
1363+
},
13321364
[C.installFromSource]: {
13331365
androidEmulator: androidEmulator.contract(
13341366
ANDROID_INSTALL_SOURCE_CONTRACT_EVIDENCE,

‎test/integration/command-coverage/evidence.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ export const ANDROID_ACTION_BUTTON_RUNTIME_CONTRACT_EVIDENCE: AndroidContractEvi
4444
[C.actionButton],
4545
'Android refuses the action-button fact on every kind',
4646
);
47+
export const ANDROID_FOLD_RUNTIME_CONTRACT_EVIDENCE: AndroidContractEvidence =
48+
defineAndroidContractEvidence(
49+
'packages/platform-android/src/runtime.test.ts',
50+
[C.fold],
51+
'Android refuses the fold fact on every kind',
52+
);
4753
export const ANDROID_VIEWPORT_RUNTIME_CONTRACT_EVIDENCE: AndroidContractEvidence =
4854
defineAndroidContractEvidence(
4955
'src/daemon/__tests__/viewport-runtime.test.ts',

‎test/integration/provider-scenarios/apple-platform-output-guard.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ const DRIVEN_COMMANDS: Record<string, DriveSpec> = {
127127
[PUBLIC_COMMANDS.tvRemote]: () => one(['select']),
128128
[PUBLIC_COMMANDS.appSwitcher]: () => one(),
129129
[PUBLIC_COMMANDS.actionButton]: () => one(),
130+
[PUBLIC_COMMANDS.fold]: () => one(['open']),
130131

131132
// -- orchestration (drive to an error response; still scanned) --
132133
[PUBLIC_COMMANDS.artifacts]: () => one(),

0 commit comments

Comments
 (0)