fix: index Cursor transcript lookups - #2
Conversation
Read composer and bubble prefixes through the key index so each conversation no longer scans unrelated rows. Add instruction-budget regressions and run the Cursor tests on macOS, Windows and Linux.
|
Mention Blocks like a regular teammate with your question or request: @blocks review this pull request Run |
|
Expanded macOS validation of the same locally patched nightly is complete. This broader baseline supersedes using the earlier narrow search-only run as a general usage estimate. Apple M5 Pro, 15 cores, 24 GiB, macOS 26.5; populated local graph, normal embeddings and Cortex enabled, CPU governor off. Timed phases ran on battery. All Memtrace processes, clients, Node helpers and exited-child CPU are included; percentages are per one CPU core. The complete 59.6-minute timed trace has valid continuous counters and both native sidecars alive.
Short burst CPU uses enclosing one-second samples: 31.1 seconds and 7.0 seconds respectively, retaining the first/last fractions of work. Worst rolling three-minute CPU during unattended observation was 19.70%; no rolling three-minute quiet window fell below 7%. During that twenty-minute interval, Memcore averaged 8.24%, Cortex 0.51%, and owners/clients/helpers 6.22%. The complete timed run peaked at 3.24 GiB aggregate RSS and 6.90 GiB accounted footprint; system memory pressure was normal in 35 snapshots and warning in 25. All 90 exposed MCP tools were invoked with representative inputs, alongside actual feature/refactor/test commits, file watching, indexing and file-change stress. This is invocation coverage, not 90 blanket correctness passes. All 70 timed requests completed: 68 passed answer checks and two dependency-path requests returned an explicitly incomplete graph at the projection ceiling. Both 20-request bursts passed. Paced latency p50 was 0.940 seconds; the history calls took 47.1–47.6 seconds. The previously missing fresh learned-scoring case is now covered: a normally captured Git feature decision was ingested and received a persisted learned gate verdict, and its arc returned two Produced episode links. More than 12,000 real existing decisions were also scored. The preserved model cache loaded in 1,299 ms. Remaining findings include ambiguous graph identities after combined replay/fleet/file-change stress, a named-workspace/member-recall scope issue with explicit existing-store overrides, incomplete process-flow results, and the manual scope cleanup required to return an expanded store to single-repository mode. Exact triggering operations are not all isolated, and these findings are not attributed to this Cursor change without a matched reproduction. A hot Memcore sample during unattended observation captured property scanning, record decoding and gRPC response work. The preserved two-minute search warmup is a candidate caller, not a proven attribution of every burst. The targeted Cursor lookup improvement remains verified, and this PR's Windows/Linux/macOS Cursor tests and full CI remain green. The broader runtime does not meet the requested roughly 7% idle target or the original 5% criterion. This is a local Cortex-patched The disposable fixture graph and watcher were removed. Primary graph counts remained unchanged, and the primary runtime was restored. Full raw timing, process samples, logs, response evidence and charts are retained locally; no transcripts, graph contents or private paths are included here. |
Cursor capture repeatedly scanned the entire SQLite key-value table when loading composer metadata and each conversation's bubbles. On the populated Mac used for MEMDEV-45, the Cursor database is approximately 11 GB. Use bounded ranges on its existing binary key index so capture can seek directly to each prefix.
The regression tests enforce bounded query work with 10,000 unrelated rows and cover literal wildcard characters and adjacent conversation prefixes. No platform scheduling or model behavior changes.
Validation:
These are not a clean general-release CPU acceptance: the paced trace had one short-lived-child sampling fault; an automatically reconnected MCP client's CPU was outside the owner tree; periodic search warmup still drives idle bursts; and fresh learned scoring was not exercised (the newly captured governance document is exempt by design). The original 5% quiet gate remains unmet. This PR fixes the verified Cursor scan defect; MEMDEV-45 remains open for the other cases and packaged integration.