fix(tooling): allow ignored-only staged changes #8468
main fromrefs/pull/8468/head·merged by juliusmarminge View on GitHubProblem#
The pre-commit hook sends every staged path to vp fmt, but Oxfmt intentionally ignores files such as pnpm-lock.yaml and patch files. When a commit contains only ignored files, the formatter sees zero matches and fails the commit even though there is nothing to format.
Fix#
Pass Oxfmtʼs supported --no-error-on-unmatched-pattern option from the Vite staged config. Supported source files are still formatted, while ignored-only commits become a successful no-op.
Verification#
vp fmt vite.config.ts --checkvp staged --verboseformatted the staged Vite config normallyvp staged --diff origin/main...79e063e67 --no-stash --verboseran against the exact patch/lockfile-only diff from #8467 and succeeded with zero matching files- the commit completed through the updated pre-commit hook without bypass flags
git diff --cached --check
Generated with GPT-5.6 Sol in T3 Code through the Codex harness.
Note
Low Risk Single-line change to pre-commit formatting behavior with no runtime, auth, or data impact.
Overview
Updates the pre-commit staged formatter in vite.config.ts so vp fmt is invoked with --no-error-on-unmatched-pattern.
When a commit stages only paths that Oxfmt ignores (e.g. pnpm-lock.yaml), the hook no longer fails for “no matching files”; commits that include formattable sources still run the formatter as before.
Note
Add --no-error-on-unmatched-pattern to staged vp fmt command#
Updates the staged task in vite.config.ts so the formatter does not error when the glob pattern matches no files. This lets staged changes consisting only of ignored files pass without a false failure.
Macroscope summarized ed6c1bd.- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
juliusmarminge merged thisb0ae3f3
juliusmarminge closed this
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 13.3 KiB 13.3 KiB +46 B (+0.3%) 15.1 KiB ✅ Codex Thread snapshot wire 6.9 KiB 6.9 KiB +5 B (+0.1%) 7.3 KiB ✅ Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB +41 B (+0.6%) 7.8 KiB ✅ Codex Live turn WebSocket decoded 55.5 KiB 55.6 KiB +44 B (+0.1%) 66.4 KiB ✅ Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅ Claude Total thread wire 13.3 KiB 13.3 KiB −1 B (−0.0%) 15.1 KiB ✅ Claude Thread snapshot wire 6.9 KiB 6.9 KiB +6 B (+0.1%) 7.3 KiB ✅ Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB −7 B (−0.1%) 7.8 KiB ✅ Claude Live turn WebSocket decoded 56.4 KiB 56.4 KiB 0 B (0.0%) 66.4 KiB ✅ Claude Live turn messages 11 11 0 (0.0%) 21 ✅ Baseline:
94401d0· PR result:ed6c1bd· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 109.4 KiB
- Claude decoded thread snapshot: 110.1 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
0b929830-dc51-476e-999e-8656396cc0f5You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Comment `@coderabbitai help` to get the list of available commands.