Repository navigation
refactor(runtime): compose typed file search and listing ownership - #27396
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The added change-scope assertion matches the classifier’s behavior; no merge-blocking issue is established. Pre-merge checks |
|
#27396 deleted the write-only registry that consumed it; nothing sets the option now, and its doc comment implied a cancellation path that no longer exists.
ELI5
File search and listing behave the same, but engineers can now find their implementation and mobile cache in one checked service instead of following mechanically split inheritance. This is the first runtime ownership pilot after SSH relay retirement.
What Changed
RuntimeFileSearchwith workspace resolution and store access as its only host dependencies. Preserve the runtime's existing command API and delegate to this owner.@ts-nocheckentries. Check the surviving file-access facade and mobile read implementation too.Why
Composition gives search one owner without packaging the entire unchecked runtime. Reusing providers and the existing cache avoids parallel implementations. Lifecycle changes, file grants, watchers, mutations and CI selection remain separate work.
Linked Issue
Maintainer-requested restructuring pilot, following #26963 and #27124. Based on main after #27214 and #27215.
Visual Proof
N/A — no UI or intended user behavior change.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
269 affected tests in 25 suites pass: search/listing, Quick Open capabilities and real-process options, mobile cache/expiry, file access, provider contracts, ripgrep cancellation and Unix socket/RPC cancellation.
Six new cases check early and in-flight abort, execution-host isolation, unavailable SSH behavior and both markdown listing capabilities.
Full
pnpm tc, changed-code quality with zero new findings, anti-slop audit, process-import and runtime-Electron ratchets pass. The existing suppression ratchet shrinks by six entries.Native Windows on paired host
awin, exactb593f8e87ae336ffb6dca9c3635d923e0c7fc45d: frozen install, package build, full typecheck and suppression ratchet pass. Broad run: 250 passed / 12 skipped / seven failed. The identical batch on unrefactored base43645e52744gives 244 passed / 12 skipped / the same seven failing cases; all six new cases pass. Failures concern POSIX path fixtures and unavailable file-symlink privileges on this Windows host. No Windows assertions were changed; both logs are retained. Runtime production files are identical on the final integrated head; later changes only integrate upstream CI/workflow fixes and add one graph assertion.All 146 scope/qualification tests pass with the upstream repair (test(ci): point server-scope qualification fixtures at SSH after relay deletion #27392) preserved and the added graph assertion.
Final exact head
ad44fbb9f2c: all 28 CI checks pass (16 policy skips). All five full unit shards pass, totaling 115,451 passing tests; static/typecheck, both packages, all six persistence platforms, relay integration and both paired Quick Open E2E cases pass.An unchanged GC occupancy test initially observed five ticks where it requires more than five. Matched isolated controls on untouched main and this branch passed all 16 GC tests; one diagnostic failed-job rerun then passed. The original failure and controls are retained. No test or GC code was changed or assertion weakened. A progress-based test repair remains a separate follow-up.
CI policy, coverage and build steps are unchanged. Passing full-shard execution totaled 2,788.10s versus 2,855.59s for a nearby green run with the same Node/Bun versions and six fewer cases; no slowdown observed. Runner/source/retry differences prevent claiming a guaranteed speedup or whole-workflow improvement. No GUI/focus tests launched on the user's desktop.
Review
Two independent native audits compared 19 moved methods: 16 bodies match token-for-token; the remaining differences are the standalone remote-search call, the static matcher owner rename and deletion of write-only bookkeeping. Parameters/defaults and runtime literal multisets are preserved. RPC names, command-surface wiring, the ripgrep producer and mobile cache implementation are unchanged.
The landed merge was independently checked against its actual main parent. All reviewed refactor files and upstream changes are preserved; the newly landed phone relay retains file-method routing and result contracts.
Agent skill upstream boundary
Notes
No shutdown owner or event-driven cache invalidation existed in this command layer. This refactor preserves that baseline; it adds neither cancellation guarantees nor process-exit claims. Paired work still executes on its owning server; unavailable remote paths never fall back locally. Windows, SSH, folder workspaces and mixed-version behavior are covered by the retained contracts.
Checklist