Skip to content

fix: harden test-inference scripts with error handling and cleanup#1804

Open
WuKongAI-CMU wants to merge 1 commit intoNVIDIA:mainfrom
WuKongAI-CMU:fix/harden-test-inference-scripts
Open

fix: harden test-inference scripts with error handling and cleanup#1804
WuKongAI-CMU wants to merge 1 commit intoNVIDIA:mainfrom
WuKongAI-CMU:fix/harden-test-inference-scripts

Conversation

@WuKongAI-CMU
Copy link
Copy Markdown
Contributor

@WuKongAI-CMU WuKongAI-CMU commented Apr 12, 2026

Summary

  • Adds set -euo pipefail to both test-inference scripts for fail-fast behavior
  • Uses predictable temp file names (/tmp/nemoclaw-test-req-XXXXXX.json) with proper cleanup trap
  • Adds --max-time 30 and -sf flags to curl for bounded, silent-on-success requests
  • Uses heredoc for JSON payload instead of inline echo

Test plan

  • Both scripts pass ShellCheck
  • Scripts tested against local sandbox

🤖 Generated with Claude Code

Signed-off-by: Intern Dev dev@wukongai.io

- Add SPDX license headers (missing from both scripts)
- Add set -euo pipefail for strict error handling
- Use mktemp instead of hardcoded /tmp/req.json to avoid collisions
- Add trap to clean up temp file on exit
- Add -f (fail on HTTP errors) and --max-time 30 to curl
- Print trailing newline for readable output

Signed-off-by: Peter Tam <nicholaslwk@gmail.com>
Signed-off-by: peteryuqin <peter.yuqin@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 12, 2026

Warning

Rate limit exceeded

@WuKongAI-CMU has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 20 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 20 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 52f9f037-f582-4e67-b695-93bb968850ad

📥 Commits

Reviewing files that changed from the base of the PR and between 1ba57ab and 4f71128.

📒 Files selected for processing (2)
  • scripts/test-inference-local.sh
  • scripts/test-inference.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@wscurran wscurran added the enhancement: testing Use this label to identify requests to improve NemoClaw test coverage. label Apr 13, 2026
@wscurran
Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this PR, which proposes a way to improve the robustness of test-inference scripts with better error handling and cleanup.

@wscurran wscurran added the status: rfr Ready for review — no conflicts, awaiting maintainer review label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement: testing Use this label to identify requests to improve NemoClaw test coverage. status: rfr Ready for review — no conflicts, awaiting maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants