sourcecode 1.35.22__py3-none-any.whl → 1.35.23__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,3 @@
1
1
  """sourcecode — Deterministic codebase context maps for AI coding agents."""
2
2
 
3
- __version__ = "1.35.22"
3
+ __version__ = "1.35.23"
@@ -244,11 +244,11 @@ def _route_to_canonical_endpoint(route: dict) -> CanonicalEndpoint:
244
244
  security_dict = route.get("security_annotations")
245
245
  security: Optional[CanonicalSecurity] = None
246
246
  if security_dict:
247
- # Determine source_scope from inheritance_depth:
248
- # depth=0 → annotation on method or class (method takes precedence)
249
- # depth>0 → inherited from parent class
250
247
  depth = route.get("inheritance_depth") or 0
251
- scope = "inherited" if depth > 0 else "method"
248
+ if depth > 0:
249
+ scope = "inherited"
250
+ else:
251
+ scope = security_dict.get("_scope", "method")
252
252
  security = CanonicalSecurity.from_policy_dict(security_dict, source_scope=scope)
253
253
 
254
254
  endpoint_id = CanonicalEndpoint.make_id(method, path, controller_class, handler_symbol)
@@ -422,7 +422,7 @@ def run_migrate_check(
422
422
 
423
423
  def _detect_spring_boot_2(root: Path) -> bool:
424
424
  """Return True if any pom.xml or build.gradle declares spring-boot 2.x."""
425
- _SB2 = re.compile(r"spring.boot[^\"'\n]*[\"']?2\.\d+", re.IGNORECASE)
425
+ _SB2 = re.compile(r"spring[-.]boot[^\"'\n]*[\"']?2\.\d+", re.IGNORECASE)
426
426
  for name in ("pom.xml", "build.gradle", "build.gradle.kts"):
427
427
  candidate = root / name
428
428
  try:
@@ -1034,6 +1034,12 @@ class TaskContextBuilder:
1034
1034
  if g
1035
1035
  ]
1036
1036
 
1037
+ _ris_key_deps = compact.get("key_dependencies") or []
1038
+ # Fall through to full analysis if deps expected but RIS has none.
1039
+ # RIS may have been built before dependency analysis was run on this repo.
1040
+ if spec.enable_dependencies and not _ris_key_deps:
1041
+ return None
1042
+
1037
1043
  return TaskOutput(
1038
1044
  task=task_name,
1039
1045
  goal=spec.goal,
@@ -1043,7 +1049,7 @@ class TaskContextBuilder:
1043
1049
  suspected_areas=[],
1044
1050
  improvement_opportunities=[],
1045
1051
  test_gaps=[],
1046
- key_dependencies=compact.get("key_dependencies") or [],
1052
+ key_dependencies=_ris_key_deps,
1047
1053
  code_notes_summary=None,
1048
1054
  limitations=[],
1049
1055
  confidence=compact.get("confidence") or compact.get("confidence_summary") or "high",
@@ -1303,7 +1309,20 @@ class TaskContextBuilder:
1303
1309
  from dataclasses import asdict
1304
1310
  from sourcecode.dependency_analyzer import DependencyAnalyzer
1305
1311
 
1306
- dep_records, dep_summary = DependencyAnalyzer().analyze(self.root)
1312
+ _dep_analyzer = DependencyAnalyzer()
1313
+ dep_records, dep_summary = _dep_analyzer.analyze(self.root)
1314
+ # For multi-module repos (Maven/Gradle), root pom.xml is a parent POM
1315
+ # with few deps. Per-workspace analysis finds the actual module deps.
1316
+ if workspace_analysis.workspaces:
1317
+ for _ws in workspace_analysis.workspaces:
1318
+ _ws_root = self.root / _ws.path
1319
+ if _ws_root.exists() and _ws_root.is_dir():
1320
+ try:
1321
+ _ws_deps, _ws_summary = _dep_analyzer.analyze(_ws_root)
1322
+ dep_records = dep_records + _ws_deps
1323
+ dep_summary.limitations.extend(_ws_summary.limitations)
1324
+ except Exception:
1325
+ pass
1307
1326
  primary_eco = stacks[0].stack if stacks else ""
1308
1327
  _direct_raw = [
1309
1328
  d for d in dep_records
@@ -2543,6 +2543,7 @@ def _route_security_from_sym(
2543
2543
  for candidate in filter(None, [method_sym, class_sym]):
2544
2544
  result = _extract_from(candidate)
2545
2545
  if result is not None:
2546
+ result["_scope"] = "class" if candidate is class_sym else "method"
2546
2547
  return result
2547
2548
  return None
2548
2549
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.35.22
3
+ Version: 1.35.23
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
@@ -40,7 +40,7 @@ Description-Content-Type: text/markdown
40
40
 
41
41
  **Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
42
42
 
43
- ![Version](https://img.shields.io/badge/version-1.35.20-blue)
43
+ ![Version](https://img.shields.io/badge/version-1.35.23-blue)
44
44
  ![Python](https://img.shields.io/badge/python-3.10%2B-green)
45
45
 
46
46
  ---
@@ -114,7 +114,7 @@ pipx install sourcecode
114
114
 
115
115
  ```bash
116
116
  sourcecode version
117
- # sourcecode 1.35.20
117
+ # sourcecode 1.35.23
118
118
  ```
119
119
 
120
120
  ---
@@ -1,10 +1,10 @@
1
- sourcecode/__init__.py,sha256=p3pMcJ60xxF18F5C5hvsyn5B4uh1rOmKBO_RC94DPAA,104
1
+ sourcecode/__init__.py,sha256=_3RZgCJrBxKTnf4cMy8WI2Ca9TZsi_5ac6JucEkUIVM,104
2
2
  sourcecode/adaptive_scanner.py,sha256=XffluXKzJUXrMtjEiAOnSNPZnztdIcts17T9ouHeID0,10521
3
3
  sourcecode/architecture_analyzer.py,sha256=qh749a7ykPtGmQI1MR9y6j8TtL_jBdVYFx9YRsLqOMw,44121
4
4
  sourcecode/architecture_summary.py,sha256=z34_6v7cSwy98cof2UVciGho7SCrZ93tiqMmq5WNzRQ,20405
5
5
  sourcecode/ast_extractor.py,sha256=sa6CmLpn-k5G3_Hzxn8hAlZ5-TS-EVzXDD0Gvxd2jzs,50613
6
6
  sourcecode/cache.py,sha256=wAyPrXN5DqiGivnMpeEuun2xHDKfBer2_oBsh6kj_vc,30447
7
- sourcecode/canonical_ir.py,sha256=uwpwCnJxMh_eiIVg4cOLv7-aZthvmDFcG4azCOycLkw,24281
7
+ sourcecode/canonical_ir.py,sha256=2vTLc6wL1cH3NNbEcdZpfX5okh8h5dKq7xd0m0rv_Ro,24167
8
8
  sourcecode/cir_graphs.py,sha256=rZi8JV4ZrAa2WSCeyNa4JIEKQ_yZzDZTsrvVz2KfuKA,8919
9
9
  sourcecode/classifier.py,sha256=2lYoSH3vOTkXZYPU7Go2WIet1-IuNzTWVhc-ULnXtgw,8024
10
10
  sourcecode/cli.py,sha256=wy5-T6Ba_hvqJoFkSROCJxOpsy_VzbYI98TlJIEeGW0,238063
@@ -29,18 +29,18 @@ sourcecode/graph_analyzer.py,sha256=DHR8fY69oU_Pi4SYaWboX6EoEFrctQKB9dsjpqwGMzw,
29
29
  sourcecode/license.py,sha256=3JCV2OeTVttKrOGBguU5uZC0c02Stig-KLB0mP2lNiY,22742
30
30
  sourcecode/mcp_nudge.py,sha256=5ELU_ixzh6uA83NXLOZT8h00OhL53okfQdji3jyKOjg,2917
31
31
  sourcecode/metrics_analyzer.py,sha256=m0ENgtqKeBL17kUIK3fmGkgo7UfXBNHxCMj0H_Y5K7c,22750
32
- sourcecode/migrate_check.py,sha256=KQJRuQPrZSDYnIsekEjF-6j6b702Cu-pjojo-teO4wM,16338
32
+ sourcecode/migrate_check.py,sha256=5vsO7YJiXkn6HKealy2n7qoc99-eD2EW9YAE8Jm1HR0,16341
33
33
  sourcecode/output_budget.py,sha256=Js9yUlfQtPhqBl9R6wn_9UHVjjJc3GtLcqyfjf5t50Q,9869
34
34
  sourcecode/path_filters.py,sha256=ROFRQ8eSLBEMiixK9f45-RO7um4VEEcjoD5AA4I427I,3739
35
35
  sourcecode/pr_comment_renderer.py,sha256=smHslxiG14lrytCkq5nFrFu-qTHgA-t-LFYfdrfjz2o,14423
36
36
  sourcecode/pr_impact.py,sha256=dCDVw83EDbyVf6F9ZmEQmsFz8ruVH7d4mpeKQCIZHM0,16805
37
- sourcecode/prepare_context.py,sha256=fGFY9gWOA3-tmD4PHxil_QsaYJxfBvcAkj4rlhXUKYo,221229
37
+ sourcecode/prepare_context.py,sha256=_indldfE-5OmMdusS_5rYB7MAJb8ub3UCCMHOXe7A_Y,222292
38
38
  sourcecode/progress.py,sha256=qn30sWaHOkjTgXsSBmiPkz7Rsbwc5oSlIe6JNEMYp_k,3149
39
39
  sourcecode/ranking_engine.py,sha256=ZAucq_YX2KkWUuAZf4P0lhtQ_38vEFnUhuGtSZd1S0E,12970
40
40
  sourcecode/redactor.py,sha256=SB4hwIvg8h-hvcqKcDWaZvA-aSyn-at-BIRwa0tUv5E,3227
41
41
  sourcecode/relevance_scorer.py,sha256=0AgEt4KrV73nioMqBgjhGjtY7L2C7L7cSyKtj3IKcrw,9408
42
42
  sourcecode/repo_classifier.py,sha256=FG1vaWKdWXsWdl-S8hjVMiTqcwgaRXkDyvK4rPcOGtQ,22681
43
- sourcecode/repository_ir.py,sha256=5meIvsVN4WlllStxIglZznILKcI0Q2t2XMLB9aVT3uc,169561
43
+ sourcecode/repository_ir.py,sha256=vTdWuFj0iRUavs4mOWl87JETR7Je9bKVeDycKBqOFp8,169640
44
44
  sourcecode/ris.py,sha256=RcqLVwC-doFcKKViYDkCjZLBqf_wzLES7-F6vHEeWzE,20419
45
45
  sourcecode/runtime_classifier.py,sha256=uTAD6BDCiBLUZEDRfqk718kM4RTT_vAbfkcOI2_Xx58,18432
46
46
  sourcecode/scanner.py,sha256=WdOQ78mMzjR1NjmKTlbxdgwinnCTfAhxCVLBEFQiFHU,8899
@@ -94,8 +94,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
94
94
  sourcecode/telemetry/events.py,sha256=oEvvulfsv5GIDWG2174gSS6tNB95w38AIYiYeifGKlE,2294
95
95
  sourcecode/telemetry/filters.py,sha256=Asa71oRl7q3Wt_FMwuufIZJFzSYdgRNKS8LHCIyFeYE,4805
96
96
  sourcecode/telemetry/transport.py,sha256=QSslxIwij8YkRWcVvxykODDrkiN_GAAEu3dUP7KIWeE,1651
97
- sourcecode-1.35.22.dist-info/METADATA,sha256=myCZutK9p4r8d-O38SYo4et7pkpwASrkuJOnr_WIAac,21297
98
- sourcecode-1.35.22.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
99
- sourcecode-1.35.22.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
100
- sourcecode-1.35.22.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
101
- sourcecode-1.35.22.dist-info/RECORD,,
97
+ sourcecode-1.35.23.dist-info/METADATA,sha256=SPVcfkrBpRzffHQfMhEbeyM4fxShVvN6gdmSMOJs35Q,21297
98
+ sourcecode-1.35.23.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
99
+ sourcecode-1.35.23.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
100
+ sourcecode-1.35.23.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
101
+ sourcecode-1.35.23.dist-info/RECORD,,