Skip to content

fix(chat-bash): inherit exec policy defaults#73982

Closed
openclaw-clownfish[bot] wants to merge 1 commit into
mainfrom
clownfish/ghcrawl-157029-autonomous-smoke
Closed

fix(chat-bash): inherit exec policy defaults#73982
openclaw-clownfish[bot] wants to merge 1 commit into
mainfrom
clownfish/ghcrawl-157029-autonomous-smoke

Conversation

@openclaw-clownfish

Copy link
Copy Markdown
Contributor

Summary

Credit

This repairs and carries forward the contributor work from @iron6909 in #50392. It also preserves attribution for @updatedb's overlapping host/security/ask inheritance fix in #41598.

Review Notes

  • Address Greptile findings on execPolicy consistency and approvalRunningNoticeMs forwarding.
  • Address clawsweeper parity findings for the remaining exec defaults and focused regression coverage.

Validation

  • pnpm check:changed

ProjectClownfish replacement details:

@openclaw-clownfish openclaw-clownfish Bot added the clawsweeper Tracked by ClawSweeper automation label Apr 29, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M r: too-many-prs Auto-close: author has more than twenty active PRs. labels Apr 29, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing this PR because the author has more than 10 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit.

@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR repairs /bash and ! chat session commands to inherit the full set of tools.exec defaults — including host, security, ask, node, pathPrepend, safeBins/profiles, strictInlineEval, timeoutSec, approvalRunningNoticeMs, and notify flags — with correct session → agent → global precedence ordering. A focused regression test covering the multi-layer merge and a routing test for punctuation-prefixed bang commands are included.

Confidence Score: 5/5

PR is safe to merge; changes are well-scoped, additive, and covered by new tests.

No P0 or P1 findings. The inheritance logic is correct: ?? is used (not ||) so explicit false values at the agent level are honoured and not overridden by the global. Session-level overrides correctly take highest precedence for the four fields that SessionEntry exposes. The safeBinProfiles merge vs. safeBins replacement asymmetry is intentional and validated by the test.

No files require special attention.

Reviews (2): Last reviewed commit: "fix(chat-bash): inherit exec policy defa..." | Re-trigger Greptile

@vincentkoc vincentkoc reopened this Apr 29, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the r: too-many-prs Auto-close: author has more than twenty active PRs. label Apr 29, 2026
@clawsweeper

clawsweeper Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Keep open, but do not merge as-is: the bug still exists on current main and the latest release, yet this PR’s resolver misses the normalized exec policy path and the branch is conflicting with missing real behavior proof.

Root-cause cluster
Relationship: canonical
Canonical: #73982
Summary: This PR is the active replacement candidate for the chat-bash exec-default inheritance work, but it is not merge-ready as submitted.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review.

So I’m closing this here because the remaining work is already tracked in the canonical issue.

Review details

Best possible solution:

Close this stale PR. The latest review rated it F, the branch still lacks merge-ready proof, and there has been no human follow-up after the durable review.

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

Yes, at source level. Current main and v2026.6.10 only forward timeout/notify defaults for chat bash, while PR head still omits normalized tools.exec.mode from its new resolver; I did not run a live command in this read-only review.

Is this the best way to solve the issue?

No. The PR is a useful partial repair, but the best fix should reuse or faithfully mirror resolveExecDefaults and applyExecPolicyLayer so chat bash cannot drift from the canonical exec policy contract.

Security review:

Security review needs attention: The diff touches host command-execution policy and currently misses the normalized exec mode boundary.

  • [high] Normalized exec mode can be bypassed — src/auto-reply/reply/bash-command.ts:67
    The new chat-bash resolver omits tools.exec.mode, so configs that intend deny/ask/auto behavior can be ignored by chat-triggered bash while the normal exec path honors that policy.
    Confidence: 0.9

AGENTS.md: found and applied where relevant.

What I checked:

  • stale F-rated PR: PR was opened 2026-04-29T02:28:41Z, is older than 60 days, and the latest review rated it F.
  • proof blocker: real behavior proof is missing and proof tier is F, so this branch is not merge-ready without contributor follow-up.
  • no human follow-up: live comments and timeline hydrated by apply contain no non-automation activity after the ClawSweeper review.

Likely related people:

  • vincentkoc: Recent current-main history added the shared exec policy layering that chat bash should reuse or mirror. (role: recent exec policy contributor; confidence: high; commits: b60f63150f51; files: src/agents/agent-tools.ts, src/agents/exec-defaults.ts, src/infra/exec-policy.ts)
  • vrknetha: The host-only /bash and ! command path appears to originate from the commit that added the bash chat command. (role: introduced behavior; confidence: medium; commits: 25a5f1cb9658; files: src/auto-reply/reply/bash-command.ts, src/auto-reply/reply/commands.ts)
  • joshavant: Recent exec approval work touched ExecToolDefaults and approval routing, adjacent to this PR’s command-execution policy surface. (role: adjacent exec approval contributor; confidence: medium; commits: 5d1e649aeadf; files: src/agents/bash-tools.exec-types.ts, src/agents/bash-tools.exec.ts, src/agents/agent-tools.ts)
  • iron6909: The PR body credits this person’s closed source repair as the main chat-bash exec-policy inheritance work carried forward here. (role: source repair contributor; confidence: medium; commits: 93db96161393; files: src/auto-reply/reply/bash-command.ts, src/auto-reply/reply/bash-command.test.ts)
  • updatedb: The PR body and related closed PR show overlapping host/security/ask inheritance work plus a bang-routing change that this PR tries not to carry forward. (role: overlapping source repair contributor; confidence: low; commits: 0ae5876f67c0, 6246b6e75b0d; files: src/auto-reply/reply/bash-command.ts, src/auto-reply/reply/commands-bash.ts)

Codex review notes: model internal, reasoning high; reviewed against 119dc4bd821e.

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label May 30, 2026
@clawsweeper clawsweeper Bot added the rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. label May 30, 2026
@barnacle-openclaw barnacle-openclaw Bot removed the stale Marked as stale due to inactivity label May 30, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels May 30, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jun 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. and removed merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Jun 16, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper Tracked by ClawSweeper automation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant