@ataraxy-labs/sem 0.22.1 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -1
- package/README.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,61 @@ All notable changes to sem are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.23.1] - 2026-08-22
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **CSV, JSON, and Vue entities no longer collide on generated ids with entities from other files.** Their id-generation scheme is now disambiguated per plugin, closing a gap where two entities could silently collapse onto the same id and one would drop out of the graph.
|
|
12
|
+
- **Entities from non-code files (Markdown, TOML, YAML, JSON, CSV, Vue/Svelte) now carry accurate byte ranges**, so tools that rely on byte offsets (extraction, editing, highlighting) work correctly for these file types instead of getting an inaccurate span.
|
|
13
|
+
- **Markdown headings that appear inside a fenced code block are no longer parsed as real document headings.**
|
|
14
|
+
- **TypeScript/JavaScript entity byte spans now include a leading `export` keyword when present**, so extracting an exported declaration's exact source text no longer drops the `export ` prefix. Facts schema v4 — existing caches rebuild automatically on first use.
|
|
15
|
+
- **`sem entities` no longer opens the git repository through libgit2 on every call.** That was a fixed per-call cost regardless of file size, disproportionately noticeable on small-file lookups; it's now only paid when actually needed.
|
|
16
|
+
- **sem-mcp's `query` and `limit` parameters on the `entities` and `context` tools now work correctly** (previously ignored).
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **sem-mcp: new `find` and `grep` tools**, giving MCP clients the same fast entity-lookup and trigram-accelerated search already available from the CLI (`sem find`, `sem grep`).
|
|
21
|
+
- **sem-mcp: `entities` and `context` tools accept `format=json`**, returning structured JSON instead of human-readable text for callers that want to parse results programmatically.
|
|
22
|
+
|
|
23
|
+
## [0.23.0] - 2026-08-22
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **C++ and Python's precomputed-facts fast paths are now opt-in (`SEM_MUL_CPP=1`, `SEM_MUL_PYTHON=1`), and Rust's stays opt-in (`SEM_MUL_RUST=1`).** These fast paths trade memory for speed by skipping a second parse of files whose facts are already known. Re-measuring peak memory footprint (the metric that actually tracks memory pressure and swap risk, as opposed to resident-set size, which can look artificially low once memory has been compressed) found C++ costing ~25-28% more than a default build on llvm-project and Python ~22-25% more on home-assistant/core — both above the project's +15% admission ceiling, even after a follow-up trim narrowed the gap. Rust independently re-measured at ~33% over. Cold builds on large C++/Python repos are correspondingly slower by default than in 0.22.1, but use less memory; set the relevant env var if you have RAM headroom and want the speed.
|
|
28
|
+
- **Go's fast path is now on by default**, no configuration needed. It cleared the same ceiling (+6.8% to +8.5% peak memory footprint on Kubernetes, well under +15%) once the correctness fixes below landed, and delivers a 12-17% faster cold build on Kubernetes as a result.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **Go call resolution no longer merges same-named packages from different API groups.** Kubernetes has dozens of packages literally named `v1` — one per API group (`kubeadm`, `bootstraptoken`, `pod-security-admission`, and more) — and import resolution used to key packages only by their bare directory name, so a call like `DeepCopyInto` from one API group's type could resolve to a same-named method in a completely unrelated package. Packages are now disambiguated by their full import path. This alone removes roughly 32,000 false cross-package edges on Kubernetes, and (combined with the fix below) makes Kubernetes cold builds 28-30% faster.
|
|
33
|
+
- **Go resolution no longer confuses a source file's own name with a standard-library package it happens to share a name with.** Large Go codebases routinely contain files literally named `os.go` or `time.go`; a secondary lookup route used to treat a file's own bare filename as if it were an importable package, so calls like `os.Stat()` or `time.Now()` could resolve to the local file instead of the real standard-library package. That route has been removed entirely — only the correct, directory-based lookup remains.
|
|
34
|
+
- **Rust call resolution no longer confuses an external standard-library import with a same-named local module.** `use std::cmp;` followed by `cmp::max(...)` could previously resolve to an unrelated local `cmp.rs` instead of the real standard-library function. Imports rooted at `std`/`core`/`alloc` are now excluded from local-module matching outright (an external import can never legitimately resolve to a file in your own repo), and a genuine same-named local-module collision is now disambiguated per the specific item being called rather than per whole-file bucket, falling back to an honest miss instead of guessing when it can't be told apart.
|
|
35
|
+
- **Fixed a scope-resolution precedence bug affecting every supported language: a nested closure or sibling function could resolve a call to the wrong same-named target** — for example, a TypeScript call landing on a sibling closure's function of the same name instead of the one actually being called. A function's own locally declared bindings now always take precedence over an outer scope's binding of the same name, and nested locals inside a plain function (not just a class or module) are now registered for lookup at all, closing a gap where they were invisible to their own siblings.
|
|
36
|
+
- **Go's cross-file method resolution is now internally consistent when the fast path is enabled.** Rewriting a method's identity to reflect its true cross-file package location left other places that cache that identity out of date, which could push a call through an unrelated fallback path instead of the correct local lookup. Every place an entity's identity is cached is now kept in sync with the rewrite, and the fast-path build is now bit-identical to the default build on Kubernetes.
|
|
37
|
+
- **Multi-document YAML files (`---`-separated) no longer lose entities to id collisions.** Top-level keys sharing a name across different documents in the same file used to collapse onto one generated id, silently dropping all but one from the graph — including whether it was a test. Each document is now part of the generated id whenever a real collision exists; ordinary single-document files are unaffected.
|
|
38
|
+
- **`sem entities`'s index-backed listings no longer come back empty on Windows.** An absolute path built by ordinary path-joining wasn't normalized the same way as the repository root before comparison, and Windows always prepends its extended-path marker during normalization, so the two could never match. Two related normalization gaps in the MCP server and the index reader were fixed alongside it.
|
|
39
|
+
- **Fixed a parse-cache test flake** caused by tests sharing global cache state under parallel execution; the cache is now injectable per test/thread, with no change to production behavior.
|
|
40
|
+
- **`sem setup` no longer installs a SessionStart hook that forks `mcp --resident`.** That resident server was deleted in 0.22.0 (`--resident` is kept only as a no-op flag for old installs), so every fresh `sem setup` was forking a process that does nothing, once per Claude Code session. `sem setup` now installs only the `UserPromptSubmit` hook (`sem hook prompt-submit`); `sem unsetup` still recognizes and removes a legacy `mcp --resident` SessionStart hook from an older install.
|
|
41
|
+
- **Caches written by the MCP server no longer silently drop test-coverage flags read by the CLI.** `sem-cli` and `sem-mcp` each maintained their own copy of the on-disk cache format, and a prior perf fix landed on only one of the two copies — any cache last written by the MCP server ended up with permanently empty test flags. The two copies are now one shared implementation, so both read and write the same, complete cache.
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- **New internal diagnostics**: a dangling-edge check that catches any graph edge pointing at an entity id nothing declared (always a bug, never legitimate), plus a set of resolution counters behind `SEM_PROFILE_RESOLVE` for measuring how often lookups fall back to slower paths. Development/debugging aids, not user-facing commands.
|
|
46
|
+
- **The internal reference-consistency checker used by sem's own test suite got dramatically faster** — from about 100 seconds to well under a second on a large TypeScript codebase — by resolving each entity through one lookup table instead of a per-entity search. Not user-facing, but it makes sem's own correctness checks practical to run at scale.
|
|
47
|
+
- **Per-field memory attribution** for the experimental fast-path facts, letting future memory work target the specific data structure responsible for a footprint regression instead of guessing.
|
|
48
|
+
|
|
49
|
+
### Performance
|
|
50
|
+
|
|
51
|
+
- **Kubernetes cold builds are 28-30% faster**, from the same package-index disambiguation fix described above.
|
|
52
|
+
- **Builds against an empty or fresh facts cache no longer pay a needless per-file cost.** Recognizing an empty cache directory now takes one directory read instead of checking every candidate file, cutting cache-merge time on an empty cache from ~245ms to ~0.4ms and making a full cold build roughly 7% faster.
|
|
53
|
+
- **The experimental fast-path facts now use about 17% less memory**, by trimming unused capacity left over from incremental construction and deduplicating repeated identifier strings within each file. Wall-clock time is unaffected.
|
|
54
|
+
|
|
55
|
+
### Removed
|
|
56
|
+
|
|
57
|
+
- **The Go package-index builder's second, hand-duplicated copy** — one shared implementation is now used everywhere a build needs it.
|
|
58
|
+
- **Five internal, already-closed measurement tools** (micro-benchmarks and one-off memory/timing probes) whose results were already recorded elsewhere and are no longer needed to reproduce them.
|
|
59
|
+
- **`sem-mcp`'s own duplicate disk-cache implementation** — superseded by the shared implementation described above.
|
|
60
|
+
- **The file-stem Go package-resolution route** — see Fixed, above; only the directory-based route remains.
|
|
61
|
+
|
|
7
62
|
## [0.22.1] - 2026-08-16
|
|
8
63
|
|
|
9
64
|
### Added
|
|
@@ -16,7 +71,7 @@ All notable changes to sem are documented in this file.
|
|
|
16
71
|
|
|
17
72
|
### Performance
|
|
18
73
|
|
|
19
|
-
- **Cold graph builds are 11-30% faster and peak RSS is down 17-40% on giant corpora, versus 0.21.** Measured end-to-end on the shipped release binary: home-assistant-core 5.9s, TypeScript monster 11.2s, dotnet-runtime 46.7s, llvm-project 34.7s, linux 35.2s cold full-CLI (warm rebuilds: 0.2-1.3s). Every corpus improved on both the engine-only and full-CLI metrics
|
|
74
|
+
- **Cold graph builds are 11-30% faster and peak RSS is down 17-40% on giant corpora, versus 0.21.** Measured end-to-end on the shipped release binary: home-assistant-core 5.9s, TypeScript monster 11.2s, dotnet-runtime 46.7s, llvm-project 34.7s, linux 35.2s cold full-CLI (warm rebuilds: 0.2-1.3s). Every corpus improved on both the engine-only and full-CLI metrics.
|
|
20
75
|
- **C#/C++ builds now skip re-parsing files whose facts are already known**, closing the last gap in precomputed-facts reuse (JS/TS/Python/Go/Java/Rust already had it). A per-file gate proves a corpus-wide invariant — no entity's parent lives in a different file — before trusting precomputed facts wholesale, so this needed no facts-schema change. Measured on dotnet-runtime: reparse time drops from 10.6s to 65ms.
|
|
21
76
|
- **Parsed file facts now persist to disk as a content-addressed corpus**, so a build that has seen a file's exact content before warm-starts it instead of re-parsing from scratch, even in a fresh process. Fixed a regression where checking a shared corpus against a large number of prior contributors got slower as the corpus grew (one repo's known-content rebuild was measured 332% slower against a 7.9GB shared corpus than a 556MB one); it now costs the same regardless of corpus size.
|
|
22
77
|
- **`sem context` regained a fast tier it had lost, by reading each entity's body from its own file at an indexed byte span instead of walking and hydrating the whole corpus.** A prior cascade of cache removals deleted the old fast path along with a correctness bug it had, but left `sem context` always doing a full corpus load — measured on the TypeScript monster 1.11s down to 48ms, on a mid-size repo 0.16-0.28s down to 4.6ms. Verified byte-identical against the always-correct full-load path across both entity- and file-scoped lookups; still declines (never approximates) on a stale cache, an ambiguous name, or any entity missing a span.
|
package/README.md
CHANGED
|
@@ -273,7 +273,7 @@ sem setup
|
|
|
273
273
|
|
|
274
274
|
Now `git diff` shows entity-level changes instead of line-level. No prompts, no agent configuration needed. Everything that calls `git diff` gets sem output automatically. Also installs a pre-commit hook that shows entity-level blast radius of staged changes.
|
|
275
275
|
|
|
276
|
-
On macOS and Linux, `sem setup` also
|
|
276
|
+
On macOS and Linux, `sem setup` also registers a Claude Code `UserPromptSubmit` hook (`sem hook prompt-submit`) for prompt-time context injection. It edits `~/.claude/settings.json` idempotently, backs it up first, and leaves any hooks you already have untouched.
|
|
277
277
|
|
|
278
278
|
To disable and go back to normal git diff (also removes the session hooks):
|
|
279
279
|
|
|
@@ -306,7 +306,7 @@ No config, no API keys, never fails your build. See [action/](action/) for detai
|
|
|
306
306
|
|
|
307
307
|
## Cloud acceleration (for scale and teams)
|
|
308
308
|
|
|
309
|
-
Local is always free and
|
|
309
|
+
Local is always free and always fast — the on-disk index answers day-to-day queries in single-digit milliseconds even from a cold process, so there's nothing to keep warm and no login required. You do not pay to make your laptop fast.
|
|
310
310
|
|
|
311
311
|
Cloud is for what a laptop can't do. On a very large monorepo the first local graph build can take a few seconds; a shared team graph shouldn't be rebuilt per developer; and CI wants the graph without checking anything out. `sem login` connects those cases to sem cloud, which keeps a warm, pre-built graph for your registered repos and serves the heavy queries from it (on a large repo like deno, an `impact` query is ~86ms from the cloud vs ~573ms rebuilt locally).
|
|
312
312
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ataraxy-labs/sem",
|
|
3
3
|
"mcpName": "io.github.Ataraxy-Labs/sem",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.23.1",
|
|
5
5
|
"description": "npm wrapper for the sem CLI. Downloads the matching release binary and exposes the sem command in node_modules/.bin.",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
|
7
7
|
"type": "module",
|