Repository navigation
LRC-DEV-PROCESS: process versions, so a look change can ship without changing existing edits (#146) - #533
Merged
Conversation
…changing existing edits (storytold#146) Each photo's develop settings record the rendering process they are interpreted by (`DevelopSettings::process`). There is one process, V1, the pipeline as it is; nothing renders differently (180 CPU 8/16-bit and GPU renders of procedural scenes, and the saved settings JSON and hash64, are byte-identical to main). Settings saved without the field load as V1 (a field-level serde default), new settings get the latest (`Default`), and V1 is left out when saving, so files and preview-cache keys stay as they were. A damaged value (anything but a whole number up to 2^32 - 1) reads as V1 too, so it never costs the rest of the settings (an unparsable `lc:settings` sidecar is ignored). Reset moves a photo to the latest process, section and slider resets don't; virtual copies inherit it; copy / paste / sync / Auto Sync / presets don't carry it; a number from a newer LightCraft is kept and renders with the newest known process. The process is not an edit (Edited badges, import-look checks). The base tone map is chosen per process in one place (`finish::base_tone`, shared by CPU and GPU). Photo > Update to Current Process (`develop.updateProcess`) moves selected photos on an older process to the latest as one undo step. Its menu enablement follows the selection; a call that names photos (`ids` / `id`) is validated on those instead, through a new opt-in `CommandSpec::explicit_targets` (execute checks enablement before the handler sees `ids`). `develop.get` reports the process. The rule and how to add V2: docs/process-versions.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Member
|
Thank you @AlexChambers! This landed in #657 with the other community PRs of this round. Please join our Discord if you haven't already: https://discord.gg/artcraft |
This was referenced Oct 10, 2026
Closed
brahimforbladi-blip
pushed a commit
to brahimforbladi-blip/lightcraft
that referenced
this pull request
Oct 10, 2026
- storytold#540's crs::Target replaces the raw flag: storytold#597/storytold#604's folder sync and sidecar_op and storytold#533's process tests pass the photo's target instead of a bool. - storytold#568's DRO test fits through storytold#528's fit_look (proxies now return the clipped mask). - storytold#541 (French) and storytold#564 (Ukrainian) gain the 15 keyword format strings storytold#578-storytold#592 added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brahimforbladi-blip
pushed a commit
to brahimforbladi-blip/lightcraft
that referenced
this pull request
Oct 10, 2026
…orytold#533 does) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brahimforbladi-blip
pushed a commit
to brahimforbladi-blip/lightcraft
that referenced
this pull request
Oct 10, 2026
…e_tone; V1 at peak 1 unchanged) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
emmertex
added a commit
to Kaan88/lightcraft
that referenced
this pull request
Oct 26, 2026
LR-META-XMP: read referenced JPEG Extended XMP (upstream PR 2581, own take)
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.
Why
Issue #146 proposes retuning the default raw tone curve, and notes that this "changes the look of every existing raw edit, so it needs a maintainer decision (e.g. versioned process defaults so existing edits keep their look)". #196 (stronger Highlights / Shadows / Whites / Blacks) has the same problem. LightCraft had no way to tell which rendering a photo was edited under.
#514 (retuning the default raw curve against Lightroom) is the first change that would need it.
This PR adds that mechanism, modelled on Lightroom's process version. It does not change any rendering: there is one process, V1, which is today's pipeline. A tone retune can then land as V2 without touching existing edits.
What it does
DevelopSettings::process: ProcessVersion(au32newtype) records the rendering process.Processis an enum of the processes this build implements (onlyV1), somatches on it are exhaustive and adding V2 makes the compiler point at every stage that depends on it.lightcraft_pipeline::finish::base_tonepicks the base tone map by process (Process::V1 =>the existing camera / raw / display tone maps, unchanged). CPU and GPU both get it throughFinishParams::new.develop.updateProcess, "Update to Current Process", in the Photo menu after Reset Edits. It moves the target photos that are on an older process to the latest as one undo step (history entry on each photo), keeps slider values, and never moves a photo to an older process. The menu item is enabled only while a selected photo is on an older process, so today it is always disabled (with the reason "already on the current process (version 1)"). A call that names its photos (ids/id) acts on them whatever is selected: each must exist and one must be on an older process, otherwise it returns an error.Session::executechecks a command's enablement before the handler seesids, so a selection-based predicate would block{"ids": [older_photo]}whenever the selection is current or empty.CommandSpecgets an opt-inexplicit_targetsflag: when a call names photos, the selection predicate is skipped and the command validates those photos itself. Onlydevelop.updateProcessopts in; the otherids?commands behave as before (most usehas_selection, so they share the empty-selection limitation and could opt in later).develop.get/ MCPget_developalways reportprocess.Semantics
lc:settingssidecars, browser libraries)develop.reset)process(develop.merge) sets itcrs:edits (XMP, Lightroom catalogs, imported presets)crs:ProcessVersionnumbers Adobe's renderer and stays ignored. New photos are therefore on the latest process, existing photos keep theirs2.0counts as 2)lc:settingssidecars), so a bad value never costs the edits. It is not kept: the photo is saved as V1Lightroom's Sync offers the process version as its own checkbox. LightCraft's copy groups are coarser, and leaving the process out keeps one simple rule: only Reset and Update to Current Process change a photo's process (plus
develop.mergewhen asked explicitly, and restoring a version / history step).The process is not an edit:
Photo::camera_defaults/import_defaultscarry the photo's own process, andDevelopSettings::is_uneditedignores it, so "Edited" badges and filters, the embedded-preview shortcut for unedited raws and Local cleanup don't flip when V2 arrives. The "before" view and Auto analysis use the photo's process too.Compatibility
ProcessVersionhas a hand-writtenDeserialize: a damaged value reads as V1 instead of failing the whole settings. This matters because some readers drop settings that fail to parse (anlc:settingssidecar that doesn't parse is ignored, losing its edits).#[serde(default = "ProcessVersion::legacy")]; the structDefaultgives new settingsLATEST. These coincide today and diverge the moment V2 becomes the latest, which is when old catalogs must stay V1.settings_saved_before_process_versions_load_as_v1uses a full settings blob as main wrote it and asserts the literal V1.skip_serializing_if), so files written for V1 photos are byte for byte what main writes, andDevelopSettings::hash64(the persistent render-cache key) is unchanged: no thumbnail or preview is invalidated by this upgrade.processfrom the delta, likeversion,spotsandred_eye.Docs
docs/process-versions.md: the rule ("a change that alters how existing settings render ships as a new process; V1 is frozen", with bug fixes allowed in place), how to add a process, and the table above.docs/parity.md: new row LRC-DEV-PROCESS (Classic's Settings > Update to Current Process; no row existed), notes on LR-BEHAV-RENDER-FIDELITY and top gap 4, summary refreshed. Short notes inxmp-interop.md,lightroom-catalog-import.md,mcp.mdand ROADMAP's look-parity risk.Testing
crates/develop/src/tests_process.rs: legacy blob and{}load as V1; new / raw settings are latest; V1 is omitted when saving, other numbers round-trip; unknown numbers (7,u32::MAX, 0,2.0) load and map to a known process; damaged values (negative, fractional, too large, text, null, list, object) read as V1 while the rest of the settings load, also nested; process is not an edit, survives section resets, and is not carried by copy groups, paste or presets (also at 50 %).crates/pipeline/src/tests.rsstored_process_numbers_render_with_a_known_process: legacy settings render identically to V1, an unknown newer number identically to the latest, for rendered, raw and camera-tone sources, plain and edited, 8-bit and 16-bit.crates/catalog/src/model.rs: a photo on another process with its import defaults (and with an import look) is not edited; an edit still is.crates/catalog/src/tests_journal.rs: a damaged process in a catalog snapshot, and in a CRC-valid log record, loads as V1 with the photo's edits.crates/engine/src/tests_process.rs: new photos and Reset get the latest (including from a newer process and from an older import look), section / slider resets don't change it; Update to Current Process is disabled with a reason when nothing is outdated, is one undo step, undo / redo work, keeps slider values, skips newer processes, works on the active photo alone; virtual copies inherit; copy / paste / sync / presets / Auto Sync keep each photo's process; an unknown number survives closing and reopening a library, renders, anddevelop.getreports it;lc:settingssidecars round-trip the process and leave V1 out, and a sidecar with a damaged process still restores its edits;crs:edits withcrs:ProcessVersiondon't set one; named photos are updated with a different, current photo selected and with nothing selected (idsandid), while all-current, unknown, malformed and emptyidsare errors and the menu item stays selection-based.hash64of the same settings identical.develop.merge {"process": 0}(a stand-in for an older process) it is enabled, and running it updates the photo and greys it out again.cargo xtask ci(rustc 1.99, Apple M3 Max): fmt, clippy, heif pass;testfails only on two GPU denoise-runner tests,lightcraft-gpunn::tests::the_gpu_gives_what_the_reference_givesandnn::tests::a_runner_serves_many_tiles_from_many_threads(Metal output off by ~0.8 of the output's size). They fail the same way on the untouched base commit 8f924a9 on this machine and this PR doesn't touchcrates/gpu. With--no-fail-fastevery other test binary passes, and parity, layers, assets and wasm pass when run on their own. In one of those runs the engine unit tests hung once, in twotests_face_recognizetests (see below); rerun, all 476 engine tests passed.Not in this PR
demo::scene_pixels(crates/engine/src/demo.rs) renders a scene with rayon insideOnceLock::get_or_init. Called from the faces worker's rayon pool, a worker blocked in that render can steal a job that waits on the sameOnceLock, and both wait forever (tests_face_recognize::indexing_embeds_each_face_once_and_reports_progressandsuggestions_come_from_the_named_faces_and_are_never_appliedsat inOnce::waitfor 30 minutes). Timing-dependent; a fix will follow in its own PR.🤖 Generated with Claude Code