Skip to content

fix(scripts): apply prettier --write to benchmark-sandbox-image-build.js#1637

Merged
cv merged 1 commit intoNVIDIA:mainfrom
TSavo:fix/local-prek-gate-baseline
Apr 8, 2026
Merged

fix(scripts): apply prettier --write to benchmark-sandbox-image-build.js#1637
cv merged 1 commit intoNVIDIA:mainfrom
TSavo:fix/local-prek-gate-baseline

Conversation

@TSavo
Copy link
Copy Markdown
Contributor

@TSavo TSavo commented Apr 8, 2026

Summary

Residual fix for #1636 after #1634 cleaned up the ESLint and prettier drift in bin/lib/onboard.js and test/onboard.test.js. The benchmark script wasn't covered by that sweep, so it's the last file failing prettier --check on stock main.

Related Issue

Refs #1636 (#1634 already handled the other two findings — this closes out the residual).

Changes

  • scripts/benchmark-sandbox-image-build.js: handful of execFileSync(...) and run(...) argument wraps. No semantic change — same calls, same args, same control flow, just line-broken to comply with the configured prettier max width.

Diff: +26 / −6 in 1 file.

Type of Change

  • Code change for a new feature, bug fix, or refactor.
  • Code change with doc updates.
  • Doc only. Prose changes without code sample modifications.
  • Doc only. Includes code sample changes.

Testing

  • npx prettier --check scripts/benchmark-sandbox-image-build.js clean
  • npx prettier --check bin/lib/onboard.js test/onboard.test.js scripts/benchmark-sandbox-image-build.js — all 3 files now clean (the first two were fixed by fix(lint): resolve ESLint errors introduced by #1564 #1634)
  • node --check scripts/benchmark-sandbox-image-build.js clean
  • Re-running the prek pre-push gate with prettier-js,shfmt no longer surfaces any auto-fix in this file (verified by amending an unrelated branch and re-pushing on a fresh clone)
  • Upstream CI (will run on PR open)

Checklist

General

Code Changes

  • Formatters applied — this PR is the formatter output.
  • Tests added or updated for new or changed behavior — N/A, formatting-only.
  • No secrets, API keys, or credentials committed.
  • Doc pages updated for any user-facing behavior changes — N/A, no behavior change.

Doc Changes

  • N/A (no doc changes)

Signed-off-by: T Savo evilgenius@nefariousplan.com

Summary by CodeRabbit

  • Chores
    • Internal script formatting improvements with no functional changes.

`scripts/benchmark-sandbox-image-build.js` had line-length drift between
the source and the project's prettier config. `npx prettier --check`
would warn on it, and the prek pre-push hook auto-fixed it on every
contributor's machine — which then triggered the framework's
"Files were modified by following hooks" failure path, blocking the
push for any contributor whose own diff was unrelated.

This is the residual fix for NVIDIA#1636 after NVIDIA#1634 already cleaned up the
ESLint and prettier drift in `bin/lib/onboard.js` and `test/onboard.test.js`.
The benchmark script wasn't covered by NVIDIA#1634's sweep, so it's still the
last file failing `prettier --check` on stock `main`.

`prettier --write` produced a handful of `execFileSync(...)` and
`run(...)` argument wraps. No semantic change — same calls, same args,
same control flow, just line-broken to comply with the configured max
width.

Refs NVIDIA#1636.

Signed-off-by: T Savo <evilgenius@nefariousplan.com>
Copilot AI review requested due to automatic review settings April 8, 2026 22:11
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12fe6906-204b-4301-9a5d-b3dc44529346

📥 Commits

Reviewing files that changed from the base of the PR and between 3b6f657 and ac0d532.

📒 Files selected for processing (1)
  • scripts/benchmark-sandbox-image-build.js

📝 Walkthrough

Walkthrough

The benchmark-sandbox-image-build.js script is reformatted to restructure execFileSync and run function calls into multi-line argument objects and arrays. Computed values and control flow remain unchanged; functionality is preserved.

Changes

Cohort / File(s) Summary
Script Reformatting
scripts/benchmark-sandbox-image-build.js
Restructured multi-line argument objects and arrays for execFileSync/run calls; no functional changes to git revision/status retrieval, image size measurement, or build logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 With whiskers twitched and hop-skip cheer,
The lines are neat, the code is clear,
Reformatted calls in tidy rows,
Where logic flows and readability grows!

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: applying prettier formatting to the benchmark-sandbox-image-build.js file, which directly matches the reformatting work described in the raw summary.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link
Copy Markdown

Copilot AI left a comment

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 resolves the last remaining Prettier formatting drift reported in #1636 by applying prettier --write to the benchmark script, bringing it in line with the repository’s configured max line width without changing runtime behavior.

Changes:

  • Wraps long run(...) / execFileSync(...) invocations to satisfy Prettier line-length rules.
  • Reformats multi-argument calls (including dockerBuild(...)) for consistent indentation and trailing commas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@cv cv left a comment

Choose a reason for hiding this comment

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

LGTM — security review PASS.

Formatting-only change (Prettier line-width wrapping). No logic, control flow, or dependency changes. CI failure is an unrelated fork permission issue (Cleanup artifacts job).

No concerns.

@cv cv enabled auto-merge (squash) April 8, 2026 22:15
@cv cv merged commit 8f6995c into NVIDIA:main Apr 8, 2026
9 of 12 checks passed
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.

3 participants