refactor: remove orphaned read_context_text function (Arc C)#29
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 pipelinecomment was stale/incorrect). 11 lines removed.Verified-not-orphaned (left untouched)
resolve_declared_operating_pathbuild_operating_path_entry→ 4 production callerschoose_primary_context_filerun_instructions_audit.py:88render_context_recovery_plan_markdown--portfolio-context-recoveryCLI flaglatest_portfolio_truth_pathload_latest_portfolio_truth→ weekly pipelinedetect_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.