Skip to content

test(stack): lock source probes to two named architectures - #16

Merged
HaoZeke merged 2 commits into
mainfrom
fix/stack-arch-probe-two-arches
Nov 3, 2026
Merged

HaoZeke merged 2 commits into
mainfrom
fix/stack-arch-probe-two-arches

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

stack arch --probe-sources and two --arch values

What and why

stack arch --probe-sources resolves each planned easyconfig's source_urls and sources on the families --arch names, then probes those URLs.
The suite locked one --arch, and the default of x86_64, aarch64, and riscv64 when --arch is absent.
It did not lock two families.
That pair is the comparison that decides the class: a miss is arch-missing when the other named family fetched the same source slot, and unreachable when neither did.
A family that was not named must not enter that comparison.

The probe already used the families parsed from --arch.
What was open was a regression that passes two of them, plus the how-to, which showed one family and all three and did not quote a pair.

Before and after

On the Kaleido fixture, a local server has only kaleido-0.2.1-manylinux1-x86_64.whl.
tests/source_probe.rs and tests/doc_walkthrough.rs copy the tree, substitute that server for __BASE_URL__, and run eb-stack.

--arch x86_64 --arch aarch64 --probe-sources exits 1 and prints:

Kaleido-0.2.1-GCCcore-15.2.0.eb source kaleido-0.2.1-manylinux2014-aarch64.whl is arch-missing on aarch64: <base>/kaleido-0.2.1-manylinux2014-aarch64.whl (attempt 1/3 HEAD=status:404 RANGE=status:404)
parse_failed=0 unsupported=0 flagged=0 source_unreachable=0 source_arch_missing=1

The text does not contain riscv64.
--arch aarch64 --arch x86_64 prints the same text.
--arch x86_64/amd/zen4 --arch aarch64/neoverse_v1 prints the same text.
eb_stack_arch with "arch": ["x86_64", "aarch64"] returns that finding line and isError: true.

--arch aarch64 --arch riscv64 --probe-sources exits 1.
Both wheels are unreachable, the count line is source_unreachable=2 source_arch_missing=0, and the text does not contain x86_64.
eb_stack_arch returns those two lines.

--arch aarch64 --arch aarch64/neoverse_v1 matches --arch aarch64 alone: one unreachable line and source_unreachable=1.

docs/orgmode/howto/arch-unsupported.org now quotes the x86_64 plus aarch64 run.
The command reference, the --probe-sources help, and the eb_stack_arch description say two names are compared only with each other.
llms-full.txt matches that manual.

Tests

  • Formatting: cargo +stable fmt --all --check exited 0.
  • Lints: cargo +stable clippy --locked --all-targets -- -D warnings exited 0 (Finished dev profile).
  • Full suite: cargo +stable test --locked --all-targets -- --test-threads=8 exited 0, with 93 suites, 1504 passed, 0 failed, 10 ignored.
  • Packaging: cargo +stable package --locked exited 0, packaged 1532 files, 12.6MiB (5.6MiB compressed), and finished the verify compile.
  • Hooks: uvx prek run -a exited 0.
    Trailing whitespace, end of file, YAML, Tom's Obvious Minimal Language (TOML), merge conflicts, large files, private keys, and codespell passed.
  • New and touched tests: stack_arch_probe_with_two_arches_compares_only_that_pair, the_source_probe_howto_quotes_the_output_it_prints, and llms_txt_matches_the_org_manual passed.

Toolchain: cargo +stable, rustc 1.99.1.

Repro

cargo test --locked --test source_probe -- stack_arch_probe_with_two_arches_compares_only_that_pair
cargo test --locked --test doc_walkthrough -- the_source_probe_howto_quotes_the_output_it_prints

The how-to command, on a copy of the fixture whose __BASE_URL__ is that server:

eb-stack stack arch \
  --arch x86_64 \
  --arch aarch64 \
  --easystack tests/source_probe_fixtures/easystacks/kaleido.yml \
  --easyconfigs tests/source_probe_fixtures/easyconfigs \
  --probe-sources

Note

Medium Risk
Changes core dependency-order graph construction for a new CLI/MCP path; incorrect installed matching could omit required builds, while probe changes are mostly documented regression tests.

Overview
Adds stack order --installed so build orders skip modules already on the site (module list or Lmod tree, same inventory as stack gap --installed) and do not walk their dependencies. --filter-deps still runs first; stdout prints installed=N; eb_stack_order exposes the same installed input and count.

The build-order graph walk is refactored through build_order_against_installed / graph_from_keys_against_installed, with unit tests for installed leaves and GCC-family resolution.

Separately, docs, CHANGELOG, and tests lock stack arch --probe-sources when two --arch families are named: misses are arch-missing only if the other probed family fetched that source slot, otherwise unreachable, without consulting families left off the command.

Reviewed by Cursor Bugbot for commit 7e8f8d3. Bugbot is set up for automated code reviews on this repo. Configure here.

`stack order` walked every dependency the roots pin, including modules already on the machine.
`--installed` now stops that walk at each listed module and leaves that module and its own dependencies out of the order.
`--filter-deps` still drops dependencies first, and the modules that remain follow the synthetic GCC-family hierarchy.
A single `--arch` was the only probe the suite locked.
Two flags were free to consult the third default family again: a wheel neither named family can fetch would come back `arch-missing` when that third family can fetch it, and `unreachable` only for one `--arch`.

The new test probes x86_64 with aarch64, and aarch64 with riscv64, on the Kaleido fixture.
The first pair reports the aarch64 wheel as `arch-missing` and does not mention riscv64.
The second reports both wheels as `unreachable`.
Flag order, a CPU target, and a family named twice stay on that same set.
`eb_stack_arch` returns the same lines.
The how-to quotes the pair.
Three texts now say that two names are compared only with each other: the command reference, the `--probe-sources` help, and the tool description.
@HaoZeke
HaoZeke merged commit 155119f into main Nov 3, 2026
19 checks passed
@HaoZeke
HaoZeke deleted the fix/stack-arch-probe-two-arches branch November 4, 2026 09:44
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.

1 participant