Skip to content

Add self-contained per-chip ESP libs slices and additive client selection #1889

Closed

Description

@zackees

Implement self-contained per-chip ESP Arduino libs slices according to the owner's thin-slices ruling.

  • Stream the upstream xz once, spool bounded-memory payloads, emit sorted normalized tar.zst slices including shared content, and print integrity metadata.
  • Keep manifest v1 whole-bundle assets intact and add optional slices on the same vendor-URL-keyed asset.
  • Use board MCU hints only for SDK libs; separate chip cache identities, reuse whole bundles, and fail closed on slice integrity errors.
  • Validate offline archive safety/determinism and client selection/cache/integrity tests, workspace clippy and bash test; measure the upstream 3.3.5 archive.

Delivery is an unmerged PR. Publishing artifacts and a client release are follow-ups.

Activity

  1. zackees commented on Nov 5, 2026

    @zackees
    MemberAuthor

    Closing as delivered — verified against origin/main (ea4be00c), 2026-11-04.

    Delivery PR: #1889's implementation landed in 6ae5ec2b "feat: add deterministic per-chip ESP libs slices and variant fetching" (14 files, +792). Each acceptance bullet maps to code now on main:

    AC bullet Evidence on main
    stream the xz once, spool bounded-memory payloads, sorted normalized tar.zst incl. shared content, integrity metadata ci/slice_esp_libs.py — spool_tar ("Read the xz once; never extract paths supplied by the archive"), safe_name/_check_ancestors (traversal + symlink-ancestor rejection), chips = sorted(…) / names = sorted(…), digest() sha256+size per slice, --check never writes
    manifest v1 whole-bundle assets intact, optional slices on the same vendor-URL-keyed asset ci/gen_mirror_manifest.py; downloader_mirror_manifest.rs keeps Asset { url, checksum, slices: Option<HashMap<chip, SliceEntry>> }
    board MCU hints for SDK libs only; separate chip cache identities; reuse whole bundles; fail closed on slice integrity fbuild-packages-fetch/src/variants.rs — per-chip slice lookup, tracing::info!("no ESP libs slice for {chip}; using mirrored whole bundle"), verify() on the downloaded slice, "retries are permitted, whole-bundle fallback after slice failure is not"; fbuild-library/.../esp32_framework/libs.rs::required_sdk_variants keeps SDK variants separate from the chip identity
    tests + measurement ci/test_slice_esp_libs.py, ci/test_gen_mirror_manifest.py, downloader_mirror_tests.rs, libs.rs variant tests

    Publishing the slice artifacts and cutting a client release are release steps (tracked by the release issue), not work left in this issue. Nothing here is being re-done; re-open if a specific slice/selection gap is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions