sourcecode 1.33.0__py3-none-any.whl → 1.33.1__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.33.0"
3
+ __version__ = "1.33.1"
sourcecode/cli.py CHANGED
@@ -219,6 +219,8 @@ _SUBCOMMANDS: frozenset[str] = frozenset(
219
219
  "activate",
220
220
  # Cache observability
221
221
  "cache",
222
+ # RIS bootstrap
223
+ "cold-start",
222
224
  }
223
225
  )
224
226
 
@@ -1838,6 +1840,7 @@ def main(
1838
1840
  _allowed_changed_files: Optional[set[str]] = None
1839
1841
  if changed_only:
1840
1842
  from sourcecode.git_analyzer import GitAnalyzer as _GitAnalyzerEarly
1843
+ _git_confirmed_clean = False
1841
1844
  try:
1842
1845
  _gc_early = _GitAnalyzerEarly().analyze(target, depth=1, days=1)
1843
1846
  _bad_gc = {"no_git_repo", "git_not_found", "git_timeout"}
@@ -1846,15 +1849,31 @@ def main(
1846
1849
  if _uc:
1847
1850
  # WORKTREE_UNSTAGED + WORKTREE_STAGED only; untracked excluded
1848
1851
  _allowed_changed_files = set(_uc.staged) | set(_uc.unstaged)
1849
- if not _allowed_changed_files:
1852
+ if not _allowed_changed_files:
1853
+ # Git is available and confirms no uncommitted changes.
1854
+ # Do NOT fall back to a full scan — that would silently produce
1855
+ # output identical to --compact, making it impossible for the
1856
+ # caller to distinguish "no changes" from "changes found".
1857
+ _git_confirmed_clean = True
1858
+ else:
1859
+ # Git unavailable — fall back gracefully.
1850
1860
  typer.echo(
1851
- "[changed-only] git unavailable or no uncommitted changes — falling back to full scan.",
1861
+ "[changed-only] git unavailable — falling back to full scan.",
1852
1862
  err=True,
1853
1863
  )
1854
1864
  changed_only = False
1855
1865
  except Exception:
1856
1866
  typer.echo("[changed-only] git error — falling back to full scan.", err=True)
1857
1867
  changed_only = False
1868
+ if _git_confirmed_clean:
1869
+ _nc_payload = json.dumps({
1870
+ "status": "working_tree_clean",
1871
+ "no_changes": True,
1872
+ "changed_files": [],
1873
+ "message": "No uncommitted changes detected — working tree is clean.",
1874
+ }, ensure_ascii=False)
1875
+ write_output(_nc_payload, output=output)
1876
+ raise typer.Exit()
1858
1877
 
1859
1878
  # Contract pipeline — runs for mode=contract|standard|deep|hybrid (skip for raw)
1860
1879
  _progress.update("extracting contracts")
@@ -2539,9 +2558,14 @@ def prepare_context_cmd(
2539
2558
  if _task_include("confidence"):
2540
2559
  out["confidence"] = output.confidence
2541
2560
  if task != "review-pr" and _task_include("relevant_files"):
2561
+ _rfs = output.relevant_files
2562
+ if task == "generate-tests":
2563
+ # relevant_files goal: untested SOURCE files. Test files belong in test_gaps.
2564
+ # Without this filter, high-churn test files rank above untested source files.
2565
+ _rfs = [f for f in _rfs if getattr(f, "role", None) != "test"]
2542
2566
  out["relevant_files"] = [
2543
2567
  _serialize_relevant_file(f)
2544
- for f in output.relevant_files
2568
+ for f in _rfs
2545
2569
  ]
2546
2570
  if _task_include("key_dependencies") and output.key_dependencies:
2547
2571
  out["key_dependencies"] = output.key_dependencies
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.33.0
3
+ Version: 1.33.1
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
@@ -39,7 +39,7 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  **Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
41
41
 
42
- ![Version](https://img.shields.io/badge/version-1.33.0-blue)
42
+ ![Version](https://img.shields.io/badge/version-1.33.1-blue)
43
43
  ![Python](https://img.shields.io/badge/python-3.10%2B-green)
44
44
 
45
45
  ---
@@ -113,7 +113,7 @@ pipx install sourcecode
113
113
 
114
114
  ```bash
115
115
  sourcecode version
116
- # sourcecode 1.33.0
116
+ # sourcecode 1.33.1
117
117
  ```
118
118
 
119
119
  ---
@@ -1,4 +1,4 @@
1
- sourcecode/__init__.py,sha256=Fk3-VcGm9_CNfTjflFer8o6KMnle3o1Zvum4r66pj4E,103
1
+ sourcecode/__init__.py,sha256=etbaHEAFq4Y5ytZacDtpQYJt_hteBOpOxKlJl-EIGJY,103
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
@@ -7,7 +7,7 @@ sourcecode/cache.py,sha256=h1BT-9PG_7HK---ZzH0j5u3PN0dz2s6IRAUOjQIPYH4,28055
7
7
  sourcecode/cache.tmp_new,sha256=-IvV7CojiZjqeKMln1m-lqI0QVA2uFGWmYir4XRFOUk,27970
8
8
  sourcecode/canonical_ir.py,sha256=_HM3AUmKSdna9u4dCoU6rpgSA6HdF8gzOKZykIUCNGY,23277
9
9
  sourcecode/classifier.py,sha256=2lYoSH3vOTkXZYPU7Go2WIet1-IuNzTWVhc-ULnXtgw,8024
10
- sourcecode/cli.py,sha256=fIY-kaSbQ_YilCwR9jqsm8n2_kMfyYrHrudee6KQaQE,172312
10
+ sourcecode/cli.py,sha256=aoy3H0QhffBj6CLMGHDMlhtW2TQOwrJfK8LFEsajJFM,173536
11
11
  sourcecode/code_notes_analyzer.py,sha256=EJemNCNc9Dn-1RZYu-aNbK0ELzmsyC4s6FdHi3XyNEI,9392
12
12
  sourcecode/confidence_analyzer.py,sha256=_jckZSxksV-OU38vbkxfVNBnWCtlCq8Vwfg23x1uspA,19054
13
13
  sourcecode/context_scorer.py,sha256=QpChSpsmaAYz91rXA4Ue5xzQmNz_ZboZN09YOHScq1U,14679
@@ -80,8 +80,8 @@ sourcecode/telemetry/consent.py,sha256=wLMvGNJeSSyZoNkQXpoUioY6mMv4Qdvuw7S9jAEWn
80
80
  sourcecode/telemetry/events.py,sha256=oEvvulfsv5GIDWG2174gSS6tNB95w38AIYiYeifGKlE,2294
81
81
  sourcecode/telemetry/filters.py,sha256=Asa71oRl7q3Wt_FMwuufIZJFzSYdgRNKS8LHCIyFeYE,4805
82
82
  sourcecode/telemetry/transport.py,sha256=KJeIPCPWMdmbCP3ySGs2iUlia34U6vWne2dZsUezesw,1560
83
- sourcecode-1.33.0.dist-info/METADATA,sha256=2Xbq33fdfqhc4P5EfadeJgzSkGCcJ-c1DdZJiwiGch8,16440
84
- sourcecode-1.33.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
85
- sourcecode-1.33.0.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
86
- sourcecode-1.33.0.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
87
- sourcecode-1.33.0.dist-info/RECORD,,
83
+ sourcecode-1.33.1.dist-info/METADATA,sha256=NqcQIRQo2sldQvv32_3mF9QUqPAxJR5LO4kgdBaojY0,16440
84
+ sourcecode-1.33.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
85
+ sourcecode-1.33.1.dist-info/entry_points.txt,sha256=ex3F9rmbXeyDIoFQHtkEqTsKSaJow8F0LrVu8XfIktQ,57
86
+ sourcecode-1.33.1.dist-info/licenses/LICENSE,sha256=7DdHrU9Z_3e7dSvq4ISijZNjnuHo5NIHNiHDouMQ9JU,10491
87
+ sourcecode-1.33.1.dist-info/RECORD,,