refactor(platform-apple): collapse the runner client chain and merge the command trait table
Merged
TH
2mo ago+167+167+012345678901234567890123456789-291-291-012345678901234567890123456789
Summary
Closes #2793. An internal refactor of the runner client in packages/platform-apple (12 files, +167/ā291). Runtime behavior is unchanged.
core/runner-client.tsbinds the host and re-exports the operations from their owning modules.runner/client.ts, whose factory and never-readrunnerLeaseCleanupAdapteronly forwarded calls, is deleted. Plain re-exports don't trigger TS2883, so theAppleRunnerClientannotations are gone.- Removed the unused
providerparameter ofresolveAppleRunnerProvider. RUNNER_COMMAND_TRAITSis now oneRecord<command, traits>.alertstays a function, and the Swift table is left alone.- The stale fallow entry is removed in
chore(gates).
Where the issue differs from current code:
- The manifest file had already moved into
runner-command-traits.ts, but it still had two tables, which this PR merges. - No test covered the dead parameter.
- ADR 0023's trace is pinned to
27a97ee619, so I left it unchanged.
Validation
Tested SHA 06ec3c651d:
pnpm build,check:layering,check:production-exports,check:fallow, andcheck:affected --runall pass (vitest 3003/3003).- Diffing the runner subpaths' dist-types before and after shows identical resolved exports. Only a doc comment changed.
- Planted mutations in the trait table and in the reader fail the group test.
- No device run: nothing on the device path changed.
- Adversarial review: fixed 3 findings (test independence, evaluation-order doc, error hint). Rejected 5 (hypothetical
sideEffects, the ADR is pinned to a commit, trait objects were already shared, the composition root is not a barrel, and the guard is needed).
š¤ Generated with Claude Code