Skip to content

fix(B-0823): ISO audit accepts nixpkgs-25.11 kernel/initrd variant paths + diagnostic dump on failure#5235

Merged
AceHack merged 1 commit into
mainfrom
otto-cli/fixfwd-iso-bootloader-paths-25-11-2026-05-26
May 26, 2026
Merged

fix(B-0823): ISO audit accepts nixpkgs-25.11 kernel/initrd variant paths + diagnostic dump on failure#5235
AceHack merged 1 commit into
mainfrom
otto-cli/fixfwd-iso-bootloader-paths-25-11-2026-05-26

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 26, 2026

Summary

Cascade #4 ISO audit failed on commit 75eff94 (post-#5226 merge) with 2 missing-path assertions on `boot/bzImage` + `boot/initrd`. Same class as B-0818 — nixpkgs 25.11's image/images refactor changed kernel + initrd locations in the ISO.

Two-layer fix

This PR (fix-fwd, immediate unblock):

  1. Kernel + initrd checks converted to `REQUIRED_KERNEL_ANY` + `REQUIRED_INITRD_ANY` any-of-family pattern (mirrors existing `REQUIRED_BOOTLOADER_ANY` discipline that survived the 24.11→25.11 channel bump cleanly)
  2. Candidate paths cover legacy (`boot/bzImage`) + per-arch (`boot/x86_64-linux/bzImage`) + generic-named (`boot/kernel`) + vmlinuz conventions
  3. Added `dumpIsoEntriesForDiagnostic()` helper — prints first 80 sorted ISO entries on audit failure so future regressions self-debug

B-0823 (substrate-layer follow-up):

  • Investigate which 25.11 path actually drives kernel + initrd locations from the diagnostic dump
  • Optionally tighten the any-of families OR keep lenient as defense-in-depth (per B-0818 precedent)

Test plan

  • build-iso passes on this PR's commit (the actual test)
  • BACKLOG.md drift check clean
  • Diagnostic dump appears in logs if a future audit fails

🤖 Generated with Claude Code

…ths via any-of family + diagnostic dump on failure

The build-iso job on commit 75eff94 (post-#5226 merge) failed the
Audit installer ISO content (cascade #4) step with 2 missing-path
assertions on boot/bzImage + boot/initrd. Same class as B-0818 (isoName)
— nixpkgs 25.11's image/images refactor changed where kernel + initrd
land in the ISO.

Two-layer fix:

1. THIS PR (fix-fwd) — convert kernel + initrd checks to REQUIRED_KERNEL_ANY
   + REQUIRED_INITRD_ANY any-of-family pattern mirroring REQUIRED_BOOTLOADER_ANY
   that survived the 24.11→25.11 channel bump cleanly. Candidate paths
   cover legacy (boot/bzImage) + per-arch (boot/x86_64-linux/bzImage) +
   generic-named (boot/kernel) + vmlinuz conventions.

2. Defense-in-depth — added dumpIsoEntriesForDiagnostic() helper that
   prints first 80 sorted ISO entries on audit failure. Same fix-pattern
   as the dep-pin-search-first-authority rule: future regressions
   self-debug rather than requiring log-archaeology.

3. B-0823 (substrate-layer follow-up) — investigate which 25.11 path
   actually drives kernel + initrd locations; optionally tighten the
   any-of families OR keep lenient as defense-in-depth (per B-0818
   precedent).

Composes with: B-0800 (nixpkgs 25.11 EOL recovery), B-0818 (sibling
isoName regression), B-0816 (cross-distro portability).

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 26, 2026 17:28
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack enabled auto-merge (squash) May 26, 2026 17:28
@AceHack AceHack merged commit d559799 into main May 26, 2026
34 checks passed
@AceHack AceHack deleted the otto-cli/fixfwd-iso-bootloader-paths-25-11-2026-05-26 branch May 26, 2026 17:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the installer ISO content audit to tolerate nixpkgs 25.11 kernel/initrd path layout changes and adds diagnostic output to make future audit failures easier to debug. Adds a new backlog row tracking the follow-up investigation and indexes it in docs/BACKLOG.md.

Changes:

  • Replace strict boot/bzImage + boot/initrd requirements with kernel/initrd “any-of” path families.
  • Add an ISO entry diagnostic dump on audit failure (first 80 sorted entries).
  • Add backlog row B-0823 and index it in docs/BACKLOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tools/ci/audit-installer-iso-content.ts Switch kernel/initrd checks to any-of families and emit a diagnostic ISO entry listing on failure.
docs/backlog/P2/B-0823-investigate-nixpkgs-25-11-iso-kernel-initrd-path-layout-tighten-audit-after-discovery-aaron-2026-05-26.md New P2 backlog row documenting the regression, fix-fwd, and follow-up investigation plan.
docs/BACKLOG.md Adds B-0823 to the P2 index.

Comment on lines +340 to +342
const proc = spawnSync("7z", ["l", "-slt", isoPath], { encoding: "utf8" });
if (proc.status !== 0) {
return ` (could not dump entries: 7z l failed with status ${proc.status})`;
Comment on lines +394 to +398
// Diagnostic dump (B-0823) — show what's actually in the ISO so the
// candidate any-of paths can be extended next time nixpkgs shifts.
process.stderr.write(`ISO entries (first 80 sorted) for diagnostic:\n`);
process.stderr.write(dumpIsoEntriesForDiagnostic(parsed.isoPath));
process.stderr.write("\n\n");

## Probable root cause

Same class as [B-0818](B-0818-investigate-isoname-mkforce-not-sticking-on-nixpkgs-25-11-aaron-2026-05-26.md): nixpkgs 25.11's image/images refactor changed where kernel + initrd land in the ISO. Per the [iso-image module source](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/installer/cd-dvd/iso-image.nix) the path includes `cfg.boot.kernelPackages.kernel` + `cfg.system.boot.loader.kernelFile` — historically resolved to `boot/bzImage` at top-level but may now include per-arch / store-hash variations.
This was referenced May 26, 2026
AceHack added a commit that referenced this pull request May 26, 2026
…5251)

* fix(postmerge-5235): 3 Copilot findings + workflow path-trigger fix

1. tools/ci/audit-installer-iso-content.ts — dumpIsoEntriesForDiagnostic()
   now reuses lsIso() instead of open-coding a duplicate spawnSync that
   was missing sonarjs/no-os-command-from-path suppression + maxBuffer +
   r.error handling. Single source of truth for the 7z invocation; safe
   on large ISOs; CI lint clean.

2. tools/ci/audit-installer-iso-content.ts — DIAG_DUMP_LIMIT constant
   used in both the header text + the function call so they never drift
   apart. Earlier draft hard-coded "first 80" in the header while the
   function param could be different.

3. docs/backlog/P2/B-0823-*.md — nixpkgs link pinned to nixos-25.11
   branch instead of master (master drifts; nixos-25.11 matches the
   channel the row investigates).

4. .github/workflows/build-ai-cluster-iso.yml — added
   tools/ci/audit-installer-iso-content.ts to BOTH pull_request.paths
   AND push.paths. This workflow was the reason the original #5235
   fix-fwd didn't actually trigger an ISO rebuild on merge — only
   audit-installer-substrate.ts (source-substrate audit) was in the
   path filter; audit-installer-iso-content.ts (post-build content
   audit) wasn't. Now it is. This PR's commit will trigger the workflow
   + the diagnostic dump on failure will surface the actual 25.11
   kernel/initrd paths.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(postmerge-5235): 2 Copilot threads — path normalization in diagnostic dump + clarify 7z PATH-resolution comment (#5251)

1. Line ~350: normalize leading slashes in diagnostic dump via the same
   .replace(/^\/+/, "") that auditIsoContent uses (line ~274). Otherwise
   failure messages report "boot/..." while dump shows "/boot/..." on
   7z versions that emit leading slashes — cross-reference broken for
   operators.

2. Line ~343: comment said "non-PATH-pinned 7z" which contradicted
   lsIso's deliberate PATH-resolved + sonarjs-suppression approach.
   Rephrased to explicitly state PATH-resolved.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants