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:
Marius Ciepluch
2026-11-30 10:56:25 +01:00
co-authored by Claude Fable 5.2
parent e22bd420d9
commit b975acb7e0
65 changed files with 117 additions and 122 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ import yaml
from benchmarks.valid.artifact_contract import read_benchmark_artifact, write_benchmark_artifact
from openultrasast.config import load_dotenv
from openultrasast.plane.memory import PRESIGNED_ARCHIVE_SUFFIX, S3Store, open_store
from openultrasast.memory import PRESIGNED_ARCHIVE_SUFFIX, S3Store, open_store
from openultrasast.search.task_storage import diagnostic, exception_reason
@@ -12,7 +12,7 @@ from pathlib import Path
from openultrasast.config import load_dotenv
from openultrasast.learn import experiments as ex
from openultrasast.plane.memory import open_store
from openultrasast.memory import open_store
EXPERIMENT = "exp-004-pooled-block-gate"
UNITS = Path(f"plane/experiments/{EXPERIMENT}.units.jsonl")
+1 -1
View File
@@ -45,6 +45,7 @@ from collections.abc import Mapping
from pathlib import Path
from typing import Any
from openultrasast import memory
from openultrasast.findings import quick_scan_findings
from openultrasast.learn.features import (
NONE,
@@ -71,7 +72,6 @@ from openultrasast.learn.features import (
from openultrasast.learn.labels import Clone
from openultrasast.learn.roles import RoleSet, from_model_roles, infer_for_checkout
from openultrasast.pairs import DEFAULT_CATALOG, _materialize_side, _targets, load_pair_catalog
from openultrasast.plane import memory
from openultrasast.plane.harvest import declares
from openultrasast.plane.tasks.alerts import covers
from openultrasast.plane.tasks.alerts import engine_languages as _engine_languages
+1 -1
View File
@@ -31,11 +31,11 @@ from engine_trace_worker import EXCLUDED_DIRS, safe_path, unit_record, write_jso
from openultrasast.learn.examples import read_jsonl
from openultrasast.learn.labels import load_sources, repo_name
from openultrasast.memory import FileStore
from openultrasast.model.specs import taint_specs
from openultrasast.model.taint import request_params
from openultrasast.pairs import _materialize_side, load_pair_catalog
from openultrasast.plane.engine_alerts import export_pin
from openultrasast.plane.memory import FileStore
from openultrasast.plane.tasks.alerts import engine_languages
from openultrasast.preprocess import detect_language
+1 -1
View File
@@ -17,7 +17,7 @@ from engine_trace_k8s import pack
from benchmarks.ax.batch import AXLane, Item, SandboxFailure, Workload, manifest
from benchmarks.ax.batch import task_state as task_state
from openultrasast.plane.memory import open_store as open_store
from openultrasast.memory import open_store as open_store
def task_manifest(name, args, urls):
+1 -1
View File
@@ -12,7 +12,7 @@ import time
import uuid
from datetime import timedelta
from openultrasast.plane.memory import PRESIGNED_ARCHIVE_SUFFIX, S3Store, open_store
from openultrasast.memory import PRESIGNED_ARCHIVE_SUFFIX, S3Store, open_store
IMAGE = "ghcr.io/norandom/openultrasast:2.0.1"
BOOTSTRAP = r"""
+1 -1
View File
@@ -9,7 +9,7 @@ import uuid
from engine_worker_service import PENDING, client_from_env, pack, put, read, result_key, status
from openultrasast.plane.memory import PRESIGNED_ARCHIVE_SUFFIX
from openultrasast.memory import PRESIGNED_ARCHIVE_SUFFIX
class Dispatcher:
+1 -1
View File
@@ -28,7 +28,7 @@ from pathlib import Path
from engine_trace_worker import unit_record, worker
from openultrasast.plane.memory import S3Client, s3_settings
from openultrasast.memory import S3Client, s3_settings
PENDING = "engine-queue/pending/"
CLAIMED = "engine-queue/claimed/"
+1 -1
View File
@@ -22,7 +22,7 @@ from openultrasast.config import load_dotenv
from openultrasast.learn.examples import load_examples
from openultrasast.learn.labels import load_sources
from openultrasast.learn.slice import function_slice
from openultrasast.plane.memory import MemoryStore, open_store
from openultrasast.memory import MemoryStore, open_store
UNITS = Path("plane/experiments/exp-004-pooled-block-gate.units.jsonl")
OUTPUT = Path("benchmarks/measurements/2026-10-03-graph-slice-leak-audit/record.json")
+2 -2
View File
@@ -21,7 +21,9 @@ from pathlib import Path
from benchmarks.ax.batch import AXLane, ClusterUnavailable, SearchExecutorTask, Workload, validate_image
from benchmarks.ax.search_verify import AXSideDispatcher, validate_result
from benchmarks.search.executor_smoke import CLONE
from openultrasast.budget import BudgetExhausted, SpendBudget
from openultrasast.config import load_dotenv
from openultrasast.memory import FileStore, open_store
from openultrasast.model.endpoint import (
DEEPSEEK_BASE_ENV,
DEEPSEEK_BASE_URL,
@@ -30,8 +32,6 @@ from openultrasast.model.endpoint import (
Prices,
price_of,
)
from openultrasast.plane.budget import BudgetExhausted, SpendBudget
from openultrasast.plane.memory import FileStore, open_store
from openultrasast.provider.openrouter import OpenRouterChatClient
from openultrasast.search import _sandbox
from openultrasast.search.board import Board
+1 -2
View File
@@ -837,8 +837,7 @@ def run(
def main(argv: list[str] | None = None) -> int:
from openultrasast import config
from openultrasast.plane import memory
from openultrasast import config, memory
from openultrasast.plane.reconciler import results_root
parser = argparse.ArgumentParser(description=__doc__)
+2 -3
View File
@@ -18,7 +18,7 @@ from urllib.parse import urlsplit
import yaml
from openultrasast.plane.memory import MemoryStore
from openultrasast.memory import MemoryStore
URL = re.compile(r"github\.com/([\w.-]+/[\w.-]+)", re.I)
NAME = re.compile(r"[\w.-]+/[\w.-]+")
@@ -327,8 +327,7 @@ def verify_tests(root: Path) -> dict:
def main(argv: list[str] | None = None) -> int:
import os
from openultrasast import config
from openultrasast.plane import memory
from openultrasast import config, memory
from openultrasast.plane.reconciler import results_root
parser = argparse.ArgumentParser(description=__doc__)
+1 -1
View File
@@ -12,6 +12,7 @@ from copy import deepcopy
from pathlib import Path
from openultrasast import tool_hunter
from openultrasast.budget import MeteredClient
from openultrasast.complexity.map import Hotspot
from openultrasast.config import load_config
from openultrasast.hunt.runner import _full_checkout as full_checkout
@@ -19,7 +20,6 @@ from openultrasast.hunter_tools import clamp_repo_path
from openultrasast.learn.program import ANSWER_FORMAT, Caller, Prompt, classify
from openultrasast.model.endpoint import resolve_models
from openultrasast.model.taxonomy import FAMILY_IDS, load_families
from openultrasast.plane.budget import MeteredClient
if __package__ in {None, ""}:
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))