Repository navigation
refactor: drop code only tests reached — paged search, verifier compat path, dead helpers - #469
Open
CryptoJones wants to merge 1 commit into
Open
CryptoJones wants to merge 1 commit into
CryptoJones wants to merge 1 commit into
Conversation
…t path, dead helpers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
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.
Removes code that nothing in the product calls; only tests (or nothing at all) reached it. 12 files, +38 / −340 (net −302).
What was removed and why nothing needs it
SearchIndex.search_page,SearchPage,_pack_edge_first(searchindex.py), plus their 6 tests. This cursor- and token-budgeted search API was never wired to any surface. The MCP server pages throughserver._page, and the CLI and web app callsearch. Searchedsrc/,docs/,e2e/,scripts/and README: no caller outsidetests/test_searchindex.py.omi_dir=Nonecompatibility path (verify.py).verify.judgeandverify.judge_with_activitywere used only by tests, and they were the only way_ask_modelran without a vault. In that case it used its own hand-rolled copy ofai_usage.run_model: resolve backend → substitute{prompt}→subprocess.run→ parse. That copy also skipped usage accounting and the profile'sverifier_llmpermission. The only production caller,verify_consult, always passes the vault.omi_diris now required, and tests call_judge_scoredthrough a 2-line_judgehelper. I removed the two tests that only exercised the deleted subprocess branch. Backend resolution is still covered intest_ai_usage.py.mesh.commit_local(also dropped fromdocs/mesh.md)hooks._latest_by_name,hooks._journal_tail, and the now-unused_JOURNAL_TAIL_BULLETS/_JOURNAL_GLOBconstantsguard._shell_body, a wrapper over_shell_body_index; its docstring moved to_shell_body_indexpolicy._heredoc_owner_is_shell, a wrapper over_HeredocOwners; its docstring moved to the classcompliance.recidivism; its two test call sites now userecidivism_counts()[rule], which production already usesBehavior is unchanged: every production path calls exactly what it called before.
Verification
Ran
ruff check .: clean.mypy src(strict): no issues in 59 files.pytestfull suite: 3818 passed and 13 failed. Two of those 13 were my missedcompliance.recidivismtest call sites, which I fixed afterwards;test_compliance.pynow passes (16/16). The other 11 also fail on the unmodified base commitc8c1015with this branch's changes stashed, so they predate this PR:test_guard.py/test_rules.pyhit the 2.0 s hard bound on this machine.test_repo_block_message_embeds_governing_excerptfails: the excerpt is missing from the reason text.test_name_timelines.pydecoy tests pickB.mdinstead ofA.md.omind guard reset, thenomind guard verifywith real PostToolUse events against a temporary vault and a temporaryXDG_STATE_HOME, once withOMI_MODEL_CMD=/bin/false. The verifier ran end to end through the simplified_judge_scored→_ask_model(…, omi_dir)path and returnedrelevantwithout raising. I did not confirm which branch decided that verdict.Did not run
Blocked by the machine
pytestwas not on PATH until I ranuv sync --all-extras. The 8 timing tests exceed their 2.0 s bound on this host whether or not this branch's changes are applied.🤖 Generated with Claude Code