A website CI scan stopped with an executable format error. The failure appeared while the job was trying to run the tool it had downloaded. The scan result therefore could not tell us anything about the files the tool was meant to check. The change author traced the problem to a download that always selected the x64 package, even when the job ran on an Arm machine. The error is in the CI record. The architecture mismatch is the author's diagnosis, and the error message by itself does not identify which file or platform assumption was wrong.

The workflow had specified a tool version, which is one choice a download needs to make. The other choice is which build of that version to fetch. A release with multiple platform packages can assign one version to binaries that contain different machine instructions. A pin can select the intended release while still pointing to the wrong package for the machine that will execute it. In this case the change kept the version fixed and moved the platform choice into a step that looks at the machine's reported architecture.

That step translates between two naming schemes. The operating system can report x86_64, while a publisher can use x64 in the asset name. The selector maps the reported value to the suffix used by this release. It also accepts two spellings for the Arm variant. Both spellings lead to the same suffix. The mapping is about which file to request. The download still has to exist at the resulting location, and the file it returns has to be suitable for the job.

We tested the selector locally by extracting its shell branch from the merged revision. A stub supplied each architecture label in place of the machine query, so we could exercise the branches without changing the machine running the test. The x86_64 fixture selected x64. The aarch64 and arm64 fixtures both selected arm64. All three returned exit zero. A fourth fixture supplied riscv64, which is outside this selector's supported choices. It printed an unsupported-architecture message and exited one. That case checks whether a label outside the mapping stops selection before a download is chosen.

These four cases answer a narrow question. Given one of those input strings, does the shell choose the expected suffix or report an unsupported architecture? They do not check the remote release, unpack an archive, or run any of the binaries. An incorrect publisher suffix could pass every fixture and still yield a missing download. A file with the correct name could also contain an executable that the machine cannot run. Those are different failures, and testing the string mapping alone leaves them open. For example, if a publisher changes its asset naming between releases, the same machine label can require a different suffix when the version pin moves.

The workflow also calls the downloaded tool's version command before using it for the scan. That is a separate point at which it asks the downloaded program to execute. If the command succeeds, the program has done enough to report a version in that environment. That check alone cannot establish that the scan ran or what it found. The CI record provides a separate observation. The scan job passed on the pull request head and on the merged revision. We did not independently verify the architecture of those passing runs, so they do not establish a before-and-after test on the same machine or coverage across both platforms.

When a tool is fetched by CI, I want the setup step to make its supported choices visible. Here each recognized label has an explicit destination, and an unrecognized label yields an error before the selector offers an asset name. If a new machine reports a label the workflow has never seen, the failure then points to the decision that needs attention. Adding support would still require checking what the publisher ships for that platform and exercising the actual program there. A passing selector test can explain the choice the workflow made. The execution result is the evidence for what happened after that choice.

← All engineering articles