Repository navigation
Upstream intake 2026-11-25: craft-libs lane + first craft-libs intake (9 ports), monitor round - #1499
Merged
Merged
Conversation
…acked paths) Upstream moves decoder, develop and metadata code into storytold/craft-libs, so fixes land there and the matching upstream PR shrinks to a rev bump or closes. The intake tool now takes --repo craft-libs for enumerate and drift, keeps only PRs touching TRACKED_PATHS (the crates the fork has a counterpart of, plus craft-ui/craft-docpath it builds against), and the ledger accepts craft-libs#<n> rows (duplicates are checked per source). The runbook gains a craft-libs lane section. Manual: none, no user-visible change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ImageProcessing crop tags may be LONG8. `v as usize` truncated a value past u32 on wasm32 to a small number that passed the bounds check as a plausible crop; the conversion is now checked (`usize::try_from`) and the bounds use the subtraction form, so anything unrepresentable or outside the frame keeps the whole frame. The preview start/length casts get the same check. Sources: adapted from storytold/craft-libs#2380 (63ed548b69, trufae), MIT OR Apache-2.0. Manual: none, no user-visible change. Co-authored-by: pancake <pancake@nopcode.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tiles A lossless DNG tile could decode a frame of up to max(2·tile, 65,536) samples, and a Sony quad tile one of max(tile, 65,536). Many tiny tiles pointing at one large frame each decoded and kept about 128 KB that the decode grouping counted as a few bytes. The lossless limit is now twice the tile's samples (a quad tile: its samples) with no floor, and a DNG tile drops the surplus capacity after the resize. DCT-coded (Blackmagic) tiles keep the floor, since they are padded to whole MCUs. Sources: adapted from storytold/craft-libs#2232 (ccabfee3b5, Phil Hart), MIT OR Apache-2.0. Manual: none, no user-visible change. Co-authored-by: Phil Hart <radial@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lossy-JPEG frame cap took `.max(image height)` for every chunk, so each 16-row strip of a tall image could declare (and decode) a frame of about four whole images, and many strips pointing at one payload decoded it each in parallel. The cap is now a few times the chunk's own MCU-rounded rows (RowsPerStrip clipped to the image still covers a last strip coded at full height and an only strip taller than the image). Valid tiled lossy DNGs are unchanged. Sources: adapted from storytold/craft-libs#1884 (bea91b1861, FredApps), MIT OR Apache-2.0; the fork's cap came from its own take on upstream #2635 (89895c6). Manual: none, no user-visible change. Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t 2048
`DngCompression::Lj92 { tile }` accepted edges up to 65,534 (JPEG's dimension limit), so a tiny
image could pad every tile to 65,534² samples. It now takes the Deflate bound (2048) and refuses
anything larger with the existing "tile too large" limit before any padding; every caller passes
256, so this hardens the API only.
Sources: adapted from storytold/craft-libs#1759 (9b5b517b42, Dylan M. Taylor), MIT OR Apache-2.0.
Manual: none, no user-visible change.
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ctor 2 wraps at the packed depth Two parts of craft-libs #1300 the fork had the bug for: - CR3: a `stsz`, `co64` or `stco` box too short for its own count made `trak()` return None, so the main raw track vanished and the largest-raw selector quietly decoded the reduced raw as the photo. The tables now deny the track's data (an error at decode) instead, and their counts are bounded by the box (a constant sample size times its count by the file). - Deflated DNG chunks with horizontal differencing: packed 9-15-bit samples store each difference modulo 2^bits, so the sum now wraps there too; a negative step no longer comes back 2^bits too high. Samples in 16-bit words keep the 16-bit wrap. The other parts of #1300 (uncompressed coverage, lossy component count, RAF layout, per-format guards) are recorded in the intake ledger, not ported. Sources: adapted from storytold/craft-libs#1300 (ad8faa1c13, Terra854), MIT OR Apache-2.0. Manual: none, no user-visible change. Co-authored-by: Terra854 <bentinner@yahoo.com.sg> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… one Each CMT1-CMT4 slot took the last box of its name, so a damaged later box hid a readable earlier one (and its Exif, maker note, focus and preview data). The first readable box of a slot now wins, a later readable box replaces a damaged one, and a lone damaged box still fills the slot. Well-formed files (one box per slot) are unchanged. Sources: adapted from storytold/craft-libs#1080 (4ca29b10db, Dylan M. Taylor), MIT OR Apache-2.0. Manual: none, no user-visible change. Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rce attribute fields Two read fixes from craft-libs #967 (fixes it took from open upstream PRs) the fork still had: - Exif Rating: writers store -1 (rejected) as a SHORT 0xFFFF; the reader clamped it to five stars. It now reads as -1 (upstream #1995's read side; writing Rating stays out). - XMP: a property with rdf:parseType="Resource" may carry its struct's fields as attributes, as an rdf:Description does; only its child elements were flattened, so `crs:Look`'s attribute-form parameters were lost on import (upstream #1226's XMP part). The other fixes in #967 are already in the fork or decided in the ledger. Sources: adapted from storytold/craft-libs#967 (commits 554951d2b9, Sebastian Berschneider; 3df364ad17, Ilya Dorman), MIT OR Apache-2.0. Manual: none; the import behaviour change is a fix, recorded in What's New and the changelog. Co-authored-by: Sebastian Berschneider <berschi@gmail.com> Co-authored-by: Ilya Dorman <ilya@codeforhumans.dev> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XML end-of-line handling turns a literal CR into LF on reading, so a caption, title or setting with a carriage return came back changed after a sidecar round trip. The writer now escapes it as ` ` (in text and attributes); the reader already decodes the reference. Sources: adapted from storytold/craft-libs#1042 (commit c812fc816b, smi-leonivkovic; from upstream #4119, whose quick-xml bump stays PENDING), MIT OR Apache-2.0. Manual: none, no user-visible change. Co-authored-by: smi-leonivkovic <leon.ivkovic@smi-digital.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DJI Mavic 3 DNGs write StripByteCounts for the active columns (5280 x 3956 x 2) while the strip holds full 5376-wide rows to the end of the file. The fork read only the counted bytes and zero-filled the rest, so about 70 rows at the bottom came out black inside the default crop. The strip is now lengthened to the full raster only for that exact case: uncompressed, one strip, one integer sample of 8 or 16 bits, an ActiveArea starting at column 0 inside the image, a count of exactly area-columns x rows, and the whole raster inside the file. Every other short strip keeps today's behaviour. Only files that decoded wrong change. Sources: adapted from storytold/craft-libs#2042 (efce830a55, techneissa; issue craft-libs#2040), MIT OR Apache-2.0. Manual: none; the fix is recorded in What's New and the changelog. Co-authored-by: techneissa <55485515+techneissa@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t craft-libs intake - upstream: 59 waiting rows moved (drift). Decision changes recorded (#4426 #1463 #3733 #3944 #4119 #4126 #4358 #3949 #672 #4271 #3502 -> SKIP; #4057 #4243 #4413 -> LEARN); the 46 rows whose head moved with the decision unchanged are re-stamped. - craft-libs: 29 rows for the PRs read (9 ADOPT with fork commits, 13 SKIP, 5 PENDING incl. the craft-ui/craft-docpath rev bump with security fixes, 1 LEARN); boundary and run-log rows. - NOTICE credits craft-libs (MIT OR Apache-2.0, used under MIT) for the ports. - Runbook: craft-libs rows' Upstream ref is the PR head; the tool's reports survive a non-UTF-8 console. Manual: none, no user-visible change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 26, 2026
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.
Upstream now moves decoder, develop and metadata code into storytold/craft-libs and consumes it from there. Fixes land there, and the matching upstream PR shrinks to a rev bump or closes, so the intake never saw them. This PR adds craft-libs as a second intake source and runs its first intake. It also records today's upstream monitor round.
Tooling and runbook
tools/upstream_intake.py:enumerateanddrifttake--repo craft-libs.TRACKED_PATHS. Those are the crates the fork has its own counterpart of (raw, crw, develop, develop-model, metadata, crs, tiff, sniff, image codecs, colour, psd) plusuianddocpath, which the fork builds against. craft-libs takes 200+ PRs a week.craft-libs#<n>/craft-libs commit <sha>sit in the same ledger, and duplicates are checked per source.docs/upstream-pr-intake.mdgets a new section, "The craft-libs lane". It covers what is read and how fixes are taken: always hand-ported into the fork's own crate, never as a dependency. Dependency crates get a rev bump instead. Extraction PRs are skipped.Round table: craft-libs (first intake)
Scope: everything merged since craft-raw was created (2026-11-11) on the decoder and metadata paths, which is 72 merges and commits. Extractions, perf and test-only changes were skipped. The fixes and the PRs named by upstream ledger rows were read in full against the fork's code.
v as usizeon LONG8 maker-note crop tags: a wrapped value passed as a plausible crop on wasm32lcc-rawteststiffraw.rsand ARW quad tiles: many tiny tiles each decoded and kept a large frame. DCT tiles keep the floormax(image height)per chunk, so each strip could decode a frame of about 4 images. Now bounded by the chunk's own rowsstsz/co64/stcodropped the main track, so the reduced raw decoded as the photo. Predictor 2 did not wrap at the packed bit depth. The other parts are recorded in the ledger (maintainer call, corpus, LEARN)parseType="Resource"attribute fields were lost (upstream #1226) (upstream #4119)doc_path::resolverelies on. A rev bump may move eguiRound table: upstream (monitor, 2026-11-25)
59 of 163 waiting rows moved. None could be adopted.
Shared numbers and anything unmeasured
Checks
cargo test -p lcc-rawand-p lcc-meta: all green, with the new tests.cargo xtask ci --quickafter merging currentmain: all 14 steps passed (547 corpus tests skipped: no corpus on this machine, so the decoder changes were not run against real raws).python tools/upstream_intake.py check: 0 errors.driftfor both sources: clean after the re-stamp.Manual: none, no user-visible change beyond the two fixes in What's New / changelog (Rejected rating from Exif; DJI Mavic 3 DNG rows).
🤖 Generated with Claude Code