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
**Note:** A component must have either `helm` OR `kustomize` configuration, not both.
249
249
250
+
**Using mixins for shared OS/platform content:**
251
+
```yaml
252
+
# Leaf overlay referencing mixins instead of duplicating content
253
+
spec:
254
+
base: h100-eks-ubuntu-training
255
+
mixins:
256
+
- os-ubuntu # Ubuntu constraints (defined once in recipes/mixins/)
257
+
- platform-kubeflow # kubeflow-trainer component (defined once in recipes/mixins/)
258
+
criteria:
259
+
service: eks
260
+
accelerator: h100
261
+
os: ubuntu
262
+
intent: training
263
+
platform: kubeflow
264
+
constraints:
265
+
- name: K8s.server.version
266
+
value: ">= 1.32.4"
267
+
```
268
+
269
+
Mixins carry only `constraints` and `componentRefs` — no `criteria`, `base`, `mixins`, or `validation`. They live in `recipes/mixins/` with `kind: RecipeMixin`.
270
+
250
271
## Error Wrapping Rules
251
272
252
273
**Never return bare errors.** Every `return err` must wrap with context:
| Ignore `Close()` error on writable file handles | Capture and check `closeErr := f.Close()` |
458
479
| Hardcode resource names from templates | Extract to named constants to keep code and templates in sync |
459
480
481
+
## Pull Request Requirements
482
+
483
+
**Pre-push checklist:** Always run `make qualify` before pushing. This is the CI-equivalent gate that covers tests, linting (golangci-lint + yamllint), e2e, vulnerability scan, and repo-specific checks (docs sidebar, agents sync). Do not substitute a subset of commands — if `make qualify` passes locally, CI will pass.
484
+
485
+
**Branch hygiene:**
486
+
- Always rebase onto the target branch before pushing: `git fetch origin main && git rebase origin/main`
**PR description:** Use the template from `.github/PULL_REQUEST_TEMPLATE.md` exactly as defined there. Do not inline a modified copy — read and fill in the canonical template. The template covers: Summary, Motivation/Context (with Fixes/Related), Type of Change, Components Affected, Implementation Notes, Testing, Risk Assessment, and Checklist.
491
+
492
+
**Test coverage gate (Go packages only):**
493
+
Before pushing a PR that changes Go source files, check test coverage on affected packages. Set `pkg` to the narrowest directory root you want to measure — `$pkg/...` intentionally includes descendant packages. Prefer the narrowest changed root (e.g., if only `pkg/collector/topology` changed, use `pkg=pkg/collector/topology`, not `pkg=pkg/collector`). Use a broader root only when you intentionally want one combined delta across related subpackages.
494
+
1. Run `GOFLAGS="-mod=vendor" go test -coverprofile=cover.out ./$pkg/...` on each changed package
495
+
2. Get the baseline using a clean worktree (changes must be committed first): `(git worktree add $TMPDIR/baseline origin/main && (cd $TMPDIR/baseline && GOFLAGS="-mod=vendor" go test -coverprofile=$TMPDIR/base.out ./$pkg/...); rc=$?; git worktree remove --force $TMPDIR/baseline; return $rc 2>/dev/null || (exit $rc))`. This preserves the test exit status through cleanup. Write the profile to `$TMPDIR/base.out` (outside the worktree) so it survives cleanup. Compare with `go tool cover -func` on both profiles. Skip this step for entirely new packages.
496
+
3. **Block** if `make test-coverage` fails — this enforces the project-wide 70% floor (from `.settings.yaml`). Do not use per-package profiles for this check.
497
+
4. **Flag** any package with per-package coverage decrease > 0.5% (comparing step 1 vs step 2)
498
+
5. **Block** if any new exported function or method (identified via `git diff origin/main -- $pkg/` — look for added `func` lines with uppercase names) has 0% coverage — add tests before pushing
499
+
6. Report the delta in the PR description's Testing section (e.g., `pkg/recipe: 90.4% → 90.3% (-0.1%)`)
500
+
This rule does not apply to non-Go changes (YAML, docs, CI workflows). Note: CI also posts per-package coverage deltas post-push via `go-coverage-report` in `on-push-comment.yaml`; this gate catches regressions before push.
501
+
502
+
**PR policy:**
503
+
- Do NOT add `Co-Authored-By` lines (organization policy)
504
+
- Do NOT add "Generated with Claude Code", "Created by Codex", or similar attribution
505
+
- Add appropriate type labels: `enhancement`, `bug`, `documentation`
506
+
- Area labels are auto-assigned by `.github/labeler.yml` based on changed file paths (e.g., `area/recipes`, `area/ci`, `area/api`, `area/cli`, `area/bundler`, `area/collector`, `area/validator`, `area/docs`, `area/infra`, `area/tests`). You may also add them manually when the auto-labeler wouldn't match (e.g., issue-only PRs or cross-cutting changes).
507
+
- Do NOT add `size/*` labels (auto-assigned by bot)
508
+
- Keep the PR title under 70 characters; use the description for details
Copy file name to clipboardExpand all lines: .github/actions/aicr-build/action.yml
+48-9Lines changed: 48 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,16 @@
15
15
name: 'AICR Build'
16
16
description: 'Builds the aicr validator image (via Dockerfile) and CLI binary, and loads the image into kind.'
17
17
18
+
inputs:
19
+
build_validators:
20
+
description: 'Deprecated: use validator_phases instead. Ignored when validator_phases is set.'
21
+
required: false
22
+
default: 'true'
23
+
validator_phases:
24
+
description: 'Comma-separated validator phases to build (e.g., "conformance,deployment"), or "none" to skip all. Takes precedence over build_validators.'
25
+
required: false
26
+
default: ''
27
+
18
28
runs:
19
29
using: 'composite'
20
30
steps:
@@ -27,28 +37,54 @@ runs:
27
37
28
38
- name: Build snapshot agent image and load into kind
29
39
shell: bash
40
+
env:
41
+
GOFLAGS: -mod=vendor
30
42
run: |
31
-
# Build snapshot agent image with CUDA runtime (provides nvidia-smi for GPU detection).
43
+
# Build snapshot agent image with CUDA base (provides nvidia-smi for GPU detection).
44
+
# Uses cuda:base (~250MB) instead of cuda:runtime (~1.8GB) — only nvidia-smi is needed.
32
45
# GPU test workflows use --image=ko.local:smoke-test for aicr snapshot.
33
46
CGO_ENABLED=0 go build -trimpath -o dist/aicr ./cmd/aicr
0 commit comments