Repository navigation
fix: resolve streaming inference errors in network policies - #667
quanticsoul4772 wants to merge 4 commits into
Conversation
Solves the problem of agents stopping to ask 'what to do next'. What's included: - Complete autonomous agent guide (docs/autonomous-agents.md) - 600+ lines - Configuration examples for non-interactive mode - Dashboard and log streaming instructions - Example autonomous config (.openclaw/autonomous-config.json) - Quick reference added to AGENTS.md This enables users to observe agents working without interruption. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Replaces tls: terminate with access: full for NVIDIA and Anthropic inference endpoints. TLS termination causes the proxy to fail decoding chunked streaming responses, resulting in "error decoding response body" warnings. Endpoints fixed: - integrate.api.nvidia.com - inference-api.nvidia.com - api.anthropic.com - statsig.anthropic.com - sentry.io This follows the same fix applied to GitHub/npm in commit 24a1b4e. access: full allows CONNECT tunneling to pass through without L7 inspection, which is required for streaming APIs. Fixes: upstream protocol error warnings in sandbox logs Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Updates all 10 preset policy files to use access: full instead of tls: terminate, preventing the same streaming decode errors when users apply preset policies. Presets fixed: - discord.yaml (Discord API + gateway) - docker.yaml (Docker Hub + nvcr.io) - github.yaml (GitHub + API + raw content) - huggingface.yaml (Hub + LFS + Inference API) - jira.yaml (Atlassian Cloud) - npm.yaml (npm + Yarn registries) - outlook.yaml (Microsoft Graph + Office365) - pypi.yaml (Python Package Index) - slack.yaml (Slack API + webhooks) - telegram.yaml (Telegram Bot API) This ensures consistency with the main openclaw-sandbox.yaml policy and prevents streaming errors for any API that uses chunked transfer encoding. Related: previous commit fixed main policy Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Updates tsconfig.json to exclude *.test.ts files from the build output. Test files should not be compiled into dist/ as they are only used during development and testing. This resolves TypeScript compilation errors caused by test files using vitest dependencies and mocking that aren't needed in production builds. Before: tsc failed with "Cannot find module 'vitest'" errors After: tsc builds successfully, only compiling source files Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis pull request introduces autonomous agent execution capabilities through new configuration files, comprehensive development documentation, and simplified network policy definitions. Changes include a OpenClaw autonomous configuration, detailed agent development guide, autonomous operation documentation, and refactored policy presets replacing explicit allow rules with unified access directives. Changes
Poem
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…ession fix (#14656) Pins Fabric to NVIDIA/NeMo-Fabric `release/0.7` at `0dfdb254`, the merge of NVIDIA/NeMo-Fabric#685. OpenClaw agents, which NemoClaw runs with kept state, no longer fail on turns longer than about a minute or after a few minutes idle. ## Problem Since #14615, NemoClaw sets `runtime.keep_state` for OpenClaw. With kept state, Fabric's OpenClaw adapter keeps a Gateway WebSocket for native session checks, but read it only while a call waited for its response (NVIDIA/NeMo-Fabric#653). The Gateway kept sending events on it during a turn and while the runtime was idle, so the connection closed. The next session check failed with `invoke_failed` ("Cause: session_incompatible"), and Fabric marked the runtime `failed`. Qwen3-4B on vLLM takes about a minute per turn, so `docker-openclaw-vllm` and `docker-openclaw-vllm-shared` fail their reply and unchanged-plan assertions on every `v1` push. Part of #14630: the two GPU cases haven't run on this pin yet. ## Change - **Pin:** Fabric `0dfdb254` in `versions.json` (with the archive's SHA-256), the Cargo manifests and `Cargo.lock`. The documentation links move to the same revision, and every linked path exists there. - **What the pin brings:** `0dfdb254` has everything `56a4207b` had: NVIDIA/NeMo-Fabric#633, #652, #667, #668, and #676, which `release/0.7` carries as `b80becfc` with the same changes. It also brings: - #685, the session connection fix. - #672, so Fabric's packages and `nemo-fabric-core` report version 0.8.0. - #680 and #681, plugin support for OpenClaw and Hermes. - **Catalog:** `image/fabric/catalog.json` is regenerated. Only the OpenClaw and Hermes descriptors change: both declare plugins, and OpenClaw's `harness.settings.plugins.entries` becomes `plugins.bundled.entries` and `plugins.external.entries`. NemoClaw sets no plugin settings. The schema snapshots and contract fixtures regenerate unchanged. - **Tests:** the fixture image's digest in two cases and the inference names derived from it in `openshift-external-two-providers.tftest.hcl` move with the catalog. - **Release notes:** one line under "Changes Since v0.1.0-rc11". ## Beyond CI - On linux/arm64, the OpenClaw image built from this branch, running `fabric-agent-ctl serve` with `runtime.keep_state` against a model stub that streams its reply for a set time: | Turn | Result | |---|---| | 60 s reply, twice | succeeded (62 s each); `check` passed, runtime `active` | | 70 s reply, twice | succeeded (72 s, 71 s); `check` passed, runtime `active` | | 2 s reply after 200 s idle | succeeded; `check` passed, runtime `active` | With the image at `56a4207b`, the same 60 s, 70 s, and post-idle turns failed with `session_incompatible`. - The image's installed OpenClaw descriptor matches the bundled catalog. - I computed the archive's SHA-256 from codeload twice, with the same result. - Not verified yet: the GPU cases `docker-openclaw-vllm` and `docker-openclaw-vllm-shared` on this branch.
Summary
This PR fixes critical streaming inference errors caused by network policy configuration issues.
Problem
Sandboxes were experiencing warnings during streaming inference requests:
Root Cause
Network policies using
tls: terminatewith L7 inspection caused the OpenShell proxy to fail when decoding chunked transfer encoding used in streaming responses.Solution
Replaced
tls: terminateconfiguration withaccess: fullto enable CONNECT tunneling without L7 inspection.Changes Made
1. Main Policy Fix (commit 301ad5d)
nemoclaw-blueprint/policies/openclaw-sandbox.yaml2. Preset Policies Fix (commit e4b4b68)
3. Build System Fix (commit 001fb7b)
nemoclaw/tsconfig.json**/*.test.tsfrom compilationTesting
Documentation
Added comprehensive troubleshooting guide:
docs/troubleshooting/streaming-errors.mdRelated
Verification Steps
openshell policy set <name> --policy nemoclaw-blueprint/policies/openclaw-sandbox.yamlCo-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Summary by CodeRabbit
New Features
Documentation
Chores