Repository navigation
test(bundler): cover argocd-helm OCP bundling and pin its error contract - #1950
Conversation
Recipe evidence checkNo leaf overlays affected by this PR. This gate is warning-only and never blocks merge. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change clarifies symlink checks and the remaining TOCTOU window in Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
fb1b279 to
523b596
Compare
There was a problem hiding this comment.
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 `@tests/chainsaw/cli/bundle-ocp/chainsaw-test.yaml`:
- Around line 167-178: Update the scaffold validation script in the bundle-ocp
test so missing Chart.yaml or values.yaml causes an explicit failure. Add
failure handling to each test -f assertion, or enable set -e for the script,
while preserving the existing numbered-folder and static-directory checks.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: bf449496-5bc4-4d02-9d71-92af2a7cc905
📒 Files selected for processing (3)
pkg/bundler/deployer/argocdhelm/argocdhelm.gopkg/bundler/deployer/argocdhelm/argocdhelm_test.gotests/chainsaw/cli/bundle-ocp/chainsaw-test.yaml
7b67605 to
4a7ebdd
Compare
There was a problem hiding this comment.
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 `@pkg/bundler/deployer/argocdhelm/argocdhelm.go`:
- Around line 651-656: Harden the `static/` handling and subsequent value-file
writes in the surrounding deployment generation flow so a symlink replacement
after `Lstat` cannot redirect writes outside `--output`; use no-follow,
descriptor-relative operations where supported, or explicitly enforce and
document that the output directory is trusted and not concurrently modified.
Preserve the existing bundle generation behavior for trusted output trees.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 48e6fc89-caf3-4bdd-8fb7-754c04556bfb
📒 Files selected for processing (3)
pkg/bundler/deployer/argocdhelm/argocdhelm.gopkg/bundler/deployer/argocdhelm/argocdhelm_test.gotests/chainsaw/cli/bundle-ocp/chainsaw-test.yaml
cc403ed to
64ce0ac
Compare
There was a problem hiding this comment.
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 `@pkg/bundler/deployer/argocdhelm/argocdhelm_test.go`:
- Around line 778-797: Correct the coverage comment near the validator subtest
to state that only the regular-file subtests assert both ErrCodeInvalidRequest
and absence of ErrCodeInternal; do not claim the symlink subtest pins error
codes. Keep the existing distinction between checkStaticPath failures and
validator failures unchanged.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 9c1acbd1-232b-424b-9555-d37ffec16a17
📒 Files selected for processing (3)
pkg/bundler/deployer/argocdhelm/argocdhelm.gopkg/bundler/deployer/argocdhelm/argocdhelm_test.gotests/chainsaw/cli/bundle-ocp/chainsaw-test.yaml
64ce0ac to
e6fe094
Compare
njhensley
left a comment
There was a problem hiding this comment.
Review — multi-persona + adversarial meta-review
Method: 3 independent persona reviewers (Correctness/Test-coverage · Operability/CI-DX · Security/threat-model) → an adversarial senior meta-reviewer re-deriving each finding from the resolved code. Line links pinned to head 64ce0ac6.
Legend: 🔴 Blocker · 🟠 Major · 🟡 Minor · 🔵 Nitpick
Overall assessment
Tight, high-quality test-hardening follow-up to #1944/#1942 — it does exactly what it claims. The headline change, the negative !errors.Is(err, ErrCodeInternal) assertion, was mutation-verified: reverting writeValuesFiles from PropagateOrWrap back to Wrap(ErrCodeInternal, …) fails only the new assertion while the pre-existing positive check stays green — reproducing the exit-2→8 regression the PR targets. The unexpected directory: "static" assertion matches validateExactTree's real emitted string, the IncludeChecksums:true reasoning is correct, the new chainsaw argocd-helm steps are genuinely exercised in CI (via .github/actions/cli-e2e, not gated by the kwok-recipes ocp skip), cleanup is correctly re-scoped to the new last step, and the rewritten checkStaticPath threat-model comment is accurate and honestly scoped (TOCTOU window real, dismissal sound for supported configs; ValidateOutputRoot + direct-construction bypass both verified).
The two surviving items are cosmetic nitpicks; nothing blocks merge.
Confirmed non-issues (examined and cleared)
- Negative
!errors.Is(err, ErrCodeInternal)— non-vacuous and load-bearing (mutation-tested). unexpected directory: "static"string matchesvalidateExactTreeoutput (inventory.go:1244).IncludeChecksums:truegating is correct; the file/symlink subtests still exercisecheckStaticPath.checkStaticPathrewritten threat-model comment — accurate, not overclaimed.Debug→Warnlog — appropriate, no sensitive leak.
Summary
🔴 Blocker 0 | 🟠 Major 0 | 🟡 Minor 0 | 🔵 Nitpick 2 Recommendation: Approve
| try: | ||
| - script: | ||
| content: | | ||
| # set -eu so a bare check cannot fail silently: without it a |
There was a problem hiding this comment.
🔵 Nitpick — set -eu comment attributes the safeguard to the wrong construct
The comment says "without it a failing test -f … the whole guard passes with scaffold files missing." In the refactored form every check is test -f … || { echo…; exit 1; }, so the explicit exit 1 — not set -e — is what makes the guard fail-closed (and set -e doesn't fire on the left of ||). The stated mechanism describes the pre-PR bare-test -f form.
Blast radius: Cosmetic — no runtime effect. Same comment appears at line 174.
Fix: Keep set -eu (worthwhile defense-in-depth: backstops a future revert to bare checks, and set -u catches unset-var typos), but reword so it credits the explicit || exit 1 as the fail-closed mechanism rather than set -e.
There was a problem hiding this comment.
Correct, and your diagnosis of the cause is exact — that comment describes the pre-PR bare-test -f form. I wrote it against the broken version and did not update it after adding the explicit guards.
Confirmed the mechanism before rewording: with a missing file the script exits 1 both with and without set -eu, so the || { echo …; exit 1; } is doing the work and set -e never fires on the left of ||.
Reworded at both occurrences in e2120b5. set -eu is kept and now described as defence in depth for anything added later without its own guard, rather than as the safeguard itself.
| done | ||
| ls "${BUNDLE}"/[0-9][0-9][0-9]-*/ >/dev/null 2>&1 \ | ||
| || { echo "no numbered component folders found" >&2; exit 1; } | ||
| if [ -e "${BUNDLE}/static" ]; then |
There was a problem hiding this comment.
🔵 Nitpick — [ -e static ] reads false for a dangling symlink
[ -e ] dereferences, so a dangling static symlink would be treated as "correctly omitted."
Blast radius: Immaterial: checkStaticPath rejects a symlink at that path and the prior generate step ($error == null) would already have failed — the generator can't emit one.
Fix: None needed; noting for completeness. Could add || [ -L … ] if belt-and-suspenders is wanted.
There was a problem hiding this comment.
Your reachability analysis is right, and I should say plainly that you marked this "none needed" and I changed it anyway.
I added || [ -L …] in e2120b5. The reasoning was narrow: the assertion reads as "nothing at this path," and [ -e ] alone does not deliver that for a dangling link, so the check now matches what it claims regardless of whether the generator can produce one. Verified across the cases — dangling symlink goes from rc=0 to rc=1, while resolvable symlink, real directory, real file, and absent are unchanged.
That said, the cost was real: the push dismissed both approvals. Given you had explicitly waived it, folding it in with the reword was the wrong trade to make unprompted, and I would not do it that way again. Happy to revert that hunk if you would rather keep the diff to what you asked for.
Follow-up to NVIDIA#1944, which merged before these review fixes landed. Add end-to-end coverage for the fix itself. No test bundled a real OCP recipe through --deployer argocd-helm: the chainsaw suite used the default helm deployer, and kwok-recipes.yaml skips service==ocp for every deployer, so the merged fix had unit coverage only. The new steps bundle the same recipe the suite already generates and assert static/ is omitted rather than emitted empty. Verified against a binary built from the commit before the fix, where the step fails with the original error. Make the scaffold presence checks fail closed. A bare `test -f` returns 1 without terminating the script, and Chainsaw reads only the final exit status, so a missing Chart.yaml or values.yaml left the guard passing. The pre-existing assert-folder-structure step had the same shape and the same false pass. Both now run under set -eu and report which file is missing. The error-code assertion added in NVIDIA#1944 could not fail. stdlib errors.Is walks the Unwrap chain and StructuredError.Is matches on Code, so under an outer Wrap(ErrCodeInternal, ...) the chain is INTERNAL -> INVALID_REQUEST and the positive assertion still passes. ExitCodeFromError reads the outermost StructuredError, so reverting writeValuesFiles to Wrap flipped aicr bundle from exit 2 to exit 8 with the suite green. Assert the negative direction as well -- no ErrCodeInternal anywhere in the chain -- which is what pins that call to PropagateOrWrap. The "populated static dir is preserved" subtest accepted any error from Generate, unlike its siblings. Assert the specific message. The validator reports the stale directory rather than the file inside it: for an all-local recipe static/ is not an expected directory at all, so the walk rejects it before reaching its contents. Promote the kept-stale-directory log from Debug to Warn. It reports artifact residue surviving into the bundle, which Debug puts below the CLI's default level. Scope the checkStaticPath threat model to what the code delivers. Lstat rejects a symlink already present when generation reaches the path, but this is a check-then-act on a path name, so one planted between the check and the following MkdirAll or Remove is not caught. Closing that would need openat-based operations throughout and buys nothing in a supported configuration: it requires a local process with write access to --output, and anything with that access can already rewrite the finished bundle and its checksums. No behavior change beyond the log level. Related: NVIDIA#1942, NVIDIA#1944 Signed-off-by: Yuan Chen <[email protected]>
e6fe094 to
e2120b5
Compare
njhensley
left a comment
There was a problem hiding this comment.
Re-review — multi-persona + adversarial meta-review (delta)
Re-review against head e2120b58 after a force-push that dismissed the prior approval. Both prior 🔵 nitpicks are resolved and no new issues were introduced.
Legend: 🔴 Blocker · 🟠 Major · 🟡 Minor · 🔵 Nitpick
Prior-feedback status
| Prior finding | Disposition |
|---|---|
🔵 set -eu comment credited set -e for a safeguard the explicit || exit 1 provides |
✔️ Addressed — comments at chainsaw-test.yaml:72 & :174 reworded to credit the explicit || { …; exit 1; } and frame set -eu as defense-in-depth |
🔵 [ -e static ] reads false for a dangling symlink |
✔️ Addressed — now [ -e … ] || [ -L … ] with an explanatory comment |
New findings
None. The two edits are correct: the rewritten comments are technically accurate, and the \|\| [ -L … ] addition sits in an if condition (where set -e is suppressed), so a genuinely-absent static/ still exits 0 — no spurious failure.
Summary
🔴 Blocker 0 | 🟠 Major 0 | 🟡 Minor 0 | 🔵 Nitpick 0 Recommendation: Approve
The base fix and its coverage were validated in the prior pass (negative !errors.Is(err, ErrCodeInternal) assertion mutation-tested; unexpected directory: "static" matches validateExactTree; checkStaticPath threat-model comment accurate; CI coverage via .github/actions/cli-e2e). This delta only improves the two documentation/robustness nitpicks.
…alth checks Closes NVIDIA#1246. - kueue: resourceflavors/clusterqueues/localqueues.kueue.x-k8s.io (verified via in-tree manifests) - kubeflow-trainer: trainjobs.trainer.kubeflow.org (verified via tests/chainsaw/ai-conformance/kind-training-kubeflow/assert-crds.yaml) - network-operator: nicclusterpolicies.mellanox.com (verified via components/network-operator/manifests/nic-cluster-policy-aks.yaml) - k8s-nim-operator: nimservices/nimcaches/nimpipelines.apps.nvidia.com (verified via docs/conformance/cncf/v1.35/nim-eks/evidence/robust-operator.md) - gatekeeper: constrainttemplates.templates.gatekeeper.sh + configs.config.gatekeeper.sh (needs live-cluster confirmation against chart 3.22.2, flagged inline) - slinky-slurm-operator: negative finding documented - crds.enabled: false, CRDs owned entirely by sibling slinky-slurm-operator-crds chart Signed-off-by: Mohit Yadav <[email protected]> docs: restore slinky-slurm-operator health check, add comment-only negative finding Signed-off-by: Mohit Yadav <[email protected]> fix: address review comments on NVIDIA#1246 CRD backfill fix: sync kubeflow-trainer CRD docs with asserted trainingruntimes (coderabbitai) address review: soften gatekeeper verification wording, fix volatile line refs, rename CRD step for consistency chore: pausing scans chore: skills cleanup chore(deps): Update python Docker tag to v3.14 (NVIDIA#1906) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> revert(validators): pin aiperf-bench base back to python:3.13-slim (NVIDIA#1909) Signed-off-by: Nathan Hensley <[email protected]> fix(rekor-monitor): correlate identity via release-workflow run history (NVIDIA#1903) Signed-off-by: Brian Lockwood <[email protected]> Co-authored-by: Mark Chmarny <[email protected]> fix(validators): multi-stage aiperf-bench build; bump aiperf to 0.11.0 (NVIDIA#1912) Signed-off-by: Nathan Hensley <[email protected]> feat(skills): download UAT debug bundles for failure triage (NVIDIA#1913) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.20 to 46.1.21 (NVIDIA#1923) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> feat(skills): add aicr-triage skill for project board triage (NVIDIA#1911) chore(deps): regenerate stale THIRD_PARTY_NOTICES.md (NVIDIA#1926) Signed-off-by: Nathan Hensley <[email protected]> feat(server): non-interactive bundle attestation for /v1/bundle (NVIDIA#1891) chore(deps): Update dependency awscli to v1.45.52 (NVIDIA#1905) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> ci(stale): drop phantom priority/critical exempt label (NVIDIA#1925) Signed-off-by: Yuan Chen <[email protected]> chore(deps): Update dependency sigstore/cosign to v3.1.2 (NVIDIA#1924) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> feat(skills): add aicr-cross-review skill for multi-agent PR review (NVIDIA#1915) Signed-off-by: Yuan Chen <[email protected]> chore: deps: bump github.com/prometheus/client_golang from 1.24.0 to 1.24.1 (NVIDIA#1922) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix: resolve goconst and errorlint warnings across OCI, coverage, validators (NVIDIA#1916) Signed-off-by: Andrew White <[email protected]> chore(deps): Update testing-tools (NVIDIA#1934) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> fix(skills): harden UAT debug-bundle triage against malformed input (NVIDIA#1914) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump actions/stale from 10.4.0 to 11.0.0 (NVIDIA#1931) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> fix(ci): sync coverage docs to 80% and fail closed on bad threshold (NVIDIA#1937) docs: correct issue/PR lifecycle table, fix reminder dedupe (NVIDIA#1921) Signed-off-by: Yuan Chen <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> chore: deps: bump actions/checkout from 7.0.0 to 7.0.1 (NVIDIA#1930) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nathan Hensley <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix(recipe,client): reject duplicate ComponentRef names, omit disable… (NVIDIA#1917) Co-authored-by: Nathan Hensley <[email protected]> fix(validators): pass aiperf model via --model flag (NVIDIA#1939) Signed-off-by: Nathan Hensley <[email protected]> fix(skills): recover cross-review lanes, harden consensus/fallback (NVIDIA#1932) Signed-off-by: Yuan Chen <[email protected]> feat(rekor-monitor): resumable identity scan to catch up large backlogs (NVIDIA#1929) Signed-off-by: Brian Lockwood <[email protected]> fix(bundler): create argocd-helm static/ only when populated (NVIDIA#1944) Signed-off-by: Yuan Chen <[email protected]> chore: deps: update hashicorp/azurerm requirement from ~> 4.0 to ~> 5.0 in /infra/uat-azure-account (NVIDIA#1945) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix(ci): run validators/ unit tests in make test, exclude from coverage gate (NVIDIA#1918) Signed-off-by: Mohit Yadav <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> feat(corroborate): improve evidence dashboard UX (NVIDIA#1935) Signed-off-by: Nathan Hensley <[email protected]> fix(api): accept versionless legacy bundle recipes (NVIDIA#1943) Signed-off-by: Yuan Chen <[email protected]> test(bundler): cover argocd-helm OCP bundling and pin its error contract (NVIDIA#1950) Signed-off-by: Yuan Chen <[email protected]> chore: remove stray MOFED debug artifacts from repo root (NVIDIA#1955) Signed-off-by: Nathan Hensley <[email protected]> fix(deps): bump network-operator default to v26.4.1 (NVIDIA#1938) Signed-off-by: Atif Mahmood <[email protected]> Co-authored-by: Atif Mahmood <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.21 to 46.2.0 (NVIDIA#1964) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Update ministackorg/ministack Docker tag to v1.4.7 (NVIDIA#1965) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> feat(recipe): implement the ADR-015 profile core (NVIDIA#1933) Signed-off-by: Yuan Chen <[email protected]> fix(bom): extract nested operator images (NVIDIA#1960) Signed-off-by: Yuan Chen <[email protected]> address yuanchen8911 review: bump network-operator to 26.4.1 with nicnodepolicies exclusion, close gatekeeper TODO with verification
…alth checks Closes NVIDIA#1246. - kueue: resourceflavors/clusterqueues/localqueues.kueue.x-k8s.io (verified via in-tree manifests) - kubeflow-trainer: trainjobs.trainer.kubeflow.org (verified via tests/chainsaw/ai-conformance/kind-training-kubeflow/assert-crds.yaml) - network-operator: nicclusterpolicies.mellanox.com (verified via components/network-operator/manifests/nic-cluster-policy-aks.yaml) - k8s-nim-operator: nimservices/nimcaches/nimpipelines.apps.nvidia.com (verified via docs/conformance/cncf/v1.35/nim-eks/evidence/robust-operator.md) - gatekeeper: constrainttemplates.templates.gatekeeper.sh + configs.config.gatekeeper.sh (needs live-cluster confirmation against chart 3.22.2, flagged inline) - slinky-slurm-operator: negative finding documented - crds.enabled: false, CRDs owned entirely by sibling slinky-slurm-operator-crds chart Signed-off-by: Mohit Yadav <[email protected]> docs: restore slinky-slurm-operator health check, add comment-only negative finding Signed-off-by: Mohit Yadav <[email protected]> fix: address review comments on NVIDIA#1246 CRD backfill fix: sync kubeflow-trainer CRD docs with asserted trainingruntimes (coderabbitai) address review: soften gatekeeper verification wording, fix volatile line refs, rename CRD step for consistency chore: pausing scans chore: skills cleanup chore(deps): Update python Docker tag to v3.14 (NVIDIA#1906) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> revert(validators): pin aiperf-bench base back to python:3.13-slim (NVIDIA#1909) Signed-off-by: Nathan Hensley <[email protected]> fix(rekor-monitor): correlate identity via release-workflow run history (NVIDIA#1903) Signed-off-by: Brian Lockwood <[email protected]> Co-authored-by: Mark Chmarny <[email protected]> fix(validators): multi-stage aiperf-bench build; bump aiperf to 0.11.0 (NVIDIA#1912) Signed-off-by: Nathan Hensley <[email protected]> feat(skills): download UAT debug bundles for failure triage (NVIDIA#1913) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.20 to 46.1.21 (NVIDIA#1923) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> feat(skills): add aicr-triage skill for project board triage (NVIDIA#1911) chore(deps): regenerate stale THIRD_PARTY_NOTICES.md (NVIDIA#1926) Signed-off-by: Nathan Hensley <[email protected]> feat(server): non-interactive bundle attestation for /v1/bundle (NVIDIA#1891) chore(deps): Update dependency awscli to v1.45.52 (NVIDIA#1905) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mark Chmarny <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> ci(stale): drop phantom priority/critical exempt label (NVIDIA#1925) Signed-off-by: Yuan Chen <[email protected]> chore(deps): Update dependency sigstore/cosign to v3.1.2 (NVIDIA#1924) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> feat(skills): add aicr-cross-review skill for multi-agent PR review (NVIDIA#1915) Signed-off-by: Yuan Chen <[email protected]> chore: deps: bump github.com/prometheus/client_golang from 1.24.0 to 1.24.1 (NVIDIA#1922) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix: resolve goconst and errorlint warnings across OCI, coverage, validators (NVIDIA#1916) Signed-off-by: Andrew White <[email protected]> chore(deps): Update testing-tools (NVIDIA#1934) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> fix(skills): harden UAT debug-bundle triage against malformed input (NVIDIA#1914) Signed-off-by: Nathan Hensley <[email protected]> chore: deps: bump actions/stale from 10.4.0 to 11.0.0 (NVIDIA#1931) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> fix(ci): sync coverage docs to 80% and fail closed on bad threshold (NVIDIA#1937) docs: correct issue/PR lifecycle table, fix reminder dedupe (NVIDIA#1921) Signed-off-by: Yuan Chen <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> chore: deps: bump actions/checkout from 7.0.0 to 7.0.1 (NVIDIA#1930) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nathan Hensley <[email protected]> Co-authored-by: Brian Lockwood <[email protected]> fix(recipe,client): reject duplicate ComponentRef names, omit disable… (NVIDIA#1917) Co-authored-by: Nathan Hensley <[email protected]> fix(validators): pass aiperf model via --model flag (NVIDIA#1939) Signed-off-by: Nathan Hensley <[email protected]> fix(skills): recover cross-review lanes, harden consensus/fallback (NVIDIA#1932) Signed-off-by: Yuan Chen <[email protected]> feat(rekor-monitor): resumable identity scan to catch up large backlogs (NVIDIA#1929) Signed-off-by: Brian Lockwood <[email protected]> fix(bundler): create argocd-helm static/ only when populated (NVIDIA#1944) Signed-off-by: Yuan Chen <[email protected]> chore: deps: update hashicorp/azurerm requirement from ~> 4.0 to ~> 5.0 in /infra/uat-azure-account (NVIDIA#1945) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix(ci): run validators/ unit tests in make test, exclude from coverage gate (NVIDIA#1918) Signed-off-by: Mohit Yadav <[email protected]> Co-authored-by: Nathan Hensley <[email protected]> feat(corroborate): improve evidence dashboard UX (NVIDIA#1935) Signed-off-by: Nathan Hensley <[email protected]> fix(api): accept versionless legacy bundle recipes (NVIDIA#1943) Signed-off-by: Yuan Chen <[email protected]> test(bundler): cover argocd-helm OCP bundling and pin its error contract (NVIDIA#1950) Signed-off-by: Yuan Chen <[email protected]> chore: remove stray MOFED debug artifacts from repo root (NVIDIA#1955) Signed-off-by: Nathan Hensley <[email protected]> fix(deps): bump network-operator default to v26.4.1 (NVIDIA#1938) Signed-off-by: Atif Mahmood <[email protected]> Co-authored-by: Atif Mahmood <[email protected]> chore: deps: bump renovatebot/github-action from 46.1.21 to 46.2.0 (NVIDIA#1964) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Update ministackorg/ministack Docker tag to v1.4.7 (NVIDIA#1965) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Lalit Adithya <[email protected]> feat(recipe): implement the ADR-015 profile core (NVIDIA#1933) Signed-off-by: Yuan Chen <[email protected]> fix(bom): extract nested operator images (NVIDIA#1960) Signed-off-by: Yuan Chen <[email protected]> address yuanchen8911 review: bump network-operator to 26.4.1 with nicnodepolicies exclusion, close gatekeeper TODO with verification
Summary
Follow-up to #1944, which merged before this round of review fixes landed. Adds end-to-end coverage for the fix itself, makes the error-code assertion added there capable of failing, tightens a stale-output assertion, promotes one log to
Warn, and scopes a threat-model comment to what the code actually delivers.Motivation / Context
#1944 changed
writeValuesFilestoerrors.PropagateOrWrapso a bad--outputpath reports asINVALID_REQUESTinstead of an internal fault, and added an assertion intended to pin that.The assertion could not fail.
stderrors.Iswalks theUnwrapchain andStructuredError.Ismatches onCode, so under an outerWrap(ErrCodeInternal, ...)the chain isINTERNAL → INVALID_REQUESTand the positive check still passes.ExitCodeFromErrorreads the outermostStructuredError, so reverting that one line flippedaicr bundlefrom exit 2 back to exit 8 with the suite green — verified by reverting it and watching the tests pass.Related: #1942, #1944
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)Implementation Notes
End-to-end coverage. No test bundled a real OCP recipe through
--deployer argocd-helm. The chainsaw suite attests/chainsaw/cli/bundle-ocp/used the default helm deployer, and.github/workflows/kwok-recipes.yamlskipsservice==ocpfor every deployer in its matrix, so the merged fix had Go unit coverage only — the 100-overlay sweep that actually exercised it is not part of CI. Two steps are added to the existing suite: bundle the recipe it already generates with--deployer argocd-helm, and assertstatic/is omitted rather than emitted empty.Error-code assertion. Adds the negative direction — no
ErrCodeInternalanywhere in the chain — which is what actually pinswriteValuesFilestoPropagateOrWrap. The positive assertion alone is satisfied by a buried code.Stale-output assertion. The "populated static dir is preserved" subtest accepted any error from
Generate, unlike its two siblings. It now asserts the specific message. Worth noting the validator reports the stale directory, not the file inside it: for an all-local recipestatic/is not an expected directory at all, so the walk rejects it before reaching its contents. Asserting the file-level message would have failed.Log level. The kept-stale-directory message moves from
DebugtoWarn. It reports artifact residue surviving into the bundle, whichDebugputs below the CLI's default level.Threat model. The
checkStaticPathcomment claimedLstat"rejects a symlink planted afterchecksum.ValidateOutputRootran." That overstates it.Lstatrejects a symlink already present when generation reaches the path, but this is a check-then-act on a path name, so one planted between the check and the followingMkdirAllorRemoveis not caught.No TOCTOU code was added. Closing that window would require
openat-based operations throughout, and buys nothing in a supported configuration: it needs a local process with write access to--output, and anything with that access can already rewrite the finished bundle and its checksums. The comment is scoped to the guarantee the code delivers rather than the code being changed to model an attacker who has already won.No behavior change beyond the log level.
Testing
Passes with the race detector; affected-package lint and yamllint both report 0 issues.
Both new guards have a failing state, which is the point — an assertion that cannot fail is not coverage.
PropagateOrWrap→Wrapon currentmainfd26a4741^(pre-#1944)generate-argocd-helm-bundlewithbundle contains an unexpected directory: "static"The chainsaw suite was run locally both ways:
Of everything #1944 changed, the error-code half was the only part with no failing state at all.
Risk Assessment
Test assertions, two added chainsaw steps, one log level, and one comment. No production code path changes; the only runtime effect is that a kept stale
static/is now visible at the CLI's default log level.Rollout notes: None.
Checklist
make testwith-race)make lint)git commit -S) — GPG signing info