ucn 5.3.4 → 5.3.5

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.
@@ -220,3 +220,25 @@ file set, the unit a refactor has to break.
220
220
  - Use `search` or ordinary repository search for text, filenames, configuration, and unsupported syntax.
221
221
 
222
222
  Read [references/commands.md](references/commands.md) for all public commands and flags. Read [references/trust-contract.md](references/trust-contract.md) before building automation that gates changes on UCN output.
223
+
224
+
225
+ ### Inspect confirmation provenance
226
+
227
+ Caller and callee JSON carries compact `provenance`: `rule`, contributing `rules`
228
+ when there is more than one, `validation`, and the receiver's source and origin
229
+ line when recorded. Incomplete proofs include a `diagnostic`, also shown in text.
230
+ Callees retain compact `siteProvenance` for each distinct occurrence; their summary
231
+ uses the weakest confirmed site's rule. Exclusions expose counts by rule and
232
+ validation under `account.excluded.evidenceSummary`. Full declaration, import,
233
+ and member-lookup facts remain on engine results and in oracle reports.
234
+
235
+ A lone project owner of a method name does not identify an untyped receiver.
236
+ Such candidates stay unverified with `single-owner`; importing the class does not
237
+ change that. `provenance-incomplete` means the available facts cannot establish
238
+ this declaration. Inspect the site and diagnostic before editing it. Neither
239
+ reason is permission to discard a possible caller. `validation: unsupported`
240
+ means the witness collector does not yet cover that path (for example a wildcard
241
+ re-export or an external inherited member). Its existing classification is kept
242
+ in report-only mode; it is not a validated proof. Missing or inconsistent facts
243
+ on a supported lookup still route unverified. Full rule migration is tracked as
244
+ #356. Ordinal evidence weights are not probabilities.
package/core/account.js CHANGED
@@ -463,7 +463,11 @@ function buildAccount(index, name, parts) {
463
463
  confirmed,
464
464
  unverified,
465
465
  nonCall,
466
- excluded: { total: excludedTotal, byReason: excludedByReason },
466
+ excluded: { total: excludedTotal, byReason: excludedByReason,
467
+ ...(excludedEntries.some(e => e.provenance) && { evidence: excludedEntries
468
+ .filter(e => e.provenance).map(e => ({ file: relPath(index, e.file),
469
+ line: e.line, reason: e.reason, provenance: e.provenance })) }),
470
+ },
467
471
  unparsed: groundSet.unparsed,
468
472
  unsupported,
469
473
  unreadableFiles: groundSet.unreadableFiles,
package/core/analysis.js CHANGED
@@ -1158,6 +1158,8 @@ function impact(index, name, options = {}) {
1158
1158
  evidenceScore: c.evidenceScore,
1159
1159
  scoreKind: c.scoreKind,
1160
1160
  resolution: c.resolution,
1161
+ ...(c.provenance && { provenance: c.provenance }),
1162
+ ...(c.siteProvenance && { siteProvenance: c.siteProvenance }),
1161
1163
  ...(c.tier && { tier: c.tier }),
1162
1164
  ...analysis
1163
1165
  });
@@ -1190,6 +1192,8 @@ function impact(index, name, options = {}) {
1190
1192
  evidenceScore: c.evidenceScore,
1191
1193
  scoreKind: c.scoreKind,
1192
1194
  resolution: c.resolution,
1195
+ ...(c.provenance && { provenance: c.provenance }),
1196
+ ...(c.siteProvenance && { siteProvenance: c.siteProvenance }),
1193
1197
  tier: c.tier,
1194
1198
  }));
1195
1199
  // findCallers already applied binding, receiver, module ownership, and
@@ -1241,6 +1245,8 @@ function impact(index, name, options = {}) {
1241
1245
  evidenceScore: call.evidenceScore,
1242
1246
  scoreKind: call.scoreKind,
1243
1247
  resolution: call.resolution,
1248
+ ...(call.provenance && { provenance: call.provenance }),
1249
+ ...(call.siteProvenance && { siteProvenance: call.siteProvenance }),
1244
1250
  ...(call.tier && { tier: call.tier }),
1245
1251
  ...analysis
1246
1252
  });
@@ -1262,6 +1268,8 @@ function impact(index, name, options = {}) {
1262
1268
  evidenceScore: u.evidenceScore,
1263
1269
  scoreKind: u.scoreKind,
1264
1270
  resolution: u.resolution,
1271
+ ...(u.provenance && { provenance: u.provenance }),
1272
+ ...(u.siteProvenance && { siteProvenance: u.siteProvenance }),
1265
1273
  tier: 'unverified',
1266
1274
  ...(u.reason && { reason: u.reason }),
1267
1275
  ...(u.dispatchVia && { dispatchVia: u.dispatchVia }),
@@ -1711,6 +1719,8 @@ function about(index, name, options = {}) {
1711
1719
  evidenceScore: c.evidenceScore,
1712
1720
  scoreKind: c.scoreKind,
1713
1721
  resolution: c.resolution,
1722
+ ...(c.provenance && { provenance: c.provenance }),
1723
+ ...(c.siteProvenance && { siteProvenance: c.siteProvenance }),
1714
1724
  reachable: c.reachable,
1715
1725
  }));
1716
1726
 
@@ -1735,6 +1745,8 @@ function about(index, name, options = {}) {
1735
1745
  evidenceScore: c.evidenceScore,
1736
1746
  scoreKind: c.scoreKind,
1737
1747
  resolution: c.resolution,
1748
+ ...(c.provenance && { provenance: c.provenance }),
1749
+ ...(c.siteProvenance && { siteProvenance: c.siteProvenance }),
1738
1750
  ...(c.reason && { reason: c.reason }),
1739
1751
  ...(c.dispatchVia && { dispatchVia: c.dispatchVia }),
1740
1752
  ...(c.dispatchCandidates != null && { dispatchCandidates: c.dispatchCandidates }),
@@ -1786,6 +1798,8 @@ function about(index, name, options = {}) {
1786
1798
  evidenceScore: c.evidenceScore,
1787
1799
  scoreKind: c.scoreKind,
1788
1800
  resolution: c.resolution,
1801
+ ...(c.provenance && { provenance: c.provenance }),
1802
+ ...(c.siteProvenance && { siteProvenance: c.siteProvenance }),
1789
1803
  reachable: c.reachable,
1790
1804
  ...(c.returnType && { returnType: c.returnType }),
1791
1805
  ...(c.paramTypes && { paramTypes: c.paramTypes }),
@@ -2392,6 +2406,8 @@ function diffImpact(index, options = {}) {
2392
2406
  evidenceScore: c.evidenceScore,
2393
2407
  scoreKind: c.scoreKind,
2394
2408
  resolution: c.resolution,
2409
+ ...(c.provenance && { provenance: c.provenance }),
2410
+ ...(c.siteProvenance && { siteProvenance: c.siteProvenance }),
2395
2411
  ...(c.tier && { tier: c.tier }),
2396
2412
  })),
2397
2413
  unverifiedCallers: unverified.map(u => ({
@@ -2404,6 +2420,8 @@ function diffImpact(index, options = {}) {
2404
2420
  evidenceScore: u.evidenceScore,
2405
2421
  scoreKind: u.scoreKind,
2406
2422
  resolution: u.resolution,
2423
+ ...(u.provenance && { provenance: u.provenance }),
2424
+ ...(u.siteProvenance && { siteProvenance: u.siteProvenance }),
2407
2425
  tier: 'unverified',
2408
2426
  ...(u.reason && { reason: u.reason }),
2409
2427
  ...(u.dispatchVia && { dispatchVia: u.dispatchVia }),
package/core/cache.js CHANGED
@@ -707,7 +707,10 @@ function clearAllCaches() {
707
707
  // v212 (fix #342): extendsGraph/extendedByGraph no longer persisted (rebuilt on load).
708
708
  // v213 (fix #348): Python from-import records carry per-name `renames` so
709
709
  // import bindings pair each alias with its own module.
710
- const CACHE_FORMAT_VERSION = 214;
710
+ // v215: receiver-type provenance records the originating AST fact (#355).
711
+ // v224 (#355 recovery): Go declaration origins; Rust aliases, wrapper patterns,
712
+ // copied bindings and qualified macro receivers; TS indexed array evidence.
713
+ const CACHE_FORMAT_VERSION = 224;
711
714
  const USAGE_CACHE_FILE = 'usage-results.json';
712
715
 
713
716
  /**