Commit Graph
198 Commits
Author SHA1 Message Date
aiongg 519a0c22a3 Engine split step 3: top crate with the wrapper Session
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).

The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.

Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.

Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.

Part of #15710
2026-11-22 19:29:06 +00:00
aiongg cf2e416e31 Merge pull request #15914 from aiongg/ci-pin-toolchain
ci: pin Rust, stop cache evictions, corpus tests in the gate, fewer tests per PR
2026-11-22 12:03:37 -05:00
aiongg 3e05a3747b Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	.github/workflows/ci.yml
2026-11-22 15:29:46 +00:00
David Mann 9eaa64ec2e Merge branch 'main' into fix/15711-record-bootstrap-feature-set 2026-11-22 13:24:03 +01:00
aiongg 44ac69dede Merge upstream/main into ci-pin-toolchain; gate runs when platforms fails, cold cache clear keeps newer entries, panic_hunt timeout 2026-11-22 05:59:39 +00:00
David Mann eb6213cea3 Merge PR #15192: fix(xtask): reject unknown corpus arguments before fetching
Conflict: both sides added tests at the top of xtask/src/corpus/tests.rs; kept both.
2026-11-22 00:29:42 +01:00
David Mann 0ba8169821 Merge PR #15825: fix(xtask): reject device names in PSD recipe IDs 2026-11-22 00:27:47 +01:00
David Mann 3987eaf4df Merge PR #15668: fix(xtask): reject malformed PNG icon headers 2026-11-22 00:27:12 +01:00
David Mann 45f0e7350a Merge PR #15222: fix(xtask): include multiline translation literals in reports 2026-11-22 00:27:05 +01:00
David Mann e0505bcf47 Merge PR #15203: fix(xtask): report invalid performance baselines 2026-11-22 00:26:55 +01:00
David Mann 0b589b7ddd Merge PR #15181: fix(xtask): skip linked source entries in statistics 2026-11-22 00:26:17 +01:00
David Mann 57571a2ba0 Merge PR #15166: fix(xtask): require PIXLS checksum pins before fetching 2026-11-22 00:26:08 +01:00
David Mann 7d4de61ea8 Merge PR #15144: fix(xtask): preserve inline comments around workspace versions 2026-11-22 00:25:46 +01:00
David Mann e781a2514a Merge PR #15846: fix(xtask): include current ATN command paths in the corpus gate 2026-11-21 17:24:16 +01:00
FredApps b3f6f32103 ci: record the active xtask bootstrap feature set 2026-11-20 22:50:53 +01:00
FredAppsandFredApps c0771fe72b Build the CI archive driver without framework-only lint dependencies (#15963)
* Use the document mutator in the damage-history fixture

* Compile the archive driver without framework-only lint dependencies

---------

Co-authored-by: FredApps <[email protected]>
2026-11-21 00:07:08 +07:00
Mex 9de2619128 test(xtask): exclude similarly named ATN sibling paths 2026-11-20 15:46:09 +01:00
Mex 2a3fae44ef fix(xtask): limit ATN corpus trigger to real module paths
Updated the CRITICAL paths to include a trailing slash for consistency and modified the is_critical function to check for a specific path.
2026-11-20 15:45:42 +01:00
aiongg d3bed32270 xtask: the scorecard names corpus directories under corpus/, as the corpus tests and pins do 2026-11-20 08:01:19 +00:00
aiongg d110e35a0f xtask: the corpus build switch is an option, so the unit tests do not depend on the gate's environment
Part of #15711
2026-11-20 04:52:54 +00:00
aiongg f08d65ac69 ci: the Linux gate builds the real-file corpus tests in and its shards fetch the corpora
Part of #15711
2026-11-20 04:16:53 +00:00
FredApps 4dc260d9e8 Check Cargo artifact freshness in fixture 2026-11-20 04:51:55 +01:00
FredApps fc17b2d5fa Select fixture profile under nextest CI 2026-11-20 03:03:06 +01:00
FredApps 38826a67de Exercise the binaries-only listing used for planning 2026-11-20 02:47:22 +01:00
FredApps b61d81bb08 Keep unrecorded listing path unchanged and verify real output 2026-11-20 02:45:36 +01:00
FredApps 5c34f6dbef Reject malformed Cargo messages while draining output 2026-11-20 02:41:56 +01:00
FredApps 3512a47d91 Record build units during shard planning 2026-11-20 02:39:21 +01:00
aiongg 4d91c2ec04 Merge pull request #15826 from aiongg/ci-shard-archives
CI: one test archive per shard, balanced by recorded test times
2026-11-19 20:03:50 -05:00
Mex 3c1043a87b test(xtask): cover ATN corpus trigger paths
Exercise the ATN root and nested modules, all existing corpus prefixes, and unrelated engine paths.
2026-11-19 23:07:29 +01:00
aiongg 3f28dd6751 CI shards: check the plan against the archive and mode; times only from full runs
- A shard fails unless its plan's GPU mode matches --gpu/--no-gpu and its archive holds exactly the
  binaries its plan names; a single-archive build deletes any shard plan left in the target dir.
- Shard runs pass --no-tests warn: a shard may hold no runnable test, and the build job's check
  already guarantees that every test runs once.
- scripts/ci-test-times.py takes only main's push and nightly runs (pull requests leave packages
  out on Windows) unless given --force, and names binaries a refresh drops.
- target_dir() moves from perf.rs to main.rs for both users.
2026-11-19 22:06:59 +00:00
Mex 1fba8d090f fix(xtask): run corpus tests for changes to the current ATN module
Point the changed-path trigger at the current engine command module and share the predicate with regression tests.
2026-11-19 23:06:47 +01:00
aiongg aac8e37bec CI: one test archive per shard, balanced by recorded test times
The gate's build job writes one nextest archive per shard (craft-common-actions gate.yml
shard-archives), so each shard downloads only the test binaries it runs instead of the whole
2.4-2.6 GB archive.

`cargo xtask ci archive` builds and lists the tests once, then plans the shards
(xtask/src/shards.rs): whole binaries go to the lightest shard, heaviest first, by the times in
.config/ci-test-times.tsv; a binary heavier than half a shard's share is split by test filter along
its module tree, and its executable goes into each archive that runs part of it. On Linux shard 1
takes every binary with gpu-group tests. The build checks that every test runs on exactly one shard,
writes the plan into the target directory, which every archive carries, and archives each shard
with `cargo nextest archive -E`. A shard runs `xtask ci tests --shard <k>` with its part of the
plan; the slice partition is gone.

scripts/ci-test-times.py refreshes the times file from a CI run's shard logs; a missing or stale
row only costs balance.
2026-11-19 20:47:26 +00:00
aiongg a92d36e8f9 xtask: record the build units of the gate's test and doctest builds for the cache trim
In a gate leg that saves the dependency cache, craft-common-actions' rust-cache action names a
file in CRAFT_CACHE_UNITS, and cache-trim deletes every unit of the target directory the file
does not name before the entry is saved. ci archive (and the cargo test --no-run build) and ci
doctest print Cargo's JSON messages (json-render-diagnostics: diagnostics stay on stderr) and
append them to the file; ci archive first records xtask's own build, which cargo xtask builds
before xtask can record anything.
2026-11-19 20:47:25 +00:00
Mex 1008be1a69 fix(xtask): reject device names in PSD recipe IDs
Reject reserved Windows device names case-insensitively before the runner creates output artifacts. Cover all reserved IDs and ordinary near matches through recipe schema validation. Fixes #15822.
2026-11-19 21:41:36 +01:00
David Mann 363f37f6c8 Merge pull request #15685 from davidmann4/integration-batch-21
Integration batch 21: EPIC-UI-REWORK PRs green on main (WIP)
2026-11-19 17:17:24 +01:00
aiongg 9d9b465e08 Merge pull request #15712 from aiongg/ci-build-once
ci: build the tests once per OS, keep compiled workspace crates, balance the shards
2026-11-19 10:08:34 -05:00
David MannandClaude Opus 5.5 252773ce8c Address CodeRabbit review: stale transform picture, setup panics, UI feature check
- A pass that cancels Free Transform no longer hands the canvas the captured
  preview picture, so the moved pixels are not painted over the restored
  document in that frame (new GPU/CPU canvas test fails without it).
- The preview canvas test skips only when the GPU harness fails before the
  app callback; a panic in the app's own setup now fails the test.
- The layering check treats craft's keymap-egui as a UI feature and counts
  dependency features turned on by a crate's own [features] table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 13:35:20 +01:00
FredApps 44a50908d9 Isolate exhaustive oil rounding proof 2026-11-19 13:19:45 +01:00
aiongg c9746558d7 ci: build the tests once per OS, keep compiled workspace crates, balance the shards
- Both gate calls build the tests once into a nextest archive (cargo xtask ci archive); the
  shards run it, and the build job runs the doctests after the upload.
- The Linux gate keeps the compiled workspace crates in a rolling cache entry
  (cache-workspace-crates). A nightly cold build is its safety net; gate-cache-prune keeps the
  newest entry. test (without heif) restores that entry.
- The shards split the tests with nextest's slice partition, which spreads the slow modules:
  on one main run's times the non-GPU shards go from 728/493/523 s (hash) to about 602/506/625 s.

Fixes #15702
2026-11-19 08:06:05 +00:00
aiongg ec40c48cc2 ci: build the tests once per OS and run the shards from a nextest archive 2026-11-19 06:34:17 +00:00
David MannandClaude Opus 5.5 eb55919530 Integration: #15608: craft counts as a UI dependency only with its UI features (#15467)
Listing craft by name in UI_CRATES flagged photocraft-algo, -io, -text and -engine, which use the facade's non-UI
parts (imaging, fonts, keymap, settings), so cargo xtask layers failed on the workspace. The facade brings the craft UI
framework (craft-ui, egui) only through `ui` and the features that turn it on (`ui-*`, `screen-testing`), so the
guard now reads each dependency's declared features from cargo metadata and flags craft below L6 only with one of
those. Tests: craft with ui, ui-app or screen-testing below L6 fails (normal and dev), the features the workspace
uses today pass, L6 may use them all, and metadata parsing keeps the features. Both fail with the feature rule empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-19 01:47:44 +01:00
David Mann 15dd67e516 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-18 23:10:21 +01:00
Mex 96093d624c fix(xtask): reject incomplete PNG icon headers
Require complete IHDR framing and its fixed 13-byte payload length before extracting icon dimensions. Add truncated-header and invalid-length regressions. Fixes #15667.
2026-11-18 22:53:25 +01:00
aiongg bd3712d114 Lint: each shared test fixture loads once per test binary, and xtask names its step list type 2026-11-18 21:20:35 +00:00
aiongg 2a83631d46 CI: the GPU shard runs the whole gpu group, perf jobs share one cache entry, CI-only changes run Windows 2026-11-18 20:19:02 +00:00
aiongg b6b66d51d9 Merge remote-tracking branch 'origin/merge-test-binaries' into ci-fixes 2026-11-18 19:46:58 +00:00
aiongg a015ef2934 Tests: engine tests on process-wide state get their own binary
The modules that assert on the scratch pool, spill configuration, simulated memory, global caches or compositor settings move to tests/global_state, where one lock makes them take turns. test-binaries lists it with the reason.
2026-11-18 19:26:28 +00:00
aiongg 0081fd10e1 Tests: merge single-file integration test binaries into one binary per crate
Each crate's top-level tests/*.rs files become modules of tests/it/main.rs, and a new xtask check (test-binaries) refuses a new single-file test binary.
2026-11-18 19:11:27 +00:00
aiongg eee31b0d11 CI: shards build their own tests instead of running from an archive
The gate's archive of ~98 test binaries would be 10-18 GB compressed, so
every shard restores the dependency cache, builds the tests and runs its
partition (scripts/ci-test-shard.sh). `cargo xtask ci tests` runs the test
steps on $NEXTEST_PARTITION, `ci build` builds exactly what a shard builds
(main's cache warm-up), and `ci doctest` runs in one shard. The `ci archive`
part, the archive's xtask binary and the extraction are gone.

The Linux GPU shard keeps the gpu group alone on lavapipe; shards 2-4 split
the rest. Windows uses six shards: ~55 min of tests on one runner, and its
slowest test alone takes ~9.6 min, so a seventh would not shorten the
slowest shard.
2026-11-18 19:09:59 +00:00
aiongg 0e3523cdcd CI: shard the Linux and Windows tests, lint leg, xtask environment fix, rust-cache v2.9.3
- xtask starts every cargo without the variables `cargo run` sets for xtask
  (CARGO_MANIFEST_DIR, CARGO_PKG_*, ...), so a build script that declares
  `rerun-if-env-changed` for them (ring) no longer reruns, with the whole
  craft facade above it, between builds inside and outside xtask.
- `cargo xtask ci` splits into the gate's parts without a second step list:
  `lint` (fmt, egui-fork, clippy, layers, panel-commands, scorecard, wasm,
  i18n report), `archive` (test build into the nextest archive, doctests),
  `tests --from <dir>` (test and panic_hunt from the extracted archive, on
  $NEXTEST_PARTITION; --gpu / --no-gpu select by the gpu test group) and
  `build` (cache warm-up). Plain `cargo xtask ci` still runs every step.
  PHOTOCRAFT_CI_EXCLUDE leaves packages out of the test build and doctests.
- The `ci` nextest profile's archive carries the xtask binary, so a shard
  builds nothing (scripts/ci-test-shard.sh).
- Linux gate: lint leg, one build, four shards. Shard 1 runs the gpu group
  alone on lavapipe and checks its output (scripts/ci-gpu-lavapipe.py now
  wraps that run); the second GPU run and its rebuild are gone.
- Windows unit, integration, clippy and warm legs move onto the shared gate
  (Windows runner, lint leg for Clippy, four shards), keeping the PR
  selection from the platforms job, rust-lld, /OPT:NOICF, /DEBUG:NONE and
  the D:\t target dir.
- The slowest-tests-first priorities apply on Linux too.
- Swatinem/rust-cache v2.9.3 by commit for this repository's own cache
  steps, with fresh keys; cache-version v2 for the gate and docs entries.
  `test (without heif)` restores the gate's entry through the shared action.
  Dispatch-only jobs no longer save caches no pull request reads; the quick
  perf suite restores perf-nightly's entry.
- windows_delay_loads reads the app from NEXTEST_BIN_EXE_photocraft, as the
  other app tests do, since archives relocate binaries.
2026-11-18 19:04:43 +00:00