Skip to content

test: convert more loop-generated cases to tables - #9271

Merged
cv merged 1 commit into
mainfrom
codex/convert-test-loops-next
Aug 17, 2026
Merged

test: convert more loop-generated cases to tables#9271
cv merged 1 commit into
mainfrom
codex/convert-test-loops-next

Conversation

@cv

@cv cv commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Convert the next 10 loop-generated test groups to Vitest it.each tables. Each case now appears as an independent table row while preserving the existing assertions and behavior-oriented titles.

Changes

  • Convert dcode empty-prompt, identity alias, CLI user-error, credential hydration, and Hermes rc-file cases to table tests.
  • Convert two SSRF parity groups and three secret-redaction groups to table tests.
  • Reduce the test-loop scanner result from 1,367 to 1,357 loops.

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 registration refactor does not change user-visible behavior or a supported product 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: The SSRF, credential, and redaction inputs and assertions remain unchanged. No production security control changed.
  • 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: Reviewed all seven changed test files and all 10 table-test conversions. The changes preserve test behavior and titles and do not change user-visible NemoClaw 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 — npx vitest run passed all seven changed files and 318 tests; npm run test:titles:check passed; the scanner reports 1,357 loops.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • 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: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Tests
    • Refactored several test suites to use parameterized test cases.
    • Preserved existing assertions and coverage for prompt validation, identity commands, error handling, SSRF classification, credential hydration, shell configuration, and secret redaction.
    • Improved test organization and readability without changing product behavior.

@cv cv self-assigned this Aug 17, 2026
@coderabbitai

coderabbitai Bot commented Aug 17, 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: b758b0ef-634f-4a68-bda3-c0d91506ca17

📥 Commits

Reviewing files that changed from the base of the PR and between 071e090 and 7f66101.

📒 Files selected for processing (7)
  • test/dcode-wrapper-empty-prompt.test.ts
  • test/dcode-wrapper-identity.test.ts
  • test/exit-code-user-error-surfaces.test.ts
  • test/package-contract/ssrf-parity.test.ts
  • test/rebuild-credential-hydration.test.ts
  • test/repro-2376.test.ts
  • test/secret-redaction.test.ts

Included review availability: Your plan includes up to 12 reviews per rolling hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

The pull request replaces manual loops that create tests with Vitest it.each tables across seven test files. Existing test cases, assertions, timeouts, and coverage remain unchanged.

Changes

Test parameterization

Layer / File(s) Summary
Command and error test tables
test/dcode-wrapper-empty-prompt.test.ts, test/dcode-wrapper-identity.test.ts, test/exit-code-user-error-surfaces.test.ts
Wrapper and user-error cases now use Vitest it.each tables. Existing assertions, arguments, and timeouts remain unchanged.
Contract and provider test tables
test/package-contract/ssrf-parity.test.ts, test/rebuild-credential-hydration.test.ts
SSRF and provider cases now use mapped parameterized test data with equivalent assertions and test coverage.
Environment and redaction test tables
test/repro-2376.test.ts, test/secret-redaction.test.ts
Hermes rc-file and secret-redaction cases now use shared parameterized tests. Existing token and file coverage remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 7f661

This test-only refactor preserves existing assertions and user-visible behavior, with the targeted test suite passing; no actionable merge-blocking risk remains.

Possibly related PRs

Suggested labels: v0.0.110

Suggested reviewers: aasthajh

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: converting additional loop-generated test cases to Vitest tables.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/convert-test-loops-next

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

@github-code-quality

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 7f66101 in the codex/convert-test-l... branch remains at 96%, unchanged from commit 071e090 in the main branch.

@cv
cv merged commit 3707b8e into main Aug 17, 2026
63 of 65 checks passed
@cv
cv deleted the codex/convert-test-loops-next branch August 17, 2026 03:31
@github-actions github-actions Bot added the v0.0.110 Release target label Aug 17, 2026
@github-actions

github-actions Bot commented Aug 17, 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): Failed

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

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.

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

Labels

v0.0.110 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant