refactor: migrate wait to request-bound runtime
Summary
Migrates wait from legacy capability admission to the request-bound selector runtime, stacked on #1877.
The final ownership correction keeps one admission/binding seam while splitting its declarations by command intent:
isadmits capture only.getand read-onlyfindadmit capture plus the preferredreadTextAtPointoperation.waitadmits capture plus the fact-conditionalfindTextandfindSelectorobservations.
An owner can therefore advertise a wait-only observation without making unrelated get, is, or find commands depend on its implementation. wait still fails closed when its owner advertises an observation without implementing it. Duration-only waits inspect and bind nothing; native misses fall through to the same admitted capture; recording, replay, landmarks, @ref, cancellation, and public response shaping retain the canonical paths.
The tightening pass removed the broad three-operation selector projection and its three pass-through bind helpers. The remaining intent-specific projections are the only construction paths, and the main snapshot binder was split before it crossed the complexity budget. No legacy/capability fallback or compatibility branch was retained.
The full stacked PR is 76 files, +2,507/-841. Excluding tests, docs, and scripts, it is approximately +1,026/-410; that growth is the request-bound runtime contract, owner facts/implementations, admission/binding, and the removal proof for the old execution path. This correction is 14 files, +282/-92 total and approximately +217/-76 production. The smaller shared-use design was rejected because it made commands depend on operations they never execute; the smaller untyped projection would allow that owner/use mismatch to recur.
CLI grammar, flags, help, response shape, and user-visible behavior are unchanged. Skills are unchanged because this is internal runtime ownership, not command guidance.
Validation
Exact stack:
-
#1877 base:
7d3e5e6e48a4ae5e2f41945a5b8d892c7573acff -
this PR head:
8e6bb5a0b1696213d0db458527d4eb4825bd0858 -
Planted red: temporarily routing
find,get, andisthrough the wait-observation use made all three new regressions fail withRuntime owner advertised findText without an implementation; the dedicatedwaitrejection remained green. Restoring the intent split made all cases green. -
Focused runtime tests: 5 files, 38 tests passed.
-
pnpm typecheck: passed. -
pnpm check:layering: 181/181 passed; every migrated command retains one platform-execution route. -
pnpm check:fallow --base origin/main: no new dead code, duplication, or complexity findings. -
pnpm check:affected --run && git push: all runnable checks passed on the committed tree. Affected coverage ran 649 files / 5,174 tests; changed-line coverage was 218/221 (98.64%) and changed-branch coverage was 181/195 (92.82%). Build, package, provider integration, wire compatibility, gate ownership, and mutation-model checks passed.
The exact-head GitHub and Size jobs were triggered by the push and are intentionally not awaited here. Their device/toolchain results remain GitHub-authoritative.