You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`pre-push` runs TypeScript build and type-check gates.
50
+
51
+
If hooks were skipped with `--no-verify`, were not installed, failed, or you cannot tell whether they ran, run a manual diff-scoped fallback before creating the PR:
43
52
44
53
```bash
45
-
npx prek run --all-files
46
-
npm test
54
+
npx prek run --from-ref main --to-ref HEAD
47
55
```
48
56
49
-
For doc-only changes, do not run the full test suite unless the docs change requires it.
50
-
Run the docs and hook checks instead:
57
+
Use `npx prek run --all-files` only when you need a whole-repository baseline, such as changing hook configuration, formatter configuration, generated-check scripts, or other repo-wide validation behavior.
58
+
59
+
### Targeted Tests
60
+
61
+
Run the smallest meaningful tests for changed behavior:
62
+
63
+
- CLI or root `src/`, `bin/`, `scripts/`, or `test/` changes: `npx vitest run --project cli` or the directly affected test file.
64
+
- Plugin changes under `nemoclaw/src/`: `npx vitest run --project plugin` or the directly affected plugin test file.
65
+
- E2E support changes under `test/e2e-scenario/support-tests/`: `npx vitest run --project e2e-vitest-support`.
66
+
- Installer behavior changes: run the relevant installer integration project only when the local environment supports it.
67
+
68
+
Reserve full `npm test` for broad runtime changes, test harness changes, or cases where targeted coverage is hard to justify.
69
+
Do not run the full test suite for doc-only changes unless the docs change code samples or generated behavior in a way that needs runtime validation.
70
+
71
+
For doc-only changes, run the docs build before opening the PR:
51
72
52
73
```bash
53
-
npx prek run --all-files
54
74
npm run docs
55
75
```
56
76
57
77
If a required check fails, fix the issue before creating the PR.
58
-
When preparing the PR body for a doc-only change, leave the `npm test` verification box unchecked unless you actually ran it.
78
+
When preparing the PR body, check only the verification boxes backed by hooks, manual commands, or CI evidence you actually have.
59
79
60
80
## Step 3: Push the Branch
61
81
@@ -129,8 +149,9 @@ Use the exact template structure below. Fill in each section based on the diff (
129
149
130
150
## Verification
131
151
<!-- Check each item you ran and confirmed. Leave unchecked items you skipped. Doc-only changes do not require npm test unless you ran it. -->
132
-
-[ ]`npx prek run --all-files` passes
133
-
-[ ]`npm test` passes
152
+
-[ ] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes
153
+
-[ ] Targeted tests pass for changed behavior
154
+
-[ ] Full `npm test` passes (broad runtime changes only)
134
155
-[ ] Tests added or updated for new or changed behavior
135
156
-[ ] No secrets, API keys, or credentials committed
136
157
-[ ] Docs updated for user-facing behavior changes
@@ -151,7 +172,7 @@ Follow these rules when filling in the template:
151
172
-**Related Issue:** Include `Fixes #NNN` or `Closes #NNN` if an issue exists. Remove the section entirely if there is no related issue.
152
173
-**Changes:** Bullet list of key changes. Be specific — reference file names, commands, or behaviors that changed.
153
174
-**Type of Change:** Check exactly one box. Use `[x]` for checked, `[ ]` for unchecked.
154
-
-**Verification:** Check only the boxes for steps you actually ran and confirmed passing. Do not check boxes for steps you skipped or did not verify. For doc-only changes, `npm test` is not required; leave it unchecked unless you ran it.
175
+
-**Verification:** Check only the boxes for steps you actually ran and confirmed passing, or for Git hooks that passed during normal commit and push. Do not check boxes for steps you skipped or did not verify. For doc-only changes, `npm test` is not required; leave it unchecked unless you ran it.
155
176
-**DCO Sign-Off:** Replace `{name}` and `{email}` with values from `git config user.name` and `git config user.email`.
156
177
157
178
## Step 6: Create the PR
@@ -198,7 +219,8 @@ Created PR [#NNN](https://github.com/NVIDIA/NemoClaw/pull/NNN)
198
219
-**Do not invent your own PR body format.** Use the template from Step 5 exactly.
199
220
-**Do not omit sections.** Even if a section is not applicable, keep it with the "Skip if..." comment.
200
221
-**Do not check boxes for steps you did not run.** If you did not run `npm run docs`, leave that box unchecked.
201
-
-**Do not run the full test suite for doc-only changes by default.** Run docs and hook checks instead, and leave `npm test` unchecked unless you actually ran it.
222
+
-**Do not rerun hook-covered checks by default.** Normal commit and push hooks are valid verification. Use `npx prek run --from-ref main --to-ref HEAD` as the fallback when hooks were skipped, missing, or uncertain.
223
+
-**Do not run the full test suite for doc-only changes by default.** Run the docs build instead, and leave `npm test` unchecked unless you actually ran it.
202
224
-**Do not forget the DCO sign-off.** CI will reject the PR without it.
203
225
-**Do not forget `--assignee @me`.** Every PR must be assigned to its creator.
204
226
-**Do not create PRs from main.** Always use a feature branch.
|**pre-push**| TypeScript type check (`tsc --noEmit` for plugin, JS, and CLI) |
140
140
141
-
For a full manual check: `npx prek run --all-files`. For scoped runs: `npx prek run --from-ref <base> --to-ref HEAD`.
141
+
For PR preparation, normal commit and push hooks are valid verification when they ran without `--no-verify`.
142
+
If hooks were skipped, missing, failed, or uncertain, use a scoped fallback: `npx prek run --from-ref <base> --to-ref HEAD`.
143
+
Reserve `npx prek run --all-files` for whole-repository baselines, such as hook, formatter, generated-check, or repo-wide validation changes.
142
144
143
145
For TypeScript changes under `src/`, `test/`, `scripts/`, `bin/`, or
144
-
`nemoclaw-blueprint/scripts/` (and for `tsconfig.cli.json` updates), also run
145
-
`npm run typecheck:cli` before opening a PR. CI runs this unconditionally, and the
146
-
pre-push hook runs it with `tsconfig.cli.json` before pushes.
146
+
`nemoclaw-blueprint/scripts/` (and for `tsconfig.cli.json` updates), the pre-push
147
+
hook runs `npm run typecheck:cli` before the branch is pushed.
148
+
CI runs this unconditionally.
149
+
If the pre-push hook was skipped or unavailable, run `npm run typecheck:cli`
150
+
manually before opening a PR.
147
151
148
152
If you still have `core.hooksPath` set from an old Husky setup, Git will ignore `.git/hooks`. Run `git config --unset core.hooksPath` in this repo, then `npm install` so `prek install` (via `prepare`) can register the hooks.
149
153
150
154
`make check` remains the primary documented linter entry point.
151
155
152
156
For doc-only changes, you do not need to run the full test suite by default.
153
-
Run the docs and hook checks instead:
157
+
Commit and push normally so the hooks run, then run the docs build:
154
158
155
159
```bash
156
-
npx prek run --all-files
157
160
npm run docs
158
161
```
159
162
160
163
Leave `npm test` unchecked in the PR verification checklist unless you actually ran it.
161
-
Run `npm test` when the change touches code, generated behavior, or anything that affects runtime behavior.
164
+
If hooks were skipped or unavailable, run `npx prek run --from-ref main --to-ref HEAD` before opening the PR.
165
+
For code changes, run targeted tests for the changed behavior.
166
+
Reserve full `npm test` for broad runtime changes, test harness changes, or cases where targeted coverage is hard to justify.
162
167
163
168
## Project Structure
164
169
@@ -241,7 +246,9 @@ Follow these steps to submit a pull request.
241
246
242
247
1. Create a feature branch from `main`.
243
248
2. Make your changes with tests.
244
-
3. Run the relevant checks. For code changes, run `make check` and `npm test`. For doc-only changes, run `npx prek run --all-files` and `npm run docs`.
249
+
3. Run the relevant checks.
250
+
Let normal commit and push hooks provide hook verification, run targeted tests for changed behavior, and run `npm run docs` for doc changes.
251
+
If hooks were skipped or unavailable, run `npx prek run --from-ref main --to-ref HEAD`.
0 commit comments