Skip to content

fix(sandbox): refresh and harden all bundled harnesses - #4155

Merged
yannickmonney merged 5 commits into
mainfrom
fix/sandbox-harness-refresh
Oct 3, 2026
Merged

yannickmonney merged 5 commits into
mainfrom
fix/sandbox-harness-refresh

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refresh all nine bundled coding harnesses so sandbox sessions use current supported releases. Gemini 0.60+ silently ignores agent-owned system settings; bake immutable policies from the existing harness interpreter and select them without elevating the agent. Reject incompatible platform/image policies before execution. Preserve the existing resume restriction until the upstream fix lands.

Keep Hermes SDK diagnostics off NDJSON stdout and remove its artificial one-second tool pacing. Treat OpenClaw error envelopes as failed executions even when its CLI exits zero. Pin Node to the LTS patch required by the upgraded OpenClaw.

Harness Before After
Claude Code (stable) 2.1.283 2.1.285
Codex 0.142.5 0.160.0
Cursor 2026.03.20-44cb435 2026.10.01-e373342
Gemini 0.59.0 0.62.0
Hermes (PyPI) 0.18.0 0.19.0
OpenClaw 2026.6.11 2026.9.8
OpenCode 1.17.3 1.18.34
Pi 0.80.3 1.0.1
Qwen Code 0.23.3 0.24.7

New image checks require exact installed versions, bounded offline startup under a non-root user with a read-only root, and preserved Gemini system policy despite conflicting repository settings. The existing image suite exercises actual CLI flags, managed gateway requests, baked skills, cancellation and lazy browser startup.

CI's image-size check found the refreshed runtime was 6,166 MB against a July-era 5,900 MB budget. Keep Bun package downloads and node-gyp headers in architecture-scoped, locked BuildKit caches, add an actual-image regression for their absence, and update the documented budget to 6,600 MB (roughly 10% headroom over the refreshed ~6.0 GB baseline). Upstream runtimes and diagnostics remain complete. This increases pull/base-image disk cost; concurrent sessions share the base image. The rebuilt arm64 image removes approximately 120 MB of uncompressed layers and passes all 83 runtime checks; amd64 CI confirms 6,067 MiB and all 40 image metadata/size checks pass.

A fresh Linux Unit run exposed a process-liveness test race: a child could disappear between checking and reading its /proc entry. Reuse the test file's existing safe reader, with deterministic ENOENT/ESRCH regressions and an EACCES control. Production behavior is unchanged. The image-validation jobs now install frozen workspace dependencies through the shared toolchain action, allowing the native Codex probe to exercise the shipped exec builder and parser from a clean CI checkout.

This updates the runtime image. Newly supported OpenAI subscription models also require the platform catalog/serving release containing #4149. No production rollout or worker provisioning is included.

All 62 CI checks passed on final head 0988bcf66175c03da5031e9ff524a641120ff72d; no unresolved review threads.

Checklist

  • bun run check --concurrency=1 passes: 58/58 tasks (45 cached on the final CI-fix commit), using Bun 1.4.2 and the CI 6 GiB Node heap.
  • bun run lint:sast passes (Opengrep, zero findings); rebased-head CI also passed.
  • Translations: N/A; no UI messages, API fields or user-facing configuration changes.
  • Product docs: N/A; internal runtime compatibility fixes. Runtime README and automated manual-test coverage updated.
  • Root README translations: N/A; public product setup unchanged.

Test plan

  • Final rebased native arm64 image (sha256:e4463fd4447b2fc687ddca4eab6825185fac63c85596dc8a0ba19053dfe2ef1f): 83 passed, 0 failed with IMAGE=tale-sandbox-runtime:harness-refresh SKIP_BUILD=true bun run docker:test:sandbox-runtime.
  • Exact-version probes completed in 6–969 ms across the nine harnesses on the local test host; every probe has a 60-second failure deadline. Codex executes a real native tool round trip through the shipped exec builder and parser; the synthetic server verifies returned tool output, final text, and usage.
  • Gemini policy generation and wrapper/cancellation regressions pass; real CLI requests preserve appended context, tool exclusions and model ID despite conflicting repository settings. Hermes first/resumed turns were verified against a synthetic SSE endpoint.
  • Manual coverage gate: 1,434 boxes across five trees. Independent source and test reviews found no unresolved findings.
  • Full repository gate: 58/58 tasks passed (45 cached on the final CI-fix commit; the preceding full gate ran all 58 uncached). Runtime daemon: 273 passed, 14 Linux-only tests skipped on macOS; Linux process cleanup is exercised by the image suite. Sandbox: 766 passed. Platform: 81,536 unit tests and 5,198 UI tests passed; CLI: 1,695 tests passed.
  • Existing offline document-tool checks pass as uid 65534 and 10001 after the shared Node/Python environment upgrades.
  • Rebased onto 33aa991fee to include concurrent resource cleanup and Qwen lazy MCP fixes. The combined head passed the full repository gate, all 83 image checks and both document-tool profiles. Independent rebase and cache-fix reviews found no actionable issues.
  • Knip passed on Linux CI for this rebased head. Local Knip still reports unused entries in untouched shared/UI packages; it is separate from bun run check. Final-head Linux Knip also passed.
  • Linux CI follow-up regressions: the process-liveness file passed all 28 tests on Linux CI (21 locally, with 7 Linux-only cases skipped on macOS); the CI workflow contract passed all 55 tests. Both new defect cases failed before their fixes. Final combined full gate passed 58/58 tasks in 3m9s; Linux Unit CI passed 81,558 platform tests.
  • Final native amd64 CI: 40/40 image checks and 83/83 runtime checks passed, including native Codex tool execution, all pinned versions, cache absence, managed skills and cleanup. Runtime image: 6,067 MiB, within the 6,600 MiB budget.
  • One Windows test run hit the existing 10-second timeout on its first PowerShell launch with no output; the targeted rerun passed all 1,296 Windows tests and smoke tests. The installer and its tests are unchanged. All browser shards passed without retry-diagnostic artifacts.
  • No provider credentials are required by the container tests. Live subscription authentication must be verified after rollout.

@yannickmonney
yannickmonney marked this pull request as ready for review October 3, 2026 17:20
@yannickmonney
yannickmonney force-pushed the fix/sandbox-harness-refresh branch from 5925c03 to ffcc322 Compare October 3, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant