| ark_key_for_datapro |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/datapro.py code served (permissive licence) · get_code("f00f0744ac7bacb5") 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 urllib.parse
from collections.abc import Mapping
from typing import Any
class MockDataProStore:
"""Mock implementation of DataProStore protocol."""
def __init__(self, settings: dict[str, str] = None, secrets: dict[str, str] = None):
self.settings = settings or {}
self.secrets = secrets or {}
self._raise_on_secret = False
def get_setting(self, key: str, default: str | None = None) -> str | None:
return self.settings.get(key, default)
def get_secret_setting(self, key: str) -> str:
if self._raise_on_secret:
raise Exception("Keychain unavailable")
return self.secrets.get(key, '')
def set_secret_setting(self, key: str, value: str, *, scope: str) -> str:
self.secrets[key] = value
return value
def connector_env(self, connector: dict) -> dict:
return {}
def index_datapro_result(
self,
*,
query: str,
structured_content: Mapping[str, Any],
frame_id: str | None = None,
artifact_id: str | None = None,
occurrence_id: str | None = None,
source_content: Any | None = None
) -> dict[str, Any]:
return {}
def link_datapro_index_artifact(self, batch_id: str, artifact_id: str) -> None:
pass
# Test case 1: Valid Volcengine Ark configuration
store1 = MockDataProStore(
settings={
'llm_provider': 'ark',
'llm_base_url': 'https://api.volcengineapi.com/v1'
},
secrets={
'llm_api_key': 'ark_key_12345'
}
)
# Test case 2: Non-Ark provider
store2 = MockDataProStore(
settings={
'llm_provider': 'openai',
'llm_base_url': 'https://api.openai.com/v1'
},
secrets={
'llm_api_key': 'sk_openai_key'
}
)
# Test case 3: Ark provider with non-Volcengine endpoint
store3 = MockDataProStore(
settings={
'llm_provider': 'ark',
'llm_base_url': 'https://api.example.com/v1'
},
secrets={
'llm_api_key': 'ark_key_wrong_account'
}
)
# Test case 4: Empty base URL (treated as Volcengine)
store4 = MockDataProStore(
settings={
'llm_provider': 'ark',
'llm_base_url': ''
},
secrets={
'llm_api_key': 'ark_key_empty_url'
}
)
# Test case 5: Secret setting raises exception
store5 = MockDataProStore(
settings={
'llm_provider': 'ark',
'llm_base_url': 'https://api.volces.com/v1'
}
)
store5._raise_on_secret = True
ARGS = {
'store': store1
}
- 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
|
| command_digest |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/bash_capability.py code served (permissive licence) · get_code("40effed9db720d41") 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 hashlib
def command_digest(command: str) -> str:
"""Return the canonical SHA-256 binding for a shell command string."""
return hashlib.sha256(command.encode('utf-8', errors='surrogatepass')).hexdigest()
# Setup code
ARGS = {
"command": "ls -la /tmp"
}
- 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
|
| command_preserves_failure_status |
Ran ran, violated the contract we drafted |
PKU-YuanGroup/OpenAI4S/openai4s/bash_capability.py code served (permissive licence) · get_code("b19796d5e443973f") 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 shlex
from pathlib import Path
# The function takes a single parameter: command (str)
# It validates whether a shell command preserves failure status
# by parsing it and checking for masking operators
ARGS = {
"command": "pytest tests/ && python -m mypy src/"
}
- 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
|
| domain_of |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/egress.py code served (permissive licence) · get_code("7c573daf0485f14c") 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 urllib.parse
def _norm(host: str) -> str:
"""Lowercase a bare hostname and strip a trailing dot / :port."""
h = (host or '').strip().lower().rstrip('.')
if h.startswith('[') and ']' in h:
return h[1:h.index(']')]
return h.split(':', 1)[0]
def domain_of(target: str) -> str:
"""Extract the hostname from a URL, bare domain, or ``host:port`` string."""
t = (target or '').strip()
if not t:
return ''
if '://' not in t:
t = '//' + t
try:
host = urllib.parse.urlsplit(t).hostname or ''
except ValueError:
return ''
return _norm(host)
ARGS = {
'target': 'https://example.com:8080/path'
}
- 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
|
| endpoint_credentials |
Ran ran, violated the contract we drafted |
PKU-YuanGroup/OpenAI4S/openai4s/endpoint_identity.py code served (permissive licence) · get_code("a34f53a27032acd4") 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 urllib.parse
ARGS = {
"url": "https://user:pass@example.com/path?query=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 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
|
| endpoint_sha256 |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/endpoint_identity.py code served (permissive licence) · get_code("e0a4fa6a29c527b3") 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 hashlib
import urllib.parse
def normalize_endpoint(url: str | None) -> str:
"""The canonical, credential-free spelling of an endpoint.
Scheme, host, port and path are the routing detail; userinfo and query are
not, and both are places a credential is put. A trailing slash is dropped so
two spellings of one endpoint compare equal -- which is what makes an
immutable revision mean "the same configuration" rather than "the same
string".
Returns `""` for an empty input and leaves an unparseable one alone rather
than inventing a value: a caller storing it will fail its own validation,
which is a better failure than a silently rewritten endpoint.
"""
text = str(url or '').strip()
if not text:
return ''
try:
parts = urllib.parse.urlsplit(text)
except ValueError:
return text
if not parts.scheme or not parts.hostname:
return text
host = parts.hostname
if parts.port:
host = f'{host}:{parts.port}'
path = parts.path.rstrip('/')
return urllib.parse.urlunsplit((parts.scheme, host, path, '', ''))
def endpoint_sha256(url: str | None) -> str:
"""Stable digest of the credential-free endpoint spelling.
Receipts bind to this rather than the raw URL so two spellings of one
host compare equal and userinfo never enters the identity.
"""
canonical = normalize_endpoint(url)
return hashlib.sha256(canonical.encode('utf-8')).hexdigest()
ARGS = {
"url": "https://example.com:8080/path/to/resource?query=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 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
|
| explicit_agent_plan_key |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/datapro.py code served (permissive licence) · get_code("0b3c67c7f721ab5e") 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 collections.abc import Mapping
from typing import Any
class MockDataProStore:
"""Mock implementation of DataProStore protocol."""
def __init__(self):
self._settings = {}
self._secrets = {}
def get_setting(self, key: str, default: str | None = None) -> str | None:
return self._settings.get(key, default)
def get_secret_setting(self, key: str) -> str:
if key not in self._secrets:
raise KeyError(f"Secret not found: {key}")
return self._secrets[key]
def set_secret_setting(self, key: str, value: str, *, scope: str) -> str:
self._secrets[key] = value
return value
def connector_env(self, connector: dict) -> dict:
return {}
def index_datapro_result(self, *, query: str, structured_content: Mapping[str, Any], frame_id: str | None = None, artifact_id: str | None = None, occurrence_id: str | None = None, source_content: Any | None = None) -> dict[str, Any]:
return {}
def link_datapro_index_artifact(self, batch_id: str, artifact_id: str) -> None:
pass
# Create a mock store with the agent plan key secret set
mock_store = MockDataProStore()
mock_store.set_secret_setting('agent_plan_key', 'test-agent-plan-key-12345', scope='system')
ARGS = {
'store': mock_store
}
- 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
|
| is_placeholder_api_key |
Ran ran, violated the contract we drafted |
PKU-YuanGroup/OpenAI4S/openai4s/config.py code served (permissive licence) · get_code("03fbccf99b299a1c") 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.
ARGS = {
'k': 'your-api-key-here'
}
- 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
|
| is_volcengine_endpoint |
Ran ran, violated the contract we drafted |
PKU-YuanGroup/OpenAI4S/openai4s/datapro.py code served (permissive licence) · get_code("5c3abec8b10a095a") 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 urllib.parse
_VOLCENGINE_DOMAINS = ('volces.com', 'volcengine.com', 'volcengineapi.com')
def is_volcengine_endpoint(base_url: str) -> bool:
"""True when an LLM endpoint really is Volcengine's.
``ark`` names a *wire protocol* — the UI labels that field 兼容协议 and
accepts any Base URL — so the provider string alone does not identify whose
account a key belongs to.
"""
url = base_url.strip()
if not url:
return True
host = (urllib.parse.urlsplit(url).hostname or '').strip().lower().rstrip('.')
if not host:
return False
return any((host == domain or host.endswith('.' + domain) for domain in _VOLCENGINE_DOMAINS))
# Test cases for base_url parameter
ARGS = {
"base_url": "https://api.volcengine.com/v1/chat/completions"
}
- 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
|
| load_workflow |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/benchmark/model.py code served (permissive licence) · get_code("795385e37efad60b") 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 Workflow. 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 a valid workflow JSON file in a temporary directory
workflow_data = {
"id": "test_workflow_001",
"version": "1.0.0",
"title": "Test Workflow",
"summary": "A test workflow for validation",
"steps": ["step1", "step2", "step3"],
"permissions": ["read", "write"],
"artifacts": ["artifact1", "artifact2"],
"failure_conditions": ["timeout", "memory_error"],
"cases": [
{
"id": "case_001",
"title": "Success Case",
"outcome": "success",
"inputs": {"param1": 42, "param2": "test"},
"expect": {"result": "expected_value"},
"steps": ["step1", "step2"],
"notes": "This case should succeed"
},
{
"id": "case_002",
"title": "Failure Case",
"outcome": "failure",
"inputs": {"param1": -1},
"expect": {"error": "invalid_input"},
"steps": ["step1"],
"notes": "This case should fail"
},
{
"id": "case_003",
"title": "Permission Denied Case",
"outcome": "permission_denied",
"inputs": {},
"expect": {}
}
]
}
# Write to a temporary file
with tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False) as f:
json.dump(workflow_data, f)
temp_path = f.name
# Create the ARGS dictionary
ARGS = {
"path": Path(temp_path)
}
- 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 Workflow — a Workflow output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Workflow 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
|
| load_workflows |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/benchmark/model.py code served (permissive licence) · get_code("9dcd299f45aec15b") 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 json
import tempfile
from pathlib import Path
# Create a temporary directory structure with valid workflow.json files
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)
# Create a workflow subdirectory with a valid workflow.json
workflow_dir = temp_path / "test_workflow"
workflow_dir.mkdir()
workflow_data = {
"id": "workflow_1",
"version": "1.0",
"title": "Test Workflow",
"summary": "A test workflow for validation",
"steps": ["step1", "step2", "step3"],
"permissions": ["read", "write"],
"artifacts": ["output.txt", "results.json"],
"failure_conditions": ["timeout", "memory_error"],
"cases": [
{
"id": "case_1",
"title": "Success Case",
"outcome": "success",
"inputs": {"param1": "value1", "param2": 42},
"expect": {"result": "expected_output"},
"steps": ["step1", "step2"],
"notes": "This case should succeed"
},
{
"id": "case_2",
"title": "Failure Case",
"outcome": "failure",
"inputs": {"param1": "bad_value"},
"expect": {"error": "expected_error"},
"steps": ["step1"],
"notes": "This case should fail"
}
]
}
workflow_file = workflow_dir / "workflow.json"
workflow_file.write_text(json.dumps(workflow_data), encoding='utf-8')
# Create another workflow for testing multiple workflows
workflow_dir2 = temp_path / "another_workflow"
workflow_dir2.mkdir()
workflow_data2 = {
"id": "workflow_2",
"version": "2.0",
"title": "Another Workflow",
"summary": "Second workflow for testing",
"steps": ["step_a", "step_b"],
"permissions": [],
"artifacts": [],
"failure_conditions": ["cancelled", "permission_denied"],
"cases": [
{
"id": "case_3",
"title": "Cancelled Case",
"outcome": "cancelled",
"inputs": {},
"expect": {},
"steps": [],
"notes": ""
}
]
}
workflow_file2 = workflow_dir2 / "workflow.json"
workflow_file2.write_text(json.dumps(workflow_data2), encoding='utf-8')
ARGS = {
'root': temp_path
}
- 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
|
| normalize_endpoint |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/endpoint_identity.py code served (permissive licence) · get_code("18ac9304b241a007") 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 urllib.parse
def normalize_endpoint(url: str | None) -> str:
"""The canonical, credential-free spelling of an endpoint.
Scheme, host, port and path are the routing detail; userinfo and query are
not, and both are places a credential is put. A trailing slash is dropped so
two spellings of one endpoint compare equal -- which is what makes an
immutable revision mean "the same configuration" rather than "the same
string".
Returns `""` for an empty input and leaves an unparseable one alone rather
than inventing a value: a caller storing it will fail its own validation,
which is a better failure than a silently rewritten endpoint.
"""
text = str(url or '').strip()
if not text:
return ''
try:
parts = urllib.parse.urlsplit(text)
except ValueError:
return text
if not parts.scheme or not parts.hostname:
return text
host = parts.hostname
if parts.port:
host = f'{host}:{parts.port}'
path = parts.path.rstrip('/')
return urllib.parse.urlunsplit((parts.scheme, host, path, '', ''))
ARGS = {
'url': 'https://example.com:8080/path/to/resource/'
}
- 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
|
| provider_env_api_key |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/config.py code served (permissive licence) · get_code("73feb4f78216110b") 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
# Clear any existing API key environment variables to have a clean slate
for key in list(os.environ.keys()):
if 'API_KEY' in key:
del os.environ[key]
# Test case 1: provider is None
ARGS = {
'provider': None
}
- 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
|
| trusted_snapshot_roots |
Ran ran; our contract draft was wrong, not the code |
PKU-YuanGroup/OpenAI4S/openai4s/artifact_restore.py code served (permissive licence) · get_code("9c9d1ab67bc8b503") 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 pathlib import Path
import tempfile
# Create a temporary directory to use as data_dir
temp_dir = tempfile.gettempdir()
ARGS = {
"data_dir": temp_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 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
|
| archive_safe |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/diagnostics.py code served (permissive licence) · get_code("e146b1a35c3d3716") How it ran |
| domain_in_allowlist |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/egress.py code served (permissive licence) · get_code("4db05fcee1cdd801") How it ran |
| grant_domain |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/egress.py code served (permissive licence) · get_code("33993b8a5e9cd97a") How it ran |
| passive_security_posture |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/diagnostics.py code served (permissive licence) · get_code("2c05ecfa1e0da862") How it ran |
| report |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/doctor.py code served (permissive licence) · get_code("2babc7fbd3055d79") How it ran |
| run_checks |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/doctor.py code served (permissive licence) · get_code("45fb22598ab27e2d") How it ran |
| security_posture |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/diagnostics.py code served (permissive licence) · get_code("512548d1d646c794") How it ran |
| unopened_database |
Not yet run unverified (harvested, no recorded run) |
PKU-YuanGroup/OpenAI4S/openai4s/doctor.py code served (permissive licence) · get_code("f6f92026436a5e2e") How it ran |