Repository navigation
fix(core): allow spaces in a launch argument name - #2363
Conversation
🟢 e2e web: 95 passedAll 95 tests in 43 files
Tested by e2e 0.25.0 · 1m 1s · web · run artifacts |
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 25 model calls · 133.4k tokens (95% cached) · $0.0051 All 34 tests in 5 files
Tested by e2e 0.25.0 · 1m 29s · web · run artifacts |
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 46 model calls · 298.7k tokens (86% cached) · $0.0176 All 20 tests in 1 file
Tested by e2e 0.25.0 · 5m 48s · android-emulator · run artifacts |
MicrobenchmarksFor ⚪ No case changed by 0.5% or more. Repeatability: two builds of the head agree in every case, 10 trials each. Base A direction is reported only when the trial ranges of base and head do not overlap and the change is at least 0.5%. 4 unchanged cases
How this is measuredInstructions per iteration: the difference between a run of N and of 3N iterations, divided by 2N, so startup, loading, warmup, and compilation cancel. 5 trial(s) per case and checkout. Lower is better. Machine: linux x64, AMD EPYC, Node v26.13.1, valgrind-3.22.0, ASLR off.
Workflow run: each job's summary, and |
🟢 e2e android: 68 passed, 1 skippedAll 69 tests in 8 files
Tested by e2e 0.25.0 · 10m 40s · android-emulator · run artifacts |
🟢 e2e ios: 67 passed, 1 skippedAll 68 tests in 8 files
Tested by e2e 0.25.0 · 8m 33s · ios-simulator · run artifacts |
🟢 e2e ios agent: 21 passed, 1 skipped25 agent steps · 12 replayed from cache · 65 model calls · 482.7k tokens (84% cached) · $0.0299 All 22 tests in 1 file
Tested by e2e 0.25.0 · 8m 37s · ios-simulator · run artifacts |
Marks the mobile spaced-name test as characterization: it passes on main.
What
The object form of
app.launchArgumentsaccepts a name with spaces inside it:A name with a control character, a space at either end, or whitespace other than a space still fails with
INVALID_CONFIG.Why
AppKit autosave names produce user-defaults keys with spaces, such as
NSSplitView Subview Frames <name>. The object form refused any whitespace in a name, so such a key could only be written in the list form.Neither #1903 nor its review threads give a reason for the rule. I traced every consumer of the object form to see whether a space can split a name:
appleUserDefaults(core)-${name}as one array itemdesktop()Command::new("/usr/bin/open") ... .arg("--args").args(...), no shell (crates/e2e-desktop-napi/src/launch.rs:167)mobile()iOS simulatorsimctl launchargvmobile()iOS device--ondevicectl device process launchmobile()Android['--es', name, value]; agent-device 0.21.43 single-quotes everyadb shellword outside[A-Za-z0-9_@%+=:,./-]The list form and object values (
"a b",(fr, en-GB)) already carried spaces through every one of these paths, so a spaced name adds no new kind of input.How it works
checkLaunchArgumentsrefuses a name with a control character or whitespace other than U+0020, then a name with a space at either end (packages/core/src/internal/launch-arguments.ts:45). Before, it refused any\s.docs/reference/config.mdxanddocs/reference/engine.mdxstate the new rule.Issue
From a teammate's findings report on the desktop engine; no GitHub issue. No Linear tool in this session, so the title carries no ticket id.
Verified
Ran it locally: yes
launchArguments: { 'NSSplitView Subview Frames Main': ['0, 0, 200, 600'], e2e: true }to the testbed target, and a test that opens the app and reads the launched process's argv throughsysctl KERN_PROCARGS2.INVALID_CONFIG:target "macos" app.launchArguments argument name "NSSplitView Subview Frames Main" must have no whitespace or control characters./p "-NSSplitView Subview Frames Main" '("0, 0, 200, 600")'reads the array back fromUserDefaults.standardunder that key, soNSUserDefaultsparses a spaced name.