Repository navigation
Memtrace v1.2.0
Memtrace v1.2.0
Native desktop receipts, faster GPU embedding, and graphs that follow your checkout
New
- New features reach the nightly channel first: npm install -g memtrace@nightly. Nightly is not always stable. The default install receives stable releases, and memtrace install keeps the current channel.
- Native desktop receipts on Windows, macOS and Linux summarize useful code lookups, symbol matches, connections and impact results. Receipts combine concurrent agent sessions, highlight concrete returned results and show referenced file counts. Context comparisons are labeled estimates; they do not claim money saved, engineer time saved or bugs prevented.
- Receipts are enabled by default in interactive desktop sessions and stay quiet in CI, SSH and headless environments. The first receipt follows at least five useful lookups and two minutes; continued activity produces receipts about every 30 minutes, with idle and graceful-exit recaps. A shared delivery budget prevents duplicate or empty receipts and limits frequency.
- memtrace notifications status, on, off and interval control desktop receipts. View the latest receipt with memtrace notifications show, inspect example data with preview, or test OS delivery with test. Preference changes reach running sessions within 30 seconds, and saved mute settings persist.
- macOS receipts use a bundled native Memtrace app with its own icon, View receipt and Mute receipts actions. Windows receipts include branded details and actions; Linux uses the desktop notification service. Receipts respect operating-system permissions and focus settings. The local receipt view needs no dashboard or downloaded fonts.
- Windows and Linux x64 can install the complete CUDA runtime from the terminal when an NVIDIA GPU is available. Install and startup offer consent before downloading missing dependencies; memtrace gpu install-cuda --yes supports unattended setup. Downloads are versioned and checksum-verified, need no Python or CUDA toolkit, and require a working NVIDIA driver.
- memtrace gpu verify-cuda runs real GPU inference with CPU fallback disabled and checks its output. Setup uses this check before reporting success, and GPU diagnostics retain the selected device and runtime failure reason.
Improved
- CUDA embedding uses the full-precision code model on supported NVIDIA hardware. Warm embedding throughput on an RTX 5070 improved 22.3 times on Windows and 24.1 times on Linux under WSL2, with minimum CPU/GPU vector cosine similarity above 0.99999986. These measurements cover embedding after warmup, not total repository indexing time.
- macOS embedding allows CoreML to use the GPU as well as the Neural Engine and CPU. Bounded model inputs let CoreML accept work previously excluded by dynamic shapes, and incomplete batches return only the requested vectors. Physical M5 Pro checks confirmed GPU execution, vector accuracy and full-repository indexing. The Apple Silicon path has no M5-only restriction; older chips and macOS releases still need physical validation.
- Indexing reuses bounded parse, syntax-tree and query caches, builds line offsets lazily, and avoids repeated syntax-tree traversal and service-root discovery. Changes to parser code invalidate cached results, and unchanged derived-label inputs skip redundant computation.
- Matched structural indexing benchmarks, including database writes and excluding embedding inference, reduced wall time by 9–13% on Windows and 5–8% on Linux under WSL2. CPU time including database writes fell 29–33% on Windows and 51–55% in WSL2. Structural preparation alone improved 2.6–3.7 times on cold runs and 5.0–5.3 times on warm runs, with 74–89% less CPU time across the two platforms. Cached and uncached output was checked across 22 languages. These workload-specific results do not establish temperature or energy savings.
Fixed
- Linux x64 nightly and stable packages now compile CUDA support. Managed runtime activation reaches child processes, upgrades can replace the incomplete older bundled runtime, and an outdated GPU architecture list no longer rejects a newer runtime that can execute inference successfully.
- The opt-in CPU governor now enforces zero-budget pauses, charges concurrent CPU samples once, restores the correct allowance when interactive work ends, and keeps safety pauses in force during interactive boosts. A disabled governor no longer scales batches or parks work. Eight-worker measurements held requested two- and four-core budgets within about 1.1% on Windows and WSL2; enabling the governor still requires MEMTRACE_CPU_GOVERNOR=on.
- The macOS CPU governor now reads real AC/battery state, battery percentage and session idle time, so its existing battery and idle policies respond to the Mac. Governance remains opt-in and can increase background completion time.
- Mac memory gating now follows the kernel pressure state. Compressed-memory estimates no longer cause false critical-memory pauses; actual warning and critical pressure still reach the existing safety policies.
- Agent hooks now follow the Memtrace daemon lifetime. Cached hooks return silently after shutdown or a crash, and registrations are removed when no running daemon needs them. Saved off settings survive inherited agent settings and installation updates.
- On macOS, hooks recognize alternate paths to the same workspace, including temporary-directory aliases. Nested workspaces select their own daemon, while similarly named sibling directories stay separate.
- Exact identifier searches try indexed symbol lookup before semantic fallback and check the returned name, repository, path and source line. Normal supported hooks route directly to the running daemon.
- Agent installation preserves custom MCP settings and unrelated hooks. Claude has a user-level registration fallback, and the bundled VS Code registration supplies the active workspace directory.
- Windows history replay uses consistent file identities, so moving a declaration between lines no longer leaves every old version live. A versioned repair pass revisits affected history on upgrade, preserves explicit replay limits, and records completion so subsequent starts do not repeat the repair. Startup logs distinguish checking HEAD and repairing history from a fresh index.
- Branches inherit shared graph records and store their own changes, including removals and restorations, without copying or deleting parent records. Full indexing and incremental label updates preserve those removals, so deleted symbols, relationships and derived labels do not reappear through inheritance. Replacement metadata is acknowledged before older records are retired, making partial-write retries safe.
- The watcher follows the actual checked-out branch, including linked worktrees, detached HEAD and Git metadata outside the working directory. It arms the relevant metadata watches before reporting readiness, rejects duplicate watches of the same canonical path, and recovers missed branch notifications with a lightweight poll.
- Switching branches reconciles the destination before publishing its identity to the UI. Work from the outgoing branch cannot publish into the new checkout, failed reconciliation retries with backoff, and files unchanged from the default branch reuse inherited records. When the default branch advances, only files whose Git content differs are invalidated for reconciliation.
- Repeated checkouts compact redundant repository and branch summary records while preserving lineage metadata. A known main or master lineage no longer includes the other branch as an unrelated fallback. Windows can now read resident memory correctly when deciding whether to reconstruct a cached graph.
- Graph views, symbol lookup, hybrid-search results and repository statistics consistently resolve the selected branch, prefer its overrides, and hide inherited removals and unrelated branches. Statistics include inherited records even when a branch also has a substantial delta; previously incorrect counts can change.
- A graph already on screen stays usable when a refresh times out. A compact delayed-refresh notice offers retry instead of covering the graph with a blocking error; an initial load failure still shows an error. Existing inflated history requires the repair pass before its graph counts shrink.
- Database-writing regression tests use isolated stores, and an integration-test fallback can no longer inherit a configured external database endpoint.
Install
npm install -g memtrace