Skip to content

Navigation Menu

Sign up

Inline codec wrappers and upgrade dependencies and toolchains - #3

Merged
MSNexploder merged 4 commits into
main from
native-wrappers
Oct 27, 2026
Merged

MSNexploder merged 4 commits into
main from
native-wrappers

Conversation

@MSNexploder

@MSNexploder MSNexploder commented Oct 26, 2026 •
edited
Loading

Copy link
Copy Markdown
Owner

ImgLean’s published Jpegli and libavif Rust wrappers bundle older native libraries. Retain only the operations ImgLean uses inside one private imglean-codecs library, so native updates no longer require general-purpose wrapper forks. Preserve ownership cleanup, error boundaries, metadata handling, explicit encoder settings, and upstream notices.

imglean-codecs::avif provides RGBA decoding, fixed-policy AOM optimization, and grayscale corpus generation. AVIF validation calls the decoding API directly; validation rules remain in format validators. Jpegli retains its in-memory optimization path. The CLI and fuzz harness remain separate. One ImgLean-owned native build script replaces the separate AVIF build and shared source-preparation helper. Unused forwarding and duplicate license files are removed; component licenses and SBOM ownership remain explicit.

Cargo SBOM relationships use the IDs emitted by Cargo instead of embedding package versions. The low-level AOM encoding function stays internal to the codec crate, and ravif forwards decoding errors directly.

Build checksum-pinned libpng 1.6.59, libavif 1.4.2, libaom 3.15.2, standalone Jpegli revision 031a0077, and Highway 1.4.0. Native declarations contain only used functions and required layouts. Compatible Cargo updates, native/adapted-source notices, inventory, SPDX entries, and release schema 13 are included.

The repository tooling upgrade includes:

  • Rust 1.98.0 → 1.99.1, including FFI boolean-return and macOS linker corrections.
  • Python 3.14.7 → 3.15.2, including SSL trust and archive-extraction security corrections.
  • cargo-about 0.9.1 → 0.9.3. Regenerated notices retain 183 previously omitted lines from detected license files.
  • mise-action 4.2.5 → 5.2.3; pin the installer to mise 2026年10月19日. Upgrade upload-artifact 7.0.1 → 7.0.2 and download-artifact 8.0.1 → 8.0.2, retaining commit-SHA pins.
  • Fuzz nightly 2026年08月23日 → 2026年10月26日; Linux CI Ubuntu 24.04 → 26.04; static release builders Alpine 3.22 → 3.24; Rust container builder 1.98.0 → 1.99.1; refresh the pinned distroless Debian 13 runtime digest.

A fresh installation exposed lag in mise’s Python index even though upstream had published 3.15.2 binaries. The standard mise.lock records all configured tools and the exact Python artifact URLs, SHA-256 checksums, and GitHub-attestation provenance for all five CI platforms. Each Python checksum matches both upstream SHA256SUMS and its release asset digest. A fresh isolated precompiled install now passes. Compliance jobs explicitly install project tools. macOS stays at the promised macOS 15 runtime/test floor; Windows uses the current supported Windows Server 2025 runner. Native compiler, CMake, Ninja, NASM, and Python packages inside distribution builders remain distribution-managed and recorded in release artifacts.

Validation across consolidation and final cleanup:

  • mise run check: 116 Rust tests, 16 Python tests, locked all-target/all-feature Clippy including the fuzz workspace, and formatting passed. Existing tests retain their assertions; no fixtures changed during consolidation. Locked project-tool installation and a fresh Python precompiled install/test run passed during the tooling upgrade.
  • Root registry packages/checksums are unchanged by consolidation. Every shared registry package in the expanded fuzz lock matches the root lock. Root/fuzz/native audits, retained licenses, notice regeneration, SBOM ownership and all relationship references pass.
  • AVIF implementation bodies and declarations match their original locations. Both FFI files regenerate identically at the consolidated paths. All 95 corpus files regenerate exactly.
  • On the consolidation head, all 24 direct-provider/controller comparisons match the preceding executable’s bytes, errors, and diagnostics. libdav1d independently decodes 10 AVIF fixtures/new outputs. Before native upgrades, extraction-only validation also matched 170 Jpegli cases and 24 integrated cases against the original wrappers.
  • C/Rust sizes, alignments, and 316 field offsets across 26 structures were checked for macOS ARM64 and cross-target Windows x64 before consolidation; the declaration bytes remain unchanged. Cross-target layouts are not Windows runtime qualification.
  • GNU/Linux ARM64 full 116-test native ASan/leak run and four final short ASan validator fuzz runs pass. Alpine 3.24 ARM64 full 116-test suite/static release and four-format check pass; there is no ELF interpreter or dynamic dependency.
  • macOS representative external providers, deployment-target-15.0 release build/package smoke, and offline Debian 13 container check/publication for all four formats pass. The actual macOS binary records minimum OS 15.0; container notices match the final notices.
  • Original codec extraction received the authorized independent Codex P0–P2 review and binary validation because Autoreview rejects AVIF fixture changes. The text-only tooling and consolidation follow-ups pass Autoreview with --max-priority P2. Final consolidation review and quality-check have no remaining issues.

The preceding head 75d5982 passed all 24 hosted native/provider/compliance/fuzz checks and its automatic Codex review reported no findings. The cleanup head needs its own matrix. Its canonical gate and P2 Autoreview pass. A targeted check reproduces dangling SBOM references under valid renamed upstream IDs before the cleanup and passes afterward; current-ID output is unchanged. Local smoke packages are validation artifacts; full target-native release packaging remains a release-workflow gate. The CLI remains offline.

Consolidation deliberately makes fuzzing build the codec dependency graph. Its lockfile gains the existing codec packages and its audit policy carries the CLI’s existing narrow paste and syn exceptions. A cold AVIF fuzz build took approximately 112s before and 264s after on this host with two build jobs; other builds overlapped, so these timings are approximate. Subsequent targets built in seconds. No feature flags were added.

Remaining upstream constraints

Current direct crates, cargo-deny 0.20.2, cargo-sbom 0.10.0, cargo-fuzz 0.13.2, bindgen-cli 0.73.2, checkout 7.0.1, and representative native provider pins are current. pngquant 3.0.2 remains an intentional compatibility representative alongside current 3.0.3. The preexisting paste unmaintained-advisory exception remains.

These newer transitive major/0.x releases cannot be selected within their current parents’ requirements. Adopting them requires compatible upstream parent releases or additional forks/migrations, outside this wrapper extraction. No current ImgLean API requires them; no forced overrides were added.

Dependency Locked → newest stable Controlling parent
av-scenechange 0.14.1 → 0.25.0 rav1e 0.8.1
av1-grain 0.2.5 → 0.5.0 rav1e 0.8.1
equator 0.4.2 → 0.6.0 aligned-vec 0.6.4
equator-macro 0.4.2 → 0.6.0 equator 0.4.2
getrandom 0.3.4 → 0.4.3 rand_core 0.9.5
itertools 0.14.0 → 0.15.0 rav1e 0.8.1
miniz_oxide 0.8.9 → 0.9.1 png 0.18.1
num-bigint 0.4.8 → 0.5.1 num-rational 0.4.2
num-derive 0.4.2 → 0.5.1 rav1e 0.8.1
pastey 0.1.1 → 0.2.3 av-scenechange 0.14.1
r-efi 5.3.0 → 7.1.0 getrandom 0.3.4
r-efi 6.0.0 → 7.1.0 getrandom 0.4.3
rand 0.9.5 → 0.10.3 rav1e 0.8.1
rand_chacha 0.9.0 → 0.10.0 rand 0.9.5, rav1e 0.8.1
rand_core 0.9.5 → 0.10.1 rand 0.9.5, rand_chacha 0.9.0
syn 2.0.119 → 3.0.9 arg_enum_proc_macro 0.3.4, equator-macro 0.4.2, interpolate_name 0.2.4, num-derive 0.4.2, profiling-procmacros 1.0.18, zerocopy-derive 0.8.63
v_frame 0.3.9 → 0.7.0 av-scenechange 0.14.1, av1-grain 0.2.5, rav1e 0.8.1
wasip2 1.0.4+wasi-0.2.12 → 2.0.1+wasi-0.2.12 getrandom 0.3.4
windows-link 0.2.1 → 0.100.0 windows-sys 0.61.2
wit-bindgen 0.57.1 → 0.63.0 wasip2 1.0.4+wasi-0.2.12

chatgpt-codex-connector[bot] reacted with thumbs up emoji
Retain the in-memory Jpegli path and shared AVIF operations used by validation, providers, and corpus generation. Build checksum-pinned native sources with focused declarations and preserve their licenses and release inventory.
MSNexploder marked this pull request as ready for review October 26, 2026 19:49

chatgpt-codex-connector Bot commented Oct 26, 2026 •
edited
Loading

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026年10月27日T07:43:07.489565Z 32b9ba9 Draft marked ready
i️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

MSNexploder marked this pull request as draft October 26, 2026 20:37
Lock Python artifact URLs and checksums for every CI platform so clean
installs do not depend on the version index catching up to its release.
Retain GitHub attestation verification.
@MSNexploder MSNexploder changed the title (削除) Inline used codec wrappers and update native dependencies (削除ここまで) (追記) Inline codec wrappers and upgrade dependencies and toolchains (追記ここまで) Oct 26, 2026
MSNexploder marked this pull request as ready for review October 26, 2026 20:59
MSNexploder marked this pull request as draft October 26, 2026 21:06
Keep AVIF decoding directly available to validators and corpus generation.
Move native build ownership and compliance relationships to the codec
library, preserving implementation bodies, declarations and encoder policy.
Fuzzing now builds the codec dependency graph using the CLI pins and
existing advisory and duplicate exceptions.
MSNexploder marked this pull request as ready for review October 26, 2026 21:56
MSNexploder marked this pull request as draft October 27, 2026 07:36
MSNexploder marked this pull request as ready for review October 27, 2026 07:41
MSNexploder merged commit c524fb6 into main Oct 27, 2026
24 checks passed
MSNexploder deleted the native-wrappers branch October 27, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /