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 c1ac863
Browse filesBrowse the repository at this point in the historyBrowse files
fix(open): admit launch-only options before the lifecycle touches the device
Review round on #3928 (thymikee, second pass). A refused open still changed the
device first: the owner refusal ran inside invokeApplicationOpen, after the
relaunch close (closeBeforeRelaunch on Limrun/webdriver), the runner stop, and
the runtime-hint write. `open <app> --relaunch --capture-network` on a
provider iOS simulator killed the running app and then failed.
- One admission step: contracts `assertOpenAdmitted(binding, execution)` is the
whole rule for `--launch-console` and `--capture-network`. It is the first call
in openDirectApplication, openAndroidApplication and openAppleApplication, so
an owner that cannot honor the option is refused with UNSUPPORTED_OPERATION
before any device action. It replaces the nine
`supportsLocalSimulatorLaunch` pass-through sites and the four stacked
refusals in the canonical open; `invokeApplicationOpen` keeps only its
positional, URL, and argument-shape checks.
- Both refusals carry a typed reason (`launch-console-owner-unadmitted`,
`network-capture-owner-unadmitted`), matching the sibling
`provider-runtime-interactor-missing` posture. Their messages stay module
constants of the module that raises them, clear of any function's JSDoc (the
shared message home's facade must stay exhaustive, and a re-export no
consumer imports is dead code).
- The provider-shaped contract test now opens with `relaunch: true` against a
`closeBeforeRelaunch: true` owner and asserts the typed code and reason and
that neither open nor close ran. A second case pins the same typed refusal for
a local binding on a non-simulator device.
- A probe file at its 32 MB cap no longer reads as current traffic: the capture
read reports `atSizeCap` (the reader owns the cap constant mirroring the
probe's AdMaxFileBytes) and the probe-mode dump says the window stopped
recording. The cap check reads the handle offset through `getOffset:error:`
instead of the raising `offsetInFile`, per ADR 0037 rule 6.
- ADR 0037 rule 1 now states admission-before-device-action, rule 6 the cap
note and the offset API, and rule 5 fixes Apple dump precedence — probe, then
provider, then app-log — as the answer to the #3930 Metro question.
Live evidence re-run at this head on ios-sim-net: one open with
--capture-network --launch-console produced source=probe with five distinct
httpbin URLs, a 10-line console log, masked Authorization/Cookie with X-Trace-Id
kept, zero secret occurrences in network.jsonl; `open --relaunch
--capture-network` on the local simulator stays admitted (relaunch close, then
capture, dump still probe); a non-admitted open refuses with
UNSUPPORTED_OPERATION and reason network-capture-owner-unadmitted.
0 commit comments