chore: delete dead tap-by-text runner arm and settledAfterMs; hint on tiny stable trees#1089
Merged
Conversation
… tiny stable trees - Remove the runner .tap text arm: the daemon only ever sends selectorKey/selectorValue or x/y taps (src/platforms/apple/interactions.ts), and daemon+runner ship in lockstep. findElement(app:text:) stays for the findText probe. - Drop settledAfterMs from the wait stable result: it always equaled waitedMs and never shipped in a release (v0.18.3 predates #1059). - Add a loading hint when wait stable settles on a tree with fewer than 5 nodes (#1078): stability on a nearly-empty tree is a weak readiness signal. Refs #1078
Member
Author
|
Reviewed by diff (suites already gated by the author; host is busy running the react-navigation replay suite, CI will re-confirm). All five items check out:
LGTM pending CI. |
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
Member
Author
|
Readiness update: prior review found no actionable blockers, and GitHub checks are now green (21/21). Added ready-for-human. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dead-code/polish pass (tier-1 items from the dead-code audit). Refs #1078.
Changes
1. Delete the runner tap-by-text arm
The
.tapcase'sif let text = command.text { ... }branch inRunnerTests+CommandExecution.swiftis dead: the daemon only ever sendsselectorKey/selectorValueorx/ytaps (src/platforms/apple/interactions.ts), and daemon + runner ship in lockstep. ThefindElement(app:text:)helper stays — thefindTextprobe still uses it. The tap fallthrough error message now says "tap requires a selector or x/y".The
text?field onRunnerCommand(runner-contract.ts) is a shared flat field legitimately used bytype/findText/readText, so the contract type is unchanged.2. Delete
settledAfterMsfrom the wait stable resultIt always equaled
waitedMsand has never shipped: the latest tag (v0.18.3) predates the wait-stable merge (#1059, ab55db0 is inv0.18.3..HEAD; no tag contains it). Removed fromWaitCommandResult, thewaitForStablereturn,toDaemonWaitData, and the test assertion. No client-types/docs references existed.3. Tiny-tree hint for wait stable (#1078)
When
wait stablesettles on a tree with fewer than 5 nodes, the result now carries:toDaemonWaitDatapasses the hint through. Tests: 3-node settle asserts the hint; 6-node settle asserts nohintkey.4. interaction-common.ts sweep
Audit-only outcome: after #1083, everything still exported from
src/daemon/handlers/interaction-common.ts(finalizeTouchInteraction,ContextFromFlags,InteractionHandlerParams) has 3-4 consumers each. Nothing single-consumer or dead;fallow audit --base origin/mainand--gate allreport no issues. No code change.5. GENERIC_EXIT_MESSAGE audit (no code change)
The
GENERIC_EXIT_MESSAGEreplacement branch insrc/kernel/errors.tsis still load-bearing post-#1074:createExitError(src/utils/exec.ts:334sync path,:684async spawn close path) remains the default failure shape for every non-allowFailureexec and produces exactly"<tool> exited with code N"withprocessExitError: trueviaexecFailureDetails. The branch is NOT deletable.Verification
pnpm format:check && pnpm typecheck && pnpm lintpnpm exec fallow audit --base origin/main— no issuespnpm exec vitest run src/commands src/daemon src/contracts— 142 files, 1229 testspnpm exec vitest run test/integration— 27 files, 89 testsswiftc -parserequest-handler-catalog.test.tsand the doctor integration scenario timed out once each under heavy host load (load avg >60); both reproduce on origin/main and pass on retry — the known flaky-under-contention pattern, not a regression.