Repository navigation
Update the git hooks: one Julia process per hook - #38
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Pre-commit checks .githooks/pre-commit.jl |
The script checks test layout, formatting, Unicode NFC, and package loading. Fatou lint is advisory. Timed subprocesses are stopped when they exceed their limits. |
Pre-commit orchestration .githooks/pre-commit, .githooks/pre-commit.jl |
The shell hook launches the Julia script when Julia is available. Without Julia, it blocks commits when staged Julia or test paths are present. The Julia script selects checks based on staged paths and fails on blocking errors. |
Pre-push test suite .githooks/pre-push.jl |
The script runs Pkg.test or test/runtests.jl with bounds checking. It handles interruption of the test process. |
Pre-push ref gating and launch .githooks/pre-push, .githooks/pre-push.jl |
The Julia script runs tests only when pushed refs include refs/heads/main or refs/heads/master. Without Julia, the shell hook rejects those refs and skips other refs. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Refactor
Sequence Diagram(s)
sequenceDiagram
participant Git
participant PrePushShell as pre-push
participant PrePushJulia as pre-push.jl
participant TestProcess
Git->>PrePushShell: pushed-ref lines and hook arguments
PrePushShell->>PrePushJulia: launch when Julia is available
PrePushJulia->>PrePushJulia: check for main or master refs
PrePushJulia->>TestProcess: run selected test target when a ref matches
Merge Risk: 
Minimal · up to 8897f
-
No merge-blocking issues were identified in the hook changes.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
1428417d-a05d-4f5d-8f03-873f9aae283c
Files selected for processing: 4-
.githooks/pre-commit.githooks/pre-commit.jl.githooks/pre-push.githooks/pre-push.jl
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
=======================================
Coverage 77.20% 77.20%
=======================================
Files 18 18
Lines 443 443
=======================================
Hits 342 342
Misses 101 101 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…hooks) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
812fcd95-af39-4e18-a806-c27302c38bb5
Files selected for processing: 3-
.githooks/pre-commit.githooks/pre-commit.jl.githooks/pre-push
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
…arness githooks) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rness githooks) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The git hooks of this repository start Julia once per hook, where they started it three or four times.
.githooks/pre-commitand.githooks/pre-pushbecome short launchers.pre-commit.jlruns the test-layout check, the format check,fatou lintand the NFC check in one Julia process, and the load test in a child process with--project=., so the load test still sees the package's own environment, asusing Pkgdoes in CI.pre-push.jldoes the same for the push checks.Without
juliaon thePATH, a commit with no staged.jlfile and no change belowtest/passes, and so does a push that updates nomainormaster, as with the old hooks; any other commit or push is refused. A renamed.jlfile, a.jlfile that becomes a symlink, a path with non-ASCII characters and a file that does not parse are checked too. The formatting stage needs JuliaFormatter 2.14 or later, which supports Julia 1.10 and later, and refuses an older release with one line that names its version. Afatouthat cannot start skips the advisory lint stage, as a missingfatoudoes.The files are byte-identical to
githooks/(andscripts/test-layout.jl) of the ResearchHarness at commitbcda496, asharness githooks --applyinstalls them. Onlypre-commitandpre-pushare executable.Nothing else changes. After the merge,
harness githooksreports nothing to do for this repository.🤖 Generated with Claude Code