Skip to content

Make exec command highlighting optional#79348

Merged
jesse-merhi merged 1 commit into
mainfrom
jesse/optional-command-highlighting
May 11, 2026
Merged

Make exec command highlighting optional#79348
jesse-merhi merged 1 commit into
mainfrom
jesse/optional-command-highlighting

Conversation

@jesse-merhi

@jesse-merhi jesse-merhi commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds tools.exec.commandHighlighting, disabled by default, with global and per-agent opt-in support.
  • Skips exec command span generation and gateway span propagation unless command highlighting is explicitly enabled.
  • Updates config metadata, generated docs baseline, exec docs, and changelog coverage for the default-off setting.

Verification

  • PATH="/opt/homebrew/bin:$PATH" pnpm test src/agents/bash-tools.exec-approval-request.test.ts src/config/schema.test.ts src/config/schema.help.quality.test.ts src/gateway/server-methods/server-methods.test.ts
  • PATH="/opt/homebrew/bin:$PATH" pnpm config:schema:check
  • PATH="/opt/homebrew/bin:$PATH" pnpm config:docs:check
  • PATH="/opt/homebrew/bin:$PATH" pnpm docs:check-mdx
  • PATH="/opt/homebrew/bin:$PATH" pnpm check:changed
  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels May 8, 2026
@clawsweeper

clawsweeper Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

Summary
The PR adds a default-off tools.exec.commandHighlighting config option and gates exec approval command span generation/propagation behind it while updating schema, docs, tests, generated baseline hashes, and changelog.

Reproducibility: not applicable. this is a feature/config PR rather than a bug report. The behavior is source-verifiable in the PR head and covered by focused exec approval/config tests.

Real behavior proof
Not applicable: Real behavior proof is not required for this member-authored PR; the body lists targeted verification commands, but this read-only review did not run them.

Next step before merge
No narrow automated repair target remains; the clean path is exact-head CI/automerge plus maintainer acceptance of the config policy.

Security
Cleared: The diff changes exec approval presentation and config only, adds no dependency or supply-chain surface, and defaults the new highlighting behavior off.

Review details

Best possible solution:

Land through the opted-in automerge path after exact-head CI and mergeability are green, assuming maintainers accept the default-off exec approval highlighting policy.

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

Not applicable: this is a feature/config PR rather than a bug report. The behavior is source-verifiable in the PR head and covered by focused exec approval/config tests.

Is this the best way to solve the issue?

Yes: the narrow config gate keeps command highlighting default-off and gates both agent-side span generation and gateway propagation while preserving sanitizer and unsupported-shell guards. The remaining question is policy/merge readiness rather than a code repair.

What I checked:

Likely related people:

  • jesse-merhi: Introduced parser-derived exec approval command spans and subsequent non-POSIX/Windows span guards, and authored the current config-gating PR. (role: feature owner and recent area contributor; confidence: high; commits: 297a16453661, a70d46717c77, 2401ece533f4; files: src/agents/bash-tools.exec-approval-request.ts, src/gateway/server-methods/exec-approval.ts, src/infra/command-explainer/format.ts)
  • steipete: Recent history shows adjacent exec approval command-analysis refactors and config/tool-surface work that this PR extends. (role: recent adjacent contributor; confidence: medium; commits: 3f7e6eebc2f5, bd0e10a2f68f, 5e8e77ed83eb; files: src/gateway/server-methods/exec-approval.ts, src/config/types.tools.ts, src/agents/pi-tools.ts)
  • JerranC: Recently changed the same config and tool-policy surfaces that the new exec config field plugs into. (role: recent adjacent config/tool-policy contributor; confidence: medium; commits: 530b892f0684; files: src/config/types.tools.ts, src/config/zod-schema.agent-runtime.ts, src/agents/pi-tools.ts)

Remaining risk / open question:

  • Exact-head CI for f625052 still had queued checks when inspected.
  • GitHub PR API reported mergeability as still being calculated after the latest head update.

Codex review notes: model gpt-5.5, reasoning high; reviewed against efc864139340.

Re-review progress:

@jesse-merhi
jesse-merhi marked this pull request as ready for review May 8, 2026 10:36
Copilot AI review requested due to automatic review settings May 8, 2026 10:36

Copilot AI 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.

Pull request overview

This PR makes exec approval command highlighting opt-in by introducing tools.exec.commandHighlighting (default: false) and gating both command-span generation (agent side) and command-span propagation (gateway side) on that setting.

Changes:

  • Add tools.exec.commandHighlighting to config types, runtime schema, labels/help metadata, generated docs baseline, and changelog.
  • Skip generating command spans for exec approval requests unless highlighting is explicitly enabled.
  • Skip including commandSpans in gateway exec approval request broadcasts unless highlighting is enabled (global or per-agent).

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/gateway/server-methods/server-methods.test.ts Extends exec approval handler tests to cover default-off and explicit enable/disable behavior for command spans.
src/gateway/server-methods/exec-approval.ts Gates commandSpans normalization/propagation behind resolved commandHighlighting from runtime config.
src/config/zod-schema.agent-runtime.ts Adds tools.exec.commandHighlighting to the runtime zod schema.
src/config/types.tools.ts Adds commandHighlighting?: boolean to ExecToolConfig with default-off docs.
src/config/schema.test.ts Validates schema acceptance of tools.exec.commandHighlighting in global and agent scopes.
src/config/schema.labels.ts Adds a UI label for tools.exec.commandHighlighting.
src/config/schema.help.ts Adds help text clarifying highlighting is presentation-only and default-off.
src/config/schema.help.quality.test.ts Adds tools.exec.commandHighlighting to help-quality key coverage.
src/config/exec-command-highlighting.ts Introduces resolver for effective command-highlighting enablement (global + per-agent).
src/agents/pi-tools.ts Threads resolved exec commandHighlighting into exec tool defaults and overrides.
src/agents/bash-tools.exec.ts Passes commandHighlighting through to node/gateway approval request paths.
src/agents/bash-tools.exec-types.ts Extends ExecToolDefaults with commandHighlighting?: boolean.
src/agents/bash-tools.exec-host-node.types.ts Extends node-host exec params with commandHighlighting?: boolean.
src/agents/bash-tools.exec-host-node.ts Forwards commandHighlighting into the gateway approval request context.
src/agents/bash-tools.exec-host-gateway.ts Forwards commandHighlighting into gateway allowlist approval registration.
src/agents/bash-tools.exec-approval-request.ts Avoids loading/generating command spans unless commandHighlighting === true.
src/agents/bash-tools.exec-approval-request.test.ts Adds coverage to ensure spans are generated only when highlighting is enabled.
docs/tools/exec.md Documents tools.exec.commandHighlighting in exec tool notes.
docs/tools/exec-approvals.md Adds a dedicated section describing tools.exec.commandHighlighting semantics/scope.
docs/gateway/config-tools.md Updates the config example to include commandHighlighting: false.
docs/.generated/config-baseline.sha256 Updates generated config baseline hashes to reflect the new field.
CHANGELOG.md Records the addition of tools.exec.commandHighlighting.

Comment thread src/gateway/server-methods/server-methods.test.ts
@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 8, 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.

Re-review progress:

@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper re-review

@clawsweeper

clawsweeper Bot commented May 8, 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.

Re-review progress:

@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper re-review

2 similar comments
@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper re-review

@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper re-review

@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper automerge

@clawsweeper clawsweeper Bot added the clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge label May 11, 2026
@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper saw the passing review, but did not merge yet.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=48e1ea1229561253124c2b3bc62b7c184ba91dc8)
Merge status: ClawSweeper pass marker targets a stale PR head SHA

I left the PR open for the remaining gate instead of bypassing it.

Automerge progress:

  • 2026-05-11 15:38:55 UTC review passed cfd1433665b1 (structured ClawSweeper verdict: pass (sha=cfd1433665b1362fc1984c1bd65575509ab24...)
  • 2026-05-11 16:11:28 UTC review queued 3b30b44c96ef (after repair)
  • 2026-05-11 16:23:57 UTC review queued 3b30b44c96ef (queued)
  • 2026-05-11 17:20:46 UTC review passed 48e1ea122956 (structured ClawSweeper verdict: pass (sha=48e1ea1229561253124c2b3bc62b7c184ba91...)

@clawsweeper
clawsweeper Bot force-pushed the jesse/optional-command-highlighting branch from 0a44e7f to 132ab7a Compare May 11, 2026 03:42
@clawsweeper

clawsweeper Bot commented May 11, 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.

Re-review progress:

@clawsweeper
clawsweeper Bot force-pushed the jesse/optional-command-highlighting branch from 132ab7a to 2c6c605 Compare May 11, 2026 06:47
@clawsweeper clawsweeper Bot added the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 11, 2026
@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: Review did not complete, so no work-lane recommendation was made. (sha=2c6c605bab522d09feccc21f04e163ac2cc7b41d)

I added clawsweeper:human-review and left the final call with a maintainer.

@jesse-merhi
jesse-merhi force-pushed the jesse/optional-command-highlighting branch from 2c6c605 to cfd1433 Compare May 11, 2026 15:20
@jesse-merhi
jesse-merhi requested a review from a team as a code owner May 11, 2026 15:20
@openclaw-barnacle openclaw-barnacle Bot added channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram labels May 11, 2026
@jesse-merhi

Copy link
Copy Markdown
Member Author

/clawsweeper automerge

@clawsweeper clawsweeper Bot removed the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 11, 2026
@clawsweeper
clawsweeper Bot force-pushed the jesse/optional-command-highlighting branch from cfd1433 to 3b30b44 Compare May 11, 2026 16:11
@clawsweeper clawsweeper Bot added the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 11, 2026
@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

🦞✅
ClawSweeper is pausing this repair loop for human review.

Source: clawsweeper[bot]
Reason: Review did not complete, so no work-lane recommendation was made. (sha=3b30b44c96ef578c8f702ab10b91c322325b231b)

I added clawsweeper:human-review and left the final call with a maintainer.

@clawsweeper

clawsweeper Bot commented May 11, 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.

Re-review progress:

@jesse-merhi
jesse-merhi force-pushed the jesse/optional-command-highlighting branch from 3b30b44 to 6f3df30 Compare May 11, 2026 16:56
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web extensions: acpx extensions: nvidia size: M labels May 11, 2026
@jesse-merhi
jesse-merhi force-pushed the jesse/optional-command-highlighting branch 2 times, most recently from dd386dd to 48e1ea1 Compare May 11, 2026 17:09
@clawsweeper clawsweeper Bot removed the clawsweeper:human-review Needs maintainer review before ClawSweeper can continue label May 11, 2026
@jesse-merhi
jesse-merhi force-pushed the jesse/optional-command-highlighting branch from 48e1ea1 to f625052 Compare May 11, 2026 17:44
@jesse-merhi
jesse-merhi merged commit 79c2ed9 into main May 11, 2026
87 checks passed
@jesse-merhi
jesse-merhi deleted the jesse/optional-command-highlighting branch May 11, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants