Commit Graph
165 Commits
Author SHA1 Message Date
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
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
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
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
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
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
Zaxaerith 70e03a3b61 fix(xtask): classify craft as a UI dependency (#15467) 2026-11-18 20:29:10 +08:00
aiongg f0b603254f Panel commands: the colour panel dispatches tools.setColors, so its allowlist entry goes 2026-11-17 17:46:50 +00:00
aiongg ed14e1c413 PhotoCraft on the craft UI framework (#15449)
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
2026-11-17 10:41:35 -05:00
Dylan M. Taylor b0e0bcc6c4 Merge pull request #14236 from storytold/codex/photocraft-format-migration
Move remaining file formats and codecs to craft-libs (#778)
2026-11-13 23:03:16 -05:00
Dylan M. Taylor 040962a5b4 Merge photo-cms-port: use craft-cms and remove crates/cms (#13393) 2026-11-14 00:02:22 +00:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
Dylan M. Taylor 2b75a0092d Use craft-cms from craft-libs; remove crates/cms
craft-cms was extracted from crates/cms (storytold/craft-libs#779), and both
copies changed afterwards. storytold/craft-libs#PRNUM ports the 41 commits made
here since the extraction, so the shared crate now has everything this copy
had, and PhotoCraft depends on it.

craft-cms returns errors where the local crate panicked on caller input:
transforms, tables and LUT constructors return Result. Call sites propagate
the error where the function already returns one, and fall back where the
arguments are fixed by construction (each with a comment saying why).
Lut3d's fields are private there; the proof and HDR display table is built
with Lut3d::from_fn.

The pin is the head of the craft-libs branch and moves to main when that
pull request merges.
2026-11-11 19:41:51 +00:00
Dylan M. Taylor 5d4b68f04c Use craft-heif from craft-libs for HEIC/HEIF (#13076)
* Use craft-heif from craft-libs; remove crates/heif

PhotoCraft's HEIF decoder had drifted from LightCraft's by about 700 lines;
both now use craft-heif (storytold/craft-libs#784), built from LightCraft's
copy. HEIC colours now follow the HEVC VUI's range and matrix and libheif's
chroma upsampling. 8-bit files still open as 8-bit documents; a colour
description the VUI specifies now tags the image as an nclx did.

The codecs -> heif standalone exception ends with the local crate, and the
HEIF nextest step drops -p photocraft-heif, which no longer exists.

* Pin craft-heif to the merge of storytold/craft-libs#794

* heif: count the decoder's 16-bit buffer against max_alloc

* heif: match Apple's chroma upsampling; pin craft-heif to storytold/craft-libs#799

* heif: free the decoder's buffer before the HDR conversion and count that conversion's peak

* heif: hold the canvas the decoder really allocates to max_alloc
2026-11-11 01:59:37 -05:00
skylar taylor-barrick 1f77e59589 Merge origin/main (2772ac1e7) into craft-i18n cutover
Keep all 34 catalog deletions; sync crop options and fill rasterization text via craft-i18n 4a642c06dbcb8172f307f827c1167cd5dd8ac341. Adapt the fill prompt catalog test to embedded catalogs and preserve both parity-document updates.
2026-11-10 20:16:09 -06:00
Dylan M. Taylor bbf3ad7fd0 xtask: only follow https redirects when fetching PngSuite (#11231) 2026-11-10 17:56:37 -05:00
Martin BallandClaude Opus 5.5 3573fc74ab xtask(i18n-report): fail on a locale listing error
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 23:29:04 +00:00
Martin BallandClaude Opus 5.5 191043ad5b xtask(i18n-report): list unresolved languages, report unreadable catalogs
A registered language without a photocraft.tsv is listed apart instead of
showing 0% with every key missing, and a catalog that exists but can't be
read is an error naming the file rather than a silent gap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 22:43:23 +00:00
Martin BallandClaude Opus 5.5 9dd39df78d feat(i18n): look up translations through the craft-i18n crate
The i18n module becomes a thin Lang wrapper over craft_i18n::I18n and the
catalogs embedded from craft-i18n. Plurals use trn_plain and PhotoCraft
keeps its own fmt; @id rows come only from PhotoCraft's own rows that keep
the label's shape. Detection, PHOTOCRAFT_LOCALE, tag bounds and the 35
offered languages are unchanged.

Serbian: sr, sr-RS, sr-Cyrl-RS and sr-ME reach sr-latn, the only Serbian
catalog, and a saved interface.language "sr" migrates to "sr-latn".

The menu completeness test becomes a report that never fails, and
`cargo xtask i18n-coverage` is replaced by `cargo xtask i18n-report`, which
reads CRAFT_I18N_DIR through the crate. Docs describe the new system.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-08 16:16:46 +00:00
David Mann 017c4aab9e Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-11-06 22:57:46 +01:00
Khawar Zamman Wani 146d49f5a2 PSD write recipes: keep every exported candidate and pin the base file (#11607)
* PSD write recipes: keep every exported candidate and pin the base file

A case that failed after export dropped out of manifest.json, losing the
file a reference-editor check most needs. The CLI also reopened the corpus
path after the hash was taken.

- Keep the candidate and its hash once export succeeds.
- Run the CLI on a copy of the hashed bytes, so it never opens the corpus.
- Compare numbers by value, so 17 equals 17.0.
- tracking-split also checks runs 0 and 2 and all three run lengths.

Part of #6130.

* PSD write recipes: compare large integers exactly, reject case-only id clashes

Converting to f64 made 9007199254740993 equal 9007199254740992. Ids that
differ only by letter case name one output directory on a case-insensitive
filesystem, so they are now rejected as duplicates.

* PSD write recipes: test that the CLI receives the hashed bytes

* PSD write recipes: reject the contour library commands

Their path param can read or write any file, including the pinned base and
the corpus, and they edit no document.
2026-11-06 17:23:40 +01:00
David Mann 66c328dc2b Merge commit '9bef3b2dc8b84c1b6cefc8ce0dc2b01d089cd9e8' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-11-06 02:29:28 +01:00
Khawar Zamman Wani f54d605e2c Add recipe-driven checks for PSD exports (#10307)
* Add recipe-driven PSD export checks

* Exercise PSD recipe runner with the headless CLI

* Make PSD oracle tests isolate temporary paths

* Keep inspect output unchanged; PSD write runner as an xtask library

- info --detail adds text runs, anti-aliasing and full layer-effect settings;
  the control channel and MCP inspect output is unchanged.
- The CLI test uses xtask's new library target instead of #[path] includes.
- The runner records revision and dirty state as unknown outside a git checkout.

* psd-write-oracle: name the layer in each check, document versioning, add recipe tests

* Clean up PSD oracle test fixtures on failure with tempfile::TempDir and add docstrings
2026-11-05 17:11:56 +01:00
David Mann 4bbe9c78de Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-11-03 20:32:22 +01:00
David MannandClaude Opus 5.5 77339962cc xtask: panel-commands allowlist follows main's panels/ split; lexer helpers keep clippy's complexity limit
Main moved crates/ui-egui/src/panels.rs into panels/*.rs, so the color_field entry now names
panels/color.rs (scorecard note too), and main's cognitive_complexity deny split lex()'s block
comment and string skipping into helpers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 16:49:12 +01:00
David Mann 5dd023f949 Merge remote-tracking branch 'origin/main' into HEAD 2026-10-29 16:45:03 +01:00
FredApps 32722ffcbf Merge approved PhotoCraft PR #9019: fix(xtask): reject unknown performance benchmark selections
Port behavior and regression coverage into current modules; preserve current upstream behavior.
Validate benchmark names before both measurement and baseline-from-files paths, retaining newer baseline modes.
2026-10-29 04:21:14 +01:00
FredApps 9f076017fe Merge approved PhotoCraft PR #9015: fix(xtask): reject leading zeroes in numeric prerelease identifiers 2026-10-29 03:29:44 +01:00
aiongg a9e6f73ac5 Merge remote-tracking branch 'upstream/main' into HEAD 2026-10-28 02:31:52 +00:00
aiongg 7008da37ab perf: baseline skips rows missing from some runs 2026-10-28 02:14:22 +00:00