Skip to content

tests: minimal test_deps for older standalone tests (batch 4 of 6, libidn–node-lts) - #1407

Merged
bryan-minimal merged 4 commits into
mainfrom
retest-minimal-deps-4
Nov 11, 2026
Merged

bryan-minimal merged 4 commits into
mainfrom
retest-minimal-deps-4

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Re-checks older standalone tests with minimal test_deps (batch 4 of 6, libidn–node-lts): 25 packages, 57 tests.

These tests were written with test_deps = [base]. base brings in bash, coreutils, grep, sed, gawk, diffutils, findutils, tar, gzip, xz, bzip2, file and tzdata, and through them zlib, zstd, libmagic, libstdc++ and more. That masks missing runtime libraries: a binary that needs an undeclared library still loads, because base put the library in the test closure. The smoke-test batches of 11-06/07 (#1364–#1368, #1372, #1373) used minimal deps and found several real missing runtime_deps this way.

What changed

Only test_deps. No test command was changed.

  • base is removed from every test's test_deps.
  • bash-bootstrap is added where a command runs /bin/bash or /bin/sh (its only runtime_dep is glibc).
  • The base tools a script actually calls are added explicitly: coreutils, grep, diffutils, findutils, gawk, tar, gzip. They were found by scanning each script's command positions, including multi-line m%"…"% scripts and #!/usr/bin/env shebangs.
  • Other non-base deps (toolchain, jdk, ocaml, git, and so on) are kept as they were.
  • let base = import … stays wherever base is still a build dep.

tests are not part of the spec hash, so the test_deps changes rebuild nothing. The exceptions rebuild because their runtime_deps change: mariadb (+ sed, for mysql_config), maven (+ coreutils, sed) and mono (+ bash, for its /bin/sh wrappers).

Expected failures

Some of these tests are expected to fail. That is the point of the PR. A failure with the minimal closure, typically exit 127 with empty stderr (a loader failure) or a missing shared library, shows a package with an UNDECLARED runtime_dep that base was hiding. Each one gets fixed in a follow-up commit on this branch by adding the missing runtime_deps (which does rebuild that package). A failure can also come from a script calling a tool the scan missed. Those get fixed by adding that tool to test_deps, never by adding base back.

The failures were deliberately not predicted ahead of time. This PR exists so the build-bot runs every test under the minimal closure.

Tests

package test before after
libidn to_ascii base, glibc-locale-c-utf8 bash-bootstrap, glibc-locale-c-utf8
libseccomp link_and_run base, toolchain bash-bootstrap, toolchain, coreutils, grep
libseccomp scmp_sys_resolver base bash-bootstrap
libxml2 parse_xml base bash-bootstrap, grep
libxslt transform base bash-bootstrap, grep
llvm versions base bash-bootstrap, grep
llvm hello_clang_lld base, glibc, gcc bash-bootstrap, glibc, gcc, grep
llvm-21 versions base bash-bootstrap, grep
llvm-21 hello_clang_lld base, glibc, gcc bash-bootstrap, glibc, gcc, grep
llvm-22 versions base bash-bootstrap, grep
llvm-22 hello_clang_lld base, glibc, gcc bash-bootstrap, glibc, gcc, grep
llvm-23 versions base bash-bootstrap, grep
llvm-23 hello_clang_lld base, glibc, gcc bash-bootstrap, glibc, gcc, grep
lsof smoke base bash-bootstrap, coreutils, grep
luajit smoke base bash-bootstrap
mailpit smtp_roundtrip base bash-bootstrap, coreutils, grep
mariadb smoketest base bash-bootstrap, grep
mariadb dev_files_are_usable base bash-bootstrap
maven version base bash-bootstrap, grep
maven repo_local_from_state_dir base bash-bootstrap, coreutils, grep
mcs mcs_version base bash-bootstrap, grep
mcs help base bash-bootstrap, grep
mcs offline_fails_closed base bash-bootstrap, coreutils, grep
menhir findlib_resolve base, ocaml, ocamlfind, toolchain, grep, coreutils bash-bootstrap, ocaml, ocamlfind, toolchain, grep, coreutils
mkcert smoke base bash-bootstrap
mono version_check base (none)
mono compile_hello_world base bash-bootstrap, coreutils, grep
mono compile_math base bash-bootstrap, coreutils, grep
mono compile_with_library base bash-bootstrap, coreutils, grep
mvnd mvnd_version base bash-bootstrap, grep
mvnd offline_validate base bash-bootstrap, coreutils, grep
neovim smoke base bash-bootstrap
netcat loopback base bash-bootstrap, coreutils
next cli base bash-bootstrap, grep
next swc_binary_ships base bash-bootstrap
next sharp_uses_system_libvips base bash-bootstrap
ngspice smoketest base bash-bootstrap, grep
ngspice rc_transient base bash-bootstrap, coreutils, gawk
node type_strip base bash-bootstrap, grep
node eval base bash-bootstrap, grep
node inline_eval base bash-bootstrap, grep
node npm_global_prefix base bash-bootstrap, grep
node emsign_roots_removed base bash-bootstrap, coreutils
node spki_blocklist_rejects_emudhra_intermediate base bash-bootstrap, coreutils
node system_ca_store_default base, ca-certificates bash-bootstrap, ca-certificates, coreutils
node-24 eval base bash-bootstrap, grep
node-24 inline_eval base bash-bootstrap, grep
node-24 npm_global_prefix base bash-bootstrap, grep
node-24 emsign_roots_removed base bash-bootstrap, coreutils
node-24 spki_blocklist_rejects_emudhra_intermediate base bash-bootstrap, coreutils
node-lts type_strip base bash-bootstrap, grep
node-lts eval base bash-bootstrap, grep
node-lts inline_eval base bash-bootstrap, grep
node-lts npm_global_prefix base bash-bootstrap, grep
node-lts emsign_roots_removed base bash-bootstrap, coreutils
node-lts spki_blocklist_rejects_emudhra_intermediate base bash-bootstrap, coreutils
node-lts system_ca_store_default base, ca-certificates bash-bootstrap, ca-certificates, coreutils

Also: a scmp_sys_resolver test that can fail

scmp_sys_resolver --help 2>&1 || true passed with nothing installed. It now resolves read for two fixed ABIs and requires x86_64=0 and aarch64=63 (libseccomp 2.6.1 src/syscalls.csv), the same answer on either build host. Bash builtins only.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated package test environments across several software packages to include the command-line tools they use.
    • Added runtime command-line utility availability for selected MariaDB, Maven, and Mono commands.
    • Refined a system-call resolution check for multiple processor architectures.

…bidn–node-lts)

Replace `base` in test_deps with bash-bootstrap plus the tools each script
actually calls, so the test closure no longer masks undeclared runtime libraries.
Test commands are unchanged; tests are not in the spec hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner November 8, 2026 21:27
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Package build specifications replace broad base test dependencies with explicit tool dependencies. MariaDB, Maven, and Mono add runtime dependencies. The libseccomp resolver test changes its check, and the Node test specification separates two test blocks.

Changes: Package dependency declarations

Layer / File(s) Summary
Native library and system-tool tests
packages/libidn, packages/libseccomp, packages/libxml2, packages/libxslt, packages/lsof, packages/luajit, packages/mkcert, packages/neovim, packages/netcat, packages/ngspice / build.ncl
Tests replace base with specific tools, including Bash bootstrap, grep, and coreutils. The libseccomp resolver test now checks that read resolves to syscall 0 on x86_64 and 63 on aarch64.
Compiler and managed-language tests
packages/llvm*, packages/menhir, packages/mcs, packages/mono / build.ncl
Tests declare Bash bootstrap and other required tools instead of base. Mono adds Bash as a runtime dependency.
Application tests and runtime dependencies
packages/mailpit, packages/mariadb, packages/maven, packages/mvnd / build.ncl
Tests declare specific tool dependencies. MariaDB adds sed as a runtime dependency; Maven adds coreutils and sed as runtime dependencies.
Node test dependencies
packages/node, packages/node-lts, packages/node-24 / build.ncl
Tests declare Bash bootstrap, grep, or coreutils instead of base. The Node specification separates the inline evaluation test from the npm global-prefix test.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: norrietaylor

Merge Risk: Minimal · up to e23bd

The change narrows test dependencies and adds runtime tools. No merge-blocking failure has been established.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: reducing test dependencies for older standalone tests. The batch label and package range provide scope.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between adc60ff and e23bd5f.

Files selected for processing: 25

  • packages/libidn/build.ncl
  • packages/libseccomp/build.ncl
  • packages/libxml2/build.ncl
  • packages/libxslt/build.ncl
  • packages/llvm-21/build.ncl
  • packages/llvm-22/build.ncl
  • packages/llvm-23/build.ncl
  • packages/llvm/build.ncl
  • packages/lsof/build.ncl
  • packages/luajit/build.ncl
  • packages/mailpit/build.ncl
  • packages/mariadb/build.ncl
  • packages/maven/build.ncl
  • packages/mcs/build.ncl
  • packages/menhir/build.ncl
  • packages/mkcert/build.ncl
  • packages/mono/build.ncl
  • packages/mvnd/build.ncl
  • packages/neovim/build.ncl
  • packages/netcat/build.ncl
  • packages/next/build.ncl
  • packages/ngspice/build.ncl
  • packages/node-24/build.ncl
  • packages/node-lts/build.ncl
  • packages/node/build.ncl

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

- maven: runtime_deps += coreutils, sed. bin/mvn computes MAVEN_HOME with
  `dirname` (and runs `uname`); without coreutils MAVEN_HOME became `/` and
  `mvn --version` printed no "Apache Maven". With a .mvn/jvm.config it also
  runs tr and sed.
- mono: runtime_deps += bash. /usr/bin/mcs is a #!/bin/sh wrapper, so
  `/bin/mcs --version` failed ENOENT (no interpreter) once base was gone.

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

@agent-137 agent-137 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review on Karl's behalf. This is a comment, not an approval. Nothing was built for it. The findings come from reading the declarations and fetching upstream sources, and each one says how it was checked. The CI rollup on this head is now FAILURE.

CI: minimal build FAILURE, completed 08:36Z. Its details URL is just https://minimal.dev, so GitHub doesn't show which package or test failed. All other checks pass. CodeRabbit was rate-limited and posted no review. The PR body says some failures are expected, but this one has to be identified and fixed on the branch before merge.

Should-fix

  • packages/mariadb/build.ncl:53 (runtime_deps) and :131 (dev_files_are_usable, test_deps = [bash-bootstrap]): /bin/mysql_config --cflags runs MariaDB's scripts/mysql_config.sh. build.sh keeps it deliberately as a /bin/sh script.
    • What breaks: that script calls sed throughout. It computes basedir with echo $me | sed …, and it builds $cflags through a for remove in …; do cflags=$(echo "$cflags" | sed …) loop. With sed missing, cflags comes out empty and --cflags prints nothing. The test then fails with "mysql_config --cflags names no directory containing mysql.h".
    • Why it passed before: base supplied sed. mariadb's runtime_deps are bash, glibc, ncurses, openssl, pcre2 and zlib, with no sed.
    • Fix: add sed to mariadb runtime_deps, the same way gradle, maven and pnpm got it in this series. Users running mysql_config hit this too.
    • Confidence: this comes from my knowledge of the upstream script, not from a build. It may be the minimal build failure; check the bot log.
    • Checked: the mariadb test commands, runtime_deps, and the build.sh comments around line 105 ("They are /bin/sh scripts").

Nit

  • PR body: "changes no package output" is no longer true. Commit cd95a45 changes runtime_deps for maven (coreutils, sed) and mono (bash), so both rebuild.

Verdict: needs changes (identify the failing build; mariadb sed).

bryan-minimal and others added 2 commits November 9, 2026 12:36
mysql_config / mariadb_config are /bin/sh scripts that derive basedir and
build --cflags through sed; without it --cflags prints nothing and
dev_files_are_usable fails. base used to supply sed (agent-137 on #1407).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…true`

`scmp_sys_resolver --help 2>&1 || true` passed with nothing installed.
The test now resolves `read` against two fixed ABIs and requires
x86_64=0 and aarch64=63 (libseccomp 2.6.1 src/syscalls.csv), which
exercises the library's syscall tables and gives the same answer on either
build host. Bash builtins only, so test_deps stays [bash-bootstrap].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 8cbc665 Nov 11, 2026
15 checks passed
@bryan-minimal
bryan-minimal deleted the retest-minimal-deps-4 branch November 11, 2026 00:54
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.

3 participants