abc_runner.task¶
WARNING
This documentation is almost entirely "vibe coded"; while a helpful resource for humans and agents to understand this codebase, it should not be considered a source of ground truth in the way documentation normally is, and the user is responsible for verifying that all instructions given here are safe.
abc_runner.task
¶
Task management for ABC Runner.
Provides the Task class for loading and validating grouped benchmark task
definitions. Tasks live inside task groups, which are discovered and resolved
by :class:abc_runner.groups.GroupResolver (see :mod:abc_runner.groups).
TaskGroup
dataclass
¶
Represents a benchmark task group.
Task
¶
Task(task_name: str, resolver: GroupResolver, task_group: str | None = None)
Represents a ABC Runner task.
A task belongs to a task group and defines a benchmark problem with a workspace for the agent, a prompt describing the problem, and hidden verification tests.
Attributes:
| Name | Type | Description |
|---|---|---|
task_id |
str
|
Short task identifier (directory name under a task group) |
group_id |
str
|
Task group identifier |
task_ref |
str
|
Canonical |
group_dir |
Path
|
Full path to the (resolved) task group directory |
task_dir |
Path
|
Full path to task directory |
group_metadata |
dict
|
Parsed group metadata from |
Examples:
>>> task = Task("smoke_test/hello-world-python", resolver)
>>> task.task_ref
'smoke_test/hello-world-python'
Initialize a task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_name
|
str
|
Task identifier. Accepts either |
required |
resolver
|
GroupResolver
|
Resolver used to locate task groups. |
required |
task_group
|
str
|
Explicit task group to use when |
None
|
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the task directory is not found |
ValueError
|
If the task name is ambiguous or group metadata is invalid |
Source code in abc_runner/task.py
group_prompt_file
property
¶
Path to the task group's shared group_prompt.md, if present.
This optional file lets a task group inject shared, group-wide guidance
(for example, how to build and test the group's software stack) into the
agent's prompt between the harness system instructions and the per-task
prompt. Returns None when the group does not define one, so the
prompt layer is fully backward-compatible.
validate
¶
list_task_groups
staticmethod
¶
list_task_groups(resolver: GroupResolver) -> list[str]
list_tasks
staticmethod
¶
list_tasks(resolver: GroupResolver) -> list[str]
List all available task references as group/task.
Source code in abc_runner/task.py
list_tasks_by_group
staticmethod
¶
list_tasks_by_group(resolver: GroupResolver) -> dict[str, list[str]]
Return available task ids keyed by task group.
Source code in abc_runner/task.py
match_task_refs
staticmethod
¶
match_task_refs(patterns: list[str], resolver: GroupResolver) -> tuple[list[str], list[str]]
Match canonical group/task refs against glob patterns.
Returns (matched_task_refs, unmatched_patterns) where task refs are
sorted and deduplicated. Matching is performed only against canonical
refs returned by :meth:list_tasks.