Skip to content

Commit 96279d2

Browse files
authored
refactor: remove orphaned read_context_text function (Arc C) (#29)
`read_context_text` in portfolio_truth_sources.py had zero callers anywhere in src/ or tests/ — the comment claiming "Called indirectly via context analysis pipeline" was stale. The 5 other 0.4.0 flagged functions (resolve_declared_operating_path, choose_primary_context_file, render_context_recovery_plan_markdown, latest_portfolio_truth_path, detect_boilerplate_context) all have real production callers and are NOT orphaned. Verified with `grep -rn` across all .py files. 2150 tests pass, ruff clean.
1 parent 7ac5ef9 commit 96279d2

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/portfolio_truth_sources.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,6 @@ def _classify_context_quality(project_path: Path, context_files: list[str]) -> s
293293
return analyze_project_context(project_path, context_files).context_quality
294294

295295

296-
# Utility: reads context file text, respecting size and allowlist limits.
297-
# Called indirectly via context analysis pipeline.
298-
def read_context_text(project_path: Path, relative_file: str) -> str:
299-
path = project_path / relative_file
300-
if not path.is_file() or path.stat().st_size > MAX_CONTEXT_BYTES:
301-
return ""
302-
if path.name not in TEXT_ALLOWLIST:
303-
return ""
304-
return path.read_text(errors="replace")
305-
306-
307296
# Utility: returns True if context quality is "boilerplate".
308297
# Called indirectly via context analysis pipeline.
309298
def detect_boilerplate_context(project_path: Path, context_files: list[str]) -> bool:

0 commit comments

Comments
 (0)