Repository navigation
feat(app): grant every permission with app.permissions: 'all' - #1918
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 22 files
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 7 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
|
FYI @okwasniewski: the iOS half of this has an upstream fix in agent-device, callstack/agent-device#4667. There, |
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Checked 3579a9a against main 6fbcb66: code, agent-device 0.21.38 internals (Android and iOS permission paths), callstack/agent-device#4667, Maestro's iOS/Android grant-all, docs and translations, CI.
The shape matches #1855 and the Android half is right. agent-device's Android all reads the declared permissions from dumpsys package, then runs pm grant on each one and appops for POST_NOTIFICATIONS. It skips non-runtime or unchangeable ones with a warning, so it grants exactly the runtime permissions in the manifest. The iOS per-service expansion without notifications has the same shape as Maestro's permissions: { all: allow }, which also expands to a per-service list and leaves notifications out. Web is a clean reuse of BROWSER_PERMISSIONS.
Must fix
-
The reference type mirrors still show the old type. A user reading the reference won't find
'all':docs/reference/config.mdx:360: theapptable type column still saysRecord<string, AppPermissionState>.docs/reference/engine.mdx:1434: theEngineAppInfo.permissionsblock is still the map only.docs/reference/mobile.mdx:1198: theLaunchPermissionsblock is still the map only.
Add
| 'all'to each one. Two of them are code blocks, so mirror those indocs/jaanddocs/zhtoo, orcheck-docs-translationsfails.
Should fix
packages/mobile/src/surface.ts:919(for (const permission of IOS_GRANT_ALL)): the iOS loop throws on the first service the runtime refuses. agent-device reports a refusedsimctl privacychange asUNSUPPORTED_OPERATION, and its own hint says support varies by Xcode runtime.camerais not insimctl privacy help, even on Xcode 27. If a runtime refuses one of the 10 names, a target withpermissions: 'all'fails everyapp.open(), when the user asked for best effort. Upstream #4667 skips a refused service with a warning. Do the same here: catchUNSUPPORTED_OPERATIONper service and continue. Or show that every name grants on an iOS 26.x runtime too (CI runs Xcode 26.6). The PR verifies only iOS 27.2.- On iOS,
'all'is now 10 sequentialsettings.updateround trips before every fresh launch (app.open,restart,clearState). Each one resolves the app and runssimctl privacy. Please report the added time per launch on a simulator. If it is seconds, that is another reason to prefer the single upstreamallonce #4667 ships. IOS_GRANT_ALLisDEVICE_PERMISSIONSminusnotifications. A future Android-only name added toDEVICE_PERMISSIONSwould then be sent tosimctland fail the launch. Either list the iOS services explicitly, or drop the list when agent-device is bumped (the follow-up you already plan).
Nits
- The changeset and
docs/reference/mobile.mdxexplain internals ("in one agent-deviceallgrant", "ignores theallservicesimctl privacy grant allrecords", "in one call"). Keep only what users see: what'all'grants per platform, and that iOS notifications still needdevice.alert('accept'). packages/core/src/config/app.ts:146:Object.entries(permissions === 'all' ? {} : permissions ?? {})reads better as an early skip of the state loop whenpermissionsis'all'.- iOS grants
location(when in use). Maestro and #4667 grantlocation-always, so'all'on iOS will change meaning when agent-device is bumped. Worth one line in the follow-up.
Verified
- Unit tests: mobile 550/550, web 357/357, e2e
config.test.ts99/99. tsc --noEmitfor core, mobile, web, and e2e, includingtests/types/sdk-types.ts.pnpm lintis clean.- Web integration
permissions.test.ts: 3/3 on Chromium. A scratch run withpermissions: 'all'on Firefox booted and opened a page with the grant. WebKit is not installed here, so it is not checked. - Mutants:
- Sending one
allon iOS too fails the new engine test. - Making web
'all'grant nothing fails both the web unit test and the integration test.
- Sending one
- Agent-device 0.21.38 source: Android
allworks as described above, and iOSallis a singlesimctl privacy grant all. That supports the cubic P1 reply:allis a valid target and the P1 is not real. The 3 doc threads from cubic are fixed at this head. - CI is green. The new
apps/mobile-benchmarktest does not run in CI (the iOS and Android deterministic jobs run the testbed suite), so its result rests on the author's local runs. - Not verified on a device: the iOS 27.2 "ignores the
allrow" claim, the iOS 26.x behavior of each service, and the Android grants.
|
Thanks for the thorough review. All of it is addressed in 60752bd. Must fix
Should fix
Nits
Verified
|
There was a problem hiding this comment.
All reported issues were addressed across 14 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
0 issues found across 7 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked at 221caba against main 847a09e. Every ask from the last review is done, and the new commits add no regressions.
- Type mirrors:
'all'is now in theapptable inreference/config.mdx, inEngineAppInfo.permissionsinreference/engine.mdx, and inLaunchPermissionsandOpenAppOptions.permissionsinreference/mobile.mdx. The ja and zh code blocks and the#permissionsprose match. - Refused iOS service:
presetPermissionsnow skips a service only when it fails withUNSUPPORTED_CAPABILITY(agent-device'sUNSUPPORTED_OPERATION). Any other error still stops the launch, and the refusal is thrown when every service is refused. Cancellation andCOMMAND_FAILEDstill propagate. - Launch cost: you measured about 4.5 s per iOS launch (median 7.3 s vs 2.8 s). That is acceptable until callstack/agent-device#4667 ships and the follow-up switches iOS to one
allgrant. IOS_GRANT_ALL: it is now an explicit list withsatisfies readonly DevicePermission[], so an Android-only name can't reachsimctl.- Nits: the changeset and reference text are written for users,
config/app.tsskips the map check for'all', and thelocationvslocation-alwayschange is noted for the follow-up.
The 3 cubic findings from 11:00 (zh #permissions prose, the OpenAppOptions mirror, the changeset wording) are real and fixed at this head. No cubic findings are open.
Verified
- Unit tests: mobile 553/553, e2e
config.test.ts99/99.tsc --noEmitis clean for core and mobile, and oxlint is clean on the changed files. - Mutants against the new engine test: always rethrowing, dropping the every-service-refused check, and skipping every error each fail it.
- Merges cleanly into main 847a09e. CI is green at this head, including the iOS and Android deterministic jobs.
- Not verified on a device: the per-service grants on an iOS 26.x runtime (the skip covers it) and the Android grants. Those rest on the author's iOS 27.2 and Android 16 runs.
Asks done, see latest automated re-check.
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Post-release check at 221caba against main 8eb3cc2: merges clean, typecheck and the PR's unit tests pass on the merged tree, CI green.
Must fix (peer floors): permissions: 'all' is a new core contract (EngineAppInfo.permissions, TargetApp.permissions, config validation in packages/core/src/config/app.ts) that is not in the published @e2e-dev/core 0.24.0 (#1763). With core 0.24.0, a config with permissions: 'all' fails with INVALID_CONFIG ... permissions must be an object, even though the installed web/mobile release documents it. Please raise the peers to >=0.24.1 <1:
packages/web/package.json:65-66(@e2e-dev/core,e2e)packages/mobile/package.json:75and:77(@e2e-dev/core,e2e)
221caba to
0a02471
Compare
|
Done in 0a02471. The |
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
Superseded by the latest automated re-check.
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked at 0a02471 against main 160cbfe. The peer floor ask is done, and the rebase changed nothing else. It merges cleanly and CI is green.
- Peer floors (the last must-fix):
@e2e-dev/coreande2eare now>=0.24.1 <1inpackages/web/package.json:65-66andpackages/mobile/package.json:75,77.check:peer-rangespasses. The changeset bumpse2e,@e2e-dev/core,@e2e-dev/mobileand@e2e-dev/webas patch, andcheck:changeset-bumpspasses. git range-difffrom 221caba: commits 1, 3, 4 and 5 are identical. Commit 2 differs only in a context line indevice.e2e.tsfrom main. The only new commit is the floor bump.
Should fix
packages/mobile/src/surface.ts:363-380and:933-956(IOS_GRANT_ALLand the iOS loop inpresetPermissions): main now pins agent-device 0.21.40, which ships callstack/agent-device#4667. On iOS, itsalltarget changes each privacy service itself: calendar, camera, contacts, location-always, media-library, microphone, motion, notifications, photos, reminders, siri. It skips a service the runtime refuses, now including the notifications "Failed to create TCC authorization record" refusal, and throwsUNSUPPORTED_OPERATIONonly when every service is refused. That is the follow-up you planned. iOS can now send onethis.permission('all', 'grant', app, signal)like Android, andIOS_GRANT_ALL, the loop, and the second engine test can go.- The JSDoc at
:925-931and the comment in the new engine test give a reason that no longer holds at this head: agent-device no longer sendssimctl privacy grant all. - If you make this change, update the
LaunchPermissionsJSDoc and its mirrors, the changeset, anddocs/mobile.mdx. iOS would grantlocation-alwaysinstead oflocation, and notifications would still be skipped on a simulator. - If you would rather keep it for the follow-up, at least fix the comment in the engine test and the JSDoc so they say why the loop stays.
- The JSDoc at
Verified
- Unit tests: mobile 559/559, web
target-app.test.ts3/3, web integrationpermissions.test.ts3/3, e2econfig.test.ts103/103.tsc --noEmitis clean for mobile and web. oxlint is clean on the changed source.check:peer-ranges,check:changeset-bumpsanddocs:check(198/198 translations) pass. - Mutants, each caught by a test:
- web:
'all'grants nothing (unit and integration) - mobile: always rethrow, drop the every-service-refused check, use the iOS loop on Android, and
assertPermissionsrefusing'all' - core: config validation refusing
'all'(after a core dist rebuild)
- web:
- CI is green at this head.
ios deterministicandandroid deterministicboth ranpermissions all grants the microphone without a system dialogand passed, on agent-device 0.21.40. - No open cubic findings. kdy1 and michal-e2e have not reviewed this PR.
0a02471 to
6082488
Compare
|
Done in 6082488, the follow-up I planned. It's rebased on main, which pins agent-device 0.21.40 with callstack/agent-device#4667. Change
Verified on an iPhone 17 Pro simulator (iOS 27.2) at this head
|
There was a problem hiding this comment.
0 issues found across 9 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
kdy1
left a comment
There was a problem hiding this comment.
Note
This text was drafted with AI and posted after human approval.
- Harnesses: T3 Code, Claude Code, Codex
- AI agents: Claude Opus 5.5 (claude-opus-5-5), coordinator and verification, in Claude Code, GPT-6.2 Astra (gpt-6.2-astra), reviewer, in Codex, GPT-6.1 Sol (gpt-6.1-sol), reviewer, in Codex, Claude Opus 5.5 (claude-opus-5-5), reviewer, in Claude Code, Claude Sonnet 5.5 (claude-sonnet-5-5), reviewer, in Claude Code
Please update the Android docs (inline on docs/reference/mobile.mdx). The other inline comment, on EngineAppInfo.permissions, is a note for @okwasniewski to decide.
The feature works. I checked these at 6082488f:
| Case | Base (1cbbeb13) |
Head |
|---|---|---|
Web Chromium permissions: 'all', clipboard (permissions.test.ts) |
grantPermissions: Unknown permission: 0 |
Pass |
iOS 27.0 simulator, agent-device 0.21.40 permission grant all on com.apple.mobilesafari |
– | 10 services granted, notifications skipped with a warning. TCC DB has the 9 TCC services at auth_value 2, and locationd has the same Authorization value as a location-always grant (4; location gives 2) |
Android 16 emulator, agent-device 0.21.40 permission grant all on an app that declares CAMERA |
– | CAMERA granted |
Also run at 6082488f: mobile engine.test.ts 249/249, web target-app and permissions 6/6, e2e config.test.ts 103/103.
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked at 40f358b against main a5d1788. The iOS follow-up and kdy1's Android docs ask are done, and I found no regressions. It merges cleanly and CI is green. One cubic finding is real and small. The only open item is kdy1's question about the engine contract, which needs a call from @okwasniewski.
- iOS in one
allcall (my last should-fix):presetPermissionsnow sends onethis.permission('all', 'grant', app, signal)on both platforms.IOS_GRANT_ALL, the per-service loop, the refused-service engine test and the outdated JSDoc are gone. I read agent-device 0.21.40's iOSall(dist/src/interactor.js). It runssimctl privacy grantonce for each of calendar, camera, contacts, location-always, media-library, microphone, motion, notifications, photos, reminders and siri. It skips a service only when simctl says "operation not permitted" ("Failed to set/grant access" or "Failed to create TCC authorization record"), so a notifications refusal no longer fails the launch. Any other error propagates, and it throwsUNSUPPORTED_OPERATIONonly when every service is refused. The behaviour the loop gave us is now agent-device's. The one visible change is locationalwaysinstead oflocation, and the changeset,docs/mobile.mdx, the reference andmigrate/appium.mdxall say so. - kdy1's Android docs ask: done in
docs/mobile.mdx, the reference bullet, theLaunchPermissionsJSDoc and its en/ja/zh mirrors, bothmigrate/appium.mdxrows and the changeset. They now say "runtime permission the app declares", say the rest are skipped, and say an app that declares none fails to launch.
Should fix
docs/migrate/maestro.mdx:171(cubic, real): this row got the "runtime permission" wording but not the caveat. Every other place kdy1 listed now has it, including the Appium row atmigrate/appium.mdx:53. A Maestro user copying the grant-all default onto an Android app that declares no permissions getsENGINE_FAILUREon every fresh launch. Add the same sentence: "An Android app that declares no permissions fails to launch with it."
Nits
packages/mobile/src/surface.ts:907-911(cubic, real but minor): this private JSDoc leaves out app ops such asSYSTEM_ALERT_WINDOW, which the public JSDoc and docs mention. Either mention them or drop the Android detail here and point toLaunchPermissions.
Verified
- Mobile unit tests pass, 558/558 (after building core, e2e and mobile dist).
tsc --noEmiton mobile and oxlint on the changed files are clean.check:peer-rangespasses, with web and mobile peering@e2e-dev/coreande2eat>=0.24.1 <1.check:changeset-bumpspasses (all patch), and so docheck:benchmark-coverageanddocs:check(198/198 translations). - Mutant: on iOS, sending
locationinstead ofallfails the engine test. - CI at 40f358b: 26 checks passed and 2 were skipped (app cache, web agent).
ios deterministicandandroid deterministicboth ranpermissions all grants the microphone without a system dialogon agent-device 0.21.40 and passed (iOS 11.99s, Android 5.91s). - There is no
surface.tssize issue to flag. The file was already over 1000 lines on main (1927), and this PR adds 9.
…sions fails with 'all' agent-device 0.21.42, which main now pins, leaves such an app unchanged under permission all (callstack/agent-device#4796), so the launch goes ahead.
|
Merged main at 7109ff9. Dropped the Android no-permissions caveat in 33a4655, since agent-device 0.21.42, which main now pins, ships callstack/agent-device#4796. Nit done in cca7544. |
There was a problem hiding this comment.
0 issues found across 7 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Re-trigger cubic
okwasniewski
left a comment
There was a problem hiding this comment.
[claude-opus-5-5] automated review on behalf of @okwasniewski
Re-checked 33a4655 (cca7544 nit, main merge 7109ff9, Android caveat removal), and trial-merged it with current main 95f80b8: no conflicts.
- agent-device claim holds: main pins
agent-device0.21.42, and callstack/agent-device#4796 (merged 2026-11-20) is the first permission fix in the v0.21.41...v0.21.42 compare. The installed 0.21.42dist/src/mechanics.jshas the newinstall permissions:check, andpermission allon an app that declares nothing now returns the warning "declares no permissions, so none was changed" instead of throwing. It still throws "Could not read declared permissions" only when the dump is cut short. So removing the caveat fromdocs/reference/mobile.mdx,docs/mobile.mdx, the Maestro and Appium rows, the ja/zh type blocks andLaunchPermissionsinpackages/mobile/src/options.tsis correct. - Main merge 7109ff9: the only overlap is
packages/core/src/config/app.ts, where main's...engineLaunchArguments(launchArguments)and the PR's...enginePermissions(permissions)both survive invalidateAppandengineAppInfo, plus theEngineAppInfoimport insdk-types.ts. Apart from the caveat edits, the PR's diff against its merge base is the same as at aec6eae. - cca7544: the
unknownPermissioncomment now names which refused types'all'can skip, which was my last nit. - Peer floors: web and mobile need
@e2e-dev/coreande2e>=0.25.0 <1, which matches the next release. - cubic found 0 issues in the new commits.
Must fix
- None.
Should fix
- None.
Verified
- On the trial merge with main 95f80b8: core, e2e, web and mobile build and typecheck. oxlint is clean on the changed sources.
check:peer-rangesandcheck:changeset-bumpspass, and no added line has an em or en dash. - Tests: e2e
config,engine-protocolandschema-fixtures212/212, webtarget-app4/4, mobileengine.test310/310. - CI at 33a4655: all green, including
testx5,check,bunx2,installx2, and ios/android deterministic. mergeable_state isclean.
The only thing left is kdy1's thread on packages/core/src/engine/index.ts, which waits on a maintainer: whether one optional engine flag (grantsAllPermissions) and one optional EngineAppInfo.allPermissions field can ship as a patch. Once that is answered and the thread is resolved, comment /ready.
michal-e2e
left a comment
There was a problem hiding this comment.
Drafted by an AI agent and posted autonomously on Michal's behalf, without him reading it first.
Reviewed at 33a4655a1 (merge base 2b3bab0f6, main).
Nothing here blocks the merge. What is left is the maintainer's to decide: kdy1's open thread, the browser scope, and when this lands relative to the 0.25.0 release (see "For the maintainer"). Thanks for the careful rounds on this, @imranbarbhuiya. Moving 'all' to allPermissions behind grantsAllPermissions means an engine that has never heard of 'all' gets a clear config error instead of a string it would read as a map.
Must fix: none.
Optional
- A
desktop()target withpermissions: 'all'is told to do something it cannot. I ran it on the built packages: config load saystarget "mac" app.permissions is 'all', which engine "desktop" does not take (it declares no grantsAllPermissions); name each permission instead, or upgrade an engine released before 'all'. Butdesktop()refuses a named map too (declares app.permissions, which a desktop() target cannot set). Can the message stop at "does not take'all'", or let the engine's ownvalidateAppspeak first?packages/core/src/config/app.ts:162 - The web guide promises more than the fallback does. It says "An older browser attached over CDP that refuses a name as unknown (such as
local-network-access) gets the rest of the list." The matcher only skips names whose CDP type is the camel-cased web name, so a refusedwakeLockScreen,sensors,videoCaptureorclipboardSanitizedWritestill fails the attempt. Your code comment already says this. Please narrow the sentence the same way, for example "An older Chrome attached over CDP that does not knowlocal-network-access,storage-accessorlocal-fontsgets the rest of the list."docs/web.mdx:300 - Nothing tests that the surface turns the fallback on for
'all'. I changedthis.app.allPermissions === truetofalsehere and every web test still passed, sincetarget-app.test.tscallsgrantPermissionsdirectly. Can we add a test that bootsweb()withallPermissions: trueon a context that refuses one name, and checks the attempt still starts?packages/web/src/surface.ts:595 - Two test inputs the runner never sends. The mobile manifest test passes
validateApp(app('all'))andapp('every'), but config load hands an engine{ allPermissions: true }and never the string. TestingvalidateApp({ bundleId, allPermissions: true })would match the real path. On the protocol side,launchArgumentValueshas a loopback test that carries the value intoprepare(engine-protocol.test.ts:633).allPermissionshas no such test, and nothing checks thatmanifestMismatchcompares the new flag: I droppedgrantsAllPermissionsfromcomparable()and no test failed.packages/mobile/tests/unit/engine.test.ts:188,packages/core/src/engine/protocol/manifest.ts:86 - The
launch()reference still describespermissionsas "Permissions to grant or deny."launch()takes'all'too, since it resolves the app through the same config check. A link to config would cover it.docs/reference/core.mdx:101
Verified
-
The five asks from the claim on #1855 hold at this head.
'all'sits next to the map, with the default still grant-nothing. On a device it is sent before each fresh launch, and for onedevice.openApprelaunch. Permissions a platform cannot set are skipped, not failed. Tests, docs and a changeset are in. -
Merging into today's main (
a51e472c3) gives no conflicts (git merge-tree, exit 0). -
Wire contract: the producer (
describeEngine), the schema and the valid fixture all carrygrantsAllPermissions. The invalid fixture is unchanged, as withlaunchArgumentValuesin #1903. Its test pins it to exactly one error, and the non-boolean case is tested inengine-protocol.test.ts. -
app.permissions: 'all'end to end, merge base against this PR:main this PR mobile()target: reset the microphone,app.restart(), request itINVALID_CONFIG, must be an objectno system dialog, "Microphone enabled", on the iOS simulator and the Android emulator @e2e-dev/web0.16.1 from npmINVALID_CONFIG, must be an objectINVALID_CONFIG: engine "web" declares nograntsAllPermissions, exit 2desktop()INVALID_CONFIG, must be an objectINVALID_CONFIG: declares nograntsAllPermissionsThe
mobile()row used the benchmark config withpermissions: 'all'on each target, and a scratch test. The main column formobile()is the same core check I ran forweb()anddesktop()on the merge base. With'all'dropped from what the engine reads at launch, the same test hits the system dialog on Android and fails. -
Browsers, one run each:
web({ browser })withallPermissions: true. I read the geolocation permission state after the first open, afterrestart()and afterreset(). It wasgrantedall three times on Chromium, Firefox and WebKit. The PR body said Firefox and WebKit were not run. -
Devices: the full mobile benchmark at this head ran on an Android 15 (API 35) emulator and an iOS 27.2 simulator (iPhone 17e). Your new test "permissions all grants the microphone without a system dialog" passed on both, and again on a second iOS run.
- Android: every test passed.
- iOS: 8 failed, all in
device-fixture,deviceandflows-lists. Six of them also fail at the merge base on the same simulator and app: the four keyboard-dismissal tests,setOrientation, and the web view coupon. The other two,closeAppand "allowing the system dialog", passed when I reran the same files at this head. None of the failures reach the permission code. - The
SYSTEM_ALERT_WINDOWline in the docs: on the emulator, a directpm grantof it (the call agent-device makes for each declared permission) changedgranted=falsetogranted=truefor an app that declares it. I did not drive it through agent-device, and that app's app-op already readallow.
-
Suites at
33a4655a1, run here:pnpm checkpasses.- Every workspace package's tests pass, as does
test:scripts. That includes core, e2e (371 s), web (1,065 passed, 1 skipped) and mobile (633). - Testbed: 607 passed, 1 skipped. Every test ran, since no
--changed-sincewas passed. - Web benchmark: 95 of 95.
- Recorded web agent tests (control inventory and login form) with
--strict-cacheand no model key: 8 of 8. - One web test timed out once:
cdp-recovery.test.ts"masks password fields ... before and after reconnect", with the load average around 20 on 18 cores. It passed in a rerun of the whole web suite, and on its own at this head and at the merge base. It sets noapp.permissions, so it never reaches the changed code. I class it as flaky under load. - Your runner with the published
@e2e-dev/web0.16.1 passes a browser test, so an engine released before this change keeps working.
-
New tests: 6 added. The 5 unit and integration tests fail on the merge base and fail under at least one mutant. The benchmark test passed at this head and failed on Android when the engine resets instead of granting for
'all'. Two type assertions insdk-types.tsfailtscunder a mutant: line 248, the'every'rejection, and line 274,allPermissionsastrue. -
Mutation testing: 20 places this PR adds or changes a branch, 25 mutants. 18 were killed by a failing assertion, run with each mutant applied to
33a4655a1.- Two survived. One is the surface fallback flag, the other the
comparable()field. Both are optional findings above. - Three more failed in another way: dropping the unknown-name skip, the camel-case match, or the
clearPermissions()before the retry. They made the older-Chrome unit test throw outside itsexpect, so the test still caught them. - Two mutants of the config check did not compile, and I rewrote them. Both rewrites were killed.
- One type mutant, dropping
'all'fromTargetApp.permissions, does not compile, so the positivepermissions: 'all'line insdk-types.tshas no mutant. - Two places have no mutant: the end of the retry loop when every name is refused, and the
engine !== undefinedguard in the config check.
- Two survived. One is the surface fallback flag, the other the
Not run
- An older Chrome over CDP that does not know
localNetworkAccess. No such Chrome here, so the "Unknown permission type" text the fallback matches is Source-reported. The unit test's fake uses the same text. - Your engine with the oldest runner its peer range allows: the floor,
e2e0.25.0, is not on npm yet. The same holds on main. - A physical iPhone or Android phone, and the hosted device and browser providers, with
'all'. - The unrecorded web agent scenarios and the mobile agent suite. Both need a model key.
- Launch time with
'all': on iOS, agent-device runs onesimctl privacycall per service, 11 in all, before every fresh launch. Not measured.
Accepted as intended
- The invalid manifest fixture is unchanged.
schema-fixtures.test.tspins that fixture to exactly one error (uniqueItemsat/actions). #1903 addedlaunchArgumentValuesthe same way, andengine-protocol.test.tsrefusesgrantsAllPermissions: 'yes'.
For the maintainer
- @kdy1's open thread on
packages/core/src/engine/index.ts: can an optionalEngine.grantsAllPermissionsand an optionalEngineAppInfo.allPermissionsship as apatch? Both are additive. An engine without the flag gets a config error for'all'and nothing else changes for it.AGENTS.mdsays a0.xfeature is apatch. The call is yours. - Browser scope: #1855 asked whether
'all'should coverweb()targets, and the assignment did not answer. This PR grants each browser's whole list (camera, microphone, clipboard, notifications, local network access and more on Chromium) to every origin of the attempt. DroppinggrantsAllPermissions: truefromweb()makes config load refuse'all'there. - Release order:
web()andmobile()now passgrantsAllPermissionstodefineEngine. A@e2e-dev/corewithout this change rejects that key as unknown, for every config and not only ones using'all'(the literal key check inmanifest.ts). The peers already read>=0.25.0, and the next release is 0.25.0 (four pendingminorchangesets on main), so this holds if it lands before 0.25.0 is cut. If it lands later, the floors need raising. - #2147 (
file:app URLs) and this PR edit the same two lines ofpackages/core/src/config/app.ts: thevalidateAppcall and the return ofengineAppInfo.git merge-treereports a conflict there. Whichever lands second keeps both.
The findings are mine; the approval is @okwasniewski's.
…s-all # Conflicts: # packages/core/src/config/app.ts
desktop() refuses a named permissions map too, so telling its target to name each permission sent the user to a second error.
…AllPermissions in the manifest
There was a problem hiding this comment.
0 issues found across 9 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Re-trigger cubic
|
Merged main at 284d6b7 (merge commit, no rebase). The only conflict was the two lines you predicted in
|
|
🤖 Gemini 4 Neon responding on behalf of @KrzysztofMoch The rebase and conflict resolution in One docs fix left before merge: Please drop the
Once that's updated (and the open thread on |
agent-device 0.21.42 sends declared permissions other than notifications and photos through pm grant, which skips SYSTEM_ALERT_WINDOW as not changeable.
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.
View guided diff | Re-trigger cubic
|
🤖 Gemini 4 Neon responding on behalf of @KrzysztofMoch Pushed the |
|
/ready |
|
@KrzysztofMoch, a note for the record on Settings → Display over other apps then listed the app as "Allowed", and "Not allowed" again after The merged docs are still correct, since they don't mention it. The part that was wrong before was "app op": agent-device grants the permission and never sets the app op. If you want the docs to say that |
- mobile and web: permissions: 'all' grants every permission the platform or browser can set (e2e-inc#1918) - mobile: a DeviceProvider can install the app through the lease's daemon with installLeasedApp (e2e-inc#2224)
What and why
app.permissionstakes'all'as well as a map: grant every permission the target's engine can grant. Nothing is granted unless the target asks, and a map works as before.mobile(): permissions are set before each fresh launch (app.open(),app.restart(),app.clearState()).device.openApp(app, { relaunch: true, permissions: 'all' })does the same for one launch.permission all grant, which agent-device expands itself.INTERNET, are skipped. A loop overDEVICE_PERMISSIONSwould fail on a permission the app doesn't declare. An app that declares none launches with nothing changed (agent-device 0.21.42, which main pins).always. The simulator refuses to setnotifications("Operation not permitted", the same as naming it today), so that prompt still needsdevice.alert('accept').web(): every name inBROWSER_PERMISSIONSfor the target's browser. A browser older than that list (a CDP attach to an older Chrome) refuses the whole grant over one type it doesn't know; for'all'the names it reports as unknown (localNetworkAccess,storageAccess,localFonts) are left out and the rest granted. A named grant keeps the refusal.grantsAllPermissions: true(indefineEngine, the protocol manifest and its schema) and receivesEngineAppInfo.allPermissions: true, soEngineAppInfo.permissionsstays a map of names. For an engine that doesn't declare it, including a@e2e-dev/webor@e2e-dev/mobilereleased before this change, config load refuses'all'withINVALID_CONFIGinstead of handing it a string it would read as a map.Browser targets: the claim asked whether
'all'should cover them or stay mobile-only. I made it grant the browser's whole list. If you'd rather keep it mobile-only, droppinggrantsAllPermissions: truefrom the web engine is a one-line change, and config load then refuses'all'on aweb()target.Issue
Part of #1855, item
app: { permissions: 'all' }under Device and app. @okwasniewskiVerified
Ran it locally: yes, on an Android 16 emulator (Pixel 9), an iOS 27.2 simulator (iPhone 17 Pro) and Chromium.
Android, an app that declares no permissions: the
examples/with-composeapp, built with itsDYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSIONremoved so the manifest has no<uses-permission>at all.dumpsys package dev.e2e.examples.composeprints no declared, requested or install permissions section, and an emptyruntime permissions:block. Its three deterministic tests, run withapp: { bundleId: 'dev.e2e.examples.compose', permissions: 'all' }, pass:The unmodified example app, which requests only that non-runtime permission, passes the same three tests with
'all'.Android, an app that declares runtime permissions:
com.android.camera2, with location and notifications reset first. After a run withapp.permissions: 'all',dumpsys packageshowsPOST_NOTIFICATIONS,ACCESS_FINE_LOCATIONandACCESS_COARSE_LOCATIONgo fromgranted=falsetogranted=true.CAMERAandRECORD_AUDIOwere granted by default and stay granted.iOS simulator: an installed app with no TCC entries, run with
app.permissions: 'all'. The run wroteauth_value2 (allowed) to TCC.db forAddressBook,Calendar,Camera,MediaLibrary,Microphone,Motion,Photos,RemindersandSiri, and rewrote the app's location authorization, which agent-device grants aslocation-always. The BulletinBoard store has no entry for the app afterwards, so notifications stay unset. That's why the docs say to accept that prompt withdevice.alert('accept').Benchmark test:
apps/mobile-benchmark/tests/device.e2e.tsgetspermissions all grants the microphone without a system dialog. It resets the microphone, relaunches withpermissions: 'all', and taps the Permission Prompt scenario's request button. It has to reach "Microphone enabled", so a system dialog fails it.Web:
packages/web/tests/integration/permissions.test.tspasses in Chromium (3 of 3), including the'all'clipboard round-trip. I didn't run Firefox or WebKit; their lists are the existingBROWSER_PERMISSIONS.Checks:
pnpm checkpasses.allgrant is dropped, when the web list isn't expanded, when web stops leaving out a name an older browser doesn't know, and when config load stops refusing'all'on an engine withoutgrantsAllPermissions.Checklist
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it..d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures.e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.