Skip to content

fix: require approval for dynamic shell predicates - #187884

Merged
eleqtrizit merged 6 commits into
openclaw:mainfrom
art22s:1147
Nov 5, 2026
Merged

eleqtrizit merged 6 commits into
openclaw:mainfrom
art22s:1147

Conversation

@art22s

@art22s art22s commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Require normal exec approval for predicates whose shell source can expand or be interpreted differently from parsed argv. This narrows the safe-builtin exemption introduced by #79363 and extended to predicates in the later builtin work, while retaining ordinary literal predicate checks. It complements the exact -v guard from #180880 and corrects the quote scanner added with the shared authorization planner in #84172.

What Problem This Solves

What this Problem Solves

In gateway exec allowlist mode, a predicate can appear harmless to src/infra/exec-safe-builtins.ts while Bash later synthesizes a different operand and runs an external command. src/infra/exec-authorization-render.ts can also miss a glob after an escaped quote in an ANSI-C string. Together, these mismatches can let a model supplied command cross the approval boundary without a matching allowlist entry or operator approval. The classifier now withholds automatic trust from ambiguous predicate source, and the renderer catches that escaped quote form before dispatch.

What was wrong

  1. src/infra/exec-safe-builtins.ts checked the parsed test or [ argv for an exact -v token. Shell expansion could produce a different operand after that check.
  2. src/infra/exec-authorization-render.ts treated an escaped single quote inside $'...' as the end of an ordinary single-quoted string, hiding a following glob from the enforced renderer.

The combined effect was automatic authorization of a command whose final Bash behavior exceeded the reviewed predicate.

Why this design

  • Grant the safe-builtin exemption only to predicate source with static operand syntax; route ambiguous forms through the existing approval policy.
  • Track ANSI-C quoting and escaped quotes in the renderer so a later glob fails closed. Consume each $$ PID parameter as a pair so the following ordinary single quote keeps Bash semantics.
  • Keep literal test -d and [ -d ] checks, including quoted paths with spaces, on the existing automatic path.
  • Use the existing policy modes and configuration surface.

Why this does not conflict with related PRs

PR Governed layer Relation to this PR
#79363 Safe-builtin convenience Retains automatic handling for static predicates and other closed builtins.
#84172 Shared authorization planning and source scanning Corrects one ANSI-C quote-state case in that scanner.
#119351 Preserve shell builtin semantics during enforced rendering Keeps builtins in the shell; changes whether a predicate is automatically trusted.
#180880 Exact parsed -v rejection Preserves that guard and closes the residual source/argv mismatch.
#188780 Shared test-budget headroom Integrates the already merged upstream repair that unblocks exactly allocated regression growth; this PR adds no separate shared-baseline change.

These changes are based on main after those PRs and change only the predicate trust and renderer checks.

Evidence of Fix

Path and mode Command or probe run Before fix After fix
Shared allowlist, no matching entry node --import ./scripts/tsx.mjs --input-type=module source probe of the benign ANSI-C quote plus glob regression shape analysisOk=true, allowlistSatisfied=true, safeBuiltins; new classifier test failed allowlistSatisfied=false; classifier test passes
Enforced renderer Same source probe and renderer regression test Returned the unchanged command as ok=true; new renderer test failed Returns shell expansion in enforced arguments
Renderer quote tracking after PID parameters Real prompt-only plans for eval git status $$'a\'?v and the four-dollar variant, with null satisfaction metadata At PR head 8bca86cd, the renderer returned ok=true for both; the two new rejection cases failed. Ordinary direct $$ arguments were already blocked upstream as dynamic-argument The renderer rejects both with shell expansion in enforced arguments; one- and three-dollar ANSI-C quoted-glob controls remain accepted
Gateway allowlist, approval off Real Gateway E2E command in Testing; benign dynamic test -e *.txt plus allowlisted printf Full gateway baseline was not run; the direct evaluator and renderer results above show the prerequisite automatic authorization Rejects with exec denied: allowlist miss before process launch
Gateway allowlist, allow-once Same real Gateway E2E with operator exec.approval.resolve RPC Baseline approved path was not run Actual process completed with exit code 0 and output approved
Gateway policy changed while approval was pending Same real Gateway E2E; operator exec.approvals.set changed security to deny before allow-once resolution Baseline revocation path was not run Rejects stale approval with Exec approval changed before execution; no process result
Model-planned agent turn through a separate Gateway process Deterministic local mock provider sent chat.send turns with test -e proof.txt && pwd and test -e *.txt && pwd under the same real allowlist/off policy; observed the paired exec tool outputs With the original classifier and renderer temporarily restored, the new QA case failed at its dynamic-denial assertion while the static control passed Static predicate returned the workspace path; dynamic predicate returned exec denied: allowlist miss and no pwd output
Ordinary static predicates node scripts/run-vitest.mjs src/infra/exec-safe-builtins.test.ts --maxWorkers=1 Existing literal checks passed Literal test and [ checks pass, including a quoted path with spaces
Published stable policy to patched head Published [email protected] CLI approvals set --file <synthetic-policy>; patched doctor --fix --non-interactive, approvals get --json, then shared evaluator, all in isolated state Stable CLI stored version-1 allowlist/on-miss policy with one agent allowlist entry Doctor migration completed; patched CLI and canonical SQLite row retained defaults and allowlist. With that stored policy, test -d . remained automatic and test -e *.txt required approval
Focused suite node scripts/run-vitest.mjs src/infra/exec-safe-builtins.test.ts src/infra/exec-authorization-render.test.ts src/agents/bash-tools.exec-authorization.integration.test.ts --maxWorkers=1 New classifier and renderer tests failed red before the implementation: 4 failures, 31 passes, 1 skip in the two-file run 57 passes, 2 skips in the final three-file run, including the upstream arithmetic/assignment regressions

The real-owner gateway test exercises operator approval RPC and the process supervisor; its approved outcome is observed at the process output, and its denied and policy-changed outcomes stop before execution.

SDK / caller upgrade contract

Callers using ordinary static predicates keep automatic execution. Predicates with dynamic or ambiguous source syntax require the existing allowlist or approval decision; with approval disabled, they are denied. A policy written by the latest published stable CLI remained readable after the patched runtime's supported doctor migration, with the same defaults and agent allowlist. The classifier and real Gateway boundary tests cover these outcomes.

Boundary decision

  1. Accepted by repository maintainer art22s: quoted literal filenames containing shell metacharacters, such as [ -f 'report[v2].txt' ], use the existing allowlist/approval authority. With approval disabled and no matching entry, these forms are denied. Retain the current static-source gate; ordinary static predicates and quoted paths containing spaces remain automatic. The explicit decision is recorded on this PR.

Testing

  • Added classifier, renderer, and gateway boundary regressions; final focused run after integrating main: 57 passed, 2 skipped (10.47 s Vitest). The two new PID-prefixed quote rejection cases failed at the intended renderer assertion before the dollar-pair repair; both pass after it, and ANSI-C quoted-glob controls remain green.
  • node scripts/run-vitest.mjs src/agents/bash-tools.exec-gateway-approval.e2e.test.ts --maxWorkers=1: all 3 tests passed on the final integrated candidate (17.42 s Vitest). The new predicate test uses the real Gateway and approval/process owners with no RPC or process mocks; the existing hook reload test now updates config through the Gateway's managed config.patch path to avoid a missed file-watcher event.
  • Previously verified at 8bca86cd, cross-process QA agent-turn E2E: focused case passed after matching each model-planned tool call to its result; the complete QA file passed 10/10 before that final assertion refinement (110.22 s Vitest, 127.03 s wrapper). The local provider is deterministic and does not represent a live model decision.
  • Final candidate infra and agents-root TypeScript checks, targeted core oxlint, formatting, and git diff --check passed. The four-file validation wrapper took 338.64 s including a fresh 271.3 s runtime build required after integrating main.
  • Existing literal predicate tests and gateway authorization integration tests remain green.
  • Independent Codex review verified the source and regression contracts; the upstream integration retains every PR-owned blob byte-for-byte. Hosted Clawsweeper reviewed final head 640fd5d1ff47 with no findings or Before merge items, sufficient proof (4/6), and Ready for maintainer review. The quoted-literal authorization decision is explicitly accepted above.
  • Test budget: config/test-lines-allocations/static-predicate-approval.txt allocates exactly the 221 added LF lines for distinct classifier, renderer, real approval/revocation, and agent-turn contracts; carry this reason into the squash body. Integrated canonical main commit 4368b276f5a3, which includes the published budget repair #188780. The eight PR-owned file blobs remain byte-identical to reviewed head 9f951bd673cf, and the shared baseline matches canonical main exactly. The staged canonical test-line check now passes: 6,313,918 lines, effective ceiling 6,345,942, slack 32,024. Hosted CI run 41143275791 completed successfully on 640fd5d1ff47. The baseline check, aggregate CI gate, and required CI status all pass.

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Oct 29, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR requires normal authorization for dynamic shell predicates and corrects ANSI-C quote handling during enforced command rendering.

Example: Run test -e *.txt && pwd with allowlist security, approvals off, and no matching allowlist entry.

  • Before: The dynamic predicate can receive the safe-builtin exemption and execute automatically.
  • After: Execution is denied with exec denied: allowlist miss; ordinary literal predicates retain automatic handling.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful security repair with production-boundary evidence, resolved review concerns, and an accepted compatibility tradeoff; final CI remains pending.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Supplied production-path evidence exercises the real Gateway, operator approval RPC, and process supervisor: unauthorized dynamic predicates are denied, allow-once produces approved, and policy revocation rejects execution; separate Gateway chat turns confirm static success and dynamic denial with a deterministic provider.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A model-supplied shell predicate can execute behavior beyond the operator's automatic allowlist authorization.
Reason: The repair restores the approval invariant, and the maintainer explicitly accepted conservative gating of quoted literal metacharacters.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs a current approval-boundary defect, the maintainer accepted the compatibility tradeoff, and no introduced correctness defect remains; current-head CI is still pending.

Priority: P1
Reviewed head: 640fd5d1ff47040ebcc2b51fea11f1d1c6587a33

Before merge

None.

Findings

None.

Agent review details

How this fits together

Agent exec commands enter shared shell planning and allowlist evaluation; authorized commands pass through rendering and live policy checks before the process supervisor launches them.

flowchart LR
A[Agent exec command] --> B[Shell authorization planner]
B --> C[Allowlist and builtin classification]
C --> D[Operator approval when required]
C --> E[Authorized command rendering]
D --> E
E --> F[Current authority check]
F --> G[Process supervisor]
Loading

Technical review

Best possible solution:

Retain the existing classifier and renderer owners, restrict automatic predicate trust to static source, and preserve live approval checks before launch.

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

Current source exposes the argv/source mismatch, and supplied red/green evidence confirms classifier and renderer failures before the repair; this read-only review ran no target code.

Is this the best way to solve the issue?

The patch repairs the shared trust boundary without adding policy state or configuration, retains literal predicates, and addresses the independently reported dollar-pair regression.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a1d1da77f8e8.

Provenance checked

  • Predicate safe-builtin exemption changes intended behavior with a stated reason (2fe019c: Extend automatic builtin handling to ordinary test and bracket predicates; the later exact -v repair preserved this convenience while excluding Bash operand reevaluation.)
  • Enforced renderer quote scanner keeps the original intent (c9707ab: Use the shared parsed authorization plan and reject argument expansion that cannot be safely enforced; ANSI-C quote tracking corrects an incomplete implementation of that intent.)
  • Gateway hook reload regression keeps the original intent (9da96cb: Prove active hook-token sources remain unavailable to exec children across reload; switching the fixture to managed config.patch retains the security assertion while avoiding a missed file-watcher event.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 2fe019c adds src/infra/exec-safe-builtins.ts:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2fe019ccaed8; files: src/infra/exec-safe-builtins.ts)
  • Jesse Merhi: Raw commit c9707ab adds src/infra/exec-authorization-render.ts:38 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c9707ab635b9; files: src/infra/exec-authorization-render.ts)
  • Agustin Rivera: Raw commit 69cd9c5 adds src/infra/exec-safe-builtins.ts:21 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 69cd9c5edb96; files: src/infra/exec-safe-builtins.ts)
  • kinjitakabe: Raw commit fee4e52 adds src/infra/exec-safe-builtins.ts:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: fee4e52f22ac; files: src/infra/exec-safe-builtins.ts)

PR surface

Source +26, Tests +221, Other +2. Total +249 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 35 9 +26
Tests 5 234 13 +221
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 8 271 22 +249

Review metrics

Metric Value Why it matters
Production versus test LOC Production +35/-9; tests +234/-13 The test growth covers source classification, renderer quoting, process admission, approval revocation, and cross-process tool-result correlation; the exact net test growth has a dedicated allocation.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The current-main defect can let model-supplied predicate source exceed automatic exec authorization.
  • merge-risk: 🚨 compatibility: Previously automatic dynamic predicates and quoted metacharacter filenames now require normal authorization; the maintainer explicitly accepted this behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (8 earlier review cycles)
  • reviewed 2026-10-29T20:49:40.230Z sha 1794146 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-29T21:34:30.210Z sha 62f6c04 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-29T21:42:29.254Z sha 62f6c04 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-29T21:51:42.781Z sha f045bf1 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-29T22:00:36.911Z sha f045bf1 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-30T04:18:23.382Z sha 8bca86c :: needs maintainer review before merge. :: none
  • reviewed 2026-10-30T22:27:53.631Z sha 9f951bd :: blocked before merge. :: none
  • reviewed 2026-10-30T22:57:57.023Z sha 9f951bd :: needs maintainer review before merge. :: none

Reviewed October 30, 2026, 7:21 PM ET / 23:21 UTC (Revision 9).

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 30, 2026
@art22s

art22s commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer decision: accept conservative literal predicate gating.

I accept that quoted literal filenames containing shell metacharacters, such as [ -f 'report[v2].txt' ], require the existing allowlist/approval authorization. With approvals off and no matching allowlist entry, these commands are denied. Retain the current small static-source gate; ordinary static predicates and quoted paths containing spaces keep their automatic path.

This explicitly resolves the quoted-literal authorization decision requested by the human review and Clawsweeper for head 9f951bd673cf10ee292d234826ddec8424d75933. The implementation is unchanged. The inherited test-budget CI failure remains separately documented and is not waived by this decision.

@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Oct 30, 2026
Integrate canonical main 4368b27, including merged upstream PR openclaw#188780 restoring measured test-code headroom.

Retain the eight PR-owned files byte-for-byte from reviewed head 9f951bd, including every regression assertion and the exact 221-line test allocation. No separate PR-local baseline raise is introduced.
@art22s

art22s commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 30, 2026

@eleqtrizit eleqtrizit 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.

Re-reviewed at 640fd5d1ff4. All four findings from my previous review are resolved:

  1. $$' scanner regression (HIGH) — fixed in 9f951bd: the scanner now consumes $$ in pairs (previousUnescapedDollar = char === "$" && !previousUnescapedDollar), so only an unmatched $ opens ANSI-C mode. Even/odd dollar-run regressions added ($$' and $$$$' fail closed; one/three-dollar genuine ANSI-C controls stay green). Verified by reading the final code in the worktree.
  2. Maintainer confirmation — recorded on the PR (2026-10-30, conservative literal predicate gating accepted).
  3. CI — 60 checks passing, 0 failing at this head.
  4. Mergeability — MERGEABLE (BLOCKED only by this outstanding review).

The dead optional chaining was also cleaned up, and the upstream-main integration brought in the adjacent exec-gating fixes (arithmetic #187653, recursive assignments #187499) with their regressions retained.

Verification executed locally at the exact head (Node 24, Linux): focused suites exec-safe-builtins + exec-authorization-render + bash-tools.exec-authorization.integration → 57 passed | 2 skipped, including the 9 new dollar-pair regressions; real-gateway approval e2e → 3/3 passed, including the dynamic-predicate approval/revocation test with real approval RPCs and no mocks. Not executed here: full CI matrix and Windows paths (covered by CI).

The static-source gate, literal-predicate preservation, and approval-path behavior are unchanged from the previously reviewed core repair. Approving — this also clears the review-requested block.

@eleqtrizit
eleqtrizit merged commit 3f7ee38 into openclaw:main Nov 5, 2026
144 of 145 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 6, 2026
* fix: require approval for dynamic shell predicates

* test: prove gateway predicate approval outcomes

* test: use managed config reload in gateway approval e2e

* test: prove predicate policy in gateway agent turn
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Nov 6, 2026
* fix: require approval for dynamic shell predicates

* test: prove gateway predicate approval outcomes

* test: use managed config reload in gateway approval e2e

* test: prove predicate policy in gateway agent turn
RomneyDa added a commit that referenced this pull request Nov 8, 2026
* fix: require approval for dynamic shell predicates

* test: prove gateway predicate approval outcomes

* test: use managed config reload in gateway approval e2e

* test: prove predicate policy in gateway agent turn

(cherry picked from commit 3f7ee38)

Release adaptation: Apply both production owners and adapt Gateway approval and model-planned QA coverage to the release APIs, including managed config reload.

Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 9, 2026
Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: 0a171b4 — Leizhen Zhang — fix(auto-reply): long punctuation runs stall abort-trigger detection (#184433)
Backport-of: 49600b5 — Long Jin — fix(memory): preserve inline notes during MEMORY.md compaction (#164089)
Backport-of: 982f3b1 — RoboClaw — fix(imessage): report Automation failures after Gateway updates (#186117)
Backport-of: 3f7ee38 — art22s — fix: require approval for dynamic shell predicates (#187884)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 9, 2026
* fix(gateway): publish node reapproval with committed pairing facts

Adapt main commit 94f180d to the extended-stable worker dispatcher, retaining cleanup admission and stale-session fencing.

Co-authored-by: RomneyDa <[email protected]>

* test(gateway): clarify CLI announcement tool-only phase

Keep exact token, barrier, and completion ordering assertions intact while explicitly excluding narration before the barrier.

Co-authored-by: RomneyDa <[email protected]>

* style(gateway): format node reapproval regression

Reflow the spy chain reported by hosted CI; no behavioral changes.

Co-authored-by: RomneyDa <[email protected]>

* test(secrets): decouple Telegram fixture from plugin discovery

Import the real public Telegram secret collector directly so collection does not depend on Gateway discovery environment. Exercise collection with bundled plugins disabled while retaining existing token assertions. Gateway timeout attribution remains unresolved; no production behavior or timeout changes.

Co-authored-by: RomneyDa <[email protected]>

* test(secrets): load Telegram fixture through public resolver

Replace the static extension import rejected by core type and boundary checks with the existing test public-artifact resolver. Keep the real collector in the Vitest module graph and preserve the disabled-discovery regression.

Independent source review accepted; local test, typecheck, build, install, and performance execution remain excluded by operator instruction. Hosted CI must validate the correction.

Co-authored-by: RomneyDa <[email protected]>

* style(secrets): format Telegram fixture import

Co-authored-by: RomneyDa <[email protected]>

* fix(ui): honor recovery holds before initial chat history

Keep drafting available while the existing send owner holds recovery or a retained initial turn. Restore Send when that hold clears without waiting for initial history or submitting the draft automatically.

Add renderer regressions for both holds and clarify the pre-history outbox contract. Controlled real-Gateway red/green evidence: 42523861169 / 42526889715. Diagnostic branch is not merged.

Co-authored-by: RomneyDa <[email protected]>

* fix(ui): preserve startup status presentation while holding send

Restore the existing connected startup/history status suppression without reopening Send admission. Extend both durable hold regressions to reject the duplicate composer status band. Existing cloud E2E assertions remain unchanged.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): backport installer, service, path and telemetry repairs

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: eb5d0cb — Javier MV — fix(install): keep the installed runtime private under umask 0002 (#186782)
Backport-of: b079019 — Sukhdeep — fix(daemon): Gateway repair stops the Gateway and fails when macOS denies the Trash (#189321)
Backport-of: 558e2f3 — YangManBOBO — fix(cli): compare gateway state dirs case-insensitively on Windows (#185917)
Backport-of: b7ce1c3 — Peter Steinberger — test(windows): keep ordinary CLI coverage in one partition
Backport-of: ba75cf7 — Juan Buhagiar Duijst — fix(diagnostics-otel): gateway stalls after model calls on large sessions with content capture on (#186666)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): preserve notes and harden messaging and exec approval

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: 0a171b4 — Leizhen Zhang — fix(auto-reply): long punctuation runs stall abort-trigger detection (#184433)
Backport-of: 49600b5 — Long Jin — fix(memory): preserve inline notes during MEMORY.md compaction (#164089)
Backport-of: 982f3b1 — RoboClaw — fix(imessage): report Automation failures after Gateway updates (#186117)
Backport-of: 3f7ee38 — art22s — fix: require approval for dynamic shell predicates (#187884)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retain sandbox, recovery lease and Matrix boundaries

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: a19f1bf — Agustin Rivera — fix(agents): fail closed when sandboxed spawned children resolve CLI-backed models (#178742)
Backport-of: c9f3f82 — Peter Steinberger — fix(agents): release restart-recovery fences for killed runs (#181992)
Backport-of: dfb6454 — Leizhen Zhang — fix(matrix): crafted formatted_body stalls the Gateway in the mention check (#184432)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(config): preserve last-good state through writes and rollback

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: 99418fc — weiqinl — fix(config): keep last-known-good when the observer flags the config as truncated (#152565)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(sessions): preserve history when relocating relative stores

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: a64daf7 — Peter Steinberger — fix(sessions): resolve relative session stores against the state dir, not the working directory (#182444)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): repair September backport type contracts

Split terminal recovery actions into distinct discriminants without changing behavior. Use the branch-native Doctor import signature, checking held maintenance authority before and after the awaited import.

Validation: independent exact-diff source review, formatter and git diff --check passed. Local tests, typechecks and builds not run per operator restriction; fresh exact-head remote qualification required. Repairs CI 42643973970 attempt 1.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): align backport regressions with September contracts

Preserve uncertain config-write outcomes while correcting branch-native fixture APIs and lint errors found by hosted CI.

Co-authored-by: RomneyDa <[email protected]>

* test(ci): separate Windows capacity from growing inventory

Keep package coverage and the five-job limit independent of a historical timing snapshot. Preserve the rounded capacity boundary and exercise the documented bounded-growth fallback with fixed estimates.

Co-authored-by: RomneyDa <[email protected]>

* test(node-host): keep launcher cleanup with its invoke owner

Wait for a positive launcher PID before probing liveness, and cancel through the existing invocation owner on every exit path. Never send SIGKILL to file-derived PID zero.

Co-authored-by: RomneyDa <[email protected]>

* test(release): observe owned Gateway reservation cleanup

Verify the real reservation closes before relaunch instead of rebinding an already-released port that another socket can acquire. Preserve all seven packaged startup recovery scenarios.

Co-authored-by: RomneyDa <[email protected]>

* test(release): capture native compiler busy-executable evidence

Preserve real API execution and errors while recording failure-only executable inode and writable descriptor metadata. Add a Linux kernel-path diagnostic regression; no retry or copy change.

Co-authored-by: RomneyDa <[email protected]>

* test(release): repair stability regression fixtures

Register CLI admission metadata through the runtime registry, observe the rollback health baseline, and preserve exact SQLite byte expectations.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 17, 2026
Restrict the predicate builtin exemption to static raw operands and track ANSI-C shell quoting when rendering authorized commands. Preserve ordinary static predicates and existing live-authority checks.

Proof: baseline 7 failing focused regressions; 147 focused checks and 4 isolated Gateway checks pass. Two platform fixtures and nine unselected QA cases remain skipped. Loopback-only NO_PROXY resolves the ambient proxy failure in the model fixture.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed 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.

2 participants