SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.30052 · 2026

REPOT: Recoverable Program-of-Thought via Checkpoint Repair *

Parsa Mazaheri

arXiv · PDF · Open in the Atlas

Code that ran

29 of 44 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (12 of them constructed an object rather than computing a result; 8 honoured the contract we drafted, 0 violated it and 13 have no contract verdict; 8 failures of our instrument; 15 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.30052.json · badge: /api/ran/2605.30052.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
parsa-mz/RePot community
Papers with Code archive
29 ran · 15 no recorded run
FunctionStatusWhere it lives
ActionOption Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("a23ef25544fb3944")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ActionOption: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any

torch.manual_seed(0)

# Construct valid arguments for ActionOption
ARGS = {
    "id": "action_001",
    "action": {
        "type": "move",
        "target": "position_5",
        "value": 42,
        "nested": {"key1": "val1", "key2": [1, 2, 3]}
    },
    "label": "Move to Position 5"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ActionOption — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ActionOption output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
AgentConfig Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("1ac9ba96c7eff926")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, AgentConfig: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from dataclasses import dataclass

# Set seed for reproducibility
torch.manual_seed(0)

# Construct ARGS dict with all parameters for AgentConfig
ARGS = {
    "max_steps_multiplier": 2,
    "max_retries": 3,
    "self_consistency_k": 8,
    "max_state_visits": 4,
    "chunk_size": 4,
    "chunk_size_by_env": {
        "env_a": 2,
        "env_b": 3,
    },
    "max_llm_calls": 4,
    "max_repair_calls": 2,
    "chunk_max_tokens": 8192,
    "chunk_max_tokens_by_env": {
        "env_a": 4096,
        "env_b": 6144,
    },
    "action_choice_max_tokens": 2048,
    "temperature": 0.0,
    "max_tokens": 16384,
    "vex_default_proposer": "json",
    "vex_proposer_by_env": {
        "env_a": "beam",
        "env_b": "sampling",
    },
    "vex_disable_prefix_in_prompt": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AgentConfig — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AgentConfig output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
CallTrace Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("d1a7e248d404e760")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, CallTrace: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from dataclasses import dataclass

torch.manual_seed(0)

ARGS = {
    "raw_text": "The quick brown fox jumps over the lazy dog",
    "actions": [
        {"type": "move", "target": "position_1"},
        {"type": "interact", "target": "object_2"},
    ],
    "prompt_tokens": 150,
    "completion_tokens": 87,
    "cached_tokens": 42,
    "wall_time": 0.523,
    "finish_reason": "stop",
    "error": "",
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CallTrace — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CallTrace output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
CandidateSolution Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("a70938113a15d322")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, CandidateSolution: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

class CandidateSolution(BaseModel):
    """One move-list candidate extracted from raw model output + its replay outcome."""
    model_config = ConfigDict(extra='forbid')
    candidate_id: int
    source: str = 'unknown'
    raw_moves: list[Any] = Field(default_factory=list)
    actions: list[Action] = Field(default_factory=list)
    char_start: int = 0
    char_end: int = 0
    token_start: int = 0
    token_end: int = 0
    normalized_token_position: float | None = None
    valid_format: bool = True
    replay_success: bool = False
    first_failure_move: int | None = None
    first_failure_fraction: float | None = None
    failure_type: FailureType | None = None
    dedupe_key: str = ''

ARGS = {
    'candidate_id': 42,
    'source': 'model_output_v1',
    'raw_moves': ['move_1', 'move_2', 'move_3'],
    'actions': [
        {'action_type': 'step', 'target': 'pos_1'},
        {'action_type': 'grab', 'target': 'obj_2'},
    ],
    'char_start': 128,
    'char_end': 256,
    'token_start': 10,
    'token_end': 25,
    'normalized_token_position': 0.45,
    'valid_format': True,
    'replay_success': True,
    'first_failure_move': None,
    'first_failure_fraction': None,
    'failure_type': None,
    'dedupe_key': 'hash_abc123',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CandidateSolution — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CandidateSolution output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
EnvCapabilities Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("7466ce147055cf70")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, EnvCapabilities: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from pydantic import BaseModel, ConfigDict, Field

torch.manual_seed(0)

ARGS = {
    "supports_action_ids": True,
    "supports_progress_score": False,
    "supports_tool_plan": True,
    "profile": "state_tracking"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EnvCapabilities — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EnvCapabilities output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GenerateRequest Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("b1fd40df8a316213")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GenerateRequest: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any

torch.manual_seed(0)

ARGS = {
    "messages": [
        {"role": "user", "content": "Hello, how are you?"},
        {"role": "assistant", "content": "I'm doing well, thank you!"}
    ],
    "model": "gpt-4",
    "temperature": 0.7,
    "max_tokens": 256,
    "metadata": {
        "user_id": "test_user_123",
        "session_id": "sess_456",
        "request_id": "req_789"
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GenerateRequest — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GenerateRequest output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GenerateResult Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("7c19fdb3aca2aca8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GenerateResult: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any

# Set seed for reproducibility
torch.manual_seed(0)

ARGS = {
    "text": "This is a sample LLM response with generated text.",
    "prompt_tokens": 42,
    "completion_tokens": 28,
    "latency_s": 1.234,
    "finish_reason": "stop",
    "raw_response": {
        "id": "chatcmpl-123",
        "object": "text_completion",
        "created": 1677652288,
        "model": "gpt-3.5-turbo",
        "usage": {
            "prompt_tokens": 42,
            "completion_tokens": 28,
            "total_tokens": 70
        }
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GenerateResult — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GenerateResult output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Problem Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("dcde1456a391d895")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Problem: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Any

torch.manual_seed(0)

# Define the Action and State types as dicts
action_1 = {"type": "move", "direction": "forward", "distance": 1.5}
action_2 = {"type": "rotate", "angle": 90}
oracle_solution = [action_1, action_2]

initial_state = {
    "position": [0, 0],
    "orientation": 0,
    "inventory": ["key"],
    "energy": 100
}

goal_state = {
    "position": [5, 5],
    "orientation": 90,
    "inventory": ["key", "treasure"],
    "energy": 50
}

metadata = {
    "difficulty": "medium",
    "attempts": 3,
    "timestamp": "2024-01-15T10:30:00Z"
}

ARGS = {
    "problem_id": "puzzle_001",
    "environment": "maze_3d",
    "complexity": 7,
    "initial_state": initial_state,
    "goal_state": goal_state,
    "natural_language_prompt": "Navigate from the starting position to the treasure room while collecting the key.",
    "oracle_solution": oracle_solution,
    "min_steps": 2,
    "max_steps": 15,
    "metadata": metadata
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Problem — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Problem output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
PythonExecutionResult Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("2d12f093b2818a8b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, PythonExecutionResult: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

ARGS = {
    'ok': True,
    'stdout': 'Sample output text',
    'stderr': '',
    'error': '',
    'timed_out': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PythonExecutionResult — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PythonExecutionResult output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ReplayResult Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("322f9837e9f253b1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ReplayResult: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Any
from dataclasses import dataclass, field

torch.manual_seed(0)

State = dict[str, Any]

@dataclass
class ReplayResult:
    """Outcome of replaying a candidate move list through the verifier."""
    success: bool
    valid_prefix_actions: list = field(default_factory=list)
    invalid_action: Any | None = None
    first_failure_step: int | None = None
    final_state: State | None = None
    error_type: str | None = None
    error_message: str = ''
    valid_prefix_fraction: float = 0.0

ARGS = {
    'success': True,
    'valid_prefix_actions': [
        {'action_id': 0, 'move': 'forward'},
        {'action_id': 1, 'move': 'rotate'},
    ],
    'invalid_action': {'action_id': 2, 'move': 'invalid_move'},
    'first_failure_step': 3,
    'final_state': {
        'position': torch.tensor([1.0, 2.0, 3.0, 4.0]),
        'velocity': np.array([0.1, 0.2, 0.3, 0.4]),
        'timestamp': 42,
    },
    'error_type': 'OutOfBoundsError',
    'error_message': 'Agent moved outside valid region',
    'valid_prefix_fraction': 0.75,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ReplayResult — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ReplayResult output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
StepResult Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("ae2d47bf304abe79")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, StepResult: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class StepResult(BaseModel):
    """Outcome of ``Env.step(state, action)``: valid? next state? what went wrong?"""
    model_config = ConfigDict(extra='forbid')
    valid: bool
    next_state: State
    error_type: FailureType | None = None
    message: str = ''

# Build valid arguments for StepResult
ARGS = {
    'valid': True,
    'next_state': {
        'position': [1, 2, 3],
        'timestamp': 42,
        'agent_id': 'agent_0',
        'metadata': {'step_count': 5, 'reward': 10.5}
    },
    'error_type': None,
    'message': 'Step completed successfully'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type StepResult — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a StepResult output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
TraceStep Ran
ran on a synthesized input · constructed an object; no result was computed
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("3703554ccf1bb6f3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, TraceStep: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

torch.manual_seed(0)

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0


ARGS = {
    'problem_id': 'prob_001',
    'model': 'gpt-4',
    'method': 'reasoning_chain',
    'step': 5,
    'current_state': {'position': 10, 'items': ['key', 'torch']},
    'action_id': 'action_42',
    'legal_action_count': 8,
    'legal_action_ids': ['action_1', 'action_2', 'action_42', 'action_7'],
    'blocked_action_ids': ['action_99', 'action_100'],
    'retry_reason': 'invalid format',
    'loop_recovery_attempted': True,
    'model_action': {'type': 'move', 'target': 'north'},
    'predicted_next_state': {'position': 11, 'items': ['key', 'torch']},
    'actual_next_state': {'position': 11, 'items': ['key', 'torch']},
    'valid': True,
    'error_type': FailureType.INVALID_TRANSITION,
    'message': 'Step executed successfully',
    'raw_model_output': 'Action: move(north)',
    'finish_reason': 'stop',
    'tokens_in': 256,
    'tokens_out': 128,
    'wall_time': 1.234,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TraceStep — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TraceStep output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_SafetyVisitor Ran
ran on a synthesized input
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("18d35ff45b9a3719")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ast

ALLOWED_IMPORTS = {'collections', 'functools', 'itertools', 'json', 'math'}

BANNED_CALLS = {'__import__', 'breakpoint', 'compile', 'delattr', 'dir', 'eval', 'exec', 'getattr', 'globals', 'help', 'input', 'locals', 'open', 'setattr', 'vars'}

BANNED_MODULES = {'builtins', 'ctypes', 'importlib', 'inspect', 'os', 'pathlib', 'resource', 'shutil', 'signal', 'socket', 'subprocess', 'sys'}

def _call_name(node: ast.AST) -> str:
    if isinstance(node, ast.Name):
        return node.id
    if isinstance(node, ast.Attribute):
        return node.attr
    return ''

class _SafetyVisitor(ast.NodeVisitor):

    def visit_Import(self, node: ast.Import) -> None:
        """Reject `import X` for any X outside the allow-list."""
        for alias in node.names:
            root = alias.name.split('.', 1)[0]
            if root not in ALLOWED_IMPORTS or root in BANNED_MODULES:
                raise ValueError(f'Import is not allowed: {alias.name}')
        self.generic_visit(node)

    def visit_ImportFrom(self, node: ast.ImportFrom) -> None:
        """Reject `from X import …` for X outside the allow-list and any relative imports."""
        root = (node.module or '').split('.', 1)[0]
        if node.level or root not in ALLOWED_IMPORTS or root in BANNED_MODULES:
            raise ValueError(f'Import is not allowed: {node.module}')
        self.generic_visit(node)

    def visit_Call(self, node: ast.Call) -> None:
        """Reject calls to banned built-ins (eval, exec, open, etc.)."""
        name = _call_name(node.func)
        if name in BANNED_CALLS:
            raise ValueError(f'Function call is not allowed: {name}')
        self.generic_visit(node)

    def visit_Attribute(self, node: ast.Attribute) -> None:
        """Reject dunder attribute access (e.g. `obj.__class__`)."""
        if node.attr.startswith('__'):
            raise ValueError(f'Dunder attribute access is not allowed: {node.attr}')
        self.generic_visit(node)

    def visit_Name(self, node: ast.Name) -> None:
        """Reject any reference to a dunder name (e.g. `__import__`)."""
        if node.id.startswith('__'):
            raise ValueError(f'Dunder name access is not allowed: {node.id}')
        self.generic_visit(node)


INIT_ARGS = {}

ARGS = {
    'node': ast.parse('import json\nx = 1 + 2')
}

METHOD = 'visit'

if __name__ == '__main__':
    visitor = _SafetyVisitor(**INIT_ARGS)
    result = getattr(visitor, METHOD)(**ARGS)
    print(f"Visitor executed successfully. Result: {result}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_blocked_summary_default Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("3ee056b9fbb0ebf2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

def _blocked_summary_default(blocked: list[tuple]) -> str:
    if not blocked:
        return '(none)'
    parts = []
    for action, message in blocked[:8]:
        parts.append(f'{json.dumps(action, sort_keys=True)} ({message})')
    more = '' if len(blocked) <= 8 else f' ... (+{len(blocked) - 8} more)'
    return '; '.join(parts) + more


# Test case 1: empty blocked list
ARGS = {
    'blocked': []
}

# Test case 2: small blocked list with tuples of (action, message)
# Let's create a more comprehensive test
ARGS = {
    'blocked': [
        ('action_1', 'message_1'),
        ('action_2', 'message_2'),
        ('action_3', 'message_3'),
    ]
}

# Test case 3: larger list to test the "more" suffix
ARGS = {
    'blocked': [
        ('action_1', 'message_1'),
        ('action_2', 'message_2'),
        ('action_3', 'message_3'),
        ('action_4', 'message_4'),
        ('action_5', 'message_5'),
        ('action_6', 'message_6'),
        ('action_7', 'message_7'),
        ('action_8', 'message_8'),
        ('action_9', 'message_9'),
        ('action_10', 'message_10'),
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_call_name Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("b6d9e6240e442cf6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ast

# Construct valid AST nodes to test _call_name
node_name = ast.Name(id="my_variable")
node_attribute = ast.Attribute(attr="my_attr")
node_other = ast.Expr()

ARGS = {
    "node": node_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_failure_type_from_replay Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("45cf583afc281d52")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned FailureType. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from enum import StrEnum
from typing import Any
from dataclasses import dataclass, field

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

@dataclass
class ReplayResult:
    """Outcome of replaying a candidate move list through the verifier."""
    success: bool
    valid_prefix_actions: list = field(default_factory=list)
    invalid_action: Any | None = None
    first_failure_step: int | None = None
    final_state: State | None = None
    error_type: str | None = None
    error_message: str = ''
    valid_prefix_fraction: float = 0.0

def _failure_type_from_replay(replay: ReplayResult) -> FailureType:
    if replay.error_type == 'normalization_error':
        return FailureType.OUTPUT_FORMAT_ERROR
    return FailureType.INVALID_TRANSITION

# Construct test case 1: normalization_error
replay_result_1 = ReplayResult(
    success=False,
    valid_prefix_actions=[],
    invalid_action=None,
    first_failure_step=0,
    final_state={'state_key': 'value'},
    error_type='normalization_error',
    error_message='Normalization failed',
    valid_prefix_fraction=0.0
)

# Construct test case 2: other error_type
replay_result_2 = ReplayResult(
    success=False,
    valid_prefix_actions=['action1', 'action2'],
    invalid_action='bad_action',
    first_failure_step=2,
    final_state={'state_key': 'value2'},
    error_type='some_other_error',
    error_message='Invalid transition occurred',
    valid_prefix_fraction=0.5
)

ARGS = {
    'replay': replay_result_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FailureType — a FailureType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a FailureType output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_invalid_after_resolution_rate Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("168ecf7946f931c7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0

step1 = TraceStep(
    problem_id='prob_001',
    model='gpt-4',
    method='direct',
    step=1,
    current_state={'position': 0, 'goal': 5},
    action_id='action_a',
    legal_action_count=3,
    legal_action_ids=['action_a', 'action_b', 'action_c'],
    blocked_action_ids=[],
    retry_reason=None,
    loop_recovery_attempted=False,
    model_action={'type': 'move', 'direction': 'forward'},
    predicted_next_state={'position': 1, 'goal': 5},
    actual_next_state={'position': 1, 'goal': 5},
    valid=True,
    error_type=None,
    message='Success',
    raw_model_output='move forward',
    finish_reason='stop',
    tokens_in=50,
    tokens_out=10,
    wall_time=0.5
)

step2 = TraceStep(
    problem_id='prob_001',
    model='gpt-4',
    method='direct',
    step=2,
    current_state={'position': 1, 'goal': 5},
    action_id='action_b',
    legal_action_count=3,
    legal_action_ids=['action_a', 'action_b', 'action_c'],
    blocked_action_ids=[],
    retry_reason=None,
    loop_recovery_attempted=False,
    model_action={'type': 'move', 'direction': 'forward'},
    predicted_next_state={'position': 2, 'goal': 5},
    actual_next_state={'position': 2, 'goal': 5},
    valid=False,
    error_type=FailureType.CONSTRAINT_VIOLATION,
    message='Constraint violated',
    raw_model_output='move forward',
    finish_reason='stop',
    tokens_in=60,
    tokens_out=12,
    wall_time=0.6
)

step3 = TraceStep(
    problem_id='prob_001',
    model='gpt-4',
    method='direct',
    step=3,
    current_state={'position': 2, 'goal': 5},
    action_id=None,
    legal_action_count=2,
    legal_action_ids=['action_a', 'action_c'],
    blocked_action_ids=['action_b'],
    retry_reason='Invalid action',
    loop_recovery_attempted=True,
    model_action=None,
    predicted_next_state=None,
    actual_next_state=None,
    valid=False,
    error_type=FailureType.REPETITION_LOOP,
    message='Loop detected',
    raw_model_output='',
    finish_reason=None,
    tokens_in=0,
    tokens_out=0,
    wall_time=0.0
)

trace = [step1, step2, step3]

ARGS = {
    'trace': trace
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_legal_action_adherence_rate Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("c65b97e772044f34")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0

def _legal_action_adherence_rate(trace: list[TraceStep]) -> float:
    candidates = [s for s in trace if s.legal_action_ids]
    if not candidates:
        return 0.0
    return sum((1 for s in candidates if s.action_id in s.legal_action_ids)) / len(candidates)


# Construct test trace data
step1 = TraceStep(
    problem_id="prob1",
    model="gpt4",
    method="method1",
    step=0,
    current_state={"x": 1},
    action_id="action_a",
    legal_action_ids=["action_a", "action_b"],
    legal_action_count=2,
)

step2 = TraceStep(
    problem_id="prob1",
    model="gpt4",
    method="method1",
    step=1,
    current_state={"x": 2},
    action_id="action_c",
    legal_action_ids=["action_b", "action_d"],
    legal_action_count=2,
)

step3 = TraceStep(
    problem_id="prob1",
    model="gpt4",
    method="method1",
    step=2,
    current_state={"x": 3},
    action_id="action_b",
    legal_action_ids=["action_b", "action_e"],
    legal_action_count=2,
)

step4 = TraceStep(
    problem_id="prob1",
    model="gpt4",
    method="method1",
    step=3,
    current_state={"x": 4},
    legal_action_ids=[],
)

trace = [step1, step2, step3, step4]

ARGS = {
    "trace": trace,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_loop_recovery_success_rate Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("b38c2ea951b83a53")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]
Action = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0

def _loop_recovery_success_rate(trace: list[TraceStep], success: bool) -> float:
    attempts = [idx for idx, s in enumerate(trace) if s.loop_recovery_attempted]
    if not attempts:
        return 0.0
    recovered = 0
    for idx in attempts:
        if success or any((s.valid and s.error_type is None for s in trace[idx + 1:])):
            recovered += 1
    return recovered / len(attempts)

# Construct a trace with several TraceStep instances
trace = [
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=0,
        current_state={"env": "state_0"},
        action_id="action_0",
        legal_action_count=5,
        legal_action_ids=["a1", "a2", "a3"],
        loop_recovery_attempted=False,
        valid=True,
        error_type=None,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=1,
        current_state={"env": "state_1"},
        action_id="action_1",
        legal_action_count=5,
        loop_recovery_attempted=True,
        valid=False,
        error_type=FailureType.REPETITION_LOOP,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=2,
        current_state={"env": "state_2"},
        action_id="action_2",
        legal_action_count=5,
        loop_recovery_attempted=False,
        valid=True,
        error_type=None,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=3,
        current_state={"env": "state_3"},
        action_id="action_3",
        legal_action_count=5,
        loop_recovery_attempted=True,
        valid=False,
        error_type=FailureType.STATE_DRIFT,
    ),
]

ARGS = {
    "trace": trace,
    "success": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_parse_schema_success_rate Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("4d335d1167decdfd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0

def _parse_schema_success_rate(trace: list[TraceStep]) -> float:
    if not trace:
        return 0.0
    bad = {FailureType.OUTPUT_FORMAT_ERROR, FailureType.TOKEN_TRUNCATION, FailureType.UNKNOWN_ACTION_ID}
    return sum((1 for s in trace if s.error_type not in bad)) / len(trace)

# Build a list of TraceStep instances with various error types
trace_steps = [
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=0,
        current_state={"x": 1, "y": 2},
        action_id="act_1",
        legal_action_count=5,
        valid=True,
        error_type=None,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=1,
        current_state={"x": 2, "y": 3},
        action_id="act_2",
        legal_action_count=4,
        valid=False,
        error_type=FailureType.OUTPUT_FORMAT_ERROR,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=2,
        current_state={"x": 3, "y": 4},
        action_id="act_3",
        legal_action_count=3,
        valid=True,
        error_type=None,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=3,
        current_state={"x": 4, "y": 5},
        action_id="act_4",
        legal_action_count=2,
        valid=False,
        error_type=FailureType.TOKEN_TRUNCATION,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=4,
        current_state={"x": 5, "y": 6},
        action_id="act_5",
        legal_action_count=1,
        valid=False,
        error_type=FailureType.INVALID_TRANSITION,
    ),
]

ARGS = {
    "trace": trace_steps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_state_drift_corrected_rate Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("ca020975910b098b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0

def _state_drift_corrected_rate(trace: list[TraceStep], success: bool) -> float:
    drift_indices = [idx for idx, s in enumerate(trace) if s.predicted_next_state is not None and s.actual_next_state is not None and (s.predicted_next_state != s.actual_next_state)]
    if not drift_indices:
        return 0.0
    corrected = 0
    for idx in drift_indices:
        if success or any((s.valid for s in trace[idx + 1:])):
            corrected += 1
    return corrected / len(drift_indices)

# Build test data for the function
trace_steps = [
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=0,
        current_state={"x": 1, "y": 2},
        action_id="act_1",
        legal_action_count=5,
        legal_action_ids=["act_1", "act_2"],
        blocked_action_ids=[],
        model_action={"type": "move", "target": "north"},
        predicted_next_state={"x": 1, "y": 3},
        actual_next_state={"x": 1, "y": 2},
        valid=False,
        error_type=FailureType.STATE_DRIFT,
        message="State mismatch detected",
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=1,
        current_state={"x": 1, "y": 2},
        action_id="act_2",
        legal_action_count=5,
        legal_action_ids=["act_1", "act_2"],
        blocked_action_ids=[],
        model_action={"type": "move", "target": "south"},
        predicted_next_state={"x": 1, "y": 1},
        actual_next_state={"x": 1, "y": 1},
        valid=True,
    ),
    TraceStep(
        problem_id="prob_1",
        model="gpt-4",
        method="test_method",
        step=2,
        current_state={"x": 1, "y": 1},
        action_id="act_1",
        legal_action_count=5,
        legal_action_ids=["act_1"],
        blocked_action_ids=[],
        model_action={"type": "complete"},
        predicted_next_state={"x": 1, "y": 1},
        actual_next_state={"x": 2, "y": 1},
        valid=False,
    ),
]

ARGS = {
    "trace": trace_steps,
    "success": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_unknown_action_id_rate Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("6cd54586a4c96ba8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from enum import StrEnum
from typing import Any
from pydantic import BaseModel, ConfigDict, Field

Action = dict[str, Any]

class FailureType(StrEnum):
    """Canonical taxonomy of trace failure modes used across envs, agents, and the judge."""
    INVALID_TRANSITION = 'INVALID_TRANSITION'
    STATE_DRIFT = 'STATE_DRIFT'
    CONSTRAINT_VIOLATION = 'CONSTRAINT_VIOLATION'
    REPETITION_LOOP = 'REPETITION_LOOP'
    PREMATURE_STOP = 'PREMATURE_STOP'
    WRONG_GOAL = 'WRONG_GOAL'
    OUTPUT_FORMAT_ERROR = 'OUTPUT_FORMAT_ERROR'
    TOKEN_TRUNCATION = 'TOKEN_TRUNCATION'
    UNKNOWN_ACTION_ID = 'UNKNOWN_ACTION_ID'
    POLICY_DEVIATION = 'POLICY_DEVIATION'
    PROVIDER_REJECTION = 'PROVIDER_REJECTION'
    API_ERROR = 'API_ERROR'
    VERIFIER_DISAGREEMENT = 'VERIFIER_DISAGREEMENT'
    NO_RECOVERY_AFTER_ERROR = 'NO_RECOVERY_AFTER_ERROR'

State = dict[str, Any]

class TraceStep(BaseModel):
    """One step of an agent's run: state, action, validity, error, raw model output, tokens."""
    model_config = ConfigDict(extra='forbid')
    problem_id: str
    model: str
    method: str
    step: int
    current_state: State
    action_id: str | None = None
    legal_action_count: int | None = None
    legal_action_ids: list[str] = Field(default_factory=list)
    blocked_action_ids: list[str] = Field(default_factory=list)
    retry_reason: str | None = None
    loop_recovery_attempted: bool = False
    model_action: Action | None = None
    predicted_next_state: State | None = None
    actual_next_state: State | None = None
    valid: bool = False
    error_type: FailureType | None = None
    message: str = ''
    raw_model_output: str = ''
    finish_reason: str | None = None
    tokens_in: int = 0
    tokens_out: int = 0
    wall_time: float = 0.0

# Create sample trace steps
trace_steps = [
    TraceStep(
        problem_id="p1",
        model="gpt4",
        method="test_method",
        step=1,
        current_state={"state_key": "state_value_1"},
        action_id="action_1",
        legal_action_ids=["action_1", "action_2"],
        error_type=None,
    ),
    TraceStep(
        problem_id="p1",
        model="gpt4",
        method="test_method",
        step=2,
        current_state={"state_key": "state_value_2"},
        action_id="action_3",
        legal_action_ids=["action_1", "action_2"],
        error_type=FailureType.UNKNOWN_ACTION_ID,
    ),
    TraceStep(
        problem_id="p1",
        model="gpt4",
        method="test_method",
        step=3,
        current_state={"state_key": "state_value_3"},
        action_id="action_1",
        legal_action_ids=["action_1", "action_2"],
        error_type=None,
    ),
    TraceStep(
        problem_id="p1",
        model="gpt4",
        method="test_method",
        step=4,
        current_state={"state_key": "state_value_4"},
        action_id=None,
        legal_action_ids=[],
        error_type=FailureType.UNKNOWN_ACTION_ID,
    ),
]

ARGS = {
    "trace": trace_steps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
execute_python_code Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("0848ac44b82df4b4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PythonExecutionResult. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ast
import sys

# The function execute_python_code takes:
# - code: str (Python code to execute)
# - timeout_s: float (timeout in seconds, default 3.0)
# - max_stdout_chars: int (max stdout characters, default 200000)

# Create valid test code that passes safety checks
valid_code = """
import math
result = math.factorial(5)
print(f"5! = {result}")
"""

ARGS = {
    "code": valid_code,
    "timeout_s": 3.0,
    "max_stdout_chars": 200000,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PythonExecutionResult — a PythonExecutionResult output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PythonExecutionResult output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_python_code Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("c75f985348c28391")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

PYTHON_FENCE_RE = re.compile('```(?:python|py)?\\s*(.*?)```', re.DOTALL | re.IGNORECASE)

def extract_python_code(text: str) -> str:
    """Return the longest ```python``` fenced block in ``text``, or the full text."""
    text = re.sub('<think>.*?</think>', '', text, flags=re.DOTALL | re.IGNORECASE).strip()
    fences = [match.group(1).strip() for match in PYTHON_FENCE_RE.finditer(text)]
    if fences:
        return max(fences, key=len)
    return text

# Test with a variety of inputs
ARGS = {
    "text": """
    Some introductory text.
    ```python
    print("Hello, World!")
    x = 42
    
    More text here.
    ```python
    def foo(a, b):
        return a + b
    
    result = foo(1, 2)
    print(result)
    
    """
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_verified_prefix Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("0ce9fd2de524f32b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

def format_verified_prefix(verified_prefix: list, cap: int=4) -> str:
    """Render only the last ``cap`` committed moves.

    The verifier owns the full prefix; the model only needs a recency tail to
    maintain continuity. Default cap=4 (lever D from v7).
    """
    if not verified_prefix:
        return '(none — at the initial state)'
    tail = verified_prefix[-cap:]
    earlier = max(0, len(verified_prefix) - cap)
    more = '' if earlier == 0 else f' ... (+{earlier} earlier moves elided)'
    try:
        rendered = json.dumps(tail, separators=(',', ':'))
    except (TypeError, ValueError):
        rendered = str(tail)
    return rendered + more


# Setup code to construct valid arguments
verified_prefix_example = [
    {"move": 1, "player": "white", "position": "e2-e4"},
    {"move": 2, "player": "black", "position": "e7-e5"},
    {"move": 3, "player": "white", "position": "g1-f3"},
    {"move": 4, "player": "black", "position": "b8-c6"},
    {"move": 5, "player": "white", "position": "f1-b5"},
]

cap_example = 4

ARGS = {
    "verified_prefix": verified_prefix_example,
    "cap": cap_example,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_moves_from_stdout Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("65ec67ed8f4f4063")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import ast
import re

# Test case 1: stdout with valid moves in JSON format
stdout_json = """
Some output here
moves = [1, 2, 3, 4]
More output
"""

# Test case 2: stdout with valid moves in Python repr format (single quotes)
stdout_repr = """
Processing...
moves = ['a', 'b', 'c']
Done
"""

# Test case 3: stdout with multiple moves blocks (should use the last one)
stdout_multiple = """
moves = [10, 20]
moves = [30, 40, 50]
Final output
"""

# Test case 4: stdout with no moves block
stdout_no_moves = """
This is some output
without any moves assignment
"""

# Test case 5: stdout with malformed moves block
stdout_malformed = """
moves = [1, 2, 'invalid
More text
"""

# Use the most comprehensive test case
ARGS = {
    "stdout": stdout_multiple
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_moves_with_fallback Ran
ran, honoured the contract we drafted
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("add926ba89204411")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
import json
import ast

# Test case 1: stdout with moves in print statement (JSON format)
stdout_with_json_moves = """
Some output here
moves = [1, 2, 3, 4]
More output
"""

# Test case 2: stdout with moves in print statement (Python repr format)
stdout_with_repr_moves = """
Some output here
moves = ['a', 'b', 'c']
More output
"""

# Test case 3: empty stdout, moves in code
code_with_moves = """
x = 5
moves = [10, 20, 30]
y = x + 1
"""

# Test case 4: both stdout and code have moves (should prefer stdout)
stdout_with_moves_2 = "moves = [100, 200]"
code_with_moves_2 = "moves = [1, 2, 3]"

# Test case 5: no moves anywhere
stdout_no_moves = "just some regular output"
code_no_moves = "x = 5\ny = 10"

# Test case 6: malformed moves (should return empty list)
stdout_malformed = "moves = not_a_valid_list"

# Test case 7: multiple moves blocks (should take last one)
stdout_multiple = """
moves = [1, 2]
other stuff
moves = [5, 6, 7]
"""

# Test case 8: moves with double quotes
stdout_double_quotes = 'moves = ["x", "y", "z"]'

# Select one of the test cases for ARGS
ARGS = {
    "stdout": stdout_with_json_moves,
    "code": code_with_moves
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
render_raw_output Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("2ec7d1b2fac541fb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes three string parameters and formats them into a canonical block
# No complex objects needed - just strings

ARGS = {
    "model_text": "class SimpleModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n        self.linear = nn.Linear(4, 3)\n    def forward(self, x):\n        return self.linear(x)",
    "stdout": "Training loss: 0.5234\nEpoch 1/10 completed",
    "stderr": "UserWarning: Some weights are not initialized"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
stopped_reason Ran
ran; our contract draft was wrong, not the code
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("ab7c42ff6f3a06d9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from dataclasses import dataclass, field
from typing import Any

# Define the dataclasses as given
@dataclass
class AgentConfig:
    """Shared runtime configuration for every Agent (budgets, per-env overrides, ablation flags)."""
    max_steps_multiplier: int = 2
    max_retries: int = 3
    self_consistency_k: int = 8
    max_state_visits: int = 4
    chunk_size: int = 4
    chunk_size_by_env: dict[str, int] | None = None
    max_llm_calls: int = 4
    max_repair_calls: int = 2
    chunk_max_tokens: int = 8192
    chunk_max_tokens_by_env: dict[str, int] | None = None
    action_choice_max_tokens: int = 2048
    temperature: float = 0.0
    max_tokens: int = 16384
    vex_default_proposer: str = 'json'
    vex_proposer_by_env: dict[str, str] | None = None
    vex_disable_prefix_in_prompt: bool = False

    def resolve_chunk_size(self, env_name: str | None) -> int:
        """Return the per-env chunk size if set, otherwise the global `chunk_size`."""
        if env_name and self.chunk_size_by_env:
            override = self.chunk_size_by_env.get(env_name)
            if override is not None:
                return max(1, int(override))
        return max(1, int(self.chunk_size))

    def resolve_proposer(self, env_name: str | None) -> str:
        """Return the per-env VEX proposer kind if set, otherwise the default."""
        if env_name and self.vex_proposer_by_env:
            override = self.vex_proposer_by_env.get(env_name)
            if override:
                return str(override)
        return str(self.vex_default_proposer or 'json')

@dataclass
class CallTrace:
    """One LLM call boundary — captured for trace accounting."""
    raw_text: str
    actions: list
    prompt_tokens: int
    completion_tokens: int
    cached_tokens: int
    wall_time: float
    finish_reason: str | None
    error: str = ''

State = dict[str, Any]

@dataclass
class ReplayResult:
    """Outcome of replaying a candidate move list through the verifier."""
    success: bool
    valid_prefix_actions: list = field(default_factory=list)
    invalid_action: Any | None = None
    first_failure_step: int | None = None
    final_state: State | None = None
    error_type: str | None = None
    error_message: str = ''
    valid_prefix_fraction: float = 0.0

def stopped_reason(repair_calls: list[CallTrace], replays: list[ReplayResult], config: AgentConfig) -> str:
    """Classify why the RePoT loop stopped (replay-failure, budget exhaustion, format error)."""
    if not repair_calls and replays and (not replays[0].success):
        return 'pot_replay_failed'
    if len(repair_calls) >= config.max_repair_calls:
        return 'repair_budget_exhausted'
    if repair_calls and (not repair_calls[-1].actions):
        return 'repair_format_error'
    return 'max_steps_or_premature_stop'

# Construct valid arguments

# Test case 1: pot_replay_failed condition
config = AgentConfig(max_repair_calls=2)
repair_calls = []
replays = [ReplayResult(success=False)]

ARGS = {
    'repair_calls': repair_calls,
    'replays': replays,
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Agent Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("f81a068f9b874a73")
How it ran

no invocation recorded.

Env Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("5ce648ae3d7b87f9")
How it ran

no invocation recorded.

FailureType Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("404ce1e617218640")
How it ran

no invocation recorded.

ModelClient Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("30c6395ce8bff078")
How it ran

no invocation recorded.

RePoTAgent Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("0640f106a3329809")
How it ran

no invocation recorded.

TraceEvaluation Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("79670beb202bc620")
How it ran

no invocation recorded.

TraceRun Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("6a412a811a6dd051")
How it ran

no invocation recorded.

_emit_code_and_extract Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("8f7f2b9625267d19")
How it ran

no invocation recorded.

_legal_summary_default Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("8daeac163a1e8745")
How it ran

no invocation recorded.

_pot_once Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("dac8deafecc5414d")
How it ran

no invocation recorded.

_suffix_repair_once Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("9770e11a0ee1d9ab")
How it ran

no invocation recorded.

_validate_python_code Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("acea023ba890729c")
How it ran

no invocation recorded.

build_trace_run Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("d13ae2300717a6fb")
How it ran

no invocation recorded.

code_prompt Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("f4d0597a1462df94")
How it ran

no invocation recorded.

replay_until_failure Not yet run
unverified (harvested, no recorded run)
parsa-mz/RePot/repot/agents/repot/agent.py
code served (permissive licence) · get_code("3d7e88fcaccd1683")
How it ran

no invocation recorded.

Also present in other papers' code

Of 44 samples lifted from this paper's linked repositories, 44 carry a function identity and 0 do not. Of the 44 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 44 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

One-shot Program-of-Thought (POT) emits a Python program that prints a primitive-action plan; a single invalid action silently invalidates the trajectory. We introduce REPOT (Recoverable POT): a deterministic verified replay that walks the plan through the environment to its first invalid transition, then one LLM call that resumes from the verified prefix. REPOT costs at most one extra LLM call on the ∼14% of problems where POT fails. REPOT beats POT by +3 to +11pp across four closed-model configurations on PUZZLEZOO-775 and peaks at 96.9% vs 86.3% on gpt-5.4-mini-medium; against the matched-budget POT-retry baseline, REPOT wins decisively on Gemini (+3.8 pp, 95% CI [+2.2, +5.4]), is within sampling noise on GPT-medium and Claude, and loses on GPT-mini -a capability-scaling pattern we begin to address with ADAPTIVE REPOT, a rule-based dispatcher that routes between suffix repair and a fresh POT retry based on verifiedprefix length (preliminary; App. N). We replicate on PLANBENCH BLOCKSWORLD (+1.1 to +11.4pp) and on four open-weights models (+3.3 to +20.0pp on three of four). On DE-RAIL-550, our controlled recovery benchmark, every condition with access to checkpoint information clears ≥30% on GPT-medium and ≥70% on Gemini, vs ≤3.1% for error-only feedback -showing that checkpoint information, not the specific verified-prefix tail, is the load-bearing recovery signal.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.30052")
get_code_for_paper("2605.30052")
have("2605.30052")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.30052.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.30052.svg)](https://syntology.ai/paper/2605.30052)

Connect an agent — have() is free.