Repository navigation
Memtrace v1.2.6
Memtrace v1.2.6
Deleted code leaves the graph, and pulls no longer stall
Improved
- The node inspector in /ui now shows the route registration for an API endpoint that was discovered from a route, instead of an empty Code tab, and says where a widened code snippet came from. When the Memtrace owner process is unreachable, the inspector's Code, Info and History tabs show the backend's message and the
memtrace startrecovery step with a Retry, instead of a spinner or a claim that the symbol has no history. - The update prompt says what the new version contains. When a newer build is available, Memtrace now links that version's release notes next to the version you are on and the one on offer — on the nightly channel that is the whole question you are being asked. Accepting shows which step the upgrade is on and how long it has been running, rather than a single line while the package manager's output scrolls past; if the upgrade fails, that output is printed in full before the remedy. Output that is captured rather than shown in a terminal — an agent's log, CI — keeps the plain form. Set MEMTRACE_PLAIN_OUTPUT=1 for plain text in a terminal too, or MEMTRACE_VERBOSE_UPGRADE=1 to watch the package manager's own output during an upgrade.
Fixed
- Upgrading no longer leaves Memtrace running the previous version's program. A global install can keep a leftover copy of the native program from an earlier install alongside the current one, and when the package manager removed the newly installed copy during an upgrade, Memtrace fell back to that leftover and ran it — while
memtrace --version, and the package itself, reported the new version. Anyone verifying a fresh build could be testing one that was weeks old, with the version check itself doing the lying. Memtrace now requires the native program to match the version of the package that installed it: the installer fetches the correct one instead of accepting whichever copy it finds first, and if a mismatch survives that, Memtrace refuses to start and prints both versions and the location of the leftover copy, so you can delete it and reinstall. - Deleting a file, or removing a function or type from one, while Memtrace is running now reliably removes it from the graph, whether you or your coding agent made the change. Some graph stores had accumulated more than one live copy of the same symbol (indexing a repository that has several local branches did this about half the time), and a deletion retired only one copy, so search, the graph page, and your agent kept being handed code that no longer existed anywhere in your checkout. Every copy is now retired when its file is deleted or its definition removed, including copies that were already in your store, with no reindex required.
- Established projects now run the startup repair that removes leftover duplicate copies of a symbol. Memtrace has a repair pass that closes extra live copies of the same symbol left behind by older versions — the copies that make a deleted function keep turning up in search and for your agent — but on projects whose graph had grown large enough for Memtrace to skip its full startup scan, this repair was skipped along with it. Those are precisely the projects that accumulate the copies, having been indexed for weeks, so the stores most in need of repair were the only ones never receiving it, and upgrading did nothing for them. The repair now runs on large projects too. It stays bounded — it declines a repository too large to scan cleanly rather than slowing start — and it is a cheap no-op on a healthy store. Turning startup indexing off still turns it off.
- Re-indexing a project no longer leaves a second live copy of every unchanged symbol. When Memtrace re-indexed a repository, it timestamped the current code from the moment HEAD last moved to the checked-out commit (a checkout or branch switch), while its git-history pass timestamped the same code from the commit's own time. Whenever those two moments fell in different seconds — routine after any branch switch, and the norm on a long-lived project — the two passes disagreed by a second and the store kept both, so one symbol became two live rows. Reads still showed one (the newest wins), but the raw graph doubled, and a store re-indexed for weeks accumulated a heavy layer of these twins that made deletions look like they had not taken. Both passes now read the commit's own time, so they agree and only one row is written. Existing duplicate rows are closed by the startup repair with nothing for you to do.
- Memtrace no longer stops reconciling after a
git pullon an established project. Once a project graph grew past the point where Memtrace skips its full startup scan, the first change after a pull could leave the watcher retrying the same step every few seconds indefinitely: the pull was never applied, newly pulled files never appeared in search or for your agent, and the only cure was a manual reindex. Startup left a marker saying a graph publication still had to be confirmed, and the step that would have confirmed it was the very step being held back. Memtrace now tells an in-progress publication apart from a leftover marker, so the pull is applied normally. Verified on a 1,600-file pull: applied without stalling, with the API responsive throughout. - Files deleted by a pull are now removed from the graph on large projects. Their functions and types used to stay behind and keep being returned by search and to your coding agent, so an agent could be told about code that no longer existed anywhere in your checkout, and follow it. Memtrace looks up a deleted file's existing entries to retire them, but it was searching under a different spelling of the file path than the one it stores, so it found nothing and retired nothing. On smaller projects this never showed, because they load their index differently and never reach that lookup. Verified on a 1,600-file pull, where the clean-up now runs instead of being skipped entirely. A side benefit: entries superseded by a large pull are now retired rather than accumulating, so stores stop growing with copies of code that has already changed.
- Memtrace no longer skips its startup catch-up on large projects. When an existing graph store is big, Memtrace skips the full startup scan so that start stays fast — that is deliberate — but it was also skipping the much cheaper catch-up that applies whatever changed since the last run, so that step never ran at all on those projects. It now runs, and its cost tracks what actually changed rather than how big the store is. First-time indexing of brand-new repositories is still deferred on large stores, and the catch-up runs in the background, so start is no slower than before.
- A pull or branch switch that deletes files now removes them from the graph. Memtrace read the incoming change correctly but forwarded only the added and modified paths, so deleted files lingered in search results and on the graph page until the next full index — symbols that no longer existed anywhere in your checkout were still offered to your agent.
- When Memtrace cannot measure the size of an existing store in time, it now treats it as a large store and still runs the catch-up, instead of treating it the same as a store you had explicitly told Memtrace to leave alone.
- A function handed to another function by reference now counts as a caller. Passing a function as an argument — run_in_threadpool(parse_transactions_csv, body), rows.map(formatRow), Thread(target=run_job) — was invisible to the graph, because only the function being called directly was read from each call. A symbol used that way reported zero callers and showed only its importing file under "Called by", so dead-code and blast-radius answers were wrong in the direction that costs you: they said nothing reached a symbol that something did. These now resolve to the function that passes the reference, labelled "passed as an argument" so you can tell an indirect call from a direct one. Sibling files in a Go package are still an exception, because Go names them with no import to resolve against. Existing indexes pick this up when a file is re-indexed or edited; memtrace index --clear applies it to a repository in one step.
- The Called by and References lists explain how each relationship was found in words rather than internal codes — "imported here, never called" instead of unused-import-specifier.
- ⌘V / Ctrl+V works in the dashboard's search and filter fields when it is open inside an embedded browser. Preview panes in coding tools consume the paste shortcut themselves and never pass it to the page, so the field stayed empty while typing worked normally. The dashboard now reads the clipboard itself when the paste never arrives, and leaves the ordinary path alone everywhere it already works.
Install
npm install -g memtrace