Skip to content

fix(adapters): Toolathlon spawn-time token resolution + exit-code verifier scoring#887

Open
bingran-you wants to merge 13 commits into
mainfrom
bry/toolathlon-verifier-exit-scoring
Open

fix(adapters): Toolathlon spawn-time token resolution + exit-code verifier scoring#887
bingran-you wants to merge 13 commits into
mainfrom
bry/toolathlon-verifier-exit-scoring

Conversation

@bingran-you

@bingran-you bingran-you commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

fix(adapters): resolve Toolathlon MCP tokens at spawn + exit-code verifier scoring

Follow-up to #885. Makes the materialized Toolathlon tasks actually runnable.

  1. Token spawn-time resolution. The ${token.X}->${TOOLATHLON_X} env rewrite
    could never resolve per-task or runtime-computed tokens (Drive folder ids
    written by preprocess, groundtruth allowlists, per-student Canvas tokens):
    MCP env/args pass through verbatim and args cannot be resolved from env at
    all. New toolathlon_container.py ships into each container: write-config
    bakes the global token_key_session.py from injected TOOLATHLON
    * secrets;
    launch wraps every MCP server and resolves ${token.X}/${config}/paths
    across argv AND env at spawn, mirroring upstream utils/mcp/tool_servers.py
    (global merged with per-task override). Dep-free via an addict shim; absolute
    interpreter + PATH fallback so FastMCP can spawn it.

  2. Pre-create declared server dirs. arxiv_local (--storage-path) and the emails
    server create working dirs lazily; an agent that reaches the goal another way
    leaves them absent and evaluators that os.listdir them crash. The launcher
    mkdir -p's an explicit allow-list of directory-valued flags.

  3. Exit-code verifier scoring. Upstream evaluators score by exit code and
    several signal task-failure by raising (e.g. raise ValueError("Some tests
    FAILED")) rather than returning False. Treat any non-zero evaluator exit as
    reward 0 (healthy fail); only escalate to a verifier error on signatures that
    cannot be an agent failure (ModuleNotFoundError/ImportError/PermissionError).

  4. Tolerate task_config entries naming local harness tools (e.g. web_search)
    with no MCP yaml instead of failing the whole adaptation.

Validated on Daytona+OpenHands+Azure gpt-5.5: 37/58 headless tasks healthy on
first pass; find-alita-paper and google-cloud/maps/github/hf probes all reward
1.0. 9 adapter tests, ruff + ty clean.

Context

Follow-up to #885 (which materialized the tasks but left token resolution non-functional and misclassified raise-to-fail evaluators as infra errors). Validated live on Daytona + OpenHands + Azure gpt-5.5.

Test

  • 9 adapter tests (token merge incl. per-task override + runtime folder_id, write-config, ensure-dirs, launcher wrapping); ruff + ty clean
  • Live: find-alita-paper reward 1.0; probe batch google-cloud/maps/github/hf all reward 1.0; 37/58 headless tasks healthy first pass

Latest automation fix (2026-07-03)

Pushed 2fe7eba3 to clear the current Toolathlon user-simulation blockers:

  • replaces raw source substring sniffing for launch_time with AST-based detection of an actual argparse.add_argument("--launch_time", ...) declaration before injecting the flag in preprocess/evaluator scripts;
  • makes Toolathlon kubeconfig/email config defaults absolute under /workspace, so MCP servers do not depend on the agent workspace cwd;
  • bumps the source-adapter cache version so existing adapted Toolathlon tasks regenerate with the fixed scripts/defaults.

Local validation on the PR head:

uv run python -m pytest tests/test_source_adapters.py -q  # 14 passed
uv run ruff check src/benchflow/adapters tests/test_source_adapters.py
uv run ty check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py
uv run ruff format --check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py tests/test_source_adapters.py

GitHub CI is running on the new head and should be checked before moving this out of status:blocked.

…ifier scoring

Follow-up to #885. Makes the materialized Toolathlon tasks actually runnable.

1. Token spawn-time resolution. The ${token.X}->${TOOLATHLON_X} env rewrite
   could never resolve per-task or runtime-computed tokens (Drive folder ids
   written by preprocess, groundtruth allowlists, per-student Canvas tokens):
   MCP env/args pass through verbatim and args cannot be resolved from env at
   all. New _toolathlon_container.py ships into each container: `write-config`
   bakes the global token_key_session.py from injected TOOLATHLON_* secrets;
   `launch` wraps every MCP server and resolves ${token.X}/${config}/paths
   across argv AND env at spawn, mirroring upstream utils/mcp/tool_servers.py
   (global merged with per-task override). Dep-free via an addict shim; absolute
   interpreter + PATH fallback so FastMCP can spawn it.

2. Pre-create declared server dirs. arxiv_local (--storage-path) and the emails
   server create working dirs lazily; an agent that reaches the goal another way
   leaves them absent and evaluators that os.listdir them crash. The launcher
   mkdir -p's an explicit allow-list of directory-valued flags.

3. Exit-code verifier scoring. Upstream evaluators score by exit code and
   several signal task-failure by raising (e.g. raise ValueError("Some tests
   FAILED")) rather than returning False. Treat any non-zero evaluator exit as
   reward 0 (healthy fail); only escalate to a verifier error on signatures that
   cannot be an agent failure (ModuleNotFoundError/ImportError/PermissionError).

4. Tolerate task_config entries naming local harness tools (e.g. web_search)
   with no MCP yaml instead of failing the whole adaptation.

Validated on Daytona+OpenHands+Azure gpt-5.5: 37/58 headless tasks healthy on
first pass; find-alita-paper and google-cloud/maps/github/hf probes all reward
1.0. 9 adapter tests, ruff + ty clean.
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 04:53 — with GitHub Actions Inactive
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 04:54 — with GitHub Actions Inactive
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 04:57 — with GitHub Actions Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7deb4b2cfa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +193 to +194
("kubeconfig_path", None, "deployment/k8s/configs/cluster1-config.yaml"),
("emails_config_file", None, "configs/example_email_config.json"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use absolute paths for local config defaults

For tasks using the emails or k8s MCPs with the generated defaults, these values are passed as --config_file/KUBECONFIG_PATH to servers whose upstream YAMLs do not set cwd; BenchFlow starts the agent/MCP session in /workspace/agent_workspace, so the relative paths resolve under /workspace/agent_workspace/... while the cloned Toolathlon files live under /workspace/.... Those MCP servers will fail to start unless these defaults are absolute (or the server cwd is forced to /workspace).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2fe7eba3: the generated Toolathlon global token defaults now use absolute /workspace/... paths for both kubeconfig_path and emails_config_file, so MCP servers no longer depend on being spawned from /workspace. Covered by test_toolathlon_container_write_config_bakes_secrets; focused validation passed (tests/test_source_adapters.py 14 passed, ruff, ty, format check). GitHub CI is still running on the new head.

timeout=30,
)

def test_toolathlon_container_write_config_bakes_secrets(tmp_path: Path) -> None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add required regression-test docstrings

The root AGENTS.md says regression tests must name the PR/commit they guard in the docstring, but this new Toolathlon regression test has no docstring at all. Please add docstrings to the newly added regression tests that cite this fix (for example 44087fa or the PR) so future maintainers know which regression they protect.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already addressed on the PR head: the PR #887 regression tests now have docstrings naming the guard, including the Toolathlon verifier scoring and container-helper regressions. I also added two more PR #887 regression docstrings in 2fe7eba3 for the launch-time comment-only cases. Focused validation passed (tests/test_source_adapters.py 14 passed, ruff, ty, format check).

… access

Upstream preprocess/eval read all_token_key_session via attributes
(all_token_key_session.github_token) because upstream builds it with
addict.Dict. The generated global token_key_session.py used a plain dict, so
every github/HF/woocommerce/notion/snowflake task whose preprocess reads a
token that way crashed with AttributeError. Emit a self-contained
attribute-accessible dict subclass.
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 05:53 — with GitHub Actions Inactive
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 05:53 — with GitHub Actions Inactive
…ass launch_time

Two upstream-parity fixes to the preprocess/verifier invocation:
- Run as tasks.finalpool.<task>.preprocess.main (and .evaluation.main) from
  /workspace, exactly as upstream (uv run -m <dotted path>), so 'from ..utils'
  relative imports resolve. Running it as a bare 'preprocess.main' broke them.
- Pass --launch_time (a single value shared by preprocess and the verifier via
  /workspace/.toolathlon/launch_time.txt), matching upstream, but only to
  scripts that declare it (argparse errors on unknown args otherwise).
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 06:42 — with GitHub Actions Inactive
…al config

The notion preprocess (utils.app_specific.notion.notion_remove_and_duplicate)
reads source_notion_page_url / eval_notion_page_url off the global
all_token_key_session, but the container helper only baked the two integration
keys — the URLs resolved to None and every notion task's setup crashed before
duplicating the target subpage. Forward TOOLATHLON_NOTION_SOURCE_PAGE_URL and
TOOLATHLON_NOTION_EVAL_PAGE_URL through the token env allowlist and add both to
_GLOBAL_TOKENS. Bumps adapter version to invalidate the materialization cache.
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 07:36 — with GitHub Actions Inactive
… credential

Snowflake tasks need configs/snowflake_rsa_key.p8 for keypair auth, but the
credential-injection path validated every payload as JSON and chmod'd 0644 —
wrong for a PEM private key. Add content_format ('json'|'pem') and file_mode to
the credential spec: PEM payloads skip JSON validation and land at 0600. Register
the .p8 spec (b64_env TOOLATHLON_SNOWFLAKE_RSA_KEY_B64, trigger server snowflake).
Removes the last adapter blocker for the 4 Snowflake tasks (account still needs
a human trial signup).
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 07:40 — with GitHub Actions Inactive
@bingran-you bingran-you added bug Something isn't working P1 Important debt — must fix soon, but does not block the current release. area:eval Issue / PR lives primarily in the "eval" subsystem. review:pending PR is ready-for-review, no reviewer engagement yet. labels Jul 3, 2026
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 08:45 — with GitHub Actions Inactive
@bingran-you

Copy link
Copy Markdown
Collaborator Author

Daily scan update (2026-07-03): pushed commit 8671284c to add the missing Toolathlon verifier behavioral coverage and PR #887 regression docstrings. The new tests execute the generated verifier shell flow: evaluator task failures (ValueError) now prove reward 0.0 with verifier exit 0, while broken evaluator environments (ModuleNotFoundError) still fail the verifier. Focused local validation passed: uv run python -m pytest tests/test_source_adapters.py -q (12 passed), uv run ruff format --check tests/test_source_adapters.py, uv run ruff check tests/test_source_adapters.py src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py, and uv run ty check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py. Waiting on fresh GitHub CI for the new head before any merge/readiness decision.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation review (2026-07-03): blocked.

Simulation passed the targeted static/unit surface, but reproduced a real Toolathlon user failure:

  • uv sync --extra dev --locked
  • uv run pytest tests/test_source_adapters.py -q -> 12 passed
  • uv run ruff check src/benchflow/adapters tests/test_source_adapters.py -> passed
  • uv run ty check src/benchflow -> passed
  • uv run benchflow --help and uv run benchflow eval run --help -> passed

Blocker: src/benchflow/adapters/_toolathlon.py gates --launch_time injection on a raw substring search. A synthetic Toolathlon task that only mentioned launch_time in a comment, without declaring the CLI arg, failed setup with unrecognized arguments: --launch_time ...; the verifier path also hit the parse error and treated it as a task failure. Please replace the source-text sniffing with explicit CLI-arg detection or a dedicated marker before merge.

No model-backed trajectory was generated in this smoke, so there was no llm_trajectory.jsonl / results.jsonl / result.json health to audit.

@bingran-you bingran-you added the status:blocked Waiting on external dependency. Add a comment explaining why. label Jul 3, 2026
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 3, 2026 13:09 — with GitHub Actions Inactive
@bingran-you

Copy link
Copy Markdown
Collaborator Author

Automation follow-up (2026-07-03): pushed 2fe7eba3 to address the current Users Simulation blocker from issuecomment-4876252340.

What changed:

  • Toolathlon preprocess/evaluator launchers now inspect the Python AST for an actual argparse.add_argument("--launch_time", ...) declaration before injecting --launch_time; comments or unrelated launch_time mentions no longer trigger argparse failures.
  • Toolathlon kubeconfig/email config defaults are now absolute /workspace/... paths for MCP servers that do not run with /workspace as cwd.
  • Bumped the source-adapter cache version so generated Toolathlon tasks regenerate with the fixed scripts/defaults.

Validation on the pushed head:

uv run python -m pytest tests/test_source_adapters.py -q  # 14 passed
uv run ruff check src/benchflow/adapters tests/test_source_adapters.py
uv run ty check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py
uv run ruff format --check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py tests/test_source_adapters.py

GitHub CI is currently running on 2fe7eba3; keeping status:blocked until those checks complete green, then this can move to status:ready / review:pending.

@bingran-you bingran-you removed the status:blocked Waiting on external dependency. Add a comment explaining why. label Jul 3, 2026
@bingran-you bingran-you added the status:ready Triaged, unassigned, available to claim. label Jul 3, 2026
@bingran-you

Copy link
Copy Markdown
Collaborator Author

Automation status update (2026-07-03): GitHub checks are green on 2fe7eba3 (test, pip-audit, parity, detect-scope, rollout-smoke; scope matrix/review-pack skipped as expected). Moved labels from status:blocked to status:ready; keeping review:pending for human review/merge gate.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation automation review (2026-07-04): ready on current head 2fe7eba3.

PR-scoped validation re-ran the Toolathlon launch-time regression surface:

  • uv sync --extra dev --locked passed.
  • uv run pytest tests/test_source_adapters.py -> 14 passed.
  • Direct setup/verifier repros confirmed comments mentioning launch_time no longer inject --launch_time, while real argparse.add_argument("--launch_time", ...) declarations still receive it.
  • Standalone _toolathlon_container.py write-config / launch repro passed.
  • uv run ruff check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py tests/test_source_adapters.py passed.

Shared sweep evidence: Docker OpenHands + DeepSeek on tests/examples/hello-world-task produced a healthy BenchFlow artifact bundle at /tmp/benchflow-users-simulation-20260704T120256Z/shared-openhands-deepseek-default/2026-07-04__05-10-32: validator healthy, ACP+LLM trajectories present, results.jsonl training-ready, 37,265 tokens, $0.00273728, 71.4s total, reward 1.0. No blocker found; keeping status:ready / review:pending.

Resolve Toolathlon adapter conflicts with the latest runtime sidecar work while preserving PR #887 launch-time and verifier-scoring regressions.
@bingran-you bingran-you added the status:blocked Waiting on external dependency. Add a comment explaining why. label Jul 5, 2026 — with ChatGPT Codex Connector
@bingran-you bingran-you removed the status:ready Triaged, unassigned, available to claim. label Jul 5, 2026
@bingran-you bingran-you had a problem deploying to pypi-internal-preview July 5, 2026 08:38 — with GitHub Actions Failure

Copy link
Copy Markdown
Collaborator Author

Automation refresh (2026-07-05): pushed 7ef074fe6 to merge current origin/main into this PR and resolve the Toolathlon adapter conflicts.

Resolution kept the latest main-side Toolathlon service/runtime work while preserving the PR #887 fixes:

Local focused validation on the pushed head:

uv run --extra dev python -m pytest tests/test_source_adapters.py -q  # 22 passed
uv run ruff check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py tests/test_source_adapters.py
uv run --extra dev ty check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py
uv run --extra dev ruff format --check src/benchflow/adapters/_toolathlon.py src/benchflow/adapters/_toolathlon_container.py src/benchflow/adapters/source.py tests/test_source_adapters.py

GitHub now reports the PR as mergeable, but CI is still running on 7ef074fe6, so I moved it to status:blocked until those checks complete green. It still needs the normal human review/merge gate.

@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 5, 2026 08:43 — with GitHub Actions Inactive
@bingran-you

bingran-you commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

Automation follow-up (2026-07-05): pushed ff08340cf after investigating the new CI failure on 7ef074fe6. The failed integration-light / rollout-smoke job exited before task execution because the workflow exposed only DeepSeek/Gemini/GitHub Models to select_integration_provider.py; DeepSeek returned 402, GitHub Models returned 403, and the configured GLM/OpenAI fallback secrets were not passed into the light job.

Fix in ff08340cf:

  • Exposes the documented provider fallback envs in .github/workflows/integration-light.yml: GLM, Qwen, LiteLLM, OpenAI, and GitHub Models.
  • Adds test_integration_light_exposes_provider_fallback_envs so this smoke-lane regression stays covered.

Local validation after the follow-up:

  • uv run --extra dev python -m pytest tests/test_source_adapters.py tests/test_integration_provider_selection.py -q -> 26 passed.
  • uv run --extra dev ruff check ... on touched Python/source files -> passed.
  • uv run --extra dev ruff format --check ... -> passed.
  • git diff --check -> clean.

Keeping status:blocked until the new GitHub checks finish.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Automation status update (2026-07-05): CI is now green on ff08340cf.

Current check state:

  • test passed.
  • pip-audit passed.
  • manifest-parity / parity passed.
  • integration-light / rollout-smoke passed, including provider selection, real Docker rollout, agent-judge gate, and live oracle/parity scenarios.
  • integration-scope skipped the matrix because the light scope was sufficient for this diff.

I moved the PR from status:blocked back to status:ready. It is mergeable and waiting on human review; I did not merge because repo policy requires human review before main and self-approval does not count.

@bingran-you bingran-you added status:ready Triaged, unassigned, available to claim. and removed status:blocked Waiting on external dependency. Add a comment explaining why. labels Jul 5, 2026
@bingran-you bingran-you temporarily deployed to pypi-internal-preview July 5, 2026 08:56 — with GitHub Actions Inactive
@bingran-you

Copy link
Copy Markdown
Collaborator Author

Automation refresh (2026-07-05): main advanced again after ff08340cf, so #887 became dirty while CI was green. I merged current origin/main (1885f7820) into the PR and pushed a0bfcfd00.

Conflict/update notes:

Local validation on a0bfcfd00:

  • uv run --extra dev python -m pytest tests/test_source_adapters.py tests/test_integration_provider_selection.py tests/test_acp.py tests/test_process.py -q -> 131 passed, 1 skipped.
  • uv run --extra dev ruff check ... on touched Python/source files -> passed.
  • uv run --extra dev ruff format --check ... -> passed.
  • git diff --check && git diff --cached --check -> clean.

Temporarily moved back to status:blocked while the new GitHub checks run.

@bingran-you bingran-you added status:blocked Waiting on external dependency. Add a comment explaining why. and removed status:ready Triaged, unassigned, available to claim. labels Jul 5, 2026
@bingran-you

Copy link
Copy Markdown
Collaborator Author

Automation status update (2026-07-05): refreshed CI is green on a0bfcfd00.

Current check state:

  • test passed.
  • pip-audit passed.
  • manifest-parity / parity passed.
  • integration-light / rollout-smoke passed again, including provider selection, real Docker rollout, agent-judge gate, and live oracle/parity scenarios.
  • integration-scope matrix/review jobs skipped as expected for this light-scope diff.

Moved the PR from status:blocked back to status:ready. It still needs human review before merge per repo policy.

@bingran-you bingran-you added status:ready Triaged, unassigned, available to claim. and removed status:blocked Waiting on external dependency. Add a comment explaining why. labels Jul 5, 2026
@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation automation review (2026-07-05): ready on head a0bfcfd0013f10f344edb2cd5fa33e4606ed3f9c.

PR-specific validation passed in an isolated worktree: CLI help surfaces, SDK/import config smoke, focused source-adapter/provider/process/ACP/eval tests (198 passed, 1 skipped), focused ruff, and focused ty. The Toolathlon launch-time token snapshot/verifier behavior is covered and no thermo-nuclear blocker was found.

Shared gates passed: uv sync, ruff, ty, 71-test CLI/task/usage slice, bench help/task check/SDK smoke. Live Docker/OpenHands + Gemini flash-lite canary is healthy: ACP+LLM trajectories, results.jsonl training_ready=1, reward 1.0, 24,869 tokens, $0.00079715, 69.8s at /tmp/benchflow-users-simulation-20260705/shared-openhands-gemini-flash-lite-default/2026-07-05__05-11-14/hello-world-task__40312589. OpenHands max-effort was quarantined because that ACP agent does not declare reasoning_effort=max.

Labels: keep status:ready + review:pending.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation automation review (2026-07-06): ready by simulation on head a0bfcfd0.

Evidence:

  • Isolated worktree checks passed: adapter/provider focused pytest (28 passed), ruff, ruff format --check, ty, benchflow --help, benchflow agent list, and tasks init/check smoke. The Toolathlon launch-time and exit-code scoring paths are covered by the targeted synthetic tests.
  • CI integration-light rollout artifact was downloaded and revalidated locally: 1/1 rollout healthy, ACP + LLM trajectories present, 12 LLM exchanges with provider usage, results.jsonl training-ready, reward 1, 125,017 tokens, 6 tool calls, timing total 182.9s.

Caveat: the CI GLM user-endpoint artifact has agent_result.cost_usd: null / price_source: null; token usage and timing are healthy, but this does not satisfy the stricter Users Simulation request for non-null USD cost metadata. No code blocker found.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation automation review (2026-07-08): ready by simulation on head a0bfcfd0013f10f344edb2cd5fa33e4606ed3f9c.

Evidence:

  • Focused Toolathlon adapter suite passed: tests/test_source_adapters.py (24 passed).
  • Provider-selection, CLI arg validation, eval source provenance, and SDK alias checks passed.
  • Intended fixes are covered: comment-only launch_time no longer injects a bogus flag, evaluator task failures score 0.0 instead of infra error, evaluator import failures fail closed, and source provenance still works through CLI/SDK paths.
  • Shared base sweep passed: ruff check ., ty check src, and 149 CLI/SDK/task/usage/skill tests.
  • Current-head integration-light-jobs artifact passed benchflow-experiment-review: ACP + LLM trajectories and training-ready results.jsonl; reward 1.0, 125,017 tokens, 6 tool calls, total timing 182.9s.

Thermo-nuclear review: no structural blocker found; the change remains localized to adapter behavior and regression coverage.

Metadata caveat: GLM artifact token/timing coverage is healthy, but result.json.agent_result.cost_usd / price_source are null. This is a shared GLM user-endpoint cost-accounting gap, not a Toolathlon regression.

Labels: status:ready / review:pending.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation automation review (2026-07-10): ready by targeted simulation; one maintainability follow-up on head a0bfcfd0013f10f344edb2cd5fa33e4606ed3f9c.

Verified:

  • bench --help, bench eval --help, bench tasks --help, bench eval run --help, bench eval adopt --help
  • bench tasks check tests/conformance/acp_smoke --level structural
  • targeted Toolathlon tests: tests/test_source_adapters.py -k toolathlon plus tests/test_integration_provider_selection.py
  • direct Toolathlon container smoke for write-config, write-task-tokens, and launch, covering both global token and task snapshot token resolution

The live model-backed Codex rollout attempt did not produce a publishable artifact because the local auth/effort path failed (codex-acp does not accept the generic --reasoning-effort max option, and the follow-up run hit ACP auth). That is environment/auth plumbing, not evidence against this PR.

Thermo-nuclear maintainability note: the new Toolathlon subprocess/verifier smoke helpers were added to tests/test_source_adapters.py, which is already a large catch-all test module (~1.3k lines on this branch). This does not block the functional fix, but splitting the Toolathlon container/verifier smoke into a dedicated test module would keep the adapter suite easier to scan.

@bingran-you

Copy link
Copy Markdown
Collaborator Author

Users Simulation automation review (2026-07-11): ready by simulation on head a0bfcfd0013f10f344edb2cd5fa33e4606ed3f9c.

Scope checked: Toolathlon spawn-time token resolution, exit-code verifier scoring, source/provider selection, and CLI/SDK regression risk.

Evidence:

  • Local focused gate passed: uv sync --extra dev --locked; pytest tests/test_source_adapters.py tests/test_integration_provider_selection.py -q -> 28 passed; focused ruff; ty check src; bench --help; SDK Scene.single(agent="oracle").
  • Subagent CLI smokes passed: bench tasks/eval help, bench agent list, bench tasks list-sources, and structural task check.
  • SDK smoke passed with Scene.single(...) and RolloutConfig(..., environment="docker").
  • Direct helper smoke and Docker helper smoke passed, proving write-task-tokens snapshot plus spawn-time ${token.*} resolution after the original groundtruth file was removed.

Artifact health:

  • Current-head integration-light run 28735457558 validated healthy with benchflow-experiment-review: 1/1 healthy, ACP + LLM trajectories present, training-ready results.jsonl, reward 1.0, 125,017 tokens, 6 tool calls, 182.9s timing.
  • Caveat: this GLM user-endpoint artifact still has null agent_result.cost_usd / price_source; token, timing, and trajectory metadata are complete.

Thermo review: no production-code blocker. The fix stays in the adapter/container-helper layer, uses focused helpers, and avoids broad special-case branching. Non-blocking maintainability note: the Toolathlon subprocess/verifier tests now grow the already-large source-adapter test module; splitting them later would improve scanability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:eval Issue / PR lives primarily in the "eval" subsystem. bug Something isn't working P1 Important debt — must fix soon, but does not block the current release. review:pending PR is ready-for-review, no reviewer engagement yet. status:ready Triaged, unassigned, available to claim.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant