Repository navigation
fix(server): update fff to stop runaway watcher rescans - #14543
realhasanshoaib wants to merge 2 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused fff-node dependency bug fix that throttles runaway watcher rescans while preserving the existing search integration and native packaging behavior. The remaining changes are lockfile, patch-layout, and packaging-probe updates rather than new product capability or broad infrastructure changes. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
fff-node 0.9.4 starts a full workspace rescan on any large file-event batch, overflow, FSEvents rescan flag, or ignore-file change, with no rate limit. On large non-git roots under active development this keeps the backend at 60-190% CPU. fff 0.10.3 added a rescan throttle; 0.11.0 is the current release. 0.11.0 ships separate CJS and ESM builds, so the patch now routes `require` to the ESM build (one module instance for the server and its tests) and carries the asar.unpacked binary lookup over to dist/index.js. Refs pingdotgg#14536 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
58a8f4c to
c09c710
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe server dependency and workspace patch move to fff-node 0.11.0. The patch updates its require export target and ASAR binary-path resolution. The Windows native-load probe and its test use the package’s updated entry point. Changesfff-node dependency and packaging
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The dependency mapping and Windows probe follow the updated entry path. Although the 0.11.0 archive was unavailable for independent inspection, no actionable mismatch or merge blocker is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 4 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
When a project is a big non-git folder that keeps changing, the backend stays at 60–190% CPU even when T3 Code is idle. The file-search library, fff 0.9.4, starts a full rescan of the whole folder after almost any burst of file changes, and nothing limits how often that happens. A burst can be more than 1024 changed paths, an FSEvents rescan flag, or any
.gitignoreedit. Full details, stack samples and a repro harness are in #14536.This fixes watcher rescan throttling only. A separate upstream cost remains: binary detection reads changed files to the end (dmtrKovalenko/fff#895).
Change
fff fixed the rescan loop upstream in dmtrKovalenko/fff#751. That change adds a throttle: watcher rescans wait at least 30 seconds, and 5 minutes for non-git roots with 1M or more files. The first release with it is 0.10.3. This PR moves T3 to the current release, 0.11.0.
apps/server/package.json,pnpm-lock.yaml@ff-labs/fff-node0.9.4 → 0.11.0. The lockfile diff only touches fff packages.patches/@ff-labs__fff-node@0.11.0.patch,pnpm-workspace.yamlindex.cjsandindex.jsbuilds. As before, the patch sendsrequireto the ESM build, so the server and its tests share one module instance. It also keeps theapp.asar.unpackednative-binary lookup, now indist/index.js.scripts/build-desktop-artifact.tsand its testdist/src/index.js, which no longer exists. It now points atdist/index.js.The fff API that T3 calls is unchanged between these versions; 0.11.0 only adds
watch(). So there are no server code changes.Scope and approval
This fixes one problem: runaway rescans in the pinned native dependency. Bug report and evidence: #14536. The PR doesn't touch product behavior, and it's complementary to #11500, which keeps a partial index on scan timeout.
Verification
Problem and fix, measured. I ran a standalone harness with the exact
FileFinder.createoptions fromWorkspaceSearchIndex.tson a real 1.65M-file~/codefolder with live agent activity. It also writes and deletes 1500 files undernode_modulesevery 20 s. Each version ran for about 4 minutes on an Apple M4. The harness is in #14536.Readiness refresh (2026-10-02): merged current main
54084ae1einto the existing PR branch, preserving the current Expo patches when resolving the lockfile/workspace conflicts. The PR still changes only the seven files above. The update is a normal fast-forward from the existing head; no history rewrite is needed.Checks on refreshed head
dcff125e3, run on a separate Apple M4 test host with Node 24.13.1 / pnpm 11.10.0:tsc --noEmit: passed; existing Effect suggestions only.Packaged Electron native-load evidence: an isolated minimal macOS arm64 fixture used Electron 44.4.2 and the exact patched fff-node package/dependency closure from this lockfile. It ran from an actual
app.asarwith native.node/.dylibfiles unpacked. The fixture asserted packaged-app mode, shared require/import identity, an.asar.unpackednative-library path, successful index creation and the expected file-search result.{"electron":"44.4.2","node":"24.21.0","isPackaged":true,"binary":"<fixture>.app/Contents/Resources/app.asar.unpacked/node_modules/@ff-labs/fff-bin-darwin-arm64/libfff_c.dylib","indexedFiles":1,"result":"needle.ts"}Limits: this was a minimal packaged Electron native-load smoke test, not a complete T3 installer build. Packaged Windows/Linux execution and full desktop workflows were not tested. The existing Windows probe unit tests passed. The benchmark above consists of sequential runs on a changing live workspace, not a controlled claim about all projects or total app memory.
Readiness refresh performed with Codex (GPT-6); scoped CLI review used GPT-6.1-Sol at high reasoning.
Built with Claude Opus 5.5 (1M context) in T3 Code through the Claude Code harness, at medium reasoning effort.
🤖 Generated with Claude Code