refactor(shell-quote): one implementation, reached through the runner host port - #2595
Conversation
… host port Closes #2525. The Android perf copy is a direct import swap to @agent-device/host-kit/command, which platform-android already uses for shellQuoteIfNeeded. The apple runner copy goes through AppleRunnerHost because R77 (apple-runner-host-port) forbids a value import of host-kit from runner/**, and runner/ sits in the eager closure of seven Apple facades.
Size Report
Startup median (7 runs, lower is better):
|
|
Looks good at 37b1eca. Both deleted copies match |
|
|
Rerun confirms it. The failed iOS job on the same head Worth noting for whoever owns the runner suite: |
…tle-on-exit-2522 * origin/main: perf(scroll-until): answer every candidate from one visibility index (#2596) refactor(daemon): resolve device interactors through a composed capability (#2593) refactor(daemon): stop the client value-importing daemon internals (#2559) (#2594) refactor(shell-quote): one implementation, reached through the runner host port (#2595) docs(agents): delete the file-size tiers nobody enforces (#2597) fix(daemon): key the implicit session by workspace and platform (#2587) refactor(cli-schema): orient the schema layer above commands (#2543 step 3) (#2590)
Summary
Closes #2525. Two byte-identical
shellQuotebodies went away, leavingpackages/host-kit/src/internal/shell-quote.tsas the only implementation. 5 files, no behaviorchange and no new module.
platform-android/perf-native-artifacts.ts: the exported copy is deleted and both call sites,plus
perf-native-simpleperf.ts, importshellQuotefrom@agent-device/host-kit/command—the subpath three sibling Android modules already use for
shellQuoteIfNeeded.runner/runner-lease.ts: goes through theAppleRunnerHostport (runner/host.ts, bound incore/runner-host.ts), not a runner-local const, because R77 (apple-runner-host-port) forbids avalue import of host-kit from
runner/**andrunner/sits in the eager closure of seven Applefaçades.
grep -rn "replaceAll(\"'\"" packages srcnow returns the canonical implementation pluspackages/xml/src/internal/entities.ts, which escapes'for XML and was never a shell quoter.Validation
Tested at
37b1eca498.pnpm check:affected --runpassed (format, lint, typecheck, layering,fallow, 420 related test files / 2,899 tests), so no device run applies.
runner-session.test.tsalready pins the quoted hint text
AGENT_DEVICE_STATE_DIR='/tmp/agent-device-owner'for the Applepath, and it passes unchanged;
shell-quote.test.tspins the canonical output. GitHub staysauthoritative for coverage and provider integration.
First gate run failed on
runner-client.test.ts :: ensureXctestrunArtifact aborts only the disconnected request build(5.0s timeout). Perdocs/agents/testing.mdit was host contention:that test passes alone in 113ms at the same commit and the full rerun above is green.