From 74ffd6da5300550181605a0335bffaf6864e5bae Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 24 Nov 2026 00:33:08 +0100 Subject: [PATCH] Sort the shipped-feature imports and type what a bench makes its tasks from --- bin/task_bench/main.py | 4 ++-- bin/task_bench/shipped_features.py | 10 +++++----- bin/task_bench/test_shipped_features.py | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/task_bench/main.py b/bin/task_bench/main.py index e7ec7df4..faf6883e 100644 --- a/bin/task_bench/main.py +++ b/bin/task_bench/main.py @@ -175,11 +175,11 @@ from claude_code.entries import entry_from, json_objects from mutate_changes.tool_process import failed, Ran, run_tool from failure import Failure from task_bench.feature_tasks import feature_tasks, Features, read_features -from task_bench.shipped_features import read_shipped, shipped_tasks, ShippedFeatures from task_bench.figures import figures, Result, Side, SIDES, table from git_cli import git_repo from review_rules.review_folder import made_review_folder, REPORTS from larv_review.history_commands import read_places +from task_bench.shipped_features import read_shipped, shipped_tasks, ShippedFeatures from task_bench.record_figures import recorded_bench from run_heavy.capped_docker import SHARE_VARIABLE @@ -274,7 +274,7 @@ def bench(given: dict[str, str], env: typing.Mapping[str, str], read: typing.Cal # so a fault there stops the bench at once. kind = KINDS[given[TASKS]] # Shipped features are read from the base's history, once the base is known. - tasks_from = None if kind is SHIPPED else read(home) if kind is BUG else read_features(home, kind) + tasks_from: str | Features | ShippedFeatures | Failure | None = None if kind is SHIPPED else read(home) if kind is BUG else read_features(home, kind) if isinstance(tasks_from, Failure): return tasks_from git = functools.partial(git_repo.git, env=env) diff --git a/bin/task_bench/shipped_features.py b/bin/task_bench/shipped_features.py index c91b9579..33af6cc2 100644 --- a/bin/task_bench/shipped_features.py +++ b/bin/task_bench/shipped_features.py @@ -9,16 +9,16 @@ import pathlib import shutil import typing +from task_bench.feature_tasks import ACCEPTANCE, Feature, PATCH, why_passed_over +from task_bench.tasks import Bench, committed, on_disk, Planned, Task from branch_chunks.read import cut_with_shipped, unsupported from failure import Failure +from git_cli.git_repo import Git from plan.todo_table import Item from project_config.main import located -from project_config.settings import RECORDS -from task_bench.feature_tasks import ACCEPTANCE, Feature, PATCH, why_passed_over -from task_bench.figures import Side, SIDES from task_bench.runs import of_tests -from task_bench.tasks import Bench, committed, on_disk, Planned, Task -from git_cli.git_repo import Git +from project_config.settings import RECORDS +from task_bench.figures import Side, SIDES # The options that keep the checkout's diff config out of a diff. A rename is written as a removal and an addition, which # `git apply` takes whatever it would have detected. diff --git a/bin/task_bench/test_shipped_features.py b/bin/task_bench/test_shipped_features.py index 054afc40..5c12cc16 100644 --- a/bin/task_bench/test_shipped_features.py +++ b/bin/task_bench/test_shipped_features.py @@ -10,13 +10,13 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) -from task_bench.test_task_bench import BASE_CODE, HEAD_CODE from task_bench.test_feature_tasks import ACCEPTANCE, BenchOfTasksCase +from task_bench.test_task_bench import BASE_CODE, HEAD_CODE from failure import Failure -from branch_chunks.read import READ_AT -from task_bench import main -from task_bench.shipped_features import read_shipped from git_cli.git_repo import git +from task_bench import main +from branch_chunks.read import READ_AT +from task_bench.shipped_features import read_shipped HEADER = "| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves |\n|---|---|---|---|---|---|---|---|---|---|---|\n" ROWS = {