Skip to content

fix lefthook - #17023

Merged
yuzhichang merged 2 commits into
infiniflow:mainfrom
yuzhichang:yuzhichang/fix-lefthook
Jul 17, 2026
Merged

yuzhichang merged 2 commits into
infiniflow:mainfrom
yuzhichang:yuzhichang/fix-lefthook

Conversation

@yuzhichang

Copy link
Copy Markdown
Member

No description provided.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The workflows and file-checking hook now preserve filenames containing whitespace or newlines through NUL-delimited Git output. Web pre-commit checks are grouped, dependency preparation is centralized, and staged Prettier and ESLint commands run from the web root.

Changes

Hook path handling and web pre-commit checks

Layer / File(s) Summary
NUL-safe changed-file collection
.github/workflows/sep-tests.yml, .github/workflows/tests.yml
Workflow steps collect changed files with NUL-delimited Git output, preserve them in temporary inputs, and display shell-escaped filenames.
NUL-safe Git path parsing and validation
tools/hooks/check_files.py, test/unit_test/tools/test_check_files.py
The file-checking hook decodes NUL-delimited Git paths for staged-file and case-conflict checks, with tests covering whitespace, embedded newlines, and case conflicts.
Web check orchestration
lefthook.yml
Web checks are grouped under web-checks; web-deps reinstalls incomplete development dependencies, while Prettier and ESLint use root: "web/" with direct staged-file arguments.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: 🐞 bug

Suggested reviewers: myf-bee, 6ba3i

Poem

I’m a rabbit guarding each path,
NULs keep filenames safe from wrath.
Web checks hop in line,
Tools all work fine,
And staged files avoid a split bath.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning No PR description was provided, so the required Summary section and background context are missing. Add a Summary section that explains the Lefthook fixes, the problem being solved, and any relevant background for reviewers.
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.
Title check ❓ Inconclusive The title is related to the changes, but it is too vague to describe the main update clearly. Rename it to reflect the actual CI and hook changes, such as updating Lefthook and file-list handling for NUL-delimited paths.
✅ Passed checks (2 passed)
Check name Status Explanation
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.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@yuzhichang
yuzhichang force-pushed the yuzhichang/fix-lefthook branch from 31188e3 to 16d50fa Compare July 17, 2026 02:58
@yuzhichang yuzhichang added the ci Continue Integration label Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@lefthook.yml`:
- Around line 93-110: Update the web-prettier and web-eslint jobs to use
Lefthook’s native root option targeting the web directory, while keeping their
existing web/ glob patterns unchanged. Replace the printf, sed, and xargs
pipelines with direct commands using {staged_files}, preserving the check-only
and fix behaviors and allowing filenames with spaces to be passed safely.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85431571-29eb-4192-865a-ff6bd279acda

📥 Commits

Reviewing files that changed from the base of the PR and between 7c698f8 and 31188e3.

📒 Files selected for processing (1)
  • lefthook.yml

Comment thread lefthook.yml Resolved
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jul 17, 2026
@yuzhichang
yuzhichang marked this pull request as draft July 17, 2026 03:14
@yuzhichang
yuzhichang marked this pull request as ready for review July 17, 2026 03:14
@yuzhichang yuzhichang added ci Continue Integration and removed ci Continue Integration labels Jul 17, 2026
@yuzhichang
yuzhichang merged commit f69ed74 into infiniflow:main Jul 17, 2026
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant