test: make test titles behavior-oriented - #5918
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
📝 WalkthroughWalkthroughIntroduces a new ChangesTest title style linter and enforcement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/repro-2749-extra.test.ts`:
- Line 46: Update the describe title in the test file from coverage/meta wording
to a behavior-oriented phrase that describes the observable tls:terminate
scenario being exercised, and keep the local issue reference only as a final
suffix like (`#2749`). Use the existing describe block for the tls:terminate guard
as the unique symbol to locate and rename the test title accordingly.
In `@test/test-title-style.test.ts`:
- Line 14: The `describe(...)` title in the `test title style scanner` suite is
subject-oriented instead of behavior-oriented. Rename the suite in the
`describe` block to a contract-style title that states the observable behavior
being verified, keeping it consistent with the `test/**/*.test.{js,ts}` naming
convention enforced by this PR.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 73d4bcb9-6cd2-424a-82f6-554908d941a1
📒 Files selected for processing (117)
AGENTS.mdCONTRIBUTING.mdnemoclaw/src/blueprint/ssrf.test.tsnemoclaw/src/security/secret-scanner.test.tspackage.jsonscripts/checks/run.tsscripts/checks/test-title-style.tssrc/lib/actions/sandbox/agent/passthrough.test.tssrc/lib/actions/sandbox/auto-pair-approval.test.tssrc/lib/actions/sandbox/auto-pair-warmup.test.tssrc/lib/actions/sandbox/gateway-wedge-diagnostics.test.tssrc/lib/actions/sandbox/policy-channel-conflict.test.tssrc/lib/actions/sandbox/process-recovery.test.tssrc/lib/actions/sandbox/rebuild-env-isolation.test.tssrc/lib/actions/sandbox/rebuild-flow.test.tssrc/lib/actions/uninstall/run-plan.test.tssrc/lib/actions/update.test.tssrc/lib/adapters/openshell/resolve.test.tssrc/lib/adapters/openshell/timeouts.test.tssrc/lib/agent/onboard.test.tssrc/lib/agent/runtime.test.tssrc/lib/build-context.test.tssrc/lib/channel-runtime-status.test.tssrc/lib/cli/oclif-runner.test.tssrc/lib/core/stdin.test.tssrc/lib/core/version.test.tssrc/lib/domain/sandbox/logs.test.tssrc/lib/domain/uninstall/paths.test.tssrc/lib/inference/config.test.tssrc/lib/inference/nim.test.tssrc/lib/inference/onboard-probes.test.tssrc/lib/inventory/index.test.tssrc/lib/onboard/bridge-dns-preflight.test.tssrc/lib/onboard/docker-gpu-local-inference.test.tssrc/lib/onboard/docker-gpu-patch.test.tssrc/lib/onboard/dockerfile-patch.test.tssrc/lib/onboard/gateway-sandbox-reachability.test.tssrc/lib/onboard/gateway-start-failure-integration.test.tssrc/lib/onboard/hermes-dashboard.test.tssrc/lib/onboard/install-ollama-linux.test.tssrc/lib/onboard/legacy-command.test.tssrc/lib/onboard/machine/handlers/finalization.test.tssrc/lib/onboard/machine/transitions.test.tssrc/lib/onboard/messaging-channel-setup.test.tssrc/lib/onboard/model-router-process.test.tssrc/lib/onboard/model-router-python.test.tssrc/lib/onboard/ollama-startup.test.tssrc/lib/onboard/preflight-cdi.test.tssrc/lib/onboard/preflight.test.tssrc/lib/registry-recovery-action.test.tssrc/lib/sandbox-base-image.test.tssrc/lib/shields/timer.test.tssrc/lib/state/onboard-session.test.tssrc/lib/tunnel/services.test.tssrc/lib/validation.test.tssrc/lib/verify-deployment.test.tstest/channels-add-preset.test.tstest/channels-remove-full-teardown.test.tstest/cli/connect-recovery-settle.test.tstest/cli/dispatch-basics.test.tstest/cli/onboard-compatibility.test.tstest/credentials.test.tstest/destroy-wipe-sandbox-state.test.tstest/e2e-scenario/live/openclaw-tui-chat-correlation.test.tstest/e2e-scenario/support-tests/ci-compatible-inference.test.tstest/e2e-scenario/support-tests/e2e-scenario-matrix.test.tstest/gateway-state-reconcile-2276.test.tstest/generate-hermes-config.test.tstest/generate-openclaw-config.test.tstest/generate-platform-docs.test.tstest/hermes-gateway-wrapper.test.tstest/host-artifact-cleanup.test.tstest/http-proxy-fix-rewrite.test.tstest/install-preflight.test.tstest/install-stage-from-stdin.test.tstest/install-upgrade-sandboxes-severity.test.tstest/issue-4434-tui-unreachable-inference.test.tstest/issue-5667-hosted-inference-model-namespace.test.tstest/messaging-build-applier.test.tstest/nemo-deepagents-alias.test.tstest/nemoclaw-start-gateway-health.test.tstest/nemoclaw-start-plugin-refresh.test.tstest/nemoclaw-start.test.tstest/nemohermes-alias.test.tstest/ollama-tools-capability.test.tstest/onboard-ollama-autostart.test.tstest/onboard-preset-diff.test.tstest/onboard.test.tstest/openclaw-chat-send-patch.test.tstest/openclaw-tui-chat-correlation.test.tstest/package-contract/cli/policy-dispatch.test.tstest/package-contract/repro-2010.test.tstest/package-contract/ssrf-parity.test.tstest/platform.test.tstest/policies.test.tstest/policy-tiers.test.tstest/rebuild-credential-hydration.test.tstest/rebuild-credential-preflight.test.tstest/rebuild-shields-auto-unlock.test.tstest/rebuild-stale-recovery.test.tstest/repro-1751-extra.test.tstest/repro-2201.test.tstest/repro-2376.test.tstest/repro-2666-silent-list-status.test.tstest/repro-2749-extra.test.tstest/repro-4538-raw-doctor-perms.test.tstest/runner.test.tstest/sandbox-init.test.tstest/sandbox-provisioning.test.tstest/security-sandbox-tar-traversal.test.tstest/service-env.test.tstest/snapshot-restore-existing-dest.test.tstest/stale-dist-check.test.tstest/test-title-style.test.tstest/uninstall.test.tstest/validate-blueprint.test.tstest/wsl2-probe-timeout.test.ts
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-5918.docs.buildwithfern.com/nemoclaw |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Findings index
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 3 in-scope improvements
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
Vitest E2E Scenario Results — ✅ All requested jobs passedRun: 28308785234
|
|
Follow-up verification is complete.
|
<!-- markdownlint-disable MD041 --> ## Summary Rewrites 316 Vitest suite and case titles so behavioral descriptions lead and local issue references use a final `(#NNNN)` suffix. Adds an AST-backed repository check and `npm run test:spec`, which uses Vitest's tree reporter to render the suite as hierarchical behavioral documentation. ## Changes <!-- Bullet list of key changes. --> - Normalize issue-first, metadata-led, fragmented, and arrow-label titles across CLI, plugin, integration, package-contract, and E2E support tests. - Add `scripts/checks/test-title-style.ts` with unit coverage, include it in repository checks, and expose it as `npm run test:titles:check`. - Add `npm run test:spec` and document the behavioral-title convention for contributors and agents. - Leave production behavior unchanged; this PR changes test descriptions and contributor tooling only. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates <!-- Check all that apply. For any "covered by existing tests", "not applicable", or waiver entry, add a brief justification on the same line or in the Changes section. --> - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Docs updated for user-facing behavior changes - [x] Docs not applicable — justification: No product-facing behavior changed; contributor guidance is updated in `CONTRIBUTING.md` and `AGENTS.md`. - [ ] 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: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [x] Full `npm test` passes (broad runtime changes only) - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Carlos Villela <cvillela@nvidia.com> --------- Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Summary
Rewrites 316 Vitest suite and case titles so behavioral descriptions lead and local issue references use a final
(#NNNN)suffix. Adds an AST-backed repository check andnpm run test:spec, which uses Vitest's tree reporter to render the suite as hierarchical behavioral documentation.Changes
scripts/checks/test-title-style.tswith unit coverage, include it in repository checks, and expose it asnpm run test:titles:check.npm run test:specand document the behavioral-title convention for contributors and agents.Type of Change
Quality Gates
CONTRIBUTING.mdandAGENTS.md.Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com