fix(ci): shard package lists are truncated at a '#' — core-and-rest runs the whole workspace - #786
Open
ohdearquant wants to merge 1 commit into
Open
fix(ci): shard package lists are truncated at a '#' — core-and-rest runs the whole workspace#786ohdearquant wants to merge 1 commit into
ohdearquant wants to merge 1 commit into
Conversation
`packages:` in the test matrix is a folded scalar (`>-`), so every line in it
becomes part of one long single-line string, `#` included. That string is
substituted into the `run:` script by `${{ matrix.packages }}` before bash
parses it, and bash then reads the `#` as the start of a comment and discards
everything after it on that line.
For `core-and-rest` the comment sits on the second line of the block, so
cargo nextest run --no-fail-fast --workspace --exclude photonlayer-core ... (99 more)
is executed as
cargo nextest run --no-fail-fast --workspace
All 99 exclusions are dropped and the "catch-all" shard silently runs the
entire workspace, including every crate the other shards exist to hoist out of
it. That is the shard that has been hitting `timeout-minutes: 240`.
`core-and-rest-wasm` has the same construct but its comment is the last line
of the block, so only the comment itself is lost today; it is one reordering
away from truncating the package list.
Both comment blocks move above the `packages:` key, where YAML treats them as
comments. No package list changes.
Checked by loading the workflow and pasting each shard's resolved value into a
shell script the way the runner does: `core-and-rest` goes from 4 arguments to
202, `core-and-rest-wasm` is unchanged at 59, and no `packages` value contains
`#` any more.
ohdearquant
marked this pull request as ready for review
August 3, 2026 17:26
This was referenced Aug 3, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
packages:in thetestjob's matrix is a folded scalar (>-). YAML folds everyline of the block into one single-line string, and
#inside a folded scalar isordinary content, not a comment. That string is pasted into the step's script by
${{ matrix.packages }}before bash parses it, and bash then treats the#as thestart of a comment and drops the rest of the line.
core-and-restputs a comment on the second line of the block, so the intendedcommand
is actually run as
Every exclusion is dropped. The catch-all shard runs the whole workspace, including
all the crates that
research-nightly,core-and-rest-heavy,core-and-rest-wasm,ruvix,rvagentand the ml-research shards were created to hoist out of it. Thatis the shard sitting at
timeout-minutes: 240.core-and-rest-wasmhas the same construct, but its comment block is the last thingin the scalar, so today only the comment is lost. It is one reordering away from
truncating the package list the same way.
The change
Both comment blocks move above the
packages:key, where YAML reads them ascomments. The comment text is unchanged and no package list is edited.
How this was checked
Load the workflow, take each shard's resolved
packagesstring, and paste it into ashell script the way the runner does, then count the arguments bash actually produces:
After the change no
packagesvalue contains#.Running the restored
core-and-restargument list locally (cargo nextest run --no-fail-fastplus the 199 restored words) links 227 test binaries and executes 3121tests, so the exclusion list is accepted by cargo as written.
Note
Restoring the exclusions is necessary for that job to finish, but on its own it is not
sufficient: the job also stalls compiling
ruvector-filter's test target, which isaddressed separately in #784. Both are needed before
Tests (core-and-rest)reports areal result rather than a timeout.