SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.15096 · September 2026

OpenAl4S: Code as Action, Science as Sessions

Jun Zhu, Hao Li, Yu Wang, Yonghong Tian, Li Yuan, Jiayu Yao, Yuyang Liu, Yusong Wang, Kunpeng Ning, Yicheng Mao, Gongbo Zhang, Liuzhenghao Lv, and 7 more

arXiv · PDF · Open in the Atlas

Code that ran

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

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

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

RepositoryRoleRan
PKU-YuanGroup/OpenAI4S canonical (classifier label)
classifier basis: census
14 ran · 8 no recorded run
FunctionStatusWhere it lives
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 ran

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

import 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 ran

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

import 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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned 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 ran

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

import 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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned 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 ran

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

import 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 ran

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

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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned 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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned 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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned 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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family 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 ran

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

import 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 ran

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

import 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 ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned 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

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

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

no invocation recorded.

Also present in other papers' code

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

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

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

Repositories linked to this paper

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

Abstract

AI co-scientists could accelerate computational research, but over a long-running study the workflow also has to stay inspectable, resumable and reproducible, which requires persistent computational state and provenance. Here we present OpenAI4S, an open-source scientific research agent built around the principle of \emph{Code as Action, Science as Sessions}. OpenAI4S combines a persistent computing runtime with research-session management: orchestration is handled through structured tool calls, while scientific actions are represented as complete code cells executed in persistent Python and R kernels. An append-only Action Ledger, per-cell execution records, versioned artifacts, environment records, and workspace checkpoints preserve how results were produced and support session recovery, branching, and extension. Configurable sandboxing, permission controls, and code and trajectory screening provide complementary safeguards. We evaluate OpenAI4S on 36 research scenarios spanning retrosynthesis, molecular dynamics, protein binder design, protein mutation, catalyst screening, and mineral spectroscopy, measuring scientific task accuracy, workflow completeness, and reproducibility of the resulting repositories. OpenAI4S achieves an overall score of 7.83, compared with 5.7--6.4 for a general-purpose coding harness evaluated with three frontier models, with the largest gains on long-horizon and computation-intensive workflows. These results suggest that integrating persistent execution with session-level provenance can improve the reliability of AI-assisted scientific workflows. Environment specification and full rerunnability remain weak for every evaluated system, ours included, so reproducibility is still an open problem for scientific agents. The system is available under the MIT license at \href{https://github.com/PKU-YuanGroup/OpenAI4S}{github.com/PKU-YuanGroup/OpenAI4S}.

For agents

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

get_harvested_code_for_paper("2609.15096")
get_code_for_paper("2609.15096")
have("2609.15096")

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

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

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

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

Connect an agent — have() is free.