Repository navigation
Conversation
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
giuliolovisotto
left a comment
There was a problem hiding this comment.
Requesting changes for the non-root Docker regression below.
Validated 3b00cfdb2285712d96277b2de0100228b008b45f on Linux ARM64 with OpenClaw 2026.6.11 and Node 22.19.0:
- 515 adapter tests passed; three additional pinned-CLI checks passed (startup timeout, replay identity, and supervised termination).
- A fresh real-model smoke with
gpt-oss-120bcompleted with reward 1: two captured model calls, two policy turns, and one successful shell tool. The output file was checked independently. - The follow-up request preserved the original tool-call ID and all 467 characters of reasoning exactly. The plugin receipt and worker termination were confirmed; rollout health was healthy with no findings or unobserved checks.
The smoke used the local sandbox provider inside a root Docker container, so it does not cover DockerProvider's file-upload ownership behavior.
Signed-off-by: yaoyu-33 <[email protected]>
…d causes - Create provider_plugin/ as the sandbox user during session preparation. A provider's upload may create a missing parent as root, and the plugin writes its readiness receipt beside itself, so non-root sandboxes failed every activation. - Keep OpenClaw's openai-completions turn repairs in the plugin's replay policy (assistant-first ordering, Gemini and Anthropic turn validation); only tool-call ID sanitization and reasoning removal are turned off. - Fail a missing or wrong readiness receipt with HTTP 502 that keeps the worker's own error, and record MCP skip gaps before the guard raises. - Name the receipt path and text once in sandbox.py. - Tests: seed upload parents exist after preparation; the fake sandbox writes the receipt only when the plugin is staged and enabled; plugin upload and config asserted; node test of the plugin's policy and receipt; startup-crash cause, stdout-only activity and MCP-gap cases; drop tests duplicated by main and use the nemo_gym.trajectory import. - README: the plugin loads only in sandbox sessions; 502 on a missing receipt. Signed-off-by: yaoyu-33 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
/ok to test 4ecf184 |
Keep main's benchmark-profile paragraphs in the sandbox section of the OpenClaw README and the branch's conformance-checks section after them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test 7919a68 |
Resolve two conflicts: - app.py: keep main's sandbox_runtime_dir check beside the runtime installer, then upload the provider plugin after either path. - README.md: take main's note that HLE-style judges grant no tools, and keep this branch's Conformance checks section. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
OpenClaw reported a context overflow (the CLI's typed `context_overflow` error, from its own precheck or a provider refusal) as a failed response with `ng_agent_outcome` `model_context_limit`, which the Environment Server's default policy fails: neither graded nor retried. It also reached that path only through the exit-code gate (exit 0, or exit 1 with a FailoverError line); any other exit answered HTTP 502. A context overflow is a limit, not a failure. Whatever the CLI's exit code, the activation now answers HTTP 200 with `status="incomplete"`, `incomplete_details.reason` `max_output_tokens` (the reason vllm_model gives a context-length refusal; the Responses API names no context reason), the partial output and usage, and no `ng_agent_outcome`, so the Environment Server verifies it. A missing or failed cleanup receipt still fails the activation. This changes scores: a context-overflow row goes from an ungraded FAIL to a graded incomplete response. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
…s failure When OpenClaw ends a run without the provider plugin's replay-policy receipt, the activation answered a bare HTTP 502. The Environment Server got no typed cause, so the row could not say why the attempt was rerun. Raise it as a harness failure, `agent_route_failed` with operation `openclaw.replay_policy` (stage agent): the receipt is the harness's own evidence that it replays model turns under the policy the adapter wrote, so a run without it contradicts that configuration. It is not a sandbox or provider fault, and not a negative cleanup receipt (`harness_termination_unconfirmed`): termination was confirmed. The reason keeps the worker's own error, such as a startup crash. The disposition is unchanged: the agent route answers 5xx with the typed failure in its failure header, which the Environment Server turns into a non-terminal episode failure, so the attempt stays ungraded and is rerun under the attempt cap. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: yaoyu-33 <[email protected]>
|
/ok to test c739747 |
Signed-off-by: yaoyu-33 <[email protected]>
giuliolovisotto
left a comment
There was a problem hiding this comment.
The original non-root Docker upload-parent issue is fixed in code, and the new DockerProvider regression covers receipt ownership. Thank you for adding that coverage.
One blocking issue remains: context overflow now bypasses the caller's configured outcome policy. In responses_api_agents/openclaw_agent/app.py, the typed context_overflow is returned as incomplete without ng_agent_outcome. agent_outcome_policy therefore returns VERIFY before consulting configuration. A caller that explicitly sets by_failure_kind={"model_context_limit": "fail"} and default_action="fail" still gets grading. test_context_overflow_is_an_incomplete_graded_response explicitly asserts this override is ignored.
Please preserve the model_context_limit classification and route the decision through the Environment Server's configured outcome policy. If grading is the desired default, express that through policy while retaining explicit fail/retry overrides. Otherwise this changes benchmark scoring even for callers who explicitly configured context overflow to fail.
Reviewed at e6d5681f57764835bfe588f97a0568011ebcf375, including the prior review and author replies. Fresh tests could not run because the available local environment lacks pytest; the reported Linux results were not independently reproduced in this review.
|
When I was testing OpenClaw in Nano 4 RL training, I noticed the following token-capture issue. Please consider fixing it in your line of work:
|
Signed-off-by: yaoyu-33 <[email protected]>
Signed-off-by: yaoyu-33 <[email protected]>
giuliolovisotto
left a comment
There was a problem hiding this comment.
Reviewed bc00627 against main and the previous reviewed head. The context-overflow blocker is resolved: model_context_limit and the original partial response reach the environment outcome policy, with explicit fail/verify/retry coverage and cleanup failures retaining precedence. The replay plugin also preserves IDs/reasoning and adds guarded aliases for uniquely named granted MCP tools. No blocking findings in the reviewed scope.
Local validation: 478 passed, 1 skipped across provider-plugin, sandbox, MCP-grant and agent-outcome tests; five configuration tests failed because the installed Gym distribution metadata requires an older OpenAI version than this checkout. JavaScript syntax and git diff --check passed. Linux CLI, non-root Docker and real-model checks were not independently rerun here.
The sandboxed OpenClaw adapter now executes a dataset tool called by its bare name, such as
bash_command, when that name identifies one granted MCP tool. The original qualified name still works. Both names call the same implementation. Ambiguous names and names already used by native tools keep their qualified MCP spelling. This addresses the extra model request and mixed replay reported during training. Review reproductionThe bundled provider plugin preserves the model's original tool name, call ID and reasoning on the next request. On OpenClaw 2026.11.5, the CLI can load a cached copy of the plugin, so the adapter passes an explicit per-session path for its readiness receipt. Missing replay evidence after activity raises a typed harness failure. A confirmed startup timeout before any model or tool activity remains eligible for verification.
CLI prechecks and provider refusals that report
context_overflownow returnmodel_context_limitto the Environment Server with the original message, partial output and usage. The default policy fails the episode. An explicitverifygrades the partial result andretryrequests another attempt. Worker cleanup failures retain precedence. The PR review tracks both regressions.Verification at
bc00627c20Merged
mainatdd09637342and tested the resulting tree on Linux with Python 3.13.14, Node 24.22.3 and OpenClaw 2026.11.5.bash_commandonce. The follow-up request preserved the call ID, arguments and all 1,417 reasoning characters. The verifier returned reward 1 and the session closed. Nano 4 RL training and token-ID/logprob fidelity remain unverified.pre-commit run --all-filesandgit diff --checkpassed. The private guardwords catalog was unavailable to the hook. Both follow-up commits carry DCO sign-off.The full scripted conformance run passed 7 of 8 P0 scenarios. The remaining P0 scenario and the P1 compaction scenario reproduced on clean
mainunder the same runtime with identical failing checks.tool_failurerecovered from exit 7 and earned reward 1 on both trees. The saved tool status differed from the independent tool witness.context_compactionsent additional requests after the scripted provider's final answer. Both runs made 24 model attempts and ended without verification.Earlier validation on OpenClaw 2026.6.11, including the superseded overflow behavior
OpenClaw 2026.6.11 rewrites tool-call IDs when replaying custom-provider responses. This change loads a bundled provider plugin, in sandbox sessions only, whose replay policy keeps tool-call IDs and reasoning as the model produced them while OpenClaw's openai-completions turn repairs (assistant-first ordering, Gemini and Anthropic turn validation) stay on. The adapter requires the plugin's per-session readiness receipt and retains transcript evidence when the hook fails.
A short task budget can expire during CLI startup before the receipt exists. The guard previously turned that confirmed timeout into HTTP 500, skipping verification. The fix returns an incomplete response only when there is no receipt, output, token usage, or assistant/tool activity. Wrong receipts and partial trajectories still fail.
After #5119 and #5120 merged, model-error/capture-ownership handling and conformance registration are inherited from main. This PR adds the replay plugin and its regression coverage, preserves startup-timeout handling, documents validation commands, and removes duplicate registration/configuration/install tests from the merge. No separate public issue is needed for these reproduced adapter regressions.
Review follow-up at
e6d5681f57764835bfe588f97a0568011ebcf375(2026-11-12)Closed the non-root Docker validation gap from review. The existing directory-creation fix remains unchanged. The new regression uses the real
DockerProviderupload path, runs the bundled provider hook as UID/GID 65534, and checks that the plugin directory and readiness receipt belong to UID 65534 and the receipt contains the expected text. Removing the directory-creation fix makes this test fail withEACCES; restoring it passes.Also repaired the pinned-CLI test fixture: when it moves the session into its temporary directory, it now moves the staged plugin files too. This lets the test reach the real OpenClaw termination check instead of failing the replay-receipt guard during its fake setup.
Validation on Linux
ws, Python 3.13.14, Node 22.19.0, OpenClaw 2026.6.11:pre-commit run --all-filespassed (pre-commit 4.3.0), with no generated changes.git diff --checkand DCO sign-off passed.python:3.13-slimplus the pinned Node binary; image IDsha256:f487d13ddd1472ab6a856a750b465fa58f4831636d96b123b7d0c5e26d5a60fd. The test disables networking and image pulls.The Docker regression is optional unless
GYM_TEST_OPENCLAW_DOCKER_IMAGEnames an available local image with Bash and Node 22.19.0 or newer.Review fixes at
4ecf184b6(after mergingmainin26b49e297):provider_plugin/(withhome/.openclaw) as the sandbox user. A provider's upload may create a missing parent directory as root, and the plugin writes its receipt beside itself, so on a non-root Docker sandbox every activation failed the receipt guard. This is the regression found in review.mainare dropped.Validation at
4ecf184b6on macOS. Each new test fails with its fix removed.test_sandbox.py,test_mcp_grants.py,test_bootstrap.py,test_provider_plugin.py): 329 passed.responses_api_agents/openclaw_agent/tests: 481 passed, 37 skipped (Linux-only process supervision, runtime install and pinned-CLI tests), 1 failed. The failure istest_opensandbox_sdk_is_available_in_agent_environment, because the local venv has noopensandbox; the merged tree fails it the same way before these fixes.tests/unit_tests/test_session_contract_repo.py,tests/unit_tests/tooling/test_add_legacy_agent_environment_servers.pyandscripts/harness_conformance/tests/{test_openclaw_errors,test_runner,test_ci_install}.py: 281 passed, 10 skipped (the pinned-Linux-CLI conformance tests).pre-commit run --files <the 8 changed files>and DCO sign-off: passed.Validation at
7919a68deon macOS, after mergingmain(which adds this adapter's benchmark profile; the only conflict was the README, where both sections are kept):responses_api_agents/openclaw_agent/tests: 483 passed, 37 skipped, 1 failed. The two new passes aremain'stest_benchmark_profile.py; the failure is the same missingopensandboxmodule.scripts/harness_conformance/tests: 182 passed, 12 skipped;tests/unit_tests/environment/test_session_harness_benchmark_profiles.py: 18 passed.pre-commit run --files responses_api_agents/openclaw_agent/README.mdand DCO sign-off: passed.Validation at
3b00cfdb2285712d96277b2de0100228b008b45fon Linux x86_64, Python 3.13.14, OpenClaw 2026.6.11, Node 22.19.0:HARNESS=openclaw python -m pytest responses_api_agents/openclaw_agent/tests scripts/harness_conformance/tests tests/unit_tests/harness_capabilities tests/unit_tests/test_harness_conformance_ci.py tests/unit_tests/test_session_contract_repo.py --import-mode=importlib -q -o addopts= -o log_cli=false --tb=short -rs: 987 passed, 2 skipped (optionaljjtests). The pinned CLI termination test was enabled with the runtime environment variables documented in the adapter README.python scripts/run_harness_conformance.py --harness openclaw --output <fresh-output-directory>: all 8 scenarios pass every applicable P0 check.pre-commit run --all-files,git diff --check, and DCO sign-off passed.Compatibility: startup timeout retains the existing incomplete/gradable behavior. Missing replay assurance after model/tool activity remains an infrastructure failure, now HTTP 502 with the worker's error instead of 500; the Environment Server retries both. User plugins remain unsupported. No benchmark setup, verifier, dataset, or shared process-lifetime policy is changed.
Rollout evidence: the review smoke at
3b00cfdb2(Linux ARM64, OpenClaw 2026.6.11,gpt-oss-120b) completed with reward 1: two captured model calls, two policy turns and one successful shell tool. The follow-up request kept the original tool-call ID and all 467 characters of reasoning, the plugin receipt and worker termination were confirmed, and rollout health was clean. It used the local sandbox provider inside a root Docker container, so it does not cover upload ownership in a non-root Docker sandbox, which4ecf184b6fixes.Not yet run at
4ecf184b6or7919a68de: a real-model smoke, a non-root Docker sandbox run, the pinned Linux CLI tests and the conformance probes. Full repository CI, real-model/sandbox pairing qualification (TB 2.1 and GDPVal), and training token-ID/logprob fidelity remain separate gates. Known follow-ups outside this PR: telling a failed artifact read apart from a missing artifact in the startup-timeout check, and reporting aggregate usage as unknown when per-call usage coverage is incomplete.Update at
c739747a1a: mergemain, context overflow, typed receipt failureMerge.
d67d0a5b7mergesmain(acb67734cc). Two files conflicted:app.py:main'ssandbox_runtime_dircheck now sits beside the runtime installer. The provider plugin upload runs after either path.README.md: keptmain's note that the HLE-style judges grant no tools, plus this PR's "Conformance checks" section.test_sandbox.pyandtest_runner.pymerged without conflicts.Context overflow is graded as
incomplete(1790174862). This changes scores: a context overflow goes from FAIL to graded incomplete. OpenClaw reports a context overflow as an error of kindcontext_overflowin its JSON output, whether its own precheck or a provider refusal caught it. Before this change, the adapter turned that into a failed response withng_agent_outcomemodel_context_limit, and the Environment Server's default policy fails such a response: it is neither graded nor retried. The adapter also reached that path only through the exit-code gate; with any other exit code it answered HTTP 502.The activation now answers HTTP 200, whatever the CLI's exit code. The response has:
status="incomplete"incomplete_details.reasonmax_output_tokens, the reasonvllm_modelgives a context-length refusal (the Responses API has no context reason)ng_agent_outcomeThe Environment Server therefore verifies it. A missing or failed cleanup receipt still fails the activation.
Typed replay-receipt failure (
c739747a1a). The bare HTTP 502 for a missing or wrong replay-policy receipt is now a harnessNgFailureEvent:agent_route_failed, operationopenclaw.replay_policy, stageagent. The receipt is the harness's own evidence that it replays model turns under the policy the adapter configured, so a run without it contradicts that configuration. It is not a sandbox or provider fault, and not a negative cleanup receipt (harness_termination_unconfirmed), because termination was confirmed. The failure reason keeps the worker's own error.The disposition is unchanged. The agent route answers 5xx and the typed failure travels in the failure header. The Environment Server turns it into a non-terminal episode failure, so the attempt stays ungraded and is rerun under the attempt cap. This replaces the HTTP 502 described under "Compatibility" above.
Validation at
c739747a1a(macOS, primary venv with this worktree first on the path):responses_api_agents/openclaw_agent/testsandscripts/harness_conformance/tests: 700 passed, 53 skipped, 1 failed. The failure is the same missingopensandboxmodule as before.app.py, 27 of the new or updated cases fail: 16 context-overflow cases and 11 receipt cases.tests/unit_tests/test_public_api_facades.py,tests/unit_tests/tooling/test_migrate_imports.pyandtests/unit_tests/test_session_contract_repo.py: 903 passed.pre-commit run --files <changed files>and DCO sign-off: passed.The Linux-only pinned-CLI regression
test_openclaw_errors.pynow expects both context cases (context-http,context-precheck) to reach the verifier as incomplete responses with reward 0. Neither case was run here.Scripted-model smoke (no real model): not run. On macOS the session path cannot start, because the process supervisor needs
/procand the runtime installer requires Linux; there is no Docker here. The pinned Linux CLI tests above are pending CI or a Linux host.