Skip to content

refactor(runtime): compose typed file search and listing ownership - #27396

Merged
nwparker merged 3 commits into
mainfrom
nwparker/runtime-search-ownership
Oct 11, 2026
Merged

nwparker merged 3 commits into
mainfrom
nwparker/runtime-search-ownership

Conversation

@nwparker

@nwparker nwparker commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Compose RuntimeFileSearch with workspace resolution and store access as its only host dependencies. Preserve the runtime's existing command API and delegate to this owner.
  • Remove four inheritance classes and six @ts-nocheck entries. Check the surviving file-access facade and mobile read implementation too.
  • Delete the active-search map and UUID registration: nothing read that map. Existing ripgrep code still owns per-request abort, timeout, process termination and listener cleanup.
  • Integrate the upstream stale-fixture repair (test(ci): point server-scope qualification fixtures at SSH after relay deletion #27392) and add one assertion that the actual-consumer test resolves the dependency graph. Production CI selection policy is unchanged.
  • Preserve mobile cache lifetime/keys, SSH-unavailable results, remote capability negotiation, legacy limits and result budgets. Correct provider capability types exposed by checking the facade; markdown listing retains its native and path-list branches.

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, exact b593f8e87ae336ffb6dca9c3635d923e0c7fc45d: frozen install, package build, full typecheck and suppression ratchet pass. Broad run: 250 passed / 12 skipped / seven failed. The identical batch on unrefactored base 43645e52744 gives 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

  • Not applicable; no upstream skill material copied.

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

  • This PR is small and focused
  • I explained what changed and why
  • Visual proof is N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Affected tests, typecheck, changed quality and boundary checks pass; native Windows qualified against control; full CI passes

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c384c22-c696-4152-acf3-ff3e183515ac





📥 Commits

Reviewing files that changed from the base of the PR and between b593f8e and ad44fbb.






📒 Files selected for processing (1)
  • config/scripts/node-server-change-scope.test.mjs





Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.







📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes separate runtime search from runtime file access. RuntimeFileSearch handles runtime searches and listings, and remote Quick Open search uses an extracted helper. RuntimeFileCommandAccess provides file operations, including mobile-file and diff opening. The changes also update Markdown listing provider types and add tests for provider fallbacks, cancellation, and runtime host routing.












Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to ad44f

The added change-scope assertion matches the classifier’s behavior; no merge-blocking issue is established.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: composing typed runtime file search and listing ownership.
Description check Passed The description is complete and focused. It covers the user-facing impact, implementation, rationale, linked context, visual proof, testing, review notes, compatibility considerations, and checklist i…

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR








🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 6a77d05 into main Oct 11, 2026
72 of 74 checks passed
nwparker added a commit that referenced this pull request Oct 11, 2026
#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant