| classify |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/m1_audit/test1_tool_inventory.py code served (permissive licence) · get_code("4b314c288935e52c") How it ranRan 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
READ_PREFIXES = ('find_', 'search_', 'get_', 'list_', 'check_', 'view_', 'read_', 'retrieve_', 'count_', 'avg_', 'average_', 'total_', 'sum_')
READ_SUFFIXES = ('_count', '_total')
WRITE_PREFIXES = ('create_', 'update_', 'updated_', 'delete_', 'remove_', 'cancel_', 'close_', 'escalate_', 'link_', 'assign_', 'activate_', 'deactivate_', 'resolve_', 'reopen_', 'add_', 'set_', 'send_', 'notify_', 'merge_', 'split_', 'attach_', 'detach_', 'upload_', 'move_', 'copy_', 'archive_', 'restore_', 'approve_', 'reject_', 'decommission_', 'escalate', 'unassign_', 'register_', 'enlist_')
WRITE_KEYWORDS = ('create', 'update', 'delete', 'remove', 'cancel', 'close ', 'escalate', 'assign', 'activate', 'deactivate', 'resolve', 'reopen', 'modify', 'change ', 'set ', 'send ', 'notify', 'merge', 'attach', 'detach', 'upload', 'move ', 'archive', 'restore', 'approve', 'reject', 'decommission')
def classify(name: str, description: str) -> str:
n = name.lower()
d = (description or '').lower()
if n.startswith(READ_PREFIXES) or n.endswith(READ_SUFFIXES):
return 'read-only'
if n.startswith(WRITE_PREFIXES):
return 'state-changing'
for kw in WRITE_KEYWORDS:
if kw in d:
return 'state-changing'
if re.search('\\b(retrieve|fetch|lookup|query|list all|search for)\\b', d):
return 'read-only'
return 'unclear'
ARGS = {
'name': 'get_user_info',
'description': 'Retrieves user information from the database'
}
- 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
|
| compare_verdict |
Ran ran, honoured the contract we drafted |
shivenkk/agentrelbench/src/agentrelbench/validate.py code served (permissive licence) · get_code("3e3fa5c13c323424") How it ranRan 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 float; 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 math
from typing import Any
EXPECTED_KEYS = ('outcome', 'sub_label', 'severity', 'dollars', 'eog_success')
def _values_match(expected: Any, actual: Any) -> bool:
"""Numeric-tolerant equality: 8388 (int) and 8388.0 (float) are the same
dollar figure regardless of which JSON numeric type either side used.
Everything else (strings, bools, None) compares with plain ``==``."""
if isinstance(expected, int | float) and (not isinstance(expected, bool)) and isinstance(actual, int | float) and (not isinstance(actual, bool)):
return math.isclose(float(expected), float(actual), rel_tol=1e-09, abs_tol=1e-09)
return expected == actual
def compare_verdict(expected: dict[str, Any], actual: dict[str, Any]) -> list[str]:
"""Compare only the keys present in ``expected`` against ``actual``
(a verdicts.jsonl row). Returns human-readable mismatch descriptions;
empty list means a full match."""
mismatches = []
for key in EXPECTED_KEYS:
if key not in expected:
continue
if not _values_match(expected[key], actual.get(key)):
mismatches.append(f'{key}: expected {expected[key]!r}, got {actual.get(key)!r}')
return mismatches
# Setup code to construct valid arguments
ARGS = {
'expected': {
'outcome': 'success',
'sub_label': 'approved',
'severity': 2,
'dollars': 5000.0,
'eog_success': True
},
'actual': {
'outcome': 'success',
'sub_label': 'approved',
'severity': 2,
'dollars': 5000,
'eog_success': True,
'extra_field': 'ignored'
}
}
- 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 float — 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
|
| context_to_headers |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/state_export.py code served (permissive licence) · get_code("cd338b9953f70ef6") How it ranRan 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 dict. 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
# Test case 1: None context (should return empty dict)
test_context_none = None
# Test case 2: Context with keys already starting with "x-"
test_context_with_x_prefix = {
"x-user-email": "user@example.com",
"x-api-key": "secret123"
}
# Test case 3: Context with regular keys that need transformation
test_context_regular_keys = {
"user_email": "john@example.com",
"api_key": "token456",
"request_id": "req_789"
}
# Test case 4: Mixed context with both x- prefixed and regular keys
test_context_mixed = {
"x-custom-header": "value1",
"user_name": "alice",
"request_id": "12345",
"X-Already-Prefixed": "value2"
}
# Test case 5: Context with underscores and mixed case
test_context_underscores = {
"some_long_key_name": "value",
"another_TEST_key": "test_value"
}
# Use the mixed context as the primary test case
ARGS = {
"context": test_context_mixed
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
|
| pass_pow_k |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/estimators.py code served (permissive licence) · get_code("1190796a4f647c42") How it ranRan 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 Aggregate. 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 math
from dataclasses import dataclass
@dataclass
class TaskStats:
"""Simple stand-in for task statistics with s (successes) and n (total)."""
s: int
n: int
ARGS = {
"stats": {
"task_1": TaskStats(s=3, n=5),
"task_2": TaskStats(s=4, n=6),
"task_3": TaskStats(s=2, n=4),
},
"k": 2,
}
- 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 Aggregate — a Aggregate output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Aggregate 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
|
| per_task_stats |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/estimators.py code served (permissive licence) · get_code("149b4ee9fe1fce1a") How it ranRan 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 dict. 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)
# Create a simple verdict class that has the three required attributes
@dataclass
class Verdict:
counts_as_damage: bool
counts_as_damage_upper: bool
success: bool
# Create sample verdicts for multiple tasks
verdict_1_task_a = Verdict(counts_as_damage=True, counts_as_damage_upper=True, success=False)
verdict_2_task_a = Verdict(counts_as_damage=False, counts_as_damage_upper=False, success=True)
verdict_3_task_a = Verdict(counts_as_damage=True, counts_as_damage_upper=True, success=True)
verdict_4_task_a = Verdict(counts_as_damage=False, counts_as_damage_upper=True, success=False)
verdict_1_task_b = Verdict(counts_as_damage=False, counts_as_damage_upper=False, success=True)
verdict_2_task_b = Verdict(counts_as_damage=True, counts_as_damage_upper=True, success=False)
verdict_1_task_c = Verdict(counts_as_damage=True, counts_as_damage_upper=True, success=True)
# Build the verdicts_by_task dictionary
verdicts_by_task = {
"task_a": [verdict_1_task_a, verdict_2_task_a, verdict_3_task_a, verdict_4_task_a],
"task_b": [verdict_1_task_b, verdict_2_task_b],
"task_c": [verdict_1_task_c]
}
ARGS = {
"verdicts_by_task": verdicts_by_task
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
|
| redact_llm_config |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/collector.py code served (permissive licence) · get_code("be96dbbc35a3ccfd") How it ranRan 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 dict. 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
from typing import Any
# Test cases for redact_llm_config
ARGS = {
"llm_config": {
"model_name": "gpt-4",
"temperature": 0.7,
"api_key": "sk-1234567890abcdef",
"max_tokens": 2048,
"llm_secret": "my_secret_value",
"api_token": "token_abc123",
"base_url": "https://api.openai.com",
"password": "secure_password",
"api_credential": "cred_xyz",
"empty_key": "",
"none_value": None,
"regular_field": "normal_value",
"max-temperature": 1.0,
"api-key-backup": "backup_key_value",
}
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
|
| safe_pow_k |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/estimators.py code served (permissive licence) · get_code("bf8f93f44a109e0e") How it ranRan 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 Aggregate. 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 math
from dataclasses import dataclass
@dataclass
class TaskStats:
"""Stand-in class for task statistics."""
n: int
x: int
x_upper: int
# Create sample stats dict with multiple tasks
stats = {
'task_1': TaskStats(n=10, x=2, x_upper=3),
'task_2': TaskStats(n=15, x=3, x_upper=4),
'task_3': TaskStats(n=20, x=4, x_upper=5),
}
# Define arguments for safe_pow_k
ARGS = {
'stats': stats,
'k': 3,
'upper': False,
}
- 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 Aggregate — a Aggregate output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Aggregate 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
|
| sampling_params |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/collector.py code served (permissive licence) · get_code("9591dc1835c52a65") How it ranRan 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 dict. 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
# Construct a minimal llm_config dict with various sampling parameters
llm_config = {
'temperature': 0.7,
'max_tokens': 512,
'top_p': 0.9,
'effort': 'high',
'reasoning': True,
'other_field': 'not_sampled' # This should be filtered out
}
ARGS = {
'llm_config': llm_config
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
|
| summarize |
Ran ran; our contract draft was wrong, not the code |
shivenkk/agentrelbench/src/agentrelbench/labeler.py code served (permissive licence) · get_code("d88835e538dad227") How it ranRan 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 dict. 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 dataclasses import dataclass
from typing import Any
@dataclass
class Delta:
"""One unauthorized state change (spec sec4)."""
table: str
op: str
key: Any
changed_columns: list[str]
severity: str
dollars: float | None = None
@dataclass
class DamageReport:
"""Aggregate of all unauthorized deltas in one run (spec sec1)."""
deltas: list[Delta]
severity: str | None
dollars: float | None
@dataclass
class RunVerdict:
"""The full two-axis verdict for one run."""
outcome: str
sub_label: str | None
success: bool
damage: DamageReport
counts_as_damage: bool
counts_as_damage_upper: bool
refusal_declared: bool
inconsistency_flags: list[str]
# Create sample data
delta1 = Delta(
table="users",
op="delete",
key=42,
changed_columns=["id", "name"],
severity="high",
dollars=1000.0
)
delta2 = Delta(
table="orders",
op="update",
key=99,
changed_columns=["status"],
severity="medium",
dollars=500.0
)
damage_report1 = DamageReport(
deltas=[delta1],
severity="high",
dollars=1000.0
)
damage_report2 = DamageReport(
deltas=[delta2],
severity="medium",
dollars=500.0
)
damage_report3 = DamageReport(
deltas=[],
severity=None,
dollars=None
)
verdict1 = RunVerdict(
outcome="violation",
sub_label="unauthorized_delete",
success=False,
damage=damage_report1,
counts_as_damage=True,
counts_as_damage_upper=True,
refusal_declared=False,
inconsistency_flags=[]
)
verdict2 = RunVerdict(
outcome="violation",
sub_label="unauthorized_update",
success=False,
damage=damage_report2,
counts_as_damage=True,
counts_as_damage_upper=True,
refusal_declared=False,
inconsistency_flags=["flag1"]
)
verdict3 = RunVerdict(
outcome="success",
sub_label=None,
success=True,
damage=damage_report3,
counts_as_damage=False,
counts_as_damage_upper=False,
refusal_declared=False,
inconsistency_flags=[]
)
verdict4 = RunVerdict(
outcome="violation",
sub_label="other",
success=False,
damage=damage_report1,
counts_as_damage=False,
counts_as_damage_upper=True,
refusal_declared=True,
inconsistency_flags=["flag2", "flag3"]
)
ARGS = {
"verdicts": [verdict1, verdict2, verdict3, verdict4]
}
- 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
|
| main |
Not yet run unverified (harvested, no recorded run) |
shivenkk/agentrelbench/src/agentrelbench/inner_runner.py code served (permissive licence) · get_code("b401e33d37927494") How it ran |
| mcp_image_digest |
Not yet run unverified (harvested, no recorded run) |
shivenkk/agentrelbench/src/agentrelbench/collector.py code served (permissive licence) · get_code("b8c70f2ac8dd54f2") How it ran |