sourcecode 2.5.7__py3-none-any.whl → 2.5.8__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
@@ -4,4 +4,4 @@ ASK Engine is the product. ``ask`` is the canonical CLI command; ``sourcecode``
4
4
  the legacy compatibility alias and the Python/PyPI package name. See
5
5
  docs/PRODUCT_IDENTITY.md (normative)."""
6
6
 
7
- __version__ = "2.5.7"
7
+ __version__ = "2.5.8"
sourcecode/ris.py CHANGED
@@ -29,7 +29,7 @@ import subprocess
29
29
  from dataclasses import asdict, dataclass
30
30
  from datetime import datetime, timezone
31
31
  from pathlib import Path
32
- from typing import Optional
32
+ from typing import Any, Optional
33
33
 
34
34
  RIS_SCHEMA_VERSION: str = "1.0"
35
35
  _RIS_FILENAME: str = "ris.json.gz"
@@ -107,9 +107,46 @@ def save_ris(repo_root: Path, ris: RepositoryIntelligenceSnapshot) -> None:
107
107
  # Data extraction from L1 core_dict
108
108
  # ---------------------------------------------------------------------------
109
109
 
110
+ def _entrypoint_paths(raw: Any) -> list[str]:
111
+ """Normalize agent_view's `entry_points` to the file paths RIS promises.
112
+
113
+ `structural_map["entrypoints"]` is consumed as a list of path STRINGS (it is
114
+ sliced, and every reader guards with `isinstance(fp, str)`), but agent_view
115
+ emits that key in two different shapes under one schema_version:
116
+
117
+ {"bootstrap": [path, …], "security": […], "controllers": {counts}}
118
+ when a bootstrap/security entry point was detected (Spring, …)
119
+ [{"path": …, "kind": …}, …]
120
+ otherwise
121
+
122
+ Storing either verbatim broke BOTH readers: the dict raised `KeyError` on
123
+ `entrypoints[:10]` — swallowed by a bare `except Exception`, silently
124
+ disabling the RIS fast path on exactly the Java/Spring repos it exists for —
125
+ and the list of dicts recovered zero paths, because a dict is not a `str`.
126
+
127
+ The shape drift itself is a separate schema question; normalizing here keeps
128
+ RIS's own contract true whichever shape it is handed, including plain paths.
129
+ """
130
+ if isinstance(raw, dict):
131
+ # Only bootstrap/security carry paths; `controllers` is a count summary.
132
+ out: list[str] = []
133
+ for key in ("bootstrap", "security"):
134
+ out.extend(p for p in (raw.get(key) or []) if isinstance(p, str))
135
+ return out
136
+ if isinstance(raw, list):
137
+ out = []
138
+ for item in raw:
139
+ if isinstance(item, str):
140
+ out.append(item)
141
+ elif isinstance(item, dict) and isinstance(item.get("path"), str):
142
+ out.append(item["path"])
143
+ return out
144
+ return []
145
+
146
+
110
147
  def _extract_structural_map(agent_data: dict) -> dict:
111
148
  """Extract structural map from agent_view output."""
112
- entry_points = agent_data.get("entry_points", [])
149
+ entry_points = _entrypoint_paths(agent_data.get("entry_points", []))
113
150
 
114
151
  layers = []
115
152
  domains = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 2.5.7
3
+ Version: 2.5.8
4
4
  Summary: Persistent structural context and ultra-fast repeated analysis for AI coding agents
5
5
  License-File: LICENSE
6
6
  Keywords: agents,ai,codebase,context,developer-tools,llm
@@ -1,4 +1,4 @@
1
- sourcecode/__init__.py,sha256=AYI3dPxhkPPbI6cutQ3CdTcxsveWkRyIzUZMCY7lfFs,308
1
+ sourcecode/__init__.py,sha256=_NfSfXuUp-msE-TND4uH-8TBeVxxl6h_wE6eoRCY_E8,308
2
2
  sourcecode/adaptive_scanner.py,sha256=XffluXKzJUXrMtjEiAOnSNPZnztdIcts17T9ouHeID0,10521
3
3
  sourcecode/archetype.py,sha256=d7yoN6Tj4OBj-VgSMPEKg4WF9H8FypnZ5A6AkUh5oIE,34484
4
4
  sourcecode/architecture_analyzer.py,sha256=1CEIeFtuxdzeFaeUtA5QuDmFkb5eilUK8zRmk9tcDxc,55644
@@ -57,7 +57,7 @@ sourcecode/relevance_scorer.py,sha256=0AgEt4KrV73nioMqBgjhGjtY7L2C7L7cSyKtj3IKcr
57
57
  sourcecode/rename_refactor.py,sha256=h6dNFlB9aZ_3q6heeHBkgXQeXaT03nvPSsYH6P8qxFg,12965
58
58
  sourcecode/repo_classifier.py,sha256=FG1vaWKdWXsWdl-S8hjVMiTqcwgaRXkDyvK4rPcOGtQ,22681
59
59
  sourcecode/repository_ir.py,sha256=F6lRgPoP8oTtnGpRgjoLw-dlxZRXH7XOcehtcNwufEY,309550
60
- sourcecode/ris.py,sha256=aG2D4159gtpg968yD3PylYbIXhGFOwIlFBI0DSr84yY,20412
60
+ sourcecode/ris.py,sha256=Hw8TakTQ6hku-Abf2k8954NwkrH_sP73_8wVH8x5khc,22079
61
61
  sourcecode/runtime_classifier.py,sha256=uTAD6BDCiBLUZEDRfqk718kM4RTT_vAbfkcOI2_Xx58,18432
62
62
  sourcecode/scanner.py,sha256=WdOQ78mMzjR1NjmKTlbxdgwinnCTfAhxCVLBEFQiFHU,8899
63
63
  sourcecode/schema.py,sha256=aHNXDf8LGyUC8ZDE_VS9kiskC2-Oswhi_WnpdGy6HDw,24897
@@ -137,8 +137,8 @@ sourcecode/telemetry/consent.py,sha256=LIAO9ohJZF8OuZwM4u1VWtALlYfTCCKq4wV3Vwc7i
137
137
  sourcecode/telemetry/events.py,sha256=LtzYfaX9Ilckj5PTvAcTpDa9mLqDsYPDUiDkRa58piY,2580
138
138
  sourcecode/telemetry/filters.py,sha256=NHa5T-6DaZduQPFuC34jOqHWQgSizM-Ygq8aZ4j19ng,5834
139
139
  sourcecode/telemetry/transport.py,sha256=4gGHsq0WeY9VywEZXA3vUxykfiYnw9uuqfjAAec7F8o,1681
140
- sourcecode-2.5.7.dist-info/METADATA,sha256=WZPw6sppRfqGy5VxcYxS97BHKScBppWAW2UI8eD_TIM,10851
141
- sourcecode-2.5.7.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
142
- sourcecode-2.5.7.dist-info/entry_points.txt,sha256=-JEAdChrK5We51kZcb7OaDcyil-dHBjBPL-NhuO-QY8,89
143
- sourcecode-2.5.7.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
144
- sourcecode-2.5.7.dist-info/RECORD,,
140
+ sourcecode-2.5.8.dist-info/METADATA,sha256=woc6vFFAaDW8k2ZxGcFwNar-lnPjeWZA15ZhMjSZBz8,10851
141
+ sourcecode-2.5.8.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
142
+ sourcecode-2.5.8.dist-info/entry_points.txt,sha256=-JEAdChrK5We51kZcb7OaDcyil-dHBjBPL-NhuO-QY8,89
143
+ sourcecode-2.5.8.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
144
+ sourcecode-2.5.8.dist-info/RECORD,,