Skip to content

fix(exec): bind Windows allowlist execution path#98260

Merged
eleqtrizit merged 4 commits into
openclaw:mainfrom
eleqtrizit:807
Jun 30, 2026
Merged

fix(exec): bind Windows allowlist execution path#98260
eleqtrizit merged 4 commits into
openclaw:mainfrom
eleqtrizit:807

Conversation

@eleqtrizit

@eleqtrizit eleqtrizit commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

What Problem This Solves

Fixes an issue where Windows node-host users relying on exec allowlists could have an approved PowerShell payload execute through an ambiguous executable name instead of the executable identity established during policy analysis.

Changes

Why This Change Was Made

The Windows shell execution path now uses the existing analyzed execution plan. Exact-path matches launch the resolved executable, unresolved commands authorized by the shipped bare-wildcard contract retain their original argv, and blocked plans fail closed.

  • Pin exact-path Windows shell execution to the resolved executable path.
  • Preserve existing bare-wildcard behavior for unresolved Windows commands.
  • Deny execution when the analyzed plan is explicitly blocked or invalid.
  • Add focused unit and native Windows behavioral regression coverage.
  • Include the regression file in the Windows CI lane.

Validation

Evidence

  • node scripts/run-vitest.mjs src/node-host/invoke-system-run-allowlist.test.ts src/infra/exec-allowlist-matching.test.ts src/infra/exec-approvals-analysis.test.ts src/node-host/invoke-system-run.test.ts — 83 tests passed, one platform-specific test skipped.
  • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --pretty false — passed.
  • Native Windows workflow run 28472073797 — all seven Windows Vitest shards passed, including the real workspace-shadow execution proof.
  • node_modules/.bin/oxfmt --check src/node-host/invoke-system-run-allowlist.test.ts — passed.
  • git diff --check — passed.
  • Fresh structured Auto Review after the compatibility update — no accepted/actionable findings; patch judged correct.

Notes

User Impact

Windows exact-path allowlist users can expect node-host execution to launch the same resolved executable that satisfied policy. Existing bare-wildcard configurations retain their unresolved-command behavior, while explicitly blocked execution plans remain denied.

AI-assisted: yes.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jun 30, 2026
@clawsweeper

clawsweeper Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 5:28 PM ET / 21:28 UTC.

Summary
The PR changes Windows node-host allowlist shell execution to use the analyzed segment argv, adds Windows shadow-executable regression coverage, and includes that test in the Windows CI script.

PR surface: Source +4, Tests +193, Config 0. Total +197 across 3 files.

Reproducibility: yes. Source inspection shows current main passes the analyzed Windows segment argv to spawn, and the PR's native Windows fixture demonstrates the same-basename shadow condition; I did not rerun Windows locally in this read-only review.

Review metrics: 2 noteworthy metrics.

  • Compatibility-Sensitive Execution Branch: 1 Windows allowlist launch branch changed. That branch decides which executable identity reaches process creation after allowlist approval.
  • Native Windows Regression Lane: 1 test file added to test:windows:ci. The regression depends on Windows executable search behavior, so native Windows CI is material proof before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] Merging intentionally changes existing Windows exact-path allowlist launch behavior by binding final process creation to the executable identity proven during analysis.
  • [P1] The PR carries the protected maintainer label, so this cleanup review should not close or auto-merge it without explicit maintainer handling.

Maintainer options:

  1. Accept Resolved-Path Binding (recommended)
    Merge once maintainers agree exact-path allowlist approval should bind Windows process launch to the executable identity proven during analysis.
  2. Pause For Exec Policy Owner
    Keep the PR open if the unresolved decision is whether this compatibility tradeoff belongs in node-host now.

Next step before merge

  • [P2] Protected maintainer labeling and compatibility-sensitive exec behavior require human owner acceptance; there is no narrow automated repair to queue.

Security
Cleared: The diff strengthens an exec allowlist launch boundary and adds tests without adding dependencies, permissions, secret handling, downloads, publishing changes, or new third-party code execution.

Review details

Best possible solution:

Land this PR only after an exec/node-host owner accepts the resolved-path binding compatibility tradeoff and required checks remain green for the current head.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main passes the analyzed Windows segment argv to spawn, and the PR's native Windows fixture demonstrates the same-basename shadow condition; I did not rerun Windows locally in this read-only review.

Is this the best way to solve the issue?

Yes. The patch reuses the existing planned-segment argv helper at the final node-host launch boundary, preserves bare-wildcard behavior, and leaves only owner acceptance of the compatibility-sensitive behavior change.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 44ec7580e2f0.

Label changes

Label justifications:

  • P1: The PR fixes a security-sensitive node-host command execution boundary where a Windows allowlist-approved command can launch a different same-basename executable identity.
  • merge-risk: 🚨 compatibility: The diff changes existing Windows exact-path allowlist launch behavior by binding final process creation to the resolved executable from policy analysis.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The PR body/comments include native Windows workflow evidence for the shadow-executable fixture, and live PR checks show the Windows node test lane succeeded for the current head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body/comments include native Windows workflow evidence for the shadow-executable fixture, and live PR checks show the Windows node test lane succeeded for the current head.
Evidence reviewed

PR surface:

Source +4, Tests +193, Config 0. Total +197 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 8 4 +4
Tests 1 195 2 +193
Docs 0 0 0 0
Config 1 1 1 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 204 7 +197

What I checked:

  • Repository policy applied: The full root AGENTS.md was read; its ClawSweeper policy treats execution-policy fallback and fail-closed behavior as compatibility-sensitive review surface, and no scoped src/node-host AGENTS.md exists. (AGENTS.md:31, 44ec7580e2f0)
  • Current main launch behavior: Current main initializes execArgv from the caller argv and, for Windows allowlist shell payloads, replaces it with params.segments[0].argv, leaving a bare executable token for spawn to resolve. (src/node-host/invoke-system-run-allowlist.ts:160, 44ec7580e2f0)
  • Process creation boundary: The node host passes argv[0] directly to child_process.spawn, so the final argv[0] controls the executable identity Windows resolves. (src/node-host/invoke.ts:286, 44ec7580e2f0)
  • PR head binding behavior: At PR head, the Windows allowlist branch calls resolvePlannedSegmentArgv, returns null for blocked plans, and otherwise uses the planned argv for execution while preserving unresolved bare-wildcard argv. (src/node-host/invoke-system-run-allowlist.ts:170, 1170eb61f809)
  • Resolved executable helper contract: resolvePlannedSegmentArgv returns null for policy-blocked plans and replaces argv[0] with resolvedRealPath or resolvedPath when an execution resolution is available. (src/infra/exec-approvals-analysis.ts:57, 44ec7580e2f0)
  • Native Windows regression proof in patch: The added Windows-only test creates trusted and workspace-shadow safe.exe binaries, verifies bare Windows spawn selects the shadow, then verifies the PR path executes the trusted resolved executable. (src/node-host/invoke-system-run-allowlist.test.ts:128, 1170eb61f809)

Likely related people:

  • dwc1997: git blame shows commit 28347ba introduced the current node-host allowlist branch and resolvePlannedSegmentArgv helper being changed. (role: current implementation introducer; confidence: high; commits: 28347ba51c3d; files: src/node-host/invoke-system-run-allowlist.ts, src/infra/exec-approvals-analysis.ts)
  • Vincent Koc: The blamed commit for the current helper includes Vincent Koc as co-author, making him relevant to routing the current implementation history. (role: co-author / adjacent owner; confidence: medium; commits: 28347ba51c3d; files: src/node-host/invoke-system-run-allowlist.ts, src/infra/exec-approvals-analysis.ts)
  • jesse-merhi: Merged PR fix(exec): rebuild command authorization on the Tree-sitter command planner #84172 rebuilt the exec authorization planner and touched the same node-host, infra, and Windows shell command surfaces. (role: major exec planner refactor author; confidence: high; commits: c9707ab635b9; files: src/node-host/invoke-system-run-allowlist.ts, src/infra/exec-approvals-analysis.ts, src/infra/windows-shell-command.ts)
  • pgondhi987: Merged PR Enforce inline shell wrapper payload matching [AI] #80978 hardened shell-wrapper payload matching in the same exec approval security boundary, though for a distinct root cause. (role: adjacent exec allowlist hardening contributor; confidence: medium; commits: 50f4440c9663; files: src/infra/exec-approvals-allowlist.ts, src/infra/exec-approvals-analysis.ts, src/infra/shell-inline-command.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 30, 2026
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

Behavioral proof on native Windows for head 16add06d37c98a65c9ef89c7226a303f3c59542d:

  • Windows run 28472073797 completed successfully on blacksmith-16vcpu-windows-2025 with pnpm test:windows:ci.
  • The regression creates two real executables with the same basename: a trusted safe.exe copied from cmd.exe in the allowlisted PATH directory, and a workspace shadow safe.exe copied from where.exe, with the workspace as cwd.
  • Negative control: a real child_process.spawn("safe", ...) selects the workspace shadow, exits nonzero, and does not emit TRUSTED_EXECUTABLE. This proves the fixture exercises Windows current-directory shadowing rather than only a mocked argv assertion.
  • Fixed path: the same command goes through evaluateSystemRunAllowlist, proves the trusted executable satisfies the allowlist, then goes through resolveSystemRunExecArgv and a real child_process.spawn. The final argv is the trusted canonical path; execution exits 0 and emits TRUSTED_EXECUTABLE.
  • Native result: src/node-host/invoke-system-run-allowlist.test.ts passed 3 Windows-applicable tests (2 POSIX-only skips); all 7 Windows CI Vitest shards passed.
  • Local focused regression proof: node scripts/run-vitest.mjs src/node-host/invoke-system-run-allowlist.test.ts src/infra/exec-approvals-analysis.test.ts src/node-host/invoke-system-run.test.ts — 3 files, 57 assertions passed.
  • Fresh Auto Review after the proof change: no accepted/actionable findings; patch correct at 0.94 confidence.

This demonstrates the behavior ClawSweeper needs to verify: after allowlist approval, process creation is bound to the approved executable identity and cannot fall back to a same-basename workspace executable.

@eleqtrizit

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 30, 2026
@eleqtrizit eleqtrizit self-assigned this Jun 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 30, 2026
@eleqtrizit

Copy link
Copy Markdown
Contributor Author

Compatibility update pushed in 9582013. The Windows resolver now preserves the shipped bare-wildcard behavior for unresolved commands while still pinning exact-path matches to the executable approved during analysis. Explicitly blocked plans continue to fail closed. Focused validation passed: 83 tests passed with one platform skip, git diff --check passed, and fresh Auto Review reported no actionable findings. CI is running on the updated head.

@eleqtrizit
eleqtrizit merged commit 3811001 into openclaw:main Jun 30, 2026
101 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 1, 2026
* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 1, 2026
* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture
chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Jul 3, 2026
* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 6, 2026
* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture

(cherry picked from commit 3811001)
Rorqualx pushed a commit to Rorqualx/cortex that referenced this pull request Jul 8, 2026
* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture

(cherry picked from commit 3811001)
RomneyDa added a commit that referenced this pull request Jul 22, 2026
* fix: gate diagnostics command to owners

(cherry picked from commit 170bf72)

* fix(agent): replace self-wait with deferred release in retained-lock abort cleanup (#96100)

* fix(agent): wait for retained session write before releasing held lock on abort

* fix(agent): replace self-wait with deferred release in retained-lock abort cleanup

* fix(test): reject fallback acquire with SessionWriteLockTimeoutError in active-scope cleanup test

* fix(agent): trim retained-lock comments

Signed-off-by: sallyom <[email protected]>

---------

Signed-off-by: sallyom <[email protected]>
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit 0a042f6)

* fix(gateway): resume channel after pending task recovery

(cherry picked from commit 6039da3)

* fix(gateway): resume channel after pending task recovery

(cherry picked from commit ecd29fe)

* fix(outbound): ignore empty delivery receipts (#79811)

(cherry picked from commit 9a735be)

* fix(agents): guard delivery-evidence attachment recursion against cycles (#97041)

* fix(agents): guard delivery-evidence attachment recursion against cycles

* fix(agents): guard delivery-evidence attachment recursion against cycles

* fix(agents): guard delivery-evidence attachment recursion against cycles

---------

Co-authored-by: Pick-cat <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 4985671)

* fix(opencode-go): re-arm idle timer on block-boundary events to prevent false stalled-stream abort (#97128)

* fix(opencode-go): re-arm idle timer on block-boundary events to prevent false stalled-stream abort

When the opencode-go model finalizes a tool call and deliberates before
the next one, the provider emits real block-boundary SSE events
(text_end, thinking_end, toolcall_start, toolcall_end) that prove the
socket is alive, but the watchdog's isProviderProgressEvent only
returned true for token deltas (text_delta, thinking_delta,
toolcall_delta). This caused the idle timer to fire and falsely abort a
live stream, replacing a completed answer with a stalled error and
dropping the provider's real done event.

Fix: include block-boundary events in isProviderProgressEvent so the
idle timer is re-armed on any forward-progress provider event.
text_start and thinking_start are intentionally excluded because they
are synthetic preamble events that should not shorten the first-event
window.

Closes #96518

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* test(opencode-go): satisfy lint in stream regression

* test(opencode-go): satisfy lint in stream regression

* test(opencode-go): satisfy lint in stream regression

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 552ec2b)

* fix(model-fallback): don't rethrow provider-side AbortErrors as user cancellations (#90908)

* fix(model-fallback): don't rethrow provider-side AbortErrors as user cancellations

When the LLM API closes the connection mid-stream, the fetch layer
surfaces AbortError("This operation was aborted") with no external
abort signal triggered. The old guard `shouldRethrowAbort()` returned
false for these errors (because isTimeoutError matched the message),
so they fell through to the fallback loop but were never retried —
the error propagated up and produced SILENT_REPLY_TOKEN in group
sessions, permanently silencing the topic.

Replace the guard with a direct check: only rethrow AbortError when
the external abort signal is actually set (user/gateway cancellation).
Provider-side AbortErrors without an external signal now fall through
to the next fallback candidate, giving the system a chance to recover.

* fix(cron): forward abort signal into runWithModelFallback

Thread the cron executor's abort signal into the shared
runWithModelFallback call so that cron timeouts and cancellations
stop the fallback chain instead of retrying with the next candidate.

Previously, the run callback checked params.abortSignal?.aborted and
threw, but runWithModelFallback itself had no signal — so the new
guard in model-fallback.ts could not distinguish a caller abort from
a provider-side AbortError and would retry silently.

Also adds a focused regression test verifying the signal is forwarded.

---------

Co-authored-by: Shengting Xie <[email protected]>
Co-authored-by: yayu <[email protected]>
(cherry picked from commit 98ed83f)

* fix(browser): block node routes when sandbox host control is disabled (#97958)

(cherry picked from commit 2cf765f)

* fix(exec): bind Windows allowlist execution path (#98260)

* fix(exec): bind windows allowlist execution path

* fix(exec): add windows shadow execution proof

* fix(exec): preserve wildcard allowlist behavior

* fix(exec): correct blocked plan test fixture

(cherry picked from commit 3811001)

* fix(mcp): suppress unhandled error on stderr pipe in stdio transport (#99803)

* fix(mcp): suppress unhandled error on stderr pipe in stdio transport

When child.stderr is piped to stderrStream without an error
handler, a stream-level error (EPIPE, I/O failure) crashes the
process. Add a noop error handler before the pipe, consistent
with the error handlers already present on stdin and stdout.

Co-Authored-By: Claude <[email protected]>

* test(mcp): add regression test for stderr pipe error suppression

Co-Authored-By: Claude <[email protected]>

* fix(mcp): report stderr stream errors

* fix(mcp): report stderr stream errors

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit 1b84316)

* Harden macOS SQLite WAL checkpoints (#99067)

(cherry picked from commit f7f1be2)

* fix(secrets): suppress unhandled stdout/stderr stream errors in exec resolver (#100521)

* fix(secrets): suppress unhandled stdout/stderr stream errors in exec resolver

* proof(secrets): add real behavior proof script for exec resolver stream error catch

* proof(secrets): replace wrapper with real exec resolver stream error proof

* style: apply oxfmt to changed files

(cherry picked from commit c9a0783)

* fix(agents): retry transient filesystem races when reading workspace bootstrap files (#100910)

* fix(agents): retry transient filesystem races when reading workspace bootstrap files

* fix(agents): retry transient boundary resolution

---------

Co-authored-by: Vincent Koc <[email protected]>
(cherry picked from commit f36d170)

* fix(gateway): finish plugin HTTP responses after post-header failures (#102125)

* fix(gateway): finish plugin HTTP responses after post-header failures

* test(gateway): satisfy plugin HTTP regression lint

* fix(gateway): skip ending destroyed plugin responses

---------

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 240d350)

* fix(gateway): validate exact custom browser origins (#38290)

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit fa0349a)

* fix: block unspecified trusted DNS targets (#103075)

(cherry picked from commit c70f3d0)

* fix(channels): make nack callbacks idempotent (#104919)

* fix(channels): make nack callbacks idempotent

* fix(channels): coalesce overlapping nack callbacks

---------

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 02d307e)

* fix(channels): prevent base URL credentials in status output (#107754)

* fix(channels): redact credentials in account URLs

* fix(channels): sanitize final status summaries

(cherry picked from commit 210340f)

* fix(channels): prevent lifecycle listener buildup (#109108)

(cherry picked from commit 0e1fad7)

* fix(sandbox): use Buffer.byteLength for env var value size limit (#105017)

* fix(sandbox): use Buffer.byteLength for env var value size limit

validateEnvVarValue checked value.length (UTF-16 code units) against
the 32768-byte limit, so multi-byte CJK values like "值".repeat(11000)
passed the check despite exceeding 33 KB in UTF-8. Switch to
Buffer.byteLength(value, "utf8") so the limit matches the actual byte
count the OS and child processes see.

* test(sandbox): simplify env byte-limit coverage

Co-authored-by: 唐梓夷0668001293 <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 84fb48c)

* fix(gateway): guard process.kill ESRCH race in signalVerifiedGatewayPidSync (#109590)

* fix(gateway): guard process.kill ESRCH race in signalVerifiedGatewayPidSync

A verified gateway process can exit between the argv validation check and
the process.kill call, causing an unhandled ESRCH error. Wrap the kill in
try-catch and silently swallow ESRCH (process already gone = signal
already delivered).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* docs(gateway): explain ESRCH signal race

Co-authored-by: 丁宇婷0668001435 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 853b1a8)

* fix(litellm): guard loopback hostname auto-allow with isIP to prevent DNS SSRF bypass (#110693)

* fix(litellm): guard loopback hostname auto-allow with isIP to prevent DNS bypass

The isAutoAllowedLitellmHostname helper auto-enables private-network access
for loopback-style hosts. Before this fix, lowered.startsWith("127.")
matched DNS hostnames like 127.evil.com, letting remote endpoints bypass
the explicit allowPrivateNetwork opt-in — a SSRF risk.

Add isIP(host)===4 guard so only literal IPv4 loopback addresses qualify.
Same canonical pattern as extensions/slack/src/monitor/relay-source.ts:271
and the codex loopback fix.

Co-Authored-By: Claude <[email protected]>

* test(litellm): cover loopback endpoint policy

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 3d03b60)

* fix(discord): sustained gateway bursts stop growing memory (#110954)

* fix(discord): sustained gateway bursts stop growing memory

* fix(discord): contain gateway queue overflow

* fix(discord): drop oldest saturated gateway sends

Co-authored-by: 张贵萍0668001030 <[email protected]>

* fix(discord): surface gateway overflow warnings

Co-authored-by: 张贵萍0668001030 <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 69aeba9)

* fix(gateway): bound busy channel health by real run age (#103793)

* fix(gateway): bound busy channel health by real run age

The channel health policy treats a channel as healthy-busy even while
disconnected, bounded only by a 25 minute stale ceiling measured from
lastRunActivityAt. The run-state heartbeat refreshes lastRunActivityAt
every 60 seconds for as long as any run is active, so a run that hangs
forever (for example a send blocking on a dead socket after the
transport already reported connected:false) keeps that timestamp fresh
and the stuck ceiling is never reached. The account is then reported
healthy forever by the health monitor, readiness probe, and health CLI,
and no restart ever fires.

createRunStateMachine now tracks each in-flight run's start time keyed by
an opaque run handle and publishes the oldest still-active run's start as
activeRunStartedAt. The health policy busy override keys its ceiling off
the real run age, so a run stuck longer than the threshold reports stuck
and the monitor can restart it. Because the reported start is the oldest
active run and advances to the next-oldest as runs complete, a channel
churning through many short overlapping runs (activeRuns above 1 across
concurrent queue keys) stays healthy; only a genuinely hung run breaches
the ceiling. Short and active runs stay healthy and the existing
lastRunActivityAt fallback is preserved for snapshots without a start
time.

* fix(channels): retain run-state callback compatibility

Keep the released zero-argument onRunEnd callback source-compatible while allowing internal queue callers to pass a run handle for exact concurrent-run accounting. The compatibility path closes the oldest active run, preserving existing lifecycle behavior for consumers that do not use handles.

* fix(channels): keep anonymous runs out of age tracking

The zero-argument lifecycle callbacks cannot identify which concurrent run completed, so they must not update the identity-sensitive run start used by channel health. Keep their busy count separately and reserve exact start tracking for the shared queue's handle-aware lifecycle path.

* fix(channels): keep tracked runs internal

Keep the public run-state lifecycle callbacks unchanged. The channel queue now owns opaque run identity and augments its status updates with the oldest active queue run, so implementation details do not expand the SDK surface.

* fix(channels): type queue run start status

Keep activeRunStartedAt in the internal status patch type so the queue can publish its private tracked-run age through the existing status sink.

* fix(channels): wrap isActive to satisfy unbound-method lint

* fix(gateway): gate busy run-age ceiling on disconnected transport

(cherry picked from commit 18b79d9)

* fix(deps): update fast-uri past advisory

(cherry picked from commit 1be9db0)

* fix(release): adapt maintenance-line hardening

Backport/adapt 18ec9ce, dea1fe1, 7f32b6c, 1da345e, 931ac3e, 89780d5, and c0d99ed for the 2026.6 extended-stable maintenance line.

* fix(deps): bump protobufjs to 7.6.5

Backport-adapted from a230f74.

* test(gateway): cover bounded macOS process probe

* chore(release): prepare 2026.6.34

* test(dotenv): share path override environment assertions

* fix(release): resolve 2026.6.34 CI blockers

---------

Signed-off-by: sallyom <[email protected]>
Co-authored-by: joshavant <[email protected]>
Co-authored-by: Peter Lee <[email protected]>
Co-authored-by: sallyom <[email protected]>
Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Co-authored-by: Liu Wenyu <[email protected]>
Co-authored-by: pick-cat <[email protected]>
Co-authored-by: Pick-cat <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: weiqinl <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: shengting <[email protected]>
Co-authored-by: Shengting Xie <[email protected]>
Co-authored-by: yayu <[email protected]>
Co-authored-by: Agustin Rivera <[email protected]>
Co-authored-by: cxbAsDev <[email protected]>
Co-authored-by: ooiuuii <[email protected]>
Co-authored-by: Masato Hoshino <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: mushuiyu886 <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Bruno Wowk (Volky) <[email protected]>
Co-authored-by: Pavan Kumar Gondhi <[email protected]>
Co-authored-by: Glucksberg <[email protected]>
Co-authored-by: xingzhou <[email protected]>
Co-authored-by: tzy-17 <[email protected]>
Co-authored-by: krissding <[email protected]>
Co-authored-by: lsr911 <[email protected]>
Co-authored-by: Yuval Dinodia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant