sourcecode 4.10.6__py3-none-any.whl → 4.11.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.
Potentially problematic release.
This version of sourcecode might be problematic. Click here for more details.
- sourcecode/__init__.py +1 -1
- sourcecode/cache.py +8 -3
- sourcecode/cache.tmp_new +772 -0
- sourcecode/cache_model.py +170 -46
- sourcecode/canonical_ir.py +10 -3
- sourcecode/change_plan.py +8 -3
- sourcecode/cli.py +863 -220
- sourcecode/context_cache.py +9 -3
- sourcecode/context_graph.py +8 -3
- sourcecode/data_exposure.py +10 -1
- sourcecode/detach.py +27 -1
- sourcecode/execution_plan.py +428 -0
- sourcecode/format_contract.py +48 -6
- sourcecode/non_coverage.py +90 -2
- sourcecode/posture.py +3 -3
- sourcecode/progress.py +124 -4
- sourcecode/remedies.py +37 -5
- sourcecode/repository_ir.py +42 -4
- sourcecode/rule_catalog.py +5 -1
- sourcecode/security_posture.py +1 -1
- sourcecode/serializer.py +13 -0
- sourcecode/verify_repo.py +2 -2
- {sourcecode-4.10.6.dist-info → sourcecode-4.11.0.dist-info}/METADATA +26 -7
- {sourcecode-4.10.6.dist-info → sourcecode-4.11.0.dist-info}/RECORD +27 -25
- {sourcecode-4.10.6.dist-info → sourcecode-4.11.0.dist-info}/WHEEL +0 -0
- {sourcecode-4.10.6.dist-info → sourcecode-4.11.0.dist-info}/entry_points.txt +0 -0
- {sourcecode-4.10.6.dist-info → sourcecode-4.11.0.dist-info}/licenses/LICENSE +0 -0
sourcecode/__init__.py
CHANGED
sourcecode/cache.py
CHANGED
|
@@ -336,10 +336,15 @@ def cache_dir(repo_root: Path) -> Path:
|
|
|
336
336
|
def status(repo_root: Path) -> dict[str, Any]:
|
|
337
337
|
"""Return a stats dict describing the current cache state for *repo_root*.
|
|
338
338
|
|
|
339
|
-
Keys: ``cache_dir``, ``
|
|
339
|
+
Keys: ``cache_dir``, ``cached_cores``, ``views``, ``cas_blobs``,
|
|
340
340
|
``total_size_bytes``, ``total_size_mb``, ``ris_exists``, ``ris_git_head``,
|
|
341
341
|
``ris_last_updated_at``, ``ris_is_stale``, ``current_git_head``.
|
|
342
342
|
|
|
343
|
+
``cached_cores`` counts ``core-*.json.gz`` entries in this cache. It was
|
|
344
|
+
named ``cores`` until 4.10.7, which is the field name a captured baseline
|
|
345
|
+
uses for the machine's CPU count (``env.cores``) — two different facts under
|
|
346
|
+
one name, on the same machine, minutes apart (C4-18).
|
|
347
|
+
|
|
343
348
|
Note: ``snapshots`` is a legacy v1 field — always 0 in v2 (kept for
|
|
344
349
|
backward compatibility; v2 writes ``core-*`` and ``view-*`` files only).
|
|
345
350
|
"""
|
|
@@ -377,7 +382,7 @@ def status(repo_root: Path) -> dict[str, Any]:
|
|
|
377
382
|
if not cache_d.exists():
|
|
378
383
|
return {
|
|
379
384
|
"cache_dir": str(cache_d),
|
|
380
|
-
"
|
|
385
|
+
"cached_cores": 0, "snapshots": 0, "views": 0, "cas_blobs": 0,
|
|
381
386
|
"total_size_bytes": 0, "total_size_mb": 0.0,
|
|
382
387
|
"current_git_head": current_head,
|
|
383
388
|
"stores": _store_breakdown(repo_root, 0),
|
|
@@ -391,7 +396,7 @@ def status(repo_root: Path) -> dict[str, Any]:
|
|
|
391
396
|
total_bytes = sum(f.stat().st_size for f in all_files if f.exists())
|
|
392
397
|
return {
|
|
393
398
|
"cache_dir": str(cache_d),
|
|
394
|
-
"
|
|
399
|
+
"cached_cores": len(cores),
|
|
395
400
|
"snapshots": len(snapshots),
|
|
396
401
|
"views": len(views),
|
|
397
402
|
"cas_blobs": len(cas_blobs),
|