ci: the standards build builds the workspaces a change touches #251

Merged
dcharlot merged 2 commits from ci/build-what-changes into main 2026-10-14 11:10:50 -04:00
Owner

The standards build now builds the workspaces a pull request touches, instead of all 17 for every pull request.

Why

standards-build.yml built and tested every Rust workspace of the tree on every pull request: 9 legs on the one x86_64 runner, 7 on linux-arm64, one on macos, plus the macOS energy job. A change to one standard rebuilt all the others, though none of their inputs had changed. When measured, the x86_64 runner had 90 jobs waiting, most of them these builds.

What changes

  • A plan job (on linux-arm64, seconds) runs scripts/standards-touched.py on the pull request's own diff (base...head). It selects each workspace whose inputs the change touches:
    • its own area, the first component of its directory (all of jcp/ for jcp/jcp-rs, with its conformance data and documents);
    • the areas of every crate it depends on by path, followed transitively;
    • any file outside those areas that its Rust sources name with a relative path;
    • anything every leg shares: this workflow, the planning script, the toolchain pin, the cargo configuration. A change to any of these builds everything.
  • The build matrix is the entries the plan selects (fromJSON(needs.plan.outputs.include)). The workspace list moves into the plan job, one - { ... } line each, unchanged, with its comments.
  • The macOS energy job runs when the change touches a workspace whose energy backend it tests.
  • A push to main builds everything, as before. So does anything the plan cannot determine: an unreadable diff or an unknown commit. A wrong "skip" would silently drop a test, while a wrong "build" only costs runner time, so the plan guesses toward building.
  • The plan reads the pull request's diff, not the push delta, so merging main into a branch does not rebuild everything.

Evidence

  • Last forty merges into main. About half were WAI-only changes, and those would have built none of the 17. The others built between one and ten; a change under jcp/ builds eight, because jcp is a path dependency of most workspaces.
  • The forge builds a matrix from a previous job's output. A probe in ci-test showed it creates the legs a plan job lists, and no job at all for a job whose if: is false.
  • scripts/standards-touched-selftest.sh runs in the plan job. It builds a scratch repository and checks each case: a file in no area builds nothing; a path-dependency's area builds its dependents; a file a workspace's source includes builds that workspace; the workflow or the script builds everything; a push builds everything; an uncomputable diff builds everything; emitted entries keep their booleans (z3: true) and quoted values.
  • This pull request touches the workflow, so its own run builds all 17 through the new plan. That exercises the full path end to end.
  • The concurrency check passes.

🤖 Generated with Claude Code

The standards build now builds the workspaces a pull request touches, instead of all 17 for every pull request. ## Why `standards-build.yml` built and tested every Rust workspace of the tree on every pull request: 9 legs on the one x86_64 runner, 7 on `linux-arm64`, one on `macos`, plus the macOS energy job. A change to one standard rebuilt all the others, though none of their inputs had changed. When measured, the x86_64 runner had 90 jobs waiting, most of them these builds. ## What changes - **A `plan` job** (on `linux-arm64`, seconds) runs `scripts/standards-touched.py` on the pull request's own diff (`base...head`). It selects each workspace whose inputs the change touches: - its own area, the first component of its directory (all of `jcp/` for `jcp/jcp-rs`, with its conformance data and documents); - the areas of every crate it depends on by path, followed transitively; - any file outside those areas that its Rust sources name with a relative path; - anything every leg shares: this workflow, the planning script, the toolchain pin, the cargo configuration. A change to any of these builds everything. - **The build matrix** is the entries the plan selects (`fromJSON(needs.plan.outputs.include)`). The workspace list moves into the plan job, one `- { ... }` line each, unchanged, with its comments. - **The macOS energy job** runs when the change touches a workspace whose energy backend it tests. - **A push to main builds everything**, as before. So does anything the plan cannot determine: an unreadable diff or an unknown commit. A wrong "skip" would silently drop a test, while a wrong "build" only costs runner time, so the plan guesses toward building. - The plan reads the pull request's diff, not the push delta, so merging main into a branch does not rebuild everything. ## Evidence - **Last forty merges into main.** About half were WAI-only changes, and those would have built none of the 17. The others built between one and ten; a change under `jcp/` builds eight, because jcp is a path dependency of most workspaces. - **The forge builds a matrix from a previous job's output.** A probe in `ci-test` showed it creates the legs a plan job lists, and no job at all for a job whose `if:` is false. - **`scripts/standards-touched-selftest.sh` runs in the plan job.** It builds a scratch repository and checks each case: a file in no area builds nothing; a path-dependency's area builds its dependents; a file a workspace's source includes builds that workspace; the workflow or the script builds everything; a push builds everything; an uncomputable diff builds everything; emitted entries keep their booleans (`z3: true`) and quoted values. - **This pull request touches the workflow**, so its own run builds all 17 through the new plan. That exercises the full path end to end. - The concurrency check passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: the standards build builds the workspaces a change touches
Some checks failed
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 4s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 1m3s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 1m15s
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Successful in 47s
standards workspaces build + test / map-rs (map-conformance, map/map-rs, map-rs, linux-arm64) (pull_request) Successful in 36s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 37s
standards workspaces build + test / aac-rs (aac-conformance, aac/aac-rs, aac-rs, linux-arm64) (pull_request) Successful in 5m26s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 5m51s
standards workspaces build + test / openpay (openpay, openpay, linux-arm64) (pull_request) Successful in 2m13s
standards workspaces build + test / macOS energy backends (pull_request) Failing after 22m22s
lockfiles / every Cargo.lock is current (pull_request) Has been cancelled
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Has been cancelled
standards workspaces build + test / arl-rs (arl/arl-rs, arl-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / eoc-rs (eoc/eoc-rs, -p eoc-meter --features cuda, eoc-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (joulehook/joulehook-rs, joulehook-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (sense/sense-rs, sense-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (smart-byte/smart-byte-rs, smart-byte-rs, linux) (pull_request) Has been cancelled
tests in CI / every test file is run by a job or listed with its reason (pull_request) Has been cancelled
workflow hygiene / every workflow supersedes its own queue (pull_request) Has been cancelled
9edc1ad2aa
Every pull request built and tested all 17 standards workspaces, whatever it
changed, and the one x86_64 runner's queue filled with builds no change could
affect (90 jobs waiting when measured). A plan job on linux-arm64 now reads the
pull request's own diff and selects the workspaces it touches: a workspace's
own area, the areas of everything it depends on by path, any file outside
them its sources name, and everything every leg shares (this workflow, the
planning script, the toolchain pin, the cargo configuration). The build matrix
is the entries it selects; the macOS energy job runs when an energy-metering
workspace is touched. A push to main builds everything, and so does anything
the plan cannot determine.

Over the last forty merges into main, the WAI-only changes, about half,
would have built none of the 17; the rest built between one and ten. A probe
in ci-test confirmed this forge builds a matrix from a previous job's output
and creates no job for an empty list. A self-test runs in the plan job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge main into ci/build-what-changes
Some checks failed
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Successful in 3s
lockfiles / every Cargo.lock is current (pull_request) Successful in 52s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 9s
no-vanity-metrics / WAI public text names no comparison (pull_request) Successful in 7s
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 5s
no-vanity-metrics / No new orphan source files (pull_request) Successful in 12s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 9s
tests in CI / every test file is run by a job or listed with its reason (pull_request) Successful in 9s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 12s
WAI section references / cited sections exist (pull_request) Successful in 24s
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Has been cancelled
standards workspaces build + test / aac-rs (aac-conformance, aac/aac-rs, aac-rs, linux-arm64) (pull_request) Has been cancelled
standards workspaces build + test / arl-rs (arl/arl-rs, arl-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / eoc-rs (eoc/eoc-rs, -p eoc-meter --features cuda, eoc-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (joulehook/joulehook-rs, joulehook-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / map-rs (map-conformance, map/map-rs, map-rs, linux-arm64) (pull_request) Has been cancelled
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Has been cancelled
standards workspaces build + test / openpay (openpay, openpay, linux-arm64) (pull_request) Has been cancelled
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (sense/sense-rs, sense-rs, linux) (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (smart-byte/smart-byte-rs, smart-byte-rs, linux) (pull_request) Has been cancelled
9f7516c539
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!251
No description provided.