@aburi/diff 0.2.0 → 0.3.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.
package/LICENSE CHANGED
@@ -1,21 +1,202 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 kage1020
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 kage1020
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -43,8 +43,8 @@ import { buildDiff, writeCanonicalDiff } from "@aburi/diff"
43
43
  const diff = buildDiff({
44
44
  baseIR,
45
45
  headIR,
46
- base: { ref: "main", irSchema: "https://aburi.dev/schema/aburi.ir.v1.json" },
47
- head: { ref: "HEAD", irSchema: "https://aburi.dev/schema/aburi.ir.v1.json" },
46
+ base: { ref: "main", irSchema: "https://aburi.kage1020.com/schema/aburi.ir.v1.json" },
47
+ head: { ref: "HEAD", irSchema: "https://aburi.kage1020.com/schema/aburi.ir.v1.json" },
48
48
  gitRenames: null, // optional: { oldPath: newPath } table
49
49
  })
50
50
 
package/dist/index.d.mts CHANGED
@@ -1,22 +1,87 @@
1
1
  import { CallEdge, SerializeOptions } from "@aburi/core";
2
- import { Component, ComponentDiff, Dependency, DependencyDiff, DiffResult, IR, IRRef, MatchRationale, Signature, SliceRecord, Symbol, SymbolChange, SymbolDelta, SymbolId } from "@aburi/types";
2
+ import { Component, ComponentDiff, Dependency, DependencyDiff, DependencyEndpoint, DependencyUnknown, DiffResult, IR, IRRef, MatchRationale, NotComparedFile, RelativePath, Signature, SkipReason, SliceRecord, Summary, Symbol, SymbolChange, SymbolDelta, SymbolId } from "@aburi/types";
3
3
 
4
4
  //#region src/components.d.ts
5
5
  /**
6
- * §6.1 — Component diff. Component identity is `id`; when a Component is present in both
6
+ * `docs/design/diff-algorithm.md` §6.1 — Component diff. Assumes `components[].id` is unique on each side (ir-schema.md §14
7
+ * #2) and does not check it: `buildDiff` establishes that before calling, and a caller
8
+ * reaching this export directly owns the obligation, because the lookup map here is
9
+ * last-write-wins and a repeat is lost rather than reported.
10
+ *
11
+ * Component identity is `id`; when a Component is present in both
7
12
  * base and head with the same id, the three delta booleans describe which axes actually
8
13
  * moved (roots reshuffle, public API globs, or framework hint list). `modified` deltas
9
- * are intentionally absent from this diff (§5.2.3): fields are reported as before/after
14
+ * are intentionally absent from this diff (diff-algorithm.md §5.2.3): fields are reported as before/after
10
15
  * pairs via the `changed[]` entries so consumers can render them without stringifying
11
16
  * arrays.
12
17
  */
13
18
  declare function diffComponents(base: readonly Component[], head: readonly Component[]): ComponentDiff;
14
19
  /**
15
- * §6.2 — Dependency diff. Identity is the composite `(from, to, via)` triple; direction
16
- * and effect changes are surfaced as an added + removed pair so `modified` is not part of
17
- * the schema (§6.2 tail).
20
+ * What one document knows about itself, for deciding whether the *other* document's silence
21
+ * about an edge is evidence.
22
+ *
23
+ * `symbolFiles` is keyed on the endpoint id exactly as `dependencies[]` spells it, and its
24
+ * values come from `symbols[].source.file` — the same space `stats.skippedFiles[].path` is in,
25
+ * and the same space `buildDiff` classifies Symbols by. Reading the file out of the id's path
26
+ * segment instead would introduce a second answer to "which file is this endpoint in", and
27
+ * nothing in the schema forces the two to agree; a Symbol reported `unknown` while its edges
28
+ * stayed `removed` is precisely the inconsistency this exists to remove.
29
+ *
30
+ * A Component endpoint is absent from the map, which is how it stays out of the reclassification
31
+ * without a special case: a Component is an aggregate over roots and has no file to lose.
18
32
  */
19
- declare function diffDependencies(base: readonly Dependency[], head: readonly Dependency[]): DependencyDiff;
33
+ interface DependencySideView {
34
+ /**
35
+ * `source.file` of every Symbol this document holds, by the id an endpoint would name it
36
+ * with. Keyed by `DependencyEndpoint` rather than `SymbolId` because that is the question
37
+ * being asked: the lookup happens with an endpoint whose kind is not yet known, and "absent"
38
+ * is the answer for a Component id. Demanding the kind up front would move that decision to
39
+ * the caller, where it would need a second Symbol-id silhouette test to make.
40
+ */
41
+ symbolFiles: ReadonlyMap<DependencyEndpoint, RelativePath>;
42
+ /**
43
+ * Files this document never analysed, by path, with the reason it gave. `RelativePath` on
44
+ * both sides of the file space is what states the bridge these two maps exist to make — one
45
+ * map's values are the other's keys — though the alias is unbranded, so it is intent rather
46
+ * than enforcement.
47
+ */
48
+ lostFiles: ReadonlyMap<RelativePath, SkipReason>;
49
+ }
50
+ /**
51
+ * Build a side view from a document. The only construction site there is.
52
+ *
53
+ * `buildDiff` reads `lostFiles` for its own Symbol classification too, from this same object,
54
+ * so "a Symbol reported unknown and the edges it took with it cannot disagree about which file
55
+ * went missing" is a property of the wiring rather than a claim in a comment.
56
+ *
57
+ * Exported because `DependencySideView` is public and `diffDependencies` requires one: without
58
+ * a factory a caller would have to reproduce the `symbols[].source.file` keying and the
59
+ * `stats.skippedFiles` read, and the likeliest outcome of that is a caller who gets it wrong.
60
+ */
61
+ declare function dependencySideView(ir: IR): DependencySideView;
62
+ /**
63
+ * `docs/design/diff-algorithm.md` §6.2 — Dependency diff. Identity is the composite
64
+ * `(from, to, via)` triple; direction and effect changes are surfaced as an added + removed
65
+ * pair so `modified` is not part of the schema (§6.2 tail). Uniqueness of that triple is the caller's obligation on the same
66
+ * terms as `diffComponents` above — a repeat here is indistinguishable in the output from
67
+ * the flip it encodes.
68
+ *
69
+ * `sides` is what separates a deletion from a loss (`docs/design/diff-algorithm.md` §6.2.1).
70
+ * It is required rather than optional: omitting it would classify every edge into a lost file
71
+ * as a deletion again — silently, and while still writing `unknown: []`, which this schema
72
+ * defines as "nothing was unknown" rather than "nobody looked". A caller with no skip list to
73
+ * offer says so by passing a side view whose `lostFiles` is empty, which is the honest spelling
74
+ * of an IR written before `stats.skippedFiles` existed.
75
+ *
76
+ * The return type declares `unknown` present, where the schema leaves it optional for documents
77
+ * that predate the field. A reader may find it missing; this function always writes it.
78
+ */
79
+ declare function diffDependencies(base: readonly Dependency[], head: readonly Dependency[], sides: {
80
+ base: DependencySideView;
81
+ head: DependencySideView;
82
+ }): DependencyDiff & {
83
+ unknown: DependencyUnknown[];
84
+ };
20
85
  //#endregion
21
86
  //#region src/delta.d.ts
22
87
  declare const DEFAULT_LINE_FUZZ = 2;
@@ -55,6 +120,13 @@ type GitRenameMap = ReadonlyMap<string, string>;
55
120
  /**
56
121
  * §3.1 — segments Symbols with identical `id` into paired matches. Runs first because it
57
122
  * is the highest-confidence signal (no heuristics, just hash lookup).
123
+ *
124
+ * Assumes `id` is unique on each side (ir-schema.md §14 #1) and does not check it:
125
+ * `buildDiff` establishes that before calling, and a caller reaching this export directly
126
+ * owns the obligation. A repeat on the head side loses all but the last entry to the lookup
127
+ * map and then removes every one of them from `remainingHead`; a repeat on the base side
128
+ * pairs the same head Symbol more than once. The later stages track consumed base Symbols
129
+ * by id and lose a repeat the same way.
58
130
  */
59
131
  declare function matchStageId(base: readonly Symbol[], head: readonly Symbol[]): {
60
132
  matched: SymbolPair[];
@@ -63,7 +135,9 @@ declare function matchStageId(base: readonly Symbol[], head: readonly Symbol[]):
63
135
  };
64
136
  /**
65
137
  * §3.2 — git rename detection. When a rename map is available (typical of ref-driven
66
- * scans), rewrite the base id with the head-side file path and look for a hit.
138
+ * scans), rewrite the base id with the head-side file path and look for a hit. Two base
139
+ * files renamed onto one target predict the same head id, so the claimants are collected
140
+ * before one is chosen.
67
141
  *
68
142
  * The rewriter only touches the `file` portion of the id — the `<language>:` prefix and
69
143
  * the trailing `#<qualified-name>` segment stay unchanged so a moved file with the same
@@ -76,11 +150,10 @@ declare function matchStageGitRename(remainingBase: readonly Symbol[], remaining
76
150
  remainingHead: Symbol[];
77
151
  };
78
152
  /**
79
- * §3.3 — group base Symbols by `fingerprint.logic` and match head Symbols whose logic
80
- * fingerprint is in the map. Two disambiguation branches:
81
- * - single candidate → paired with `logic-fingerprint`
82
- * - multiple candidates → best `nameSimilarity` wins if ≥ 0.85; otherwise leave both
83
- * sides in remaining for stage 4 to re-evaluate
153
+ * §3.3 — group both sides by `fingerprint.logic` and pair within each group. Two branches:
154
+ * - single base candidate → paired with `logic-fingerprint`, no similarity test
155
+ * - several → `nameSimilarity` disambiguates at ≥ 0.85; a group that cannot reach it is left
156
+ * whole for stage 4 to re-evaluate
84
157
  *
85
158
  * Dropped symbols are excluded (§3.3 tail) — their logic fingerprint is the sentinel
86
159
  * `"000000000000"` and would collide with every other dropped Symbol in the workspace.
@@ -96,17 +169,35 @@ declare function matchStageLogicFingerprint(remainingBase: readonly Symbol[], re
96
169
  * `signatureNullness` distinguishes symbols with no signature (`interface`, `type`,
97
170
  * `class`) from callable ones so that a class body is never paired against a function.
98
171
  *
99
- * The composite score:
100
- * 0.5 * nameSimilarity + 0.3 * signatureSimilarity + 0.2 * ownerSimilarity
172
+ * §3.4.6's owner gate runs before the score: a pair whose owners are not the same class, or
173
+ * one a rename of the other, is not the same Symbol however well the rest agrees, and no
174
+ * weight small enough to leave the name axis meaning something can outvote a matching member
175
+ * name and signature.
176
+ *
177
+ * The composite score, over the pairs that clear it:
178
+ * 0.5 * memberSimilarity + 0.3 * signatureSimilarity + 0.2 * OWNER_AXIS_SATISFIED
179
+ *
180
+ * `memberSimilarity` reads the last segment, not the whole qualified name: the gate has
181
+ * already settled the owner, and reading it again on the name axis charges for it twice —
182
+ * which is what kept a renamed class from ever pairing (§3.4.6).
183
+ *
184
+ * §3.4.3 threshold table, applied per head by the token count of its last name segment:
185
+ * - 1 token → 1.0 (an exact match on both remaining axes)
186
+ * - 2 tokens → 0.95 (strict, avoids `getUser` vs `getUsers`)
187
+ * - default → 0.85
101
188
  *
102
- * §3.4.3 threshold table:
103
- * - 1-token name → 1.0 (unreachable → never paired; false-positive shield)
104
- * - 2-token name → 0.95 (strict, avoids `getUser` vs `getUsers`)
105
- * - default → 0.85
189
+ * §3.4.3 also names two Symbols the stage does not read at all, because for them the score is
190
+ * high on evidence it does not have rather than on a resemblance: one whose signature is
191
+ * null, since `signatureSimilarity(null, null)` is 1.0 and the bucket key restricts it to
192
+ * candidates that are equally signature-less; and one whose qualified name carries a single
193
+ * distinct token, since that is the whole of what its identity amounts to. Neither can be
194
+ * expressed as a threshold — the second wants a bar above the top of the scale.
106
195
  *
107
- * §3.4.3 tail — if both sides are signature-less, we skip pairing entirely because
108
- * signatureSimilarity always returns 1.0 for `null + null` and would flood the bucket with
109
- * false pairings.
196
+ * Every pairing in a bucket that clears its head’s threshold becomes a candidate, and the
197
+ * candidates are settled in score order rather than one head at a time — see
198
+ * `acceptInScoreOrder`. That doubles the pairings scored, from a bucket that shrank as heads
199
+ * consumed it to the full bucket every time; `createNameScorer` more than pays for it by
200
+ * tokenising each distinct name once per pass instead of once per comparison.
110
201
  */
111
202
  declare function matchStageNameSignature(remainingBase: readonly Symbol[], remainingHead: readonly Symbol[]): {
112
203
  matched: SymbolPair[];
@@ -114,13 +205,32 @@ declare function matchStageNameSignature(remainingBase: readonly Symbol[], remai
114
205
  remainingHead: Symbol[];
115
206
  };
116
207
  /**
117
- * §3.4.5 — dropped-only weak matcher. For dropped Symbols the fingerprint is zeroed and
118
- * name/signature are the only remaining signals. Score is a coarse "did the last name
119
- * segment or file basename survive?" — if either half matches we pair (threshold 0.5).
208
+ * §3.4.5 — dropped-only weak matcher. For dropped Symbols the fingerprint is zeroed, so the
209
+ * only signals left are the trailing segment of the qualified name and the file basename.
210
+ * Either one alone is enough to pair, which is deliberately lax: §3.4.5 accepts a
211
+ * false-positive risk because dropped Symbols sit outside the IR's main review surface.
120
212
  *
121
- * This is deliberately lax; diff-algorithm.md §3.4.5 already accepts that dropped Symbols live
122
- * outside the main IR review surface, so occasional false pairings only affect the
123
- * "Drop-rule variation" fold-out section in the Markdown projection.
213
+ * What it does not accept is a signal that identifies nothing. A basename hit on `index.ts`
214
+ * — the most common filename in a TypeScript monorepo — paired every dropped Symbol of one
215
+ * kind under one with every other, at a score they all tied on, and the results landed in
216
+ * `summary.moved`, which `--fail-on moved` gates on. So a half counts only when exactly one
217
+ * dropped base and one dropped head carry that key: such a key names a pair, where a key
218
+ * several Symbols carry names a group, and a group is not a pairing.
219
+ *
220
+ * That makes the candidates the identifying keys themselves — at most one pairing each,
221
+ * two axes, so at most `2 × min(base, head)` of them rather than the cross-product a shared
222
+ * basename used to produce.
223
+ *
224
+ * "Exactly one" is counted over the Symbols this stage is handed, not over every dropped
225
+ * Symbol in the Document — stages 1 and 2 have already taken theirs, and a key they emptied
226
+ * out identifies again. That is the intended reading, since the question is which leftover a
227
+ * key picks out, but it is also how a shared `index.ts` comes back: three dropped classes
228
+ * under one, two of them matched by id, and the basename identifies the two that are left.
229
+ *
230
+ * It also leaves nothing for §3.4.5's 0.5-per-half scale to rank, so §3.8's sweep is the
231
+ * wrong instrument: it settles conflicts by score, and with none to settle by it would drop
232
+ * one identified pairing for another over nothing but the id it sorts under. `bestPairing`
233
+ * takes a maximum matching instead.
124
234
  */
125
235
  declare function matchStageDroppedWeak(remainingBase: readonly Symbol[], remainingHead: readonly Symbol[]): {
126
236
  matched: SymbolPair[];
@@ -129,6 +239,18 @@ declare function matchStageDroppedWeak(remainingBase: readonly Symbol[], remaini
129
239
  };
130
240
  //#endregion
131
241
  //#region src/diff.d.ts
242
+ /**
243
+ * The two counters `buildDiff` always writes, narrowed off `Summary`'s optionals.
244
+ *
245
+ * They are optional on the wire so a diff written before they existed stays valid, and that
246
+ * optionality is about *documents*, not about this function — a caller holding a value it just
247
+ * built should not have to re-decide what "absent" would have meant. Same reason
248
+ * `diffDependencies` declares its `unknown` array present.
249
+ */
250
+ interface UnknownCounters {
251
+ unknown: number;
252
+ depsUnknown: number;
253
+ }
132
254
  interface DiffInput {
133
255
  baseIR: IR;
134
256
  headIR: IR;
@@ -152,7 +274,19 @@ interface DiffInput {
152
274
  * pipe the result through additional steps (Markdown projection, `--fail-on` gate) before
153
275
  * serialisation.
154
276
  */
155
- declare function buildDiff(input: DiffInput): DiffResult;
277
+ declare function buildDiff(input: DiffInput): DiffResult & {
278
+ notCompared: NotComparedFile[];
279
+ summary: Summary & UnknownCounters;
280
+ };
281
+ /**
282
+ * The files a document's scan never analysed, by path, with why.
283
+ *
284
+ * `stats.skippedFiles` is Class B: absent means the writer predates the field, not that
285
+ * nothing was lost. An empty map is the honest answer either way — with no enumeration
286
+ * there is no absence this function can explain, and guessing from
287
+ * `totalFiles > parsedFiles` would attach a reason to whichever Symbols happened to be
288
+ * missing. The CLI says so on stderr instead; a diff cannot invent the list.
289
+ */
156
290
  /**
157
291
  * Byte-deterministic serialiser for a DiffResult. Delegates to `@aburi/core`
158
292
  * `serializeCanonical` so the sort order, NFC normalisation, and codepoint key sort are
@@ -173,6 +307,13 @@ type DiffErrorCode = /** `base.$schema` and `head.$schema` disagree; a diff acro
173
307
  * cryptic `TypeError: undefined is not iterable` deep in a matching stage.
174
308
  */
175
309
  | "ir-shape-invalid"
310
+ /**
311
+ * `baseIR` or `headIR` repeats an identity the diff keys on: a `symbols[].id`, a
312
+ * `components[].id`, or a `dependencies[]` `(from, to, via)` triple. Distinct from
313
+ * `ir-shape-invalid` because the Document is well-formed — the collision changes the
314
+ * answer rather than preventing one, and ir-schema.md §14 #1 / #2 / #13 already forbid it.
315
+ */
316
+ | "ir-identity-collision"
176
317
  /**
177
318
  * A `SliceRecord` broke the derivation invariant of slice-view.md §7.1 / §8.2:
178
319
  * `members[]` empty, `members[]` not in strictly ascending order, or `id` not
@@ -229,6 +370,15 @@ declare function signatureSimilarity(base: Signature | null | undefined, head: S
229
370
  * The result is de-duplicated so `InvoiceService.createInvoice` collapses to
230
371
  * `["invoice", "service", "create"]` — Jaccard similarity relies on set semantics, so
231
372
  * repeated tokens must not double-count.
373
+ *
374
+ * **The camel boundary is ASCII.** `isCamelBoundary` compares code points against `a`–`z`,
375
+ * `A`–`Z` and `0`–`9`, so a name written in a script with no ASCII case boundary and no
376
+ * separator comes back whole: `获取用户信息` and `ユーザー情報を取得する` are one token each,
377
+ * and so is `получитьПользователя` — its camel hump does not register. A separator still
378
+ * splits (`ユーザー.取得` gives two), and a mixed name splits on its ASCII half.
379
+ *
380
+ * That makes the token count a poor measure of how much such a name says, which matters
381
+ * wherever a count is read as a proxy for that — see §3.4.3's admissibility rule.
232
382
  */
233
383
  declare function tokenizeName(input: string): string[];
234
384
  /**
@@ -237,7 +387,11 @@ declare function tokenizeName(input: string): string[];
237
387
  * purpose of §3.4.1). Empty on one side only returns 0.0.
238
388
  */
239
389
  declare function jaccard(a: readonly string[], b: readonly string[]): number;
240
- /** name-token Jaccard shortcut used by nameSimilarity and ownerSimilarity call sites. */
390
+ /**
391
+ * Jaccard over the tokens of two strings. Part of the module's surface rather than an
392
+ * internal shortcut: the two formulas below go through a token table they share for one
393
+ * matching pass, so this has no caller inside this file.
394
+ */
241
395
  declare function jaccardTokens(a: string, b: string): number;
242
396
  /**
243
397
  * §3.4.1 — Jaccard over the tokens of the full qualified name. The last segment is not
@@ -246,20 +400,36 @@ declare function jaccardTokens(a: string, b: string): number;
246
400
  */
247
401
  declare function nameSimilarity(baseName: string, headName: string): number;
248
402
  /**
249
- * §3.4.6 — owner similarity: same as nameSimilarity but restricted to everything **before**
250
- * the last segment. Compensates for the R-8 same-name-different-class collision, where
251
- * `UserRepo.getUser` should not be pair-swapped with `AdminRepo.getUser`.
403
+ * §3.4.1 — Jaccard over the tokens of the **last segment**: the member name with its owner
404
+ * removed. What §3.4's composite reads, because §3.4.6 decides the owner separately and
405
+ * reading it on both axes charges for it twice.
406
+ */
407
+ declare function memberSimilarity(baseName: string, headName: string): number;
408
+ /**
409
+ * §3.4.6 (R-8) — whether two Symbols are close enough in *scope* to be the same Symbol: the
410
+ * same owner, or one whose owner was renamed. A gate rather than a score, because grading the
411
+ * owner cannot do what R-8 asks. `UserRepo.findById` and `AdminRepo.findById` agree on their
412
+ * member name and their signature, so a shared `Repo` token at weight 0.2 carries them to
413
+ * 0.8667 against a 0.85 threshold — while `UsersRepository.findById`, which *is* the rename,
414
+ * shares no owner token and scores 0.8000. The collision outscores the rename, and raising the
415
+ * weight only moves both: at 0.3 two three-token class names sharing two tokens land on
416
+ * exactly 0.85.
252
417
  *
253
418
  * Owner extraction:
254
419
  * - `Class::method` → `Class`
255
420
  * - `A.B.C.method` → `A.B.C`
256
421
  * - `topLevel` → `` (empty)
257
422
  *
258
- * When both owners are empty (top-level functions), returns 1.0 because both live in the
259
- * same "no-owner" bucket. When one is empty and the other is not, returns 0.0 because the
260
- * two Symbols live in structurally different scopes.
423
+ * Two empty owners are compatible: top-level Symbols share the one outer scope. One empty and
424
+ * one not are never compatible — the two live at different depths.
425
+ *
426
+ * Otherwise the owners must correspond segment for segment, and within a segment every token
427
+ * on each side must find a distinct partner on the other under `sameWord`. Both sides must be
428
+ * covered, so `UserRepo` and `UserRepoV2` are two classes rather than one renamed — an added
429
+ * token is as much evidence of a sibling as of a rename, and R-8's business is refusing the
430
+ * collision.
261
431
  */
262
- declare function ownerSimilarity(baseName: string, headName: string): number;
432
+ declare function ownersAreCompatible(baseName: string, headName: string): boolean;
263
433
  /** §3.4.1 tail note — used by drop-4.5 weak matcher and threshold lookup. */
264
434
  declare function lastSegment(qname: string): string;
265
435
  //#endregion
@@ -355,5 +525,5 @@ declare function classifyStatus(base: Symbol, head: Symbol): SymbolStatus;
355
525
  type DropDirection = "to-dropped" | "to-kept";
356
526
  declare function dropDirection(head: Symbol): DropDirection;
357
527
  //#endregion
358
- export { DEFAULT_LINE_FUZZ, type DeltaOptions, DiffError, type DiffErrorCode, type DiffErrorDetail, type DiffInput, type DropDirection, type GitRenameMap, MAX_LINE_FUZZ, MIN_LINE_FUZZ, type SliceInput, type SliceRecordViolation, type SliceViolationKind, type SymbolPair, type SymbolStatus, assertSliceRecordInvariant, buildDiff, classifyStatus, computeSlices, computeSymbolDelta, diffComponents, diffDependencies, dropDirection, jaccard, jaccardTokens, lastSegment, matchStageDroppedWeak, matchStageGitRename, matchStageId, matchStageLogicFingerprint, matchStageNameSignature, nameSimilarity, ownerSimilarity, signatureSimilarity, sliceAnchor, sliceRecordViolation, tokenizeName, writeCanonicalDiff };
528
+ export { DEFAULT_LINE_FUZZ, type DeltaOptions, type DependencySideView, DiffError, type DiffErrorCode, type DiffErrorDetail, type DiffInput, type DropDirection, type GitRenameMap, MAX_LINE_FUZZ, MIN_LINE_FUZZ, type SliceInput, type SliceRecordViolation, type SliceViolationKind, type SymbolPair, type SymbolStatus, assertSliceRecordInvariant, buildDiff, classifyStatus, computeSlices, computeSymbolDelta, dependencySideView, diffComponents, diffDependencies, dropDirection, jaccard, jaccardTokens, lastSegment, matchStageDroppedWeak, matchStageGitRename, matchStageId, matchStageLogicFingerprint, matchStageNameSignature, memberSimilarity, nameSimilarity, ownersAreCompatible, signatureSimilarity, sliceAnchor, sliceRecordViolation, tokenizeName, writeCanonicalDiff };
359
529
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/components.ts","../src/delta.ts","../src/match.ts","../src/diff.ts","../src/errors.ts","../src/signature.ts","../src/similarity.ts","../src/slice.ts","../src/status.ts"],"mappings":";;;;;;;AAgBA;;;;;iBAAgB,cAAA,CACd,IAAA,WAAe,SAAA,IACf,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,QAAA;AAAA;;;;APIV;AA4ChB;;;;;;;;;;;;;;AAGiB;iBO7BD,aAAA,CAAc,KAAA,EAAO,UAAA,GAAa,WAAW;;;ANxB7D;;;;AAA8B;AAC9B;;;iBMyFgB,WAAA,CAAY,MAAA,EAAQ,WAAA,GAAc,QAAQ;ANzFhC;AAAA,KMsGd,kBAAA,sMNnGZ,2MAOU;AAAA,UMwGO,oBAAA;EACf,IAAA,EAAM,kBAAkB;EN/FlB;EMiGN,OAAA;EN/FS;EMiGT,OAAA;AAAA;;;;;;;;;;ANhGY;;iBM8GE,oBAAA,CAAqB,KAAA,YAAiB,oBAAoB;;ALzI1E;;;;iBKyOgB,0BAAA,CAA2B,MAAmB,EAAX,WAAW;;;KCjPlD,YAAA;;;ARcZ;;;;;;;;;;iBQAgB,cAAA,CAAe,IAAA,EAAM,MAAA,EAAU,IAAA,EAAM,MAAA,GAAW,YAAA;;KAepD,aAAA;AAAA,iBAEI,aAAA,CAAc,IAAA,EAAM,MAAA,GAAW,aAAa"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/components.ts","../src/delta.ts","../src/match.ts","../src/diff.ts","../src/errors.ts","../src/signature.ts","../src/similarity.ts","../src/slice.ts","../src/status.ts"],"mappings":";;;;;;;AA2BA;;;;;;;;;;iBAAgB,cAAA,CACd,IAAA,WAAe,SAAA,IACf,IAAA,WAAe,SAAA,KACd,aAAA;;;;AAAa;AAqDhB;;;;;;;;;;UAAiB,kBAAA;EAQf;;;;;;;EAAA,WAAA,EAAa,WAAA,CAAY,kBAAA,EAAoB,YAAA;EAOE;AAAA;AAcjD;;;;EAdE,SAAA,EAAW,WAAA,CAAY,YAAA,EAAc,UAAA;AAAA;;;AAcuB;AAyB9D;;;;;;;;iBAzBgB,kBAAA,CAAmB,EAAA,EAAI,EAAA,GAAK,kBAAkB;;;;;;;;;;;;;;;;AA6Bd;;iBAJhC,gBAAA,CACd,IAAA,WAAe,UAAA,IACf,IAAA,WAAe,UAAA,IACf,KAA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