Skip to content

test(conformance): include OpenClaw in P0 harness probes - #5120

Merged
giuliolovisotto merged 4 commits into
glovisotto/openclaw-session-outcomesfrom
glovisotto/openclaw-p0-conformance
Nov 2, 2026
Merged

giuliolovisotto merged 4 commits into
glovisotto/openclaw-session-outcomesfrom
glovisotto/openclaw-p0-conformance

Conversation

@giuliolovisotto

@giuliolovisotto giuliolovisotto commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add OpenClaw to the default P0 harness registry and CI selection. This is stacked on #5119; this PR contains conformance tooling and tests, with adapter changes confined to the base PR.

The runner recognizes OpenClaw's exec(command) tool, sets its deadline, and lets session setup install pinned OpenClaw 2026.6.11 / Node 22.19.0 in the sandbox.

Fixtures retain the original call_ UUID IDs for every harness. The shared Probe uses a strict _accepted_result_ids hook; OpenClawProbe overrides it, and the episode selects the probe class once. OpenClaw rewrites those IDs when replaying history: its witness accepts the rewritten result only when the replayed assistant call has the corresponding ID, tool name and arguments. Raw captures and saved tool identities remain unchanged. Regression tests reject mismatched results, names, arguments and use of this allowance by other harnesses.

The OpenClaw CI test selection also executes eight isolated real-CLI regressions: exhausted 429/500/503, connection reset, interrupted SSE, idle timeout, provider context overflow and local context precheck. They assert the structured response received by the environment, retained failure evidence and default retry/fail policy. Raw socket faults bypass capture intentionally and are not presented as capture-conformance passes. Their artifacts are saved beside the suite output, leaving the fresh output directory required by the subsequent P0 run.

The eight shared P0 scenarios, checker requirements and health expectations remain unchanged, including the upstream judge-verifier scenario. No separate public issue is needed for this focused extension of existing coverage.

Validation

On Linux ARM64:

  • Reproduced CI's sequence with the same PROBE_OUTPUT: HARNESS=openclaw python -m pytest -o addopts= --import-mode=importlib -q scripts/harness_conformance/tests tests/unit_tests/harness_capabilities responses_api_agents/openclaw_agent/tests (906 passed, 3 skipped), immediately followed by the full P0 suite (8/8 passed). All eight error-regression artifacts remain in the uploaded results tree.

  • HARNESS=openclaw python -m pytest -o addopts= --import-mode=importlib scripts/harness_conformance/tests tests/unit_tests/harness_capabilities -q: 412 passed, 2 skipped (publication tests requiring jj), including all eight new CLI regressions.

  • Adapter tests: 494 passed, 1 skipped.

  • python scripts/run_harness_conformance.py --harness openclaw --output results/openclaw-p0: 8/8 passed, including all six tool scenarios with underscore IDs.

  • python -m pytest -o addopts= --import-mode=importlib tests/unit_tests/test_public_api_facades.py tests/unit_tests/test_agent_outcome.py tests/unit_tests/trajectory/test_trajectory_record.py -q: 371 passed.

  • Full pre-commit checks passed; DCO and SSH signatures verified.

  • Real-model smoke: two model calls, one shell tool, expected file verified, reward 1, completed and unmasked evaluation.

Compatibility and benchmark impact

Default and scheduled runs include OpenClaw; OpenClaw changes select its CI job. Session probes require Linux and runtime-download access, with no model credentials. The new error regressions run when HARNESS=openclaw, as set by that CI job, and retain diagnostics in its probe artifacts. This PR does not change benchmark scoring policy or make conformance a required merge gate. P1, remote deployments and legacy local execution remain outside this qualification.

@giuliolovisotto giuliolovisotto added ci CI, automation, test queue, or workflow infrastructure work area:ci CI workflows, test routing, and repository automation needs-review PR is ready for code review and waiting on a reviewer labels Oct 27, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team October 27, 2026 13:57
@github-actions

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SHIP

LGTM — no concerns found. Reviewed all eight changed files and traced registry/CI selection, sandbox runtime installation, episode configuration, provider tool-call handling, and affected tests and documentation. No qualifying BLOCKER, RISK, or NOTE findings.

Static review only; tests, live OpenClaw probes, runtime downloads, and Fern checks were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

prokotg
prokotg previously approved these changes Oct 30, 2026

@prokotg prokotg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey, nice work getting this to 7/7. Two questions while reading through:

  1. The call_ -> call change in provider.py applies to every harness. What was OpenClaw actually doing to the IDs? The test comment says it "normalizes non-alphanumeric IDs", but I couldn't tell if it strips the underscore or does something else. Which scenarios were failing before the change? I'm wondering because real models and vLLM mostly return call_xxx, so if OpenClaw rewrites those, the retained tool_call_id won't join against the captured model calls in real runs. The fixture no longer exercises that. Would it make sense to make the prefix a per-harness thing, or at least mention the rewrite in the PR description?
  2. On model_error: only the HTTP 400 case is covered. Pi also classifies transport errors (MODEL_TRANSPORT_ERROR), and OpenCode handles the context-limit case. OpenClaw's classify_outcome only does the status-code regex. Does the pinned CLI never emit those cases (connection reset, timeout, overflow), or just didn't get checked? Same question for 429/5xx after retries run out: is that a terminal failure with the right status, or something else?

Not blocking from my side, just want to understand what's known vs assumed.

@giuliolovisotto

Copy link
Copy Markdown
Contributor Author

@prokotg Following up on your review, both points are now verified and addressed.

  1. Tool IDs: the pinned custom-provider path strips the underscore from call_<uuid> when replaying history in the next model request, rewriting both the assistant call and matching tool result. The original response, OpenClaw transcript and Gym's saved tool record retain the original ID; their joins remained correct in the controlled runs. The failure was our endpoint witness expecting the original spelling in the replayed result.

    Restoring underscores reproduced failures in all six tool scenarios: tool_success, tool_failure, usage_omitted, retry_429, retry_500, and verifier_failure. All six pass when the witness recognizes the replay spelling.

    c477a60 restores call_ fixtures for every harness. The shared Probe keeps strict ID matching; OpenClawProbe overrides a hook and accepts the rewritten ID only alongside a matching replayed assistant call, tool name and arguments. Raw captures and saved tool IDs are untouched. This covers our UUID fixtures, not arbitrary long or colliding IDs.

  2. Errors: these paths had not been checked. The pinned CLI does emit them, and the investigation found adapter gaps for transport errors, idle timeouts and context overflow. The adapter fixes and policy implications are described on #5119. Exhausted 429/500/503 already retained the correct status after three attempts. This PR adds eight real-CLI regressions covering all of those cases.

Validation on the updated stack: 386 conformance/checker tests passed (2 skipped), all 7 P0 scenarios passed with underscore IDs, and full pre-commit checks passed. The real-model tool/verification smoke also passed.

Could you re-review and approve the updated conformance commit if it looks good?

Keep error-regression artifacts beside the P0 output directory. CI runs
pytest before the P0 suite, which requires its output directory to be new.

Signed-off-by: Giulio Lovisotto <[email protected]>
@giuliolovisotto
giuliolovisotto added this pull request to the merge queue Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41476685966

Merged via the queue into main with commit b36c37b Nov 2, 2026
55 of 58 checks passed
@giuliolovisotto
giuliolovisotto deleted the glovisotto/openclaw-p0-conformance branch November 2, 2026 16:37

This branch was previously deployed

1 inactive deployment
public — bec8b5b2 Deployed Nov 2, 2026 by copy-pr-bot[bot] via release / finalize / notify #9097
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI workflows, test routing, and repository automation ci CI, automation, test queue, or workflow infrastructure work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants