ucn 5.1.1 → 5.2.0

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.
@@ -41,7 +41,7 @@ three. The text block is the whole response on every surface.
41
41
 
42
42
  Persistent indexes live in a per-user, project-keyed cache rather than the analyzed repository. Set `UCN_CACHE_DIR` to override the cache root; CLI `--no-cache` bypasses persistence and `--clear-cache` removes the current project's cache. Legacy `<project>/.ucn-cache` directories are migrated on first use.
43
43
 
44
- Supported source families are JavaScript/TypeScript/TSX, Python, Go, Rust, Java, C, C++, C#, and HTML inline JavaScript/event handlers. C/C++ uses `compile_commands.json` when available to classify headers and resolve include paths. Recoverable preprocessor branches contribute AST-proven source facts, so a single selected configuration does not silently erase definitions or calls; UCN still cannot prove which branch a particular build activates. This is portable AST analysis, not a compiler build; macros, templates, generated code, reflection, and external dependency semantics can remain unverified.
44
+ Supported source families are JavaScript/TypeScript/TSX, Python, Go, Rust, Java, C, C++, C#, and HTML inline JavaScript/event handlers. C/C++ uses `compile_commands.json` when available to classify headers and resolve include paths. Recoverable preprocessor branches contribute AST-proven source facts, so a single selected configuration does not silently erase definitions or calls; disagreeing conditional macro identities stay visible as unverified. C++ resolution uses namespace ownership, static overload shape (including arrays), and macro-parameter requalification. C# resolution uses declared property/field receiver types plus overload and hiding discipline. This is portable AST analysis, not a compiler build; macros, templates, generated code, reflection, and external dependency semantics can remain unverified.
45
45
 
46
46
  `repo` readiness is task-specific. Its headline is navigation readiness;
47
47
  refactor, deletion, semantic recall, and the sampled evidence mix are separate
@@ -114,9 +114,16 @@ rejected, and unsupported advanced syntax should be handed to ripgrep.
114
114
  call candidates. Calls proved to belong to another same-name target are
115
115
  disclosed separately and excluded from the activity total.
116
116
 
117
- `plan` always includes the selected declaration plus indexed call/import/export
118
- previews. Read `changeSummary`, and manually review any edit marked
119
- `needsReview`; the command previews changes but does not apply or compile them.
117
+ For `plan --rename-to`, the selected declaration is only the starting point.
118
+ When the index proves the relationship, the rename unit closes over
119
+ overload/signature groups, base and override declarations, Rust trait slots,
120
+ Go interface slots and their satisfiers, exact call and value-reference tokens,
121
+ imports/exports, Python `__all__` strings, and module-attribute references.
122
+ Exact token/expression spans keep a foreign same-named occurrence on the same
123
+ line unchanged. Open external interfaces, incomplete ownership, unresolved
124
+ dispatch, or an inexact token route to `needsReview` instead of a synthesized
125
+ edit. Read `changeSummary` and every review item. `plan` previews only: it does
126
+ not modify files, run a compiler, or prove runtime compatibility.
120
127
 
121
128
  ## Efficient use
122
129
 
@@ -25,7 +25,7 @@ structural or code-only search.
25
25
  | `impact [handle]` | Show direct symbol impact when given a handle; without one, analyze the Git diff. |
26
26
  | `tests <handle\|file>` | Find statically linked direct tests. Set `--depth=N` for transitive affected tests. Empty results are not runtime coverage proof. |
27
27
  | `check [handle]` | Validate confirmed call-site arity for a symbol; without one, run the composed pre-commit diagnostic. |
28
- | `plan <handle>` | Preview `--rename-to`, `--add-param`, or `--remove-param` edits, including the selected declaration and indexed call/import/export sites. Review `changeSummary` and `needsReview`. |
28
+ | `plan <handle>` | Preview `--rename-to`, `--add-param`, or `--remove-param` edits. For renames, the proven closure can include overload/signature groups, inheritance/trait/Go-interface slots, exact call/reference tokens, imports/exports, Python `__all__` strings, and module-attribute references. Open ownership or method sets stay `needsReview`; the command never applies or compiles edits. |
29
29
 
30
30
  ## Repository and architecture
31
31
 
@@ -84,4 +84,4 @@ Omit the target for the current project. A target may be a file, directory, or q
84
84
 
85
85
  ## Language notes
86
86
 
87
- Supported source families are JavaScript/TypeScript/TSX, Python, Go, Rust, Java, C, C++, C#, and HTML inline JavaScript/event handlers. C/C++ consumes `compile_commands.json` when present for header-language and include-path context, and retains AST-proven facts across recoverable preprocessor branches. UCN remains portable AST analysis: it does not run a compiler, preprocessor, Roslyn, or an LSP during normal queries, and it does not assert which conditional branch a build activates.
87
+ Supported source families are JavaScript/TypeScript/TSX, Python, Go, Rust, Java, C, C++, C#, and HTML inline JavaScript/event handlers. C/C++ consumes `compile_commands.json` when present for header-language and include-path context, and retains AST-proven facts across recoverable preprocessor branches. C++ call identity uses namespace ownership, static overload shape (including arrays), and macro requalification; disagreeing conditional macro definitions remain visible as unverified. C# uses declared property/field receiver types and overload/hiding discipline. UCN remains portable AST analysis: it does not run a compiler, preprocessor, Roslyn, or an LSP during normal queries, and it does not assert which conditional branch a build activates.
package/README.md CHANGED
@@ -39,6 +39,8 @@ It's deliberately lightweight:
39
39
 
40
40
  - **No required background process** - the CLI parses on demand, answers, and
41
41
  exits. MCP stays warm only when you choose to run it.
42
+ - **No HTTP or network stack** - MCP uses a local, dependency-free stdio
43
+ transport; UCN never opens a port.
42
44
  - **No language servers, no compilation** - tree-sitter does the analysis
43
45
  without building the project.
44
46
  - **No config** - point it at a directory and ask.
@@ -200,7 +202,7 @@ ACCOUNT, CONTRACT, and WARNING lines survive the cut.
200
202
  Don't take the tiers on faith. Release gates re-derive UCN's answers from real
201
203
  compilers and language servers on a ten-repository board of pinned production
202
204
  codebases, and publishing is blocked unless they pass. The latest full
203
- release-board run (2026-08-11):
205
+ release-board run (2026-08-24):
204
206
 
205
207
  | Repository | Pinned commit | Oracle | Caller precision | Caller recall | Callee prec / recall | Command checks |
206
208
  |---|---|---|---:|---:|---:|---:|
@@ -211,16 +213,16 @@ release-board run (2026-08-11):
211
213
  | [ripgrep](https://github.com/BurntSushi/ripgrep) | [`82313cf9`](https://github.com/BurntSushi/ripgrep/commit/82313cf95849bfe425109ad9506a52154879b1b1) | rust-analyzer | 100% | 100% | 100% / 100% | 100% |
212
214
  | [clap](https://github.com/clap-rs/clap) | [`d3e59a9a`](https://github.com/clap-rs/clap/commit/d3e59a9ab214910b9dad02921b7ef42c6400de9b) | rust-analyzer | 100% | 100% | 100% / 100% | 100% |
213
215
  | [javapoet](https://github.com/square/javapoet) | [`b9017a95`](https://github.com/square/javapoet/commit/b9017a9503b76e11b4ad4c1a9f050e2d29112cb0) | JDT LS | 100% | 100% | 100% / 100% | 100% |
214
- | [newtonsoft-json](https://github.com/JamesNK/Newtonsoft.Json) | [`4f73e743`](https://github.com/JamesNK/Newtonsoft.Json/commit/4f73e74372445108d2c1bda37b36e6f5e43402e0) | Roslyn | 99.4% | 100% | 100% / 100% | 100% |
216
+ | [newtonsoft-json](https://github.com/JamesNK/Newtonsoft.Json) | [`4f73e743`](https://github.com/JamesNK/Newtonsoft.Json/commit/4f73e74372445108d2c1bda37b36e6f5e43402e0) | Roslyn | 100% | 100% | 100% / 100% | 100% |
215
217
  | [cjson](https://github.com/DaveGamble/cJSON) | [`c859b25d`](https://github.com/DaveGamble/cJSON/commit/c859b25da02955fef659d658b8f324b5cde87be3) | clangd | 100% | 100% | 100% / 100% | 100% |
216
- | [fmt](https://github.com/fmtlib/fmt) | [`e424e3f2`](https://github.com/fmtlib/fmt/commit/e424e3f2e607da02742f73db84873b8084fc714c) | clangd | 99.6% | 100% | 100% / 100% | 100% |
218
+ | [fmt](https://github.com/fmtlib/fmt) | [`e424e3f2`](https://github.com/fmtlib/fmt/commit/e424e3f2e607da02742f73db84873b8084fc714c) | clangd | 100% | 100% | 100% / 100% | 100% |
217
219
 
218
220
  On the same run: **zero** in-scope oracle call edges missing from the answer
219
221
  (the release gate) on every repository, **zero** false-dead `deadcode` claims
220
222
  in the oracle-visible sample, **8,000 / 8,000** cross-command consistency
221
223
  comparisons in agreement, **10 / 10** repositories inside the performance
222
- budget (slowest median cold build 15.4K lines/second by wall time, worst query
223
- p95 73.8 ms, highest peak RSS 771 MB), and 3,383 automated tests with no
224
+ budget (slowest normalized median cold build 17.4K lines/second by wall time,
225
+ worst query p95 83.0 ms, highest peak RSS 908.5 MB), and 3,609 automated tests with no
224
226
  failures or skips. The same gates run in CI (the scheduled
225
227
  [Eval workflow](https://github.com/mleoca/ucn/actions/workflows/eval.yml) and
226
228
  every release tag), and `npm run trust:gate` reproduces the release board
@@ -234,10 +236,11 @@ external population. Unverified precision is reported separately and is
234
236
  intentionally much lower on dispatch-heavy code: those entries are review
235
237
  candidates, never confirmed claims.
236
238
 
237
- Beyond the publish gate, a scheduled board re-checks 22 pinned repositories
239
+ Beyond the publish gate, a scheduled board re-checks 24 pinned repositories
238
240
  across every supported oracle language (zod, express, hono, zustand, fastify,
239
- rich, click, grpc-go, chi, cursive, gson, jsoup, and friends), plus a rotating
240
- fresh-repo arm of codebases the engine was never tuned on. Repositories that
241
+ rich, click, attrs, grpc-go, chi, cursive, itertools, gson, jsoup, and
242
+ friends), plus a rotating fresh-repo arm of codebases the engine was never
243
+ tuned on. Repositories that
241
244
  expose a gap stay on the board; they don't get removed to keep a table pretty.
242
245
  These are measured results on pinned code, not a claim of universal program
243
246
  understanding or identical performance on every machine.
@@ -299,8 +302,17 @@ cli/index.js (2 changes)
299
302
  ... (more changes in core/discovery.js, core/cache.js, core/project.js, test/integration.test.js)
300
303
  ```
301
304
 
302
- Anything `plan` can't represent safely is marked `needsReview` instead of
303
- being silently rewritten. Before committing, point the same machinery at your
305
+ For a rename, `plan` closes the change over every relationship the index can
306
+ prove: overload/signature groups, base and override declarations, Rust trait
307
+ slots, Go interface slots and their satisfiers, exact call and value-reference
308
+ tokens, imports/exports, Python `__all__` strings, and module-attribute
309
+ references. It edits exact token or expression spans, so another same-named
310
+ call on the same line is not swept up accidentally.
311
+
312
+ Open external interfaces, incomplete ownership, unresolved dispatch, or an
313
+ inexact token are marked `needsReview` instead of receiving a synthesized
314
+ edit. `plan` previews changes; it does not modify files or replace the
315
+ compiler and test suite. Before committing, point the same machinery at your
304
316
  Git diff:
305
317
 
306
318
  ```bash
@@ -518,10 +530,13 @@ evidence.
518
530
  - **C** - functions, structs, macros, includes, calls, entry points, API
519
531
  analysis.
520
532
  - **C++** - C coverage plus classes, methods, constructors, inheritance,
521
- namespaces, overloads, templates, typed field receivers.
533
+ namespaces, overloads, templates, typed field receivers, static array-shape
534
+ selection, and macro requalification. Conditional macro disagreement stays
535
+ visible as unverified.
522
536
  - **C#** - namespaces, classes/interfaces/records, fields/properties,
523
- attributes, overload-aware calls, async flow, top-level programs, .NET stack
524
- frames, ASP.NET/HttpClient endpoints.
537
+ attributes, declared property/field receiver types, overload and hiding
538
+ discipline, async flow, top-level programs, .NET stack frames, and
539
+ ASP.NET/HttpClient endpoints.
525
540
  - **HTML** - inline JavaScript and `on*` event handlers.
526
541
 
527
542
  For C and C++, a `compile_commands.json` improves header-language,
package/core/cache.js CHANGED
@@ -617,7 +617,34 @@ function clearAllCaches() {
617
617
  // object they patch (`console.log = fn` → 'console') — so the builtin-global
618
618
  // exclusion can see cross-file that a project def rebinds the global's
619
619
  // member (fix #286a); impl-kind symbols leave the bindings table (#286b).
620
- const CACHE_FORMAT_VERSION = 173;
620
+ // v177: C++ `template <>` full-specialization defs persist isSpecialization
621
+ // (fix #299A — identity closure with the primary template), and C++
622
+ // argument-position calls through a local callable variable record kind
623
+ // 'expr' instead of call:NAME (fix #299B shadow guard).
624
+ // v178: extendsGraph entries persist the defining symbol's startLine so
625
+ // scope-aware consumers can pick the right def when several same-name
626
+ // classes live in one file — function-local test subclasses (fix #300,
627
+ // attrs-measured); Go range VALUE variables are typed from the container's
628
+ // element type (declared fields/params/vars/literals — `for _, route :=
629
+ // range r.routes` types route as Route; fix #300, mux-measured), changing
630
+ // persisted call-record receiverTypes.
631
+ // v179: Go unnamed interface parameters are retained in paramsStructured;
632
+ // old caches report zero-arity interface methods and break rename closure.
633
+ // v183: Go calls persist exact spans, builtin-new receiver types, indexed
634
+ // multi-return assignment targets, and lexical-closure result hints for exact
635
+ // chain/tuple flow; Rust macro-token calls retain compiler-declared closure
636
+ // parameter receiver types, and Rust functions retain generic trait bounds.
637
+ // v184: Python constructor-result records no longer retain a receiverType
638
+ // inferred from an uppercase name that is value-bound in the lexical scope
639
+ // (fix #304). Reject v183 calls shards so stale false receiver evidence
640
+ // cannot survive an engine upgrade.
641
+ // v185: C# deep member receivers retain their root+field path instead of a
642
+ // false terminal receiverType copied from the root variable (fix #305).
643
+ // v188: C++ call records retain enclosing macro-argument positions and macro
644
+ // symbols retain AST-derived parameter qualification/forwarding effects, so
645
+ // replacement-list requalification cannot masquerade as lexical calls
646
+ // (fix #306).
647
+ const CACHE_FORMAT_VERSION = 188;
621
648
 
622
649
  /**
623
650
  * Save index to cache file