Repository navigation
feat(xtask): #1037 ci reports the machine, GPU adapters and skipped tests - #1135
Merged
Merged
Conversation
libtest has no skipped status and hides the output of passing tests, so a test that returns early without a GPU, a corpus file, a craft-fonts face or a model passed silently. `lightcraft-testkit` (the testkit slot the layering table already reserves, dev-dependency only, std only) adds `skip!(Need, "reason")`: it prints the note as before and, when LIGHTCRAFT_SKIP_LOG names a file, appends one JSON line (need, reason, test, binary, file:line). Plain `cargo test` is unchanged. The 61 existing skip sites use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…skipped tests `cargo xtask ci` points each test step at target/ci/skips-<step>.jsonl, then probes the machine: OS, CPUs, RAM, toolchain, corpus and craft-fonts, and the GPU through the ignored `gpu_probe` test of lightcraft-gpu (run right after the workspace tests with --workspace, so it reuses their build; xtask stays without wgpu). The run ends with the skips grouped by need and reason and writes target/ci/report.json (schema 1: commit, dirty flag, machine, capabilities, step results and times, skips) and target/ci/summary.md for a PR (`--summary-md` prints it). `--hardware` also runs the lightcraft-gpu tests once per backend that has a hardware adapter. Nothing is uploaded; reasons are cut free of the workspace root and home directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 9 tasks
Member
|
Thank you @THEtheChad! This landed on main in integration batch 37 (#1852), rebased onto main after the previous batches. Your If you haven't already, please join our Discord: https://discord.gg/artcraft. We'd love to have you there. |
chrisgleissner
pushed a commit
to chrisgleissner/lightcraft
that referenced
this pull request
Oct 15, 2026
# Conflicts: # xtask/src/main.rs
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.
Refs #1037
What and why
Contributors and agents run
cargo xtask cibefore every commit on very different machines, but a green run says nothing about what it actually tested: libtest has no "skipped" status and hides the output of passing tests, so the CPU/GPU equivalence tests, the raw corpus tests and the CJK font tests pass silently when the GPU, corpus or fonts are missing. This PR makescargo xtask cireport what the machine offered and which tests skipped, and writes a small report a contributor can paste into a PR. Test tooling only: no change to the pipeline, the GPU adapter policy or hosted CI.lightcraft-testkit(crates/testkit, thetestkitslotxtask/src/layers.rsalready reserves; dev-dependency only, std only).lightcraft_testkit::skip!(Gpu, "no GPU adapter ({why})")prints the note as before and, whenLIGHTCRAFT_SKIP_LOGnames a file, appends one JSON line (need, reason, test name, test binary,file:line). Plaincargo testis unchanged. The 61 existingeprintln!skip sites use it (GPU, corpus, craft-fonts, YuNet/SAM 3 models,LC_PREVIEW_RAW, system ICC profiles).xtask ci: OS and version, arch, CPUs, RAM, toolchain, git commit and dirty flag, pinned corpus samples present,CRAFT_FONTS_DIR. The GPU part comes from an ignoredgpu_probeintegration test incrates/gpu, run right after the workspace test step with--workspace, so it reuses that build (1.2 s here) and xtask stays std + serde_json, without wgpu. It reports the device the pipeline picks or why not, and every adapter per backend (software ones too), one backend per process so a driver that crashes while it is enumerated (v0.2.0 crashes at startup on Intel UHD 630 (access violation in igvk64.dll, Vulkan driver) #136) costs only its own entry. By default it probes only the backends the app itself loads.target/ci/report.json(schema 1: commit, dirty flag, machine, capabilities, each step's result and time, skips) and a summary printed afterCI summary, with the skips grouped by need and reason. The report holds no host name, user name or absolute path; nothing is uploaded.target/ci/summary.md(also printed with--summary-md): a Markdown block for a PR description, like the one below.--hardware: after the workspace tests, runscargo test -p lightcraft-gpu --features denoiseonce per backend with a hardware adapter, through the existingLIGHTCRAFT_GPU_BACKENDoverride.docs/architecture.md(quality gates, revision history).This machine's report
cargo xtask ci --summary-md: pass at 76b5377 (with uncommitted changes)179 tests skipped (corpus 130, gpu 24, fonts 16, model 8, system 1)
corpus::corpus_dngs_carry_profile_lookslightcraft_engine::camera_preview::tests::corpus_arw_with_a_lens_corrected_preview_gets_a_camera_looklightcraft_engine::camera_preview::tests::corpus_colour_precedencelightcraft_engine::camera_preview::tests::corpus_colour_precedencecorpus::corpus_sony_black_levels_sit_at_the_data_floorcorpus::corpus_sony_black_levels_sit_at_the_data_floorcorpus::corpus_sony_a7cm2_codingscorpus::corpus_sony_a7cm2_codingslightcraft_engine::camera_preview::tests::corpus_a7cr_codings_get_a_camera_looklightcraft_engine::camera_preview::tests::corpus_a7cr_codings_get_a_camera_looklightcraft_engine::camera_preview::tests::corpus_a7cr_codings_get_a_camera_lookcorpus::corpus_sony_a900_packed12equivalence::a_window_does_not_keep_the_whole_source_on_the_devicelightcraft_gpu::nn::tests::a_runner_serves_many_tiles_from_many_threadslightcraft_engine::export::tests::a_batch_reports_a_gpu_fallback_on_the_file_it_hitshutdown::nothing_renders_on_the_gpu_once_the_process_is_endinglightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_engine::export::tests::vertical_watermarks_keep_combining_marks_in_one_celllightcraft_engine::export::tests::biz_ud_vertical_watermarks_place_punctuation_at_the_top_rightlightcraft_engine::export::tests::japanese_watermarks_support_vertical_columnslightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_ui_egui::theme::tests::thai_face_is_a_fallback_in_every_ui_family_when_craft_fonts_carry_onelightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_ui_egui::i18n::tests::catalog_characters_are_paintablelightcraft_engine::tests_face_models::detect_replaces_only_earlier_detections_and_is_one_undo_steplightcraft_engine::cmd::face_recognize::imp::tests::only_the_background_scan_looks_for_faces_and_only_in_photos_without_anyreference::matches_referencecorpus::system_icc_profiles(The "uncommitted changes" are the one-line clippy fix from #997, see below; the committed tree is otherwise identical.)
Test plan
lightcraft-testkitunit tests: JSON line format and escaping, cargo's binary hash stripped, eight threads appending at once give eight whole lines, an unwritable log never fails a test.prepareclears only the previous run's files; the probe asks only the pipeline's backends by default and every compiled backend with--hardware, and a crashing backend is recorded as an error; text and Markdown summaries (pipe escaping, durations); "no skips" is not claimed when the test step never ran.cargo xtask layers: testkit is a dev-dependency everywhere.cargo xtask ci(rustc 1.99.0, WSL2): green; the summary above lists 179 skips.Notes
crates/pipeline/src/spots.rs:250(chunks_exact_to_as_chunks) failsclippy -D warningson origin/main. Issue #989: clippy 1.99, fill_box reads its buffer with as_chunks::<3>() (item 4) #997 fixes it; I applied that one-line fix locally, uncommitted, to get the rest ofcito run. It is not part of this PR.ci/platform-tests, a separate PR): it addsLIGHTCRAFT_GPU_ALLOW_SOFTWAREtoctx.rsand editscrates/gpu/tests/equivalence.rs. This PR only changes the skip line of that file'sgpu()helper; the two branches merge cleanly (git merge-tree), and each applies on its own to origin/main. With both merged, the probe reports software adapters the opt-in would accept, and the equivalence skips disappear from the report on CI runners.🤖 Generated with Claude Code