mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-12-04 02:38:18 +00:00
refactor(memory): the memory store and the spend meter leave the plane package (C1)
openultrasast.plane.memory and openultrasast.plane.budget are now
openultrasast.memory and openultrasast.budget; every importer follows. A pure move:
no behaviour changes. The two renames themselves were swept into 1aad435 by mistake
(they were staged when that spec commit was made), so the three commits between it
and this one do not import; this commit completes the move.
memory.py still reaches into the plane in two lazy imports (results_root in
open_store, the reconciler in seed); the cut of the plane has to settle both.
Checked: ruff, ruff format, mypy; 163 test files around memory, budget, plane, learn
and hunt passed across three runs by the implementing agent, and the six closest
files again before this commit. The whole suite was not run locally.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
e22bd420d9
commit
b975acb7e0
@@ -76,7 +76,7 @@ def test_driver_allocates_fair_share_with_settled_rollover(tmp_path, monkeypatch
|
||||
from types import SimpleNamespace
|
||||
|
||||
from benchmarks.search import pilot_run
|
||||
from openultrasast.plane.budget import BudgetExhausted
|
||||
from openultrasast.budget import BudgetExhausted
|
||||
|
||||
monkeypatch.chdir(tmp_path)
|
||||
root = Path("benchmarks/search/private")
|
||||
@@ -145,9 +145,9 @@ def make_pilot(tmp_path, *, side="fixed", dry_run=False):
|
||||
from argparse import Namespace
|
||||
|
||||
from benchmarks.search.pilot_run import Pilot
|
||||
from openultrasast.budget import SpendBudget
|
||||
from openultrasast.memory import FileStore
|
||||
from openultrasast.model.endpoint import Prices
|
||||
from openultrasast.plane.budget import SpendBudget
|
||||
from openultrasast.plane.memory import FileStore
|
||||
from openultrasast.search.worker import StubModel
|
||||
|
||||
args = Namespace(side=side, dry_run=dry_run, model="scripted", max_tokens=128, verify_lane="vm", image="unused")
|
||||
@@ -209,8 +209,8 @@ def test_worker_failure_is_not_no_evidence(tmp_path):
|
||||
|
||||
|
||||
def test_shared_budget_reserved_and_settled_on_error(tmp_path):
|
||||
from openultrasast.budget import SpendBudget
|
||||
from openultrasast.model.endpoint import Prices
|
||||
from openultrasast.plane.budget import SpendBudget
|
||||
from openultrasast.search.worker import Worker
|
||||
|
||||
run = SpendBudget(0.5)
|
||||
@@ -400,8 +400,8 @@ def test_vm_preflight_refuses_before_client_or_store(tmp_path, monkeypatch):
|
||||
|
||||
|
||||
def test_actual_usage_settles_shared_budget_and_counts_tokens(tmp_path):
|
||||
from openultrasast.budget import SpendBudget
|
||||
from openultrasast.model.endpoint import Prices
|
||||
from openultrasast.plane.budget import SpendBudget
|
||||
from openultrasast.search.worker import Worker
|
||||
|
||||
run, task = SpendBudget(0.5), SpendBudget(0.05)
|
||||
@@ -421,8 +421,8 @@ def test_actual_usage_settles_shared_budget_and_counts_tokens(tmp_path):
|
||||
|
||||
|
||||
def test_refused_shared_reservation_releases_task_allowance(tmp_path):
|
||||
from openultrasast.budget import BudgetExhausted, SpendBudget
|
||||
from openultrasast.model.endpoint import Prices
|
||||
from openultrasast.plane.budget import BudgetExhausted, SpendBudget
|
||||
from openultrasast.search.worker import StubModel, Worker
|
||||
|
||||
run, task = SpendBudget(0), SpendBudget(0.05)
|
||||
|
||||
Reference in New Issue
Block a user