sourcecode 2.0.1__py3-none-any.whl → 2.2.0__py3-none-any.whl

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.
sourcecode/__init__.py CHANGED
@@ -1,3 +1,7 @@
1
- """sourcecode — Deterministic codebase context maps for AI coding agents."""
1
+ """ASK Engine (CLI: ``ask``) — Deterministic codebase context maps for AI coding agents.
2
2
 
3
- __version__ = "2.0.1"
3
+ ASK Engine is the product. ``ask`` is the canonical CLI command; ``sourcecode`` is
4
+ the legacy compatibility alias and the Python/PyPI package name. See
5
+ docs/PRODUCT_IDENTITY.md (normative)."""
6
+
7
+ __version__ = "2.2.0"
@@ -0,0 +1,42 @@
1
+ """Single source of truth for the caller / fan-in metric reconciliation note.
2
+
3
+ Three commands report a "how many things reference this class" number, each
4
+ derived from a different graph projection. Read side by side they can look
5
+ contradictory (e.g. 215 vs 103 for the same class) — they are not. They count
6
+ different populations:
7
+
8
+ modernize.in_degree >= explain.incoming_callers ~= impact.stats.direct_caller_count
9
+
10
+ - ``modernize.in_degree`` counts graph *edges* (all edge types, symbol level, not
11
+ deduplicated per class) — a blast-radius ranking weight, always the largest, and
12
+ not a count of classes.
13
+ - ``explain.incoming_callers`` and ``impact.stats.direct_caller_count`` both count
14
+ *distinct dependent classes*. They normally match and are always the same order
15
+ of magnitude, but can differ by a small margin because each includes a slightly
16
+ different edge set (import-only references, DI-interface resolution). The
17
+ truncated ``impact.direct_callers`` array is a display sample, not the count.
18
+
19
+ Empirically verified across repositories (Broadleaf ExtensionManager: 215 / 103 /
20
+ 103; petclinic entities & repositories: equal; occasional margin-of-one divergence
21
+ on classes with import-only references). The strict-equality claim was deliberately
22
+ NOT made — the note asserts only the robust ordering and the "same distinct-class
23
+ metric" relationship.
24
+
25
+ Every command that emits one of these numbers references this same string so the
26
+ explanation can never drift or contradict itself between commands.
27
+ """
28
+
29
+ CALLER_METRIC_RECONCILIATION: str = (
30
+ "Fan-in / caller counts differ across commands BY DESIGN and are not "
31
+ "contradictory. For the same class the expected relationship is: "
32
+ "modernize.in_degree >= explain.incoming_callers ~= impact.stats.direct_caller_count. "
33
+ "modernize.in_degree = raw count of ALL incoming graph edges (imports, injects, "
34
+ "extends/implements, references, annotations), counted at symbol level and NOT "
35
+ "deduplicated per class — a blast-radius ranking weight, not a count of classes; "
36
+ "it is always the largest of the three. explain.incoming_callers and "
37
+ "impact.stats.direct_caller_count both count DISTINCT dependent classes "
38
+ "(deduplicated to class level); they normally match but can differ by a small "
39
+ "margin because each includes a slightly different edge set (e.g. import-only "
40
+ "references or DI-interface resolution). The top-level impact.direct_callers array "
41
+ "may be truncated for output size — use stats.direct_caller_count for the true total."
42
+ )