Skip to content

test(agent): cover exact timeout command prefix - #9076

Merged
cv merged 3 commits into
mainfrom
codex/pr9075-prefix-guard-tests
Aug 14, 2026
Merged

test(agent): cover exact timeout command prefix#9076
cv merged 3 commits into
mainfrom
codex/pr9075-prefix-guard-tests

Conversation

@apurvvkumaria

@apurvvkumaria apurvvkumaria commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds regression coverage for the exact openclaw agent command prefix enforced by the timeout parser merged in #9075. The tests address advisor warning PRA-1 by proving that timeout-looking arguments on another executable or OpenClaw subcommand do not authorize a host deadline.

Changes

  • Assert that other agent --timeout 30 does not produce an inferred timeout.
  • Assert that openclaw exec --timeout 30 does not produce an inferred timeout.
  • Leave the merged parser implementation and user documentation unchanged.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: this test-only follow-up changes no user-facing behavior; fix(agent): reject ambiguous timeout argv #9075 already documents the parser contract.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Codex Desktop reviewed exact commit ece3ca732; PASS with no findings because the five-line diff adds denial assertions only and changes no runtime code, configuration, dependencies, credentials, or cryptography.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: No documentation paths changed. The exact diff adds regression assertions for behavior already documented by fix(agent): reject ambiguous timeout argv #9075 and changes no user-facing behavior.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: npx vitest run --project cli src/lib/actions/sandbox/agent/passthrough-dispatch.test.ts passed 35/35 tests at ece3ca732.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: not applicable to a five-line regression-test addition with no runtime or test-harness changes.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Summary by CodeRabbit

  • Tests
    • Added coverage to ensure timeout options are recognized only for commands beginning with the exact openclaw agent prefix.
    • Confirmed timeout options in unrelated commands or executables are ignored.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d9bd07b6-333b-4c91-bd49-5da36336b763

📥 Commits

Reviewing files that changed from the base of the PR and between fd30414 and ece3ca7.

📒 Files selected for processing (1)
  • src/lib/actions/sandbox/agent/passthrough-dispatch.test.ts

📝 Walkthrough

Walkthrough

The test suite adds coverage for timeout parsing with arguments that do not begin with the exact openclaw agent command prefix.

Changes

Timeout prefix validation

Layer / File(s) Summary
Timeout prefix parsing tests
src/lib/actions/sandbox/agent/passthrough-dispatch.test.ts
Tests reject timeout flags for other commands and executables.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Mergeability Score: ⚪ Minimal · up to ece3c

This change adds focused regression coverage without changing product behavior or runtime code; no actionable merge-blocking risk remains after normal checks.

Possibly related PRs

Suggested labels: area: cli

Suggested reviewers: hunglp6d, prekshivyas, cv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies tests for exact timeout command-prefix matching, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pr9075-prefix-guard-tests

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit ece3ca7 in the codex/pr9075-prefix-... branch remains at 96%, unchanged from commit fd30414 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit ece3ca7 in the codex/pr9075-prefix-... branch remains at 82%, unchanged from commit fd30414 in the main branch.

Show a code coverage summary of the most impacted files.
File main fd30414 codex/pr9075-prefix-... ece3ca7 +/-
src/lib/state/registry/lock.ts 48% 39% -9%
src/lib/onboard...rtup/profile.ts 93% 85% -8%
src/lib/messagi...annel-config.ts 99% 92% -7%
src/lib/messaging/hydration.ts 82% 77% -5%
src/lib/onboard...age/contract.ts 91% 86% -5%
src/lib/securit...ate-endpoint.ts 97% 94% -3%
src/lib/state/registry.ts 89% 87% -2%
src/lib/messagi.../token-paste.ts 94% 92% -2%
src/lib/adapters/http/probe.ts 92% 91% -1%
src/lib/policy/...ne-exclusion.ts 91% 97% +6%

Updated August 14, 2026 01:58 UTC

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized terminology decisions differ; normalized E2E selections match; severity counts match.
1 terminology difference from the second opinion

Advisory only. These are normalized differences from the primary terminology receipt.

  • exact OpenClaw agent prefix at src/lib/actions/sandbox/agent/passthrough-dispatch.test.ts:171: selected only by the second-opinion lane as justified.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

1 semantic terminology decision

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • justified — OpenClaw agent prefix at src/lib/actions/sandbox/agent/passthrough-dispatch.test.ts:171: Keep `exact OpenClaw agent prefix`; the modifier identifies the parser boundary tested by this title.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: None

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The focused denial cases match the parser boundary from #9075. Required checks pass, automated reviews report no findings, the documentation receipt matches ece3ca7, and all commits are verified.

@cv
cv merged commit 5de9ff6 into main Aug 14, 2026
73 checks passed
@cv
cv deleted the codex/pr9075-prefix-guard-tests branch August 14, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants