Skip to content

[Request]: Measure package payload and release-bundle duplication before optimizing storage #235

Closed as not planned

Description

@jimhoyd

Problem or use case

Core's published files include the whole docs/examples trees and llms-full.txt. Each package publisher also retains and uploads the complete signed four-package bundle. The sampled candidate artifact was 1,207,138 bytes (~1.2 MB). Complete-bundle duplication is intentional recovery evidence, and no material storage waste or package-size saving has been established.

Source audited: ea05148. Parent audit: #185 (findings). Evidence: verify run, candidate run. Timings describe one run, not a controlled savings benchmark.

Proposed behavior and alternatives

Measure packed/unpacked size by resource category and retained-copy storage. Evaluate a curated authoring-resource allowlist only if savings justify it, preserving CLI resources, documentation links, licenses and package smoke coverage. Keep TypeScript as an intentional runtime authoring dependency. Preserve complete signed-bundle verification and durable retry recovery; do not delete sibling archives merely to deduplicate. An evidence-backed decision to keep the current layout is a valid outcome. Priority: low.

Update the matching repository documentation with any behavior/workflow changes. Preserve required checks and deliberate reproducibility validation. No implementation or deployment changes were made by this audit.

Activity

  1. jimhoyd commented on Sep 20, 2026

    @jimhoyd
    CollaboratorAuthor

    Measurement for #235 (source: 0.4.1 prep, built dist/, npm pack --json). Recommendation: keep the current layout; make no change.

    Per-package payload (per-consumer install download / on-disk)

    Package Packed (.tgz) Unpacked Files
    @jimhoyd/urlcode (core) 857,969 3,148,883 488
    urlcode-auth 23,068 63,447 7
    urlcode-admin 21,172 58,528 7
    urlcode-ui 16,339 43,289 9
    Four-package total 918,548 3,314,147

    The sibling packages ship dist plus docs; the sibling numbers above are from a tree where their dist was not built, so their real size is a little larger. Their contribution is small either way.

    Core by resource category

    Unpacked bytes are from the pack manifest. The gzip column is the sum of per-file gzip -9, so it approximates each category's share of the compressed tarball and will not sum exactly to 857,969.

    Category Unpacked ~Gzipped
    docs/ 1,109,556 456,137
    dist/ 890,730 293,783
    data/ 594,282 60,345
    llms-full.txt 211,229 64,904
    examples/ 112,785 47,473
    recipes/ 75,559 34,518
    schemas/ 52,492 6,879
    packaging/, .claude/, starters/, skills/, root docs/licenses ~85,000 ~35,000

    Authoring resources (docs + examples + llms-full.txt) are ~1.43 MB unpacked, ~570 KB gzipped, about 45% of unpacked size and roughly two thirds of the packed core tarball.

    Retained-copy storage (per release, not per consumer)

    Read from candidate.yml and release*.yml: candidate.yml uploads candidate/* once (90-day retention). Each publisher (release.yml, release-auth/admin/ui.yml) uploads candidate/* again via "Retain original release bytes", unless release.ts restore promoted an existing candidate (restored == 'true' skips the upload). The bundle is the four tarballs plus sbom.cdx.json, train.json, urlcode.rb, manifest.json and SHA256SUMS. The sampled candidate artifact was 1,207,138 bytes; the tarballs are 918,548 of that.

    • Worst case (no promotion): 1 candidate + 4 publisher copies = 5 x ~1.2 MB = ~6.0 MB per release.
    • Best case (all publishers promote the candidate): ~1.2 MB.
    • Ceiling on what deduplication could reclaim: 4 x 1.2 MB = ~4.8 MB per release, for 90 days. The tarballs are already gzip-compressed, so artifact zipping does not shrink them further.

    This is bounded, transient storage, and it is what makes complete signed-bundle verification and durable retry recovery possible (each publisher can recover from its own retained bytes). I did not measure any Actions storage quota or billing impact, and I am not claiming a saving.

    Curated allowlist for core files?

    Best case would be dropping most of docs/examples/llms-full.txt: about 0.57 MB compressed off a 0.86 MB tarball (one download, per consumer) and about 0.12 MB off each 1.2 MB bundle copy. It would also break documentation links, the llms-full.txt contract, and scripts/package-smoke.ts path assertions, and would remove content that agents use to author URLCode projects. Against low-priority, non-material savings, that risk is not justified. TypeScript stays as the intentional runtime authoring dependency and is not part of this payload.

    Decision

    Keep the current layout: no files allowlist, no bundle dedup, no workflow changes. Revisit only if the candidate bundle grows by an order of magnitude or Actions storage becomes a measured constraint. If it does, the safer first lever is shortening retention-days on publisher copies rather than removing them, but that is a policy change and is not proposed here.

  2. jimhoyd commented on Sep 20, 2026

    @jimhoyd
    CollaboratorAuthor

    Closing as answered by measurement, with no change made. Findings: #235 (comment). Recommendation is to keep the current layout: the four-package bundle is 919 KB packed, the complete-bundle duplication is at most about 4.8 MB per release and backs signed-bundle verification and retry recovery, and a curated allowlist would save about 570 KB gzipped per consumer at the cost of documentation links, the llms-full.txt contract and the package-smoke path assertions. Reopen if payload size becomes a concern.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions