| add_task_ids_to_dataset |
Ran ran, violated the contract we drafted |
amazon-science/CodeAssistBench/script/add_task_id.py code served (permissive licence) · get_code("c765c446ca7e2dac") 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 bool, 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 json
import os
import tempfile
# Create temporary directory and files for testing
temp_dir = tempfile.mkdtemp()
# Create a valid input JSONL file with sample data
input_file = os.path.join(temp_dir, "input.jsonl")
output_file = os.path.join(temp_dir, "output.jsonl")
# Write sample JSONL data
sample_data = [
{"name": "issue1", "description": "First issue", "priority": "high"},
{"name": "issue2", "description": "Second issue", "priority": "low"},
{"name": "issue3", "description": "Third issue", "priority": "medium"}
]
with open(input_file, 'w', encoding='utf-8') as f:
for obj in sample_data:
f.write(json.dumps(obj) + '\n')
task_prefix = "cab_lenient"
ARGS = {
"input_file": input_file,
"output_file": output_file,
"task_prefix": task_prefix
}
- 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 bool, 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
|
| contains_media |
Ran ran, violated the contract we drafted |
amazon-science/CodeAssistBench/script/collect_1000_issues.py code served (permissive licence) · get_code("d86db1a58b7c185c") 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 bool, 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 re
IMAGE_PATTERN = '!\\[.*?\\]\\(https?://[^\\s)]+\\)'
VIDEO_PATTERN = '<video[^>]*>.*?</video>'
def contains_media(text: str) -> bool:
"""Check if text contains URLs, images, or videos."""
if text is None:
return False
if re.search(IMAGE_PATTERN, text):
return True
if re.search(VIDEO_PATTERN, text):
return True
return False
# Test cases for contains_media function
test_text_with_image = "Check this out: "
test_text_with_video = "Watch this: <video><source src='video.mp4'></video>"
test_text_plain = "This is just plain text with no media"
test_text_none = None
ARGS = {
"text": test_text_plain
}
- 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 bool, 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
|
| contains_media |
Ran ran, violated the contract we drafted |
amazon-science/CodeAssistBench/script/get_github_issue.py code served (permissive licence) · get_code("7804bcc5b694e016") 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 bool, 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 re
URL_PATTERN = 'https?://[^\\s)]+'
IMAGE_PATTERN = '!\\\\$\\\\$.*?\\\\$\\\\$\\\\$(https?://[^\\s)]+)\\\\$'
VIDEO_PATTERN = '<video[^>]*>.*?</video>'
def contains_media(text):
"""Check if text contains URLs, images, or videos"""
if text is None:
return False
if re.search(URL_PATTERN, text):
return True
if re.search(IMAGE_PATTERN, text):
return True
if re.search(VIDEO_PATTERN, text):
return True
return False
# Test cases with different media types
test_text_with_url = "Check this out: https://example.com/page"
test_text_with_video = "Here is a video: <video><source src='test.mp4'></video>"
test_text_with_image = "Image: !$$$$https://example.com/image.jpg$$"
test_text_no_media = "This is just plain text with no links"
test_text_none = None
ARGS = {
'text': test_text_with_url
}
- 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 bool, 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
|
| evaluate_issue |
Ran ran, violated the contract we drafted |
amazon-science/CodeAssistBench/script/conv_filter.py code served (permissive licence) · get_code("47526b086dc31647") 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 bool, 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 logging
from pathlib import Path
from datetime import datetime
from dataclasses import dataclass
from unittest.mock import Mock, MagicMock
import json
import tempfile
import shutil
logging.basicConfig(level=logging.INFO)
@dataclass
class BedrockConfig:
"""Configuration class."""
region: str = 'us-west-2'
model_id: str = 'us.anthropic.claude-sonnet-4-5-20250929-v1:0'
class BedrockClient:
"""Mock client for interacting with AWS Bedrock service."""
def __init__(self, config: BedrockConfig, output_log_dir: str = None):
"""Initialize Bedrock client with configuration."""
self.config = config
self.client = self._create_client()
if output_log_dir is None:
timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')
output_log_dir = f'llm_logs_{timestamp}'
self.output_log_dir = output_log_dir
Path(self.output_log_dir).mkdir(parents=True, exist_ok=True)
self.log_file = os.path.join(self.output_log_dir, 'llm_responses.jsonl')
with open(self.log_file, 'a') as f:
header = {'timestamp': datetime.now().isoformat(), 'model_id': self.config.model_id, 'session_start': True}
f.write(json.dumps(header) + '\n')
def _create_client(self):
"""Create and configure Bedrock client."""
mock_client = Mock()
return mock_client
def generate_message(self, system_prompt: str, user_prompt: str, max_tokens: int = 2048, max_retries: int = 1000, retry_delay: int = 10, metadata: dict = None) -> str:
"""Generate message using Bedrock model with retry logic."""
response_text = "Yes\nYes\nYes\nYes\nYes\nNo"
self._log_response(system_prompt, user_prompt, response_text, 0.5, metadata)
return response_text
def _log_response(self, system_prompt: str, user_prompt: str, response: str, elapsed_time: float, metadata: dict = None):
"""Log the LLM responses to a file for tracking."""
log_entry = {'timestamp': datetime.now().isoformat(), 'system_prompt': system_prompt, 'user_prompt': user_prompt, 'response': response, 'elapsed_time_seconds': elapsed_time, 'metadata': metadata or {}}
try:
with open(self.log_file, 'a') as f:
f.write(json.dumps(log_entry) + '\n')
except Exception as e:
pass
def evaluate_issue(issue: dict, bedrock_client: BedrockClient) -> bool:
"""
Evaluate a GitHub issue using the Bedrock LLM.
Args:
issue: Dictionary containing issue data
bedrock_client: Instance of BedrockClient
Returns:
bool: True if issue meets all criteria, False otherwise
"""
title = issue['title']
body = issue['body']
author = issue['author']
comments = '\n'.join([f"{comment['user']}: {comment['body']}" for comment in issue['comments']])
issue_url = issue.get('url', '')
if not issue_url:
issue_url = f'no_url_{hash(title + author) % 10000}'
user_prompt = f'Please evaluate the following GitHub issue and its comments:\n\nTitle: {title}\n\nAuthor: {author}\n\nBody:\n{body}\n\nComments:\n{comments}'
system_prompt = "You are a helpful assistant evaluating GitHub issues."
response = bedrock_client.generate_message(system_prompt, user_prompt, max_tokens=2048)
return response is not None
import os
temp_dir = tempfile.mkdtemp()
config = BedrockConfig(region='us-west-2', model_id='us.anthropic.claude-sonnet-4-5-20250929-v1:0')
bedrock_client = BedrockClient(config, output_log_dir=temp_dir)
issue = {
'title': 'Bug: Application crashes on startup',
'body': 'When I start the application, it crashes with a NullPointerException on line 42.',
'author': 'john_doe',
'url': 'https://github.com/example/repo/issues/123',
'comments': [
{
'user': 'jane_smith',
'body': 'I found the issue - there was an uninitialized variable.'
},
{
'user': 'john_doe',
'body': 'Thanks! That fixed it. The issue is now resolved.'
}
]
}
ARGS = {
'issue': issue,
'bedrock_client': bedrock_client
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- boto3, botocore — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, 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
|
| extract_repo_name_from_url |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/generate_dockerfile_with_strands.py code served (permissive licence) · get_code("dbf897955d48ae15") 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 torch
import numpy as np
def extract_repo_name_from_url(url: str) -> None:
"""Extract repository name from GitHub URL."""
if not url or 'github.com' not in url:
return None
try:
parts = url.split('github.com/')[1].split('/')
if len(parts) >= 2:
return f'{parts[0]}/{parts[1]}'
except:
pass
return None
ARGS = {
'url': 'https://github.com/pytorch/pytorch'
}
- 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
|
| generate_failure_explanation |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
amazon-science/CodeAssistBench/script/generate_dockerfile.py code served (permissive licence) · get_code("890c6f2df7f0bc62") 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 logging
# Configure logging to capture the function's log output
logging.basicConfig(level=logging.INFO)
# Define arguments for generate_failure_explanation
ARGS = {
'error_message': '''Docker build failed:
Step 1/5 : FROM python:3.9
Step 2/5 : RUN pip install numpy scipy torch
ERROR: Could not find a version that satisfies the requirement torch==2.0.0
The command '/bin/sh -c pip install numpy scipy torch' returned a non-zero code: 1
Build context size exceeds maximum allowed size of 2GB
'''
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- boto3, botocore — 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
|
| generate_response |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/docker_filter.py code served (permissive licence) · get_code("3ab69c08296acaf6") 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 tuple, 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 json
import time
from unittest.mock import Mock, MagicMock
# Create a mock client that simulates the Bedrock API
mock_client = Mock()
# Create a mock response object
mock_response_body = {
'content': [
{
'text': 'This issue can be reproduced by following these steps: 1) Clone the repo 2) Run the test case 3) Observe the error. The solution provided appears to be correct.'
}
]
}
mock_body_reader = Mock()
mock_body_reader.read.return_value = json.dumps(mock_response_body)
mock_response = {
'body': mock_body_reader
}
mock_client.invoke_model.return_value = mock_response
# Define the user prompt for testing
user_prompt = "GitHub Issue: AttributeError when calling method X. Solution: Add proper type checking before method invocation. Can this be reproduced?"
# Define ARGS with all parameters for generate_response
ARGS = {
'client': mock_client,
'user_prompt': user_prompt,
'max_retries': 10000
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| get_commit_before_date |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/merge_commit_ids.py code served (permissive licence) · get_code("aae2d43cdb39625c") 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.
from datetime import datetime
# Construct commits_data with multiple commits at different dates
commits_data = {
'commits': [
{
'sha': 'abc123def456',
'date': '2024-01-15T10:30:00Z'
},
{
'sha': 'def789ghi012',
'date': '2024-01-20T14:45:00Z'
},
{
'sha': 'jkl345mno678',
'date': '2024-01-25T09:15:00Z'
}
]
}
# Issue date that falls between some commits
issue_date = '2024-01-22T12:00:00Z'
ARGS = {
'commits_data': commits_data,
'issue_date': issue_date
}
- 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
|
| get_first_commit_date |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/filter_by_commit_date.py code served (permissive licence) · get_code("af0f9bf1386e13d8") 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 tuple, 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 json
import tempfile
import os
from datetime import datetime
# Create a temporary commit file with valid JSON data
temp_dir = tempfile.mkdtemp()
commit_file = os.path.join(temp_dir, 'commits.json')
# Create valid commit data
commit_data = {
'repository': 'test-repo',
'commits': [
{
'date': '2023-01-15T10:30:00Z',
'message': 'Initial commit'
},
{
'date': '2023-01-20T14:45:00Z',
'message': 'Second commit'
}
]
}
with open(commit_file, 'w') as f:
json.dump(commit_data, f)
ARGS = {
'commit_file': commit_file
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| load_commits_for_repo |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/merge_commit_ids.py code served (permissive licence) · get_code("9009ab6e87dcd0f1") 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 json
from pathlib import Path
import tempfile
import os
# Create a temporary directory for commits files
temp_dir = tempfile.mkdtemp()
commits_dir = Path(temp_dir)
# Create a sample commits JSON file
sample_commits = {
"commits": [
{"sha": "abc123", "message": "Initial commit"},
{"sha": "def456", "message": "Second commit"}
]
}
# Write a commits file matching the expected naming pattern
# For repo_url like "https://github.com/owner/repo"
# The pattern should be commits_*_owner_repo.json
commits_file = commits_dir / "commits_2024_owner_repo.json"
with open(commits_file, 'w') as f:
json.dump(sample_commits, f)
# Define arguments
ARGS = {
"repo_url": "https://github.com/owner/repo",
"commits_dir": commits_dir
}
- 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
|
| parse_github_url |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/get_github_issue.py code served (permissive licence) · get_code("8f0e8db8999c8578") 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 tuple, 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.
from urllib.parse import urlparse
def parse_github_url(url):
"""Parse GitHub URL to extract owner and repo name"""
path_parts = urlparse(url).path.strip('/').split('/')
if len(path_parts) >= 2:
return (path_parts[0], path_parts[1])
raise ValueError('Invalid GitHub URL format')
# Setup code to construct valid arguments
ARGS = {
'url': 'https://github.com/pytorch/pytorch'
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| process_issue_file |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/merge_commit_ids.py code served (permissive licence) · get_code("5c1d0e3f4624c9bd") 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 json
import tempfile
from pathlib import Path
# Create temporary directory structure
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)
# Create commits directory
commits_dir = temp_path / "commits"
commits_dir.mkdir(exist_ok=True)
# Create a sample commits file for owner/repo
commits_file = commits_dir / "commits_2024_owner_repo.json"
commits_data = {
"commits": [
{
"sha": "abc123def456",
"date": "2024-01-15T10:00:00Z"
},
{
"sha": "def789ghi012",
"date": "2024-01-10T12:30:00Z"
},
{
"sha": "ghi345jkl678",
"date": "2024-01-05T08:15:00Z"
}
]
}
with open(commits_file, 'w') as f:
json.dump(commits_data, f)
# Create input issues file
input_file = temp_path / "issues_input.json"
issues_data = [
{
"url": "https://github.com/owner/repo/issues/1",
"created_at": "2024-01-16T09:00:00Z",
"title": "Issue 1"
},
{
"url": "https://github.com/owner/repo/issues/2",
"created_at": "2024-01-08T14:00:00Z",
"title": "Issue 2"
},
{
"url": "https://github.com/owner/repo/issues/3",
"title": "Issue 3 - no date"
},
{
"title": "Issue 4 - no URL"
}
]
with open(input_file, 'w') as f:
json.dump(issues_data, f)
# Create output file path
output_file = temp_path / "issues_output.json"
ARGS = {
'input_file': input_file,
'output_file': output_file,
'commits_dir': commits_dir
}
- 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
|
| setup_logging |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/generate_dockerfile.py code served (permissive licence) · get_code("841dffee01585864") 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 os
import tempfile
import datetime
import logging
# Create a temporary directory for logging
temp_log_dir = tempfile.mkdtemp(prefix='test_logging_')
# Define ARGS with the required parameter for setup_logging
ARGS = {
'log_directory': temp_log_dir
}
- 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
|
| setup_logging |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/generate_dockerfile_with_strands.py code served (permissive licence) · get_code("4aa375e6a657c179") 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 os
import datetime
import logging
import tempfile
# The function setup_logging takes a log_directory parameter
# which should be a string path where logs will be created.
# The function uses os.makedirs, datetime, and logging operations.
log_directory = tempfile.mkdtemp()
ARGS = {
'log_directory': log_directory
}
- 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
|
| test_build_dockerfile |
Ran ran; our contract draft was wrong, not the code |
amazon-science/CodeAssistBench/script/generate_dockerfile_with_strands.py code served (permissive licence) · get_code("9aa073e29d69e5c5") 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 tuple, 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 os
import datetime
import subprocess
import tempfile
import shutil
from typing import Dict, Any, Optional, Tuple, List
# Analyze the function to understand what arguments it needs:
# - dockerfile_content: str - a Dockerfile as a string
# - repo_name: str - repository name
# - issue_number: str - issue number identifier
# - timeout: int - timeout in seconds (default 600)
# The function:
# 1. Creates a temporary directory
# 2. Generates an image tag from repo_name and issue_number
# 3. Writes dockerfile_content to a Dockerfile file
# 4. Attempts to run: docker build -t image_tag .
# 5. Returns a tuple of (bool, str) indicating success/failure
# For testing purposes, we need valid but minimal arguments.
# We don't actually need docker to be installed for this setup code.
ARGS = {
"dockerfile_content": """FROM alpine:latest
RUN echo "test image"
""",
"repo_name": "owner/test_repo",
"issue_number": "42",
"timeout": 600
}
- 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 tuple, ndim 1, dtype family float — a tuple 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
|
| validate_date_format |
Ran ran, violated the contract we drafted |
amazon-science/CodeAssistBench/script/get_github_repo.py code served (permissive licence) · get_code("e4b4ca867e839824") 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 bool, 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 datetime import datetime
def validate_date_format(date_string: str) -> bool:
"""Validate if the date string is in YYYY-MM-DD format"""
try:
datetime.strptime(date_string, '%Y-%m-%d')
return True
except ValueError:
return False
ARGS = {
"date_string": "2024-01-15"
}
- 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 bool, 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
|
| call_llm_with_adaptive_context |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/generate_dockerfile.py code served (permissive licence) · get_code("dc66001eb75b6b17") How it ran |
| classify_issue |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/docker_filter.py code served (permissive licence) · get_code("e39cf6d4f8748818") How it ran |
| convert_to_jsonl |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/convert_to_jsonl.py code served (permissive licence) · get_code("404dd6e9ec43f905") How it ran |
| get_issues |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/get_github_issue.py code served (permissive licence) · get_code("27882b8a9c5e9151") How it ran |
| get_repo_license |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/collect_1000_issues.py code served (permissive licence) · get_code("749e16b560b7b6f0") How it ran |
| save_llm_response |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/docker_filter.py code served (permissive licence) · get_code("4394bd84adf0886c") How it ran |
| search_repos_with_issues |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/collect_1000_issues.py code served (permissive licence) · get_code("9f6003f231d81758") How it ran |
| verify_jsonl |
Not yet run unverified (harvested, no recorded run) |
amazon-science/CodeAssistBench/script/convert_to_jsonl.py code served (permissive licence) · get_code("499605db5913293e") How it ran |