Commit 31c45c9
chore: fix all prek lint findings and wire prek into CI (NVIDIA#705)
* chore(husky): prefer local node_modules bins and optional pre-commit on push
* fix(husky): ensure Node is on PATH for git hook environments
* chore(husky): update hook scripts to executable permissions
* fix(husky): run pyright with dev extras for pytest types
uv run --with pyright omitted optional dev deps; pytest was unresolved in
orchestrator/test_endpoint_validation.py. Align pre-push and pre-commit
with nemoclaw-blueprint Makefile (uv run --extra dev --with pyright).
* fix(tooling): unblock prek shellcheck, hadolint, and vitest hooks
- husky-env: shellcheck shell=bash for SC2148
- Dockerfile: hadolint pragmas and merged pip install with pyyaml pin
- vitest pre-commit: use repo-root node_modules vitest (avoid broken npx)
* fix(npm): skip prek install when core.hooksPath is set
Husky sets core.hooksPath; prek refuses to install in that case.
Still run prek install for clones without hooksPath.
* chore: centralize prek hook types and format shell scripts
- Add default_install_hook_types (pre-commit, commit-msg, pre-push) to .pre-commit-config.yaml
- Simplify npm prepare to run prek install without repeated --hook-type flags
- Align backup-workspace, brev-setup, and install-openshell with shfmt/shellcheck style
* refactor: replace Husky hooks with prek-only equivalents
Remove .husky/ directory, scripts/husky-env.sh, and the lint-staged
dependency. All hook logic now lives in .pre-commit-config.yaml:
- pre-commit: formatters, linters, Vitest (unchanged)
- commit-msg: commitlint (unchanged)
- pre-push: tsc, pyright, plus prek-push-range which re-runs
pre-commit hooks on the outgoing commit range
The prepare script unconditionally runs `prek install` (no more
core.hooksPath guard). Contributors with a stale Husky hooksPath
should run: git config --unset core.hooksPath
* ci: run prek in PR workflow instead of make check
Replace the ad-hoc make check (eslint + prettier + tsc + ruff) with
npx prek run --all-files, which covers every hook in
.pre-commit-config.yaml (shfmt, shellcheck, hadolint, gitleaks, SPDX
headers, etc.) in addition to the existing linters.
Pre-push stage hooks (tsc --noEmit, pyright) run in a second step
with --skip prek-push-range to avoid recursion.
make check now delegates to prek as well.
* fix: resolve pre-existing prek hook failures across the repo
- Fix trailing whitespace and missing final newlines in docs, skills,
CODE_OF_CONDUCT.md, and scripts/debug.sh.
- Set executable bits on scripts with shebangs: install.sh,
smoke-macos-install.sh, test-full-e2e.sh, lib/runtime.sh,
migrations/snapshot.py.
- Fix shellcheck SC2206 in install.sh (safe IFS+read -ra for version
parsing) and remove unused SCRIPT_DIR in setup-spark.sh.
- Add hadolint ignore pragmas to test Dockerfiles (DL3008, DL3013,
DL3042, DL3059, DL4006 — test images don't need version pinning).
- Add SPDX license headers to __init__.py, test-double-onboard.sh,
test-inference-local.sh, test-inference.sh, test-full-e2e.sh.
* fix: remove redundant prek-push-range hook and fix remaining lint
prek already runs pre-commit-stage hooks during pre-push, so the
prek-push-range hook caused a duplicate pass. Remove it.
Also fix: test-full-e2e.sh exec bit, hadolint SC2086/SC2038 ignores
in test Dockerfiles.
* fix: use local commitlint binary instead of npx
prek's system hook couldn't resolve npx. Use the repo-local
node_modules/.bin/commitlint directly via git rev-parse.
* chore: add explicit priority to all prek hooks
commitlint, tsc-check, and pyright-check were missing priority.
Set all three to priority 10 (validation tier).
* chore: apply shfmt formatting to all shell scripts
Auto-formatted by shfmt -i 2 -ci -bn to pass the prek shfmt hook.
No logic changes — indentation and spacing only.
* fix(security): use mktemp for temp files, stop leaking API key in walkthrough
- test-inference-local.sh, test-inference.sh: replace hardcoded
/tmp/req.json with mktemp + trap cleanup (TOCTOU fix).
- walkthrough.sh: print a placeholder instead of expanding the real
NVIDIA_API_KEY in the tmux-fallback instructions.
- Makefile: add comment clarifying lint-ts/lint-py are for targeted runs.
* ci: consolidate install steps into a single block per job
* fix(ci): switch hadolint from Docker to native binary
hadolint-docker times out pulling ghcr.io images in CI. Use a local
system hook with the binary installed via curl in the workflow.
* perf: enable tsc incremental caching for pre-push hook
Add --incremental to tsc --noEmit so subsequent type-checks reuse
the .tsbuildinfo cache (supported since TS 4.0). Gitignore the cache
file. See: https://thoughtspile.github.io/2021/06/14/faster-pre-commit/
* ci: bump all GitHub Actions to latest major versions
- actions/checkout v4 → v6
- actions/setup-node v4 → v6
- actions/setup-python v5 → v6
- astral-sh/setup-uv v4 → v7
- actions/upload-artifact stays at v4 (latest)
- rossjrw/pr-preview-action stays at v1 (latest)
* docs: add hadolint to prerequisites in CONTRIBUTING.md1 parent 9fcfd54 commit 31c45c9
50 files changed
Lines changed: 679 additions & 429 deletions
File tree
- .agents/skills/docs
- nemoclaw-overview/references
- nemoclaw-reference
- references
- .github
- workflows
- docs/about
- nemoclaw-blueprint
- migrations
- orchestrator
- scripts
- lib
- test
- e2e
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments