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
{{ message }}
Repository navigation
Commit 181a0f9
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(ios): declare runner screen-capture facts at the owning contract (#2813)
* refactor(ios): declare runner screen-capture facts at the owning contract
#2728 asked for the runner's display facts at the owning cross-language contract,
not by per-consumer casts. The wire key was a TypeScript literal and the shape a
Swift struct pinned only by two hand-written Swift encode tests, so every consumer
restated a shape it did not own.
Move the read to packages/contracts/src/screen-capture-contract.ts and record the
wire key plus two measured Duo poses in the golden table
contracts/fixtures/screen-capture-metadata.json. The table names no field of its
own: this module's reader and ScreenshotMetadataPayload stay the only two
declarations of the shape, and each language decodes the table through its own, so
a renamed or dropped fact fails both lanes. The vitest twin asserts the host reads
exactly the facts a capture recorded and refuses anything that cannot describe one.
Negative control on a booted iPhone Duo: renaming pixelsPerPoint in the table alone
turns both lanes red, Swift with DecodingError.keyNotFound at
captures[0].metadata and vitest by refusing the payload.
* docs(adr-0025): record what the shipped capture encoder owes
The capture-surface section still said a normalization "owes a rotation and a
crop". The redraw that landed pays the rotation at the image's own logical size
and scale and deliberately takes no crop, so the one-pixel difference between a
runner capture and a simctl export stays rather than being stretched away.
Narrow the sampling-path evidence gap to what was never exercised: keyboard
settling and the navigation fallback each have a recorded lit-panel observation
from #2741, so only a pose change under the sampler, and screen recording at all,
remain open.
Drop the Device Hub and host Accessibility requirement from the Duo fixture docs.
`fold` drives the hinge through simulator HID, and device-hub-window-missing is
named by no production code any more.
* chore(gates): put the screen-capture contract on the per-PR lane
Declare the new contracts subpath in the exports map and regenerate the R11
contracts-exports snapshot from it. Add the golden-table encode test and its
no-facts sibling to the ios.yml -only-testing list, so cross-language drift on
this key fails a pull request instead of waiting for nightly; the PR list now
selects 101 methods with no dark tests.
"comment": "Cross-language golden table for the display facts one Apple runner capture reports about the image it encoded (#2728). The vitest twin is packages/contracts/src/screen-capture-contract.test.ts and the Swift twin is UnitTests/RunnerTests+AppScreenCaptureTests.swift, which decodes and re-encodes every capture through the production ScreenshotMetadataPayload — so a renamed or dropped fact fails both lanes. This table deliberately records no field list: the Swift struct and the TypeScript reader are the only declarations of the shape. Add a measured capture here, never to one suite.",
3
+
"key": "screenshotMetadata",
4
+
"captures": [
5
+
{
6
+
"name": "Open Duo, resolved inner panel LCD-1: the window is 951x669 pt on display 3 and the upright encoding is one pixel per axis under the 2853x2007 CoreDevice calls the panel",
7
+
"metadata": {
8
+
"displayID": 3,
9
+
"pixelWidth": 2852,
10
+
"pixelHeight": 2006,
11
+
"pixelsPerPoint": 3
12
+
}
13
+
},
14
+
{
15
+
"name": "Closed Duo, outer panel LCD: the same command following the app onto the other panel, reported by the window that moved with it",
0 commit comments