mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-17 12:09:27 +00:00
chore(p0): drop never-enabled hunter tools, test-only functions and receiver delivery
Off every active line (PATHFINDER-2026-10-13/03-unified-proposal.md, cuts). Deleted: the four hunter tools no caller enables (read_definition, entry_points, flows, obligations) with their schemas and dispatch, the dead mapping branch of find_refs; 20 functions whose only caller was one test (mapping task records, compute_ranking_metrics, build_quick_hunter_prompt, validate_evidence_transition, should_fuse, harness processors, rank_targets_with_model, model/report slice rendering, taxonomy hierarchical/related, config_value.verdict, taint.verdict, roles.load_roles, features.language_of and build_for_scan, folds.leave_one_*, features.recorded_case, search BatchExecutor and the three __main__ shims, delivery.put_input); the receiver delivery mode of the plane. push_inputs.py moved to benchmarks/push. memory.purge stays: the live-S3 test cleanup uses it. Net: 2,730 lines deleted, 207 added. 473 targeted tests passed; 3,282 tests collect. breadth.toml records the removals. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
f5a904b7f2
commit
f63703a604
+1
-21
@@ -5,14 +5,7 @@ import pytest
|
||||
|
||||
from openultrasast.preprocess import FileTarget
|
||||
from openultrasast.provider.openrouter import OpenRouterError, parse_json_content
|
||||
from openultrasast.rank import (
|
||||
RankingError,
|
||||
composite_priority,
|
||||
parse_ranker_response,
|
||||
rank_targets,
|
||||
rank_targets_with_model,
|
||||
write_rankings,
|
||||
)
|
||||
from openultrasast.rank import RankingError, composite_priority, parse_ranker_response, rank_targets, write_rankings
|
||||
|
||||
|
||||
class FakeRankerClient:
|
||||
@@ -72,19 +65,6 @@ def test_parse_ranker_response_rejects_malformed_scores() -> None:
|
||||
parse_ranker_response({"rankings": [{"path": "a.py", "surface": 9, "influence": 1, "reachability": 1}]}, "model")
|
||||
|
||||
|
||||
def test_rank_targets_with_model_chunks_requests() -> None:
|
||||
targets = [
|
||||
FileTarget(path="a.py", absolute_path="/repo/a.py", language="python", loc=1, tags=[], has_fuzz_entry_point=False),
|
||||
FileTarget(path="b.py", absolute_path="/repo/b.py", language="python", loc=1, tags=[], has_fuzz_entry_point=False),
|
||||
]
|
||||
client = FakeRankerClient()
|
||||
|
||||
rankings = rank_targets_with_model(targets, client=client, model="openrouter/test-ranker", chunk_size=1)
|
||||
|
||||
assert client.calls == 2
|
||||
assert {ranking.model_id for ranking in rankings} == {"openrouter/test-ranker"}
|
||||
|
||||
|
||||
def test_parse_json_content_accepts_fenced_json() -> None:
|
||||
assert parse_json_content('```json\n{"rankings": []}\n```') == {"rankings": []}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user