Skip to content

Memtrace v1.0.8

Choose a tag to compare

@Alex793x Alex793x released this 08 Aug 01:19
· 3 commits to main since this release

Memtrace v1.0.8

Every session opens the same graph, and stop leaves nothing behind

Fixed

  • A shared workspace graph is now opened by every session inside it, not only by one started at the workspace folder itself. Marking a folder as a workspace is meant to give the repositories inside it one shared index, but a session started with no flags ignored that marking unless its working directory was the workspace folder. Started from a repository inside the workspace it opened a private database instead, so searches answered from a store holding a few unrelated repositories with your own repository simply absent, and one such store appeared per running editor or agent session.
  • Sessions started inside a git worktree no longer get their own private, near-empty graph. A linked worktree looked like a separate repository to the check that decides which database to open, so a session started inside one created and bound a worktree-local database. Nothing reported an error, and indexing wrote a full graph into the stray copy. Worktrees now open the graph of the repository they belong to.
  • A store that is being skipped is now named at startup. The two fixes above change which graph an existing session opens, and from the outside that looks identical to the problem they fix: the index appearing to vanish. Startup now lists the database it opened alongside any it stepped over, and states plainly that nothing was deleted. Leftover copies stay on disk untouched, and MEMTRACE_MEMDB_DATA_DIR pins a specific one.
  • Stopping Memtrace no longer leaves part of it running. It reported success while the supervising process kept consuming a core and a background service held nearly two gigabytes, both of which had to be killed by hand. The stop signal was sent once and never escalated, services were located through a file the dead process had taken with it, and a session that ended took nothing with it. Stopping now escalates until the process is actually gone and collects whatever is left ownerless, while sessions belonging to other editors and agents are still left alone.
  • Only one decision-memory service runs per machine again. Each session reaped every other session's service before starting its own, so two agents working in different repositories killed each other's and the supervisors restarted them in a loop, with several running at once against a store meant to have a single owner. Ownership is now decided once per machine, and a session that does not own it waits to take over rather than competing.
  • Blast radius answers in about a second instead of timing out. Impact, callers and references walked the graph one symbol at a time, and each step asked a question the database answers by reading every record it holds, so a two-hop query on a real repository never returned. They now ask once per step for the whole frontier, through the index.
  • The dashboard no longer starves the database it is reporting on. Health counted repositories in a way that reads and decodes every record in the store, and the dashboard polls health continuously, so every poll piled another full scan on the ones still running. The database saturated every core with no forward progress, and the abandoned requests tore down the connection that the indexer was using to write a repository's relationships. Health now computes at most one answer at a time and serves the last good one rather than starting more work.
  • A repository whose relationship write failed no longer reports every symbol as safe to change. Its symbols still resolved, so blast radius came back as no impact and low risk, which is indistinguishable from a genuine answer. An incomplete graph now reports unknown risk and marks the result incomplete.
  • An index that writes symbols but no relationships now says so. It reported completion with a symbol count and no relationships, which reads as success, and a repository in that state cannot answer a single impact, caller or reference question. Completion now carries an explicit warning naming what is missing and what to do about it.
  • Indexing reports progress through the database write. The bar stopped at 85 percent for the whole write stage, the longest one on a large repository, with no output at all, which was twice mistaken for a hang.

Changed

  • Blast radius may now run alongside background index maintenance. It previously waited for exclusive access, which is why a single background repair could make every impact question hang no matter which symbol was asked about. It now waits briefly and then proceeds, which is safe because the same release made that walk read a capped number of symbols in fixed-size pages.
  • Stopping always terminates. Memtrace stop used to report failure and leave the process family running if the supervising process did not answer in time. It now escalates to a forced stop after a grace period, so anything scripted around the old failure exit should be re-checked.

Install

npm install -g memtrace