Skip to content

refactor: remove orphaned read_context_text function (Arc C)#29

Merged
saagpatel merged 1 commit into
mainfrom
chore/dead-code-wiring
May 31, 2026
Merged

refactor: remove orphaned read_context_text function (Arc C)#29
saagpatel merged 1 commit into
mainfrom
chore/dead-code-wiring

Conversation

@saagpatel
Copy link
Copy Markdown
Owner

What

Arc C dead-code resolution. Re-scanned the 6 public functions flagged as orphaned in a schema-0.4.0 note (6 weeks stale). 5 of 6 are false positives — they have real production callers now and were left untouched. Only one was genuinely dead.

Removed

  • read_context_text (src/portfolio_truth_sources.py) — zero callers anywhere in src/ or tests/ (the # Called indirectly via context analysis pipeline comment was stale/incorrect). 11 lines removed.

Verified-not-orphaned (left untouched)

Function Real caller
resolve_declared_operating_path build_operating_path_entry → 4 production callers
choose_primary_context_file run_instructions_audit.py:88
render_context_recovery_plan_markdown wired to --portfolio-context-recovery CLI flag
latest_portfolio_truth_path load_latest_portfolio_truth → weekly pipeline
detect_boilerplate_context _infer_tool_provenance (same stale comment, but is called)

No new orphans found in the truth/risk/security modules.

Tests

2150 passed, 2 skipped; ruff check . clean. Diff is a single 11-line deletion, independently verified.

`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.
@saagpatel saagpatel merged commit 96279d2 into main May 31, 2026
3 checks passed
@saagpatel saagpatel deleted the chore/dead-code-wiring branch May 31, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant