sourcecode 1.42.0__py3-none-any.whl → 1.44.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 +1 -1
- sourcecode/repository_ir.py +26 -3
- {sourcecode-1.42.0.dist-info → sourcecode-1.44.0.dist-info}/METADATA +3 -3
- {sourcecode-1.42.0.dist-info → sourcecode-1.44.0.dist-info}/RECORD +7 -7
- {sourcecode-1.42.0.dist-info → sourcecode-1.44.0.dist-info}/WHEEL +0 -0
- {sourcecode-1.42.0.dist-info → sourcecode-1.44.0.dist-info}/entry_points.txt +0 -0
- {sourcecode-1.42.0.dist-info → sourcecode-1.44.0.dist-info}/licenses/LICENSE +0 -0
sourcecode/__init__.py
CHANGED
sourcecode/repository_ir.py
CHANGED
|
@@ -131,6 +131,15 @@ _CLASS_DECL_RE = re.compile(
|
|
|
131
131
|
r'\s*\{',
|
|
132
132
|
)
|
|
133
133
|
|
|
134
|
+
# CH-004c: detect a type declaration that participates structurally via inheritance
|
|
135
|
+
# (`class X extends Base` / `interface I extends A` / `class C implements I`). Used by
|
|
136
|
+
# the fast pre-scan to NOT skip annotation-free files that still own extends/implements
|
|
137
|
+
# edges the impact graph needs. `[^{;]*?` keeps the match within a single declaration
|
|
138
|
+
# head (stops at the body `{` or a `;`), matching the precision of _CLASS_DECL_RE.
|
|
139
|
+
_INHERIT_PRESCAN_RE = re.compile(
|
|
140
|
+
r'\b(?:class|interface)\s+[A-Z]\w*[^{;]*?\b(?:extends|implements)\b'
|
|
141
|
+
)
|
|
142
|
+
|
|
134
143
|
_METHOD_DECL_RE = re.compile(
|
|
135
144
|
r'^(?P<modifiers>(?:(?:public|private|protected|static|final|synchronized'
|
|
136
145
|
r'|abstract|default|native|strictfp|override)\s+)*)'
|
|
@@ -1265,7 +1274,11 @@ def _build_relations(
|
|
|
1265
1274
|
# commas so each base produces its own edge and the reverse graph sees
|
|
1266
1275
|
# every supertype (not a single mangled token).
|
|
1267
1276
|
for base in _split_supertype_list(extends_str):
|
|
1268
|
-
|
|
1277
|
+
# CH-004: resolve same-package / wildcard-imported supertypes to their
|
|
1278
|
+
# FQN (not just import_map), else a same-package `extends Base` stays a
|
|
1279
|
+
# bare name and the implementation_graph cannot link sub→supertype.
|
|
1280
|
+
_sbase = re.sub(r'<.*', '', base).strip()
|
|
1281
|
+
to = _resolve_dep_type(_sbase) or import_map.get(_sbase, base)
|
|
1269
1282
|
edges.append(RelationEdge(
|
|
1270
1283
|
from_symbol=class_fqn,
|
|
1271
1284
|
to_symbol=to,
|
|
@@ -1276,7 +1289,8 @@ def _build_relations(
|
|
|
1276
1289
|
|
|
1277
1290
|
if implements_str:
|
|
1278
1291
|
for base in _split_supertype_list(implements_str):
|
|
1279
|
-
|
|
1292
|
+
_sbase = re.sub(r'<.*', '', base).strip()
|
|
1293
|
+
to = _resolve_dep_type(_sbase) or import_map.get(_sbase, base)
|
|
1280
1294
|
edges.append(RelationEdge(
|
|
1281
1295
|
from_symbol=class_fqn,
|
|
1282
1296
|
to_symbol=to,
|
|
@@ -3127,6 +3141,14 @@ def build_repo_ir(
|
|
|
3127
3141
|
'@RequiredArgsConstructor', '@AllArgsConstructor',
|
|
3128
3142
|
'@Inject', '@ApplicationScoped', '@RequestScoped', '@Singleton',
|
|
3129
3143
|
'@EnableMethodSecurity', '@EnableGlobalMethodSecurity',
|
|
3144
|
+
# Field/setter injection markers (CH-004). A class wired purely by field
|
|
3145
|
+
# injection — no class-level stereotype — is still a node in the DI graph:
|
|
3146
|
+
# e.g. an abstract base controller that holds @Autowired/@Resource services
|
|
3147
|
+
# its concrete subclasses inherit. Omitting these pre-scan-skips such classes,
|
|
3148
|
+
# dropping their injects edges, so impact-chain cannot reach callers through
|
|
3149
|
+
# them (Broadleaf: AbstractCheckoutController → checkout endpoints went missing).
|
|
3150
|
+
'@Autowired', '@Resource', '@Qualifier', '@Value',
|
|
3151
|
+
'@PersistenceContext', '@PersistenceUnit',
|
|
3130
3152
|
# JPA / persistence (needed for stereotype detection in all commands)
|
|
3131
3153
|
'@Entity', '@MappedSuperclass', '@Embeddable',
|
|
3132
3154
|
# AOP / messaging / event sourcing
|
|
@@ -3173,7 +3195,8 @@ def build_repo_ir(
|
|
|
3173
3195
|
_meta_chars_read += len(source)
|
|
3174
3196
|
# Fast pre-scan: if file has no relevant annotations skip full extraction.
|
|
3175
3197
|
# Still register package/class name for same-package resolution.
|
|
3176
|
-
if not any(marker in source for marker in _effective_markers)
|
|
3198
|
+
if not any(marker in source for marker in _effective_markers) \
|
|
3199
|
+
and not _INHERIT_PRESCAN_RE.search(source):
|
|
3177
3200
|
pkg_m = _PKG_RE.search(source)
|
|
3178
3201
|
_pkg = pkg_m.group(1) if pkg_m else ""
|
|
3179
3202
|
# Minimal class-name symbols for same-package map (no methods/fields)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.44.0
|
|
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
|
-

|
|
44
44
|

|
|
45
45
|
|
|
46
46
|
---
|
|
@@ -114,7 +114,7 @@ pipx install sourcecode
|
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
116
|
sourcecode version
|
|
117
|
-
# sourcecode 1.
|
|
117
|
+
# sourcecode 1.44.0
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
---
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
sourcecode/__init__.py,sha256=
|
|
1
|
+
sourcecode/__init__.py,sha256=KCoWiYA4njgsXUEDMnmPU0kheOgqm-RpLky5FPkilQw,103
|
|
2
2
|
sourcecode/adaptive_scanner.py,sha256=XffluXKzJUXrMtjEiAOnSNPZnztdIcts17T9ouHeID0,10521
|
|
3
3
|
sourcecode/architecture_analyzer.py,sha256=liCwQmLgb5vplohy8arjYxs_HOIv5C9MjLh_gY6bc5Q,44115
|
|
4
4
|
sourcecode/architecture_summary.py,sha256=z34_6v7cSwy98cof2UVciGho7SCrZ93tiqMmq5WNzRQ,20405
|
|
@@ -44,7 +44,7 @@ sourcecode/redactor.py,sha256=SB4hwIvg8h-hvcqKcDWaZvA-aSyn-at-BIRwa0tUv5E,3227
|
|
|
44
44
|
sourcecode/relevance_scorer.py,sha256=0AgEt4KrV73nioMqBgjhGjtY7L2C7L7cSyKtj3IKcrw,9408
|
|
45
45
|
sourcecode/rename_refactor.py,sha256=h6dNFlB9aZ_3q6heeHBkgXQeXaT03nvPSsYH6P8qxFg,12965
|
|
46
46
|
sourcecode/repo_classifier.py,sha256=FG1vaWKdWXsWdl-S8hjVMiTqcwgaRXkDyvK4rPcOGtQ,22681
|
|
47
|
-
sourcecode/repository_ir.py,sha256=
|
|
47
|
+
sourcecode/repository_ir.py,sha256=WjDYwbBm-eWp-k6aSdBrgO_XcRGuP-Llp0TZHBhq8bY,208237
|
|
48
48
|
sourcecode/ris.py,sha256=RcqLVwC-doFcKKViYDkCjZLBqf_wzLES7-F6vHEeWzE,20419
|
|
49
49
|
sourcecode/runtime_classifier.py,sha256=uTAD6BDCiBLUZEDRfqk718kM4RTT_vAbfkcOI2_Xx58,18432
|
|
50
50
|
sourcecode/scanner.py,sha256=WdOQ78mMzjR1NjmKTlbxdgwinnCTfAhxCVLBEFQiFHU,8899
|
|
@@ -101,8 +101,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
|
|
|
101
101
|
sourcecode/telemetry/events.py,sha256=LtzYfaX9Ilckj5PTvAcTpDa9mLqDsYPDUiDkRa58piY,2580
|
|
102
102
|
sourcecode/telemetry/filters.py,sha256=NHa5T-6DaZduQPFuC34jOqHWQgSizM-Ygq8aZ4j19ng,5834
|
|
103
103
|
sourcecode/telemetry/transport.py,sha256=4gGHsq0WeY9VywEZXA3vUxykfiYnw9uuqfjAAec7F8o,1681
|
|
104
|
-
sourcecode-1.
|
|
105
|
-
sourcecode-1.
|
|
106
|
-
sourcecode-1.
|
|
107
|
-
sourcecode-1.
|
|
108
|
-
sourcecode-1.
|
|
104
|
+
sourcecode-1.44.0.dist-info/METADATA,sha256=0xHtFeZJ0-CMPHbgVACahR0Z11bN0WooJP34TW2xA4g,32359
|
|
105
|
+
sourcecode-1.44.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
106
|
+
sourcecode-1.44.0.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
|
|
107
|
+
sourcecode-1.44.0.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
|
|
108
|
+
sourcecode-1.44.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|