sourcecode 1.30.3__py3-none-any.whl → 1.30.4__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/cli.py +1 -1
- {sourcecode-1.30.3.dist-info → sourcecode-1.30.4.dist-info}/METADATA +81 -5
- {sourcecode-1.30.3.dist-info → sourcecode-1.30.4.dist-info}/RECORD +7 -7
- {sourcecode-1.30.3.dist-info → sourcecode-1.30.4.dist-info}/WHEEL +0 -0
- {sourcecode-1.30.3.dist-info → sourcecode-1.30.4.dist-info}/entry_points.txt +0 -0
- {sourcecode-1.30.3.dist-info → sourcecode-1.30.4.dist-info}/licenses/LICENSE +0 -0
sourcecode/__init__.py
CHANGED
sourcecode/cli.py
CHANGED
|
@@ -1633,7 +1633,7 @@ def prepare_context_cmd(
|
|
|
1633
1633
|
refactor Structural issues, improvement opportunities
|
|
1634
1634
|
generate-tests Untested source files, test gap analysis
|
|
1635
1635
|
onboard Full project context for new agents/developers
|
|
1636
|
-
review-pr PR diff:
|
|
1636
|
+
review-pr PR diff: execution paths with per-step runtime signals, security/transactional impact, test gaps (requires git diff or --since)
|
|
1637
1637
|
delta Incremental context: git-changed files only
|
|
1638
1638
|
|
|
1639
1639
|
\b
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 1.30.
|
|
3
|
+
Version: 1.30.4
|
|
4
4
|
Summary: Deterministic codebase context for AI coding agents
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -219,9 +219,9 @@ Description-Content-Type: text/markdown
|
|
|
219
219
|
|
|
220
220
|
# sourcecode
|
|
221
221
|
|
|
222
|
-
**
|
|
222
|
+
**Deterministic, behavior-aware codebase context for AI agents and PR review.**
|
|
223
223
|
|
|
224
|
-

|
|
225
225
|

|
|
226
226
|
|
|
227
227
|
---
|
|
@@ -230,6 +230,8 @@ Description-Content-Type: text/markdown
|
|
|
230
230
|
|
|
231
231
|
`sourcecode` analyzes a repository and produces structured JSON or YAML designed to be fed directly to AI agents or language models. It solves the "stuff the whole repo into the prompt" problem by extracting a deterministic, high-signal summary: stack detection, entry points, dependencies, git hotspots, inline annotations, and confidence metadata.
|
|
232
232
|
|
|
233
|
+
For PR review specifically, `sourcecode` extracts **execution paths**: ordered chains from entry point through service to data access, with runtime signals (auth guards, cache short-circuits, async execution) anchored to the specific step where they affect behavior. A reviewer sees _what the system does_ under this change, not just which files changed.
|
|
234
|
+
|
|
233
235
|
Optimized for Java/Spring Boot monorepos. Works on any codebase.
|
|
234
236
|
|
|
235
237
|
---
|
|
@@ -255,7 +257,7 @@ pipx install sourcecode
|
|
|
255
257
|
|
|
256
258
|
```bash
|
|
257
259
|
sourcecode version
|
|
258
|
-
# sourcecode 1.30.
|
|
260
|
+
# sourcecode 1.30.4
|
|
259
261
|
```
|
|
260
262
|
|
|
261
263
|
---
|
|
@@ -342,7 +344,7 @@ sourcecode prepare-context TASK [PATH] [OPTIONS]
|
|
|
342
344
|
| `fix-bug` | Files ranked by risk (annotations, churn, uncommitted changes), suspected areas | Debugging session |
|
|
343
345
|
| `refactor` | Structural problems, improvement opportunities, high-annotation files | Code quality review |
|
|
344
346
|
| `generate-tests` | Source files without test pairs, coverage gap analysis | Writing missing tests |
|
|
345
|
-
| `review-pr` |
|
|
347
|
+
| `review-pr` | Execution paths with per-step runtime signals, security/transactional impact, test coverage gaps | Pre-merge behavior review |
|
|
346
348
|
| `delta` | Changed files with multi-hop impact analysis, structural import graph, system-level impact summary | Incremental CI/review context |
|
|
347
349
|
|
|
348
350
|
### Options
|
|
@@ -423,6 +425,80 @@ sourcecode prepare-context delta . --since main
|
|
|
423
425
|
|
|
424
426
|
---
|
|
425
427
|
|
|
428
|
+
## `review-pr` — behavior-aware PR analysis
|
|
429
|
+
|
|
430
|
+
Extracts **execution paths**: ordered chains from entry point through service to data access layer, with runtime signals anchored to the specific step where they affect behavior.
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
sourcecode prepare-context review-pr [PATH] --since REF
|
|
434
|
+
# or against uncommitted working-tree changes:
|
|
435
|
+
sourcecode prepare-context review-pr
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
**`execution_paths` schema:**
|
|
439
|
+
|
|
440
|
+
```json
|
|
441
|
+
{
|
|
442
|
+
"execution_paths": [
|
|
443
|
+
{
|
|
444
|
+
"name": "Order",
|
|
445
|
+
"entry_point": {
|
|
446
|
+
"step": "OrderController.createOrder",
|
|
447
|
+
"notes": ["condition: authorization check present (@PreAuthorize / @Secured)"]
|
|
448
|
+
},
|
|
449
|
+
"path": [
|
|
450
|
+
{
|
|
451
|
+
"step": "ShippingService.process",
|
|
452
|
+
"notes": [
|
|
453
|
+
"branch: Spring cache may short-circuit downstream call",
|
|
454
|
+
"async: runs in separate thread (@Async)"
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"step": "OrderRepository.save",
|
|
459
|
+
"notes": []
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"end_state": "DB write"
|
|
463
|
+
}
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
**Path rules:**
|
|
469
|
+
|
|
470
|
+
- One path per changed entry point — most-evident downstream call, not all branches
|
|
471
|
+
- Each step requires direct code evidence: field injection, constructor param, method call, or type annotation
|
|
472
|
+
- `notes` are scanned from that step's own source file — no cross-contamination between steps
|
|
473
|
+
- Path terminates where evidence ends; no gap-filling by naming convention or module similarity
|
|
474
|
+
|
|
475
|
+
**Runtime signals detected per step:**
|
|
476
|
+
|
|
477
|
+
| Signal | Example code | Note emitted |
|
|
478
|
+
|--------|-------------|--------------|
|
|
479
|
+
| Auth guard | `@PreAuthorize`, `@Secured`, `isAuthenticated()` | `condition: authorization check present` |
|
|
480
|
+
| Feature flag | `featureFlag.isEnabled()`, `FeatureToggle` | `condition: feature flag gates execution` |
|
|
481
|
+
| Null/empty guard | `if (x == null) return` | `condition: null/empty guard with early return` |
|
|
482
|
+
| Spring cache | `@Cacheable`, `@CacheEvict` | `branch: Spring cache may short-circuit downstream call` |
|
|
483
|
+
| Optional absence | `Optional<>`, `.orElseThrow()` | `branch: result may be absent (Optional)` |
|
|
484
|
+
| Async thread | `@Async`, `CompletableFuture` | `async: runs in separate thread (@Async)` |
|
|
485
|
+
| Event publishing | `publishEvent()`, `applicationEventPublisher` | `async: Spring application event emitted` |
|
|
486
|
+
| Kafka | `kafkaTemplate.send()` | `async: Kafka message produced` |
|
|
487
|
+
| RabbitMQ | `rabbitTemplate.send()` | `async: RabbitMQ message sent` |
|
|
488
|
+
|
|
489
|
+
**Other `review-pr` output fields:**
|
|
490
|
+
|
|
491
|
+
| Field | Description |
|
|
492
|
+
|-------|-------------|
|
|
493
|
+
| `review_hotspots` | Top changed files ranked by impact score |
|
|
494
|
+
| `suggested_review_order` | Security → API → Service → Persistence → Config |
|
|
495
|
+
| `security_impact` | Changed files touching the security surface |
|
|
496
|
+
| `transactional_impact` | Files crossing transaction boundaries |
|
|
497
|
+
| `test_coverage_risk` | Changed source files with no corresponding test |
|
|
498
|
+
| `affected_modules` | DDD domain modules touched by the change |
|
|
499
|
+
|
|
500
|
+
---
|
|
501
|
+
|
|
426
502
|
## Output schema
|
|
427
503
|
|
|
428
504
|
All outputs include a `confidence_summary` block with `overall`, `stack`, and `entry_points` confidence levels (`high` / `medium` / `low`), plus an `analysis_gaps` list describing what could not be analyzed and why.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
sourcecode/__init__.py,sha256
|
|
1
|
+
sourcecode/__init__.py,sha256=lum_KRetZZierS82OkkxkHcbIkjAw1eYUAQiiRzOrX8,103
|
|
2
2
|
sourcecode/adaptive_scanner.py,sha256=RTNExwWPXzjgLaRueT7UuxkPj5ZEToWjGbx1j0LSZ9E,10250
|
|
3
3
|
sourcecode/architecture_analyzer.py,sha256=MyBa0Hf5HmkudZQDLKrjcWDKETXETXl0mQX1swtTwAA,39091
|
|
4
4
|
sourcecode/architecture_summary.py,sha256=z34_6v7cSwy98cof2UVciGho7SCrZ93tiqMmq5WNzRQ,20405
|
|
5
5
|
sourcecode/ast_extractor.py,sha256=XgrZg2DcWcUm9r87cRG3KGO7IK2TIL_N-CvhSbUmmh4,49901
|
|
6
6
|
sourcecode/classifier.py,sha256=pYve2J1LqtYssU3lYLMDz18PT-CjN5c18QYE7R_IG1Q,7507
|
|
7
|
-
sourcecode/cli.py,sha256=
|
|
7
|
+
sourcecode/cli.py,sha256=K6ecski4uwAWtATwxD-OF8IZlfwsqFWHCoDPOi4U9bI,80775
|
|
8
8
|
sourcecode/code_notes_analyzer.py,sha256=y1MJBnPZHYp4i6cQCXUb9ATIyifS_qMQWjw_8lPkpsU,9215
|
|
9
9
|
sourcecode/confidence_analyzer.py,sha256=xw_Jv8pAd0wd8t2vvQlorw8Ih0rSF3YCoFS8K-_4aXg,15762
|
|
10
10
|
sourcecode/context_scorer.py,sha256=QpChSpsmaAYz91rXA4Ue5xzQmNz_ZboZN09YOHScq1U,14679
|
|
@@ -62,8 +62,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
|
|
|
62
62
|
sourcecode/telemetry/events.py,sha256=oEvvulfsv5GIDWG2174gSS6tNB95w38AIYiYeifGKlE,2294
|
|
63
63
|
sourcecode/telemetry/filters.py,sha256=Asa71oRl7q3Wt_FMwuufIZJFzSYdgRNKS8LHCIyFeYE,4805
|
|
64
64
|
sourcecode/telemetry/transport.py,sha256=KJeIPCPWMdmbCP3ySGs2iUlia34U6vWne2dZsUezesw,1560
|
|
65
|
-
sourcecode-1.30.
|
|
66
|
-
sourcecode-1.30.
|
|
67
|
-
sourcecode-1.30.
|
|
68
|
-
sourcecode-1.30.
|
|
69
|
-
sourcecode-1.30.
|
|
65
|
+
sourcecode-1.30.4.dist-info/METADATA,sha256=lSj_ODIJgDwxQP4EJ1VN9dbO0tiaAlWBiMG6qLep3mo,26770
|
|
66
|
+
sourcecode-1.30.4.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
67
|
+
sourcecode-1.30.4.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
|
|
68
|
+
sourcecode-1.30.4.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
|
|
69
|
+
sourcecode-1.30.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|