Repository navigation
Releases
v0.1.1
Everything merged to main since v0.1.0. Squashed from PR #22 (34a1def). No new features.
Added
404.html: branded not-found page;og:/twitter:card + canonical link;robots.txt+sitemap.xml(staged bypages.yml).CONTRIBUTING.md,SECURITY.md(private reporting via GitHub Security advisories), this changelog, PR/issue templates,dependabot.yml,.editorconfig,.gitattributes.- Reclaimable metric: wasted minus the copies that survive in the final squashed image. In the analysis output (
reclaimableBytes),tools/analyze.mjsoutput, a labelled summary stat card and a scorecard row.Wastedkeeps dive's definition unchanged — verified byte-exact against dive's goldens (17/17). - Unit tests pinning both metrics on synthetic images (
tests/reclaimable.test.mjs). tools/test-fixtures.mjs— deterministic generators for the two browser-bench fixtures (test1-waste.tarlegacy docker-save,test3-zstd.tarsame content as OCI+zstd). Analyzed on both layouts: 4 layers, wasted 5,652,480 bytes, efficiency ≈ 3.6%.- Browser benchmark asserts those numbers in real Chromium on push and
pull_request(tools/browser-fixtures.mjs), including identical stats across 3 consecutive uploads in the same page; the browser benchmark now triggers onpull_requestso the check reports on every PR (#19). tests/long-back-reference.test.mjs— zstd frame with a 10 MiB back-reference distance (> 8 MiB, windowLog 24) decodes byte-identically; includes the FCS-less variant (streamed-compression shape). Suite: 49/49.
Fixed
- Layer-diff kind badge truncated to four characters ("ADDE"); now fits ADDED / MODIFIED / DELETED.
- Wasted stat explains the definition in place (tooltip + sub-line, defined as dive's waste estimate); wasted-space panel documents dive's formula and the reclaimable rule; README explains both metrics with the
test3-zstd.tarexample (5.39 MB wasted, 3.6% efficiency, 5.20 MB reclaimable). - Removed the meta Content-Security-Policy that broke headless Chromium's first-analysis flow (#16); it will return only behind a green browser-bench run.
- README: efficiency/wasted bullet states dive's actual formulas; the "file contents" claim describes the real pipeline (uncompressed → headers only; compressed → decompressed locally, zstd additionally sha256-hashed for
diff_ids); AI-assistance disclosure added; hard-coded test counts removed from prose (CI badge authoritative). - README /
tools/verify-fixtures.mjsdocument the exact dive ref used for golden files: committed goldens exist only on divemain(dive#727); the verifier pins upstream commite97febbeb6956b11f679f6d823762752185e3fef. Released tags incl. v0.13.1 contain nointernal/imagefixturetree — cloning them silently skips all 17 fixtures. Image comparisons vs the dive CLI continue to use the released v0.13.1. - Backup tags
backup/*-pre-rewrite-2026-11-06and the merged session branches deleted 2026-11-07. - Stale worker comment in
src/core/analyze.jscorrected.
Changed
- GitHub Actions: checkout v7 · setup-node v7 · upload-artifact v7 · configure-pages v6 · upload-pages-artifact v5 · deploy-pages v5.
What was verified (node v22.22.3)
npm test→ 49/49 pass- dive goldens vs pinned upstream commit
e97febbeb6956b11f679f6d823762752185e3fef→ 17/17 passed, 0 failed, 0 skipped - CI on
main(34a1def):unit tests + verification against dive's goldens— success ·CI— success ·Deploy to GitHub Pages— success ·Browser benchmark(Chromium; cold/warm + fixture assertions) — success - Live site (https://revolover00.github.io/layerscope/) serves this version: confirmed the Reclaimable card and the updated wasted/reclaimable definitions
Known limits
- Tested in Chromium only (real-browser assertions and CI). Safari/Firefox not covered.
- zstd back-reference window: the fallback JS decoder is verified on frames with > 8 MiB back-reference distance (windowLog 24); node's zlib ignores
windowBitsfor zstd (window must be forced viaparams), which is why the test usesZSTD_c_windowLogand why oversized/undecodable frames rely on the 160 MiB two-tier cap — refused pre-allocation (content size present) or mid-decode (no FCS) — rather than on node zlib settings. Wasteddeliberately keeps dive's definition (surviving copy included) — layerscope is byte-comparable with dive;Reclaimableis the flattened-image number.- Nothing is uploaded; all decoding happens locally in the browser.
layerscope v0.1.0
First public cut of layerscope — the browser-only Docker image inspector.
Highlights:
- Drop a
docker savetarball (legacymanifest.jsonor OCIindex.json) — everything runs locally in your browser, nothing is uploaded, no backend - OCI multi-manifest indexes (e.g.
docker buildx --platform) get an in-place platform picker;linux/amd64by default with a warning that names the selected manifest - Per-layer added/modified/deleted diffs (whiteouts + opaque dirs), wasted-space analysis and efficiency score with dive's exact formula
- Top 20 largest files (two scopes), filterable lists, copyable creating commands
- zstd layer support — native
DecompressionStream('zstd')where the browser provides it, otherwise a vendored pure-JavaScript streaming decoder (fzstd, MIT; no shared linear memory). Every fallback-decoded layer is sha256-verified against the image config'srootfs.diff_ids; the 160 MiB fallback limit is refused pre-allocation for sized frames and enforced mid-decode otherwise (overshoot ≤ one 128 KiB zstd block) - gzip layers stream end-to-end; large files via
File.slice— the outer archive is never loaded whole into memory - UI: Vercel-style dark system, Geist Sans/Mono self-hosted (OFL), no frameworks, static site on GitHub Pages
Verified: 44 unit tests (npm test), jsdom UI smoke test, decoder soak (2000× sha256-verified + 50 analyses) green in CI, headless-Chromium benches (desktop 1440×900 / mobile 390×844, zero JS errors, zero overflow), 17/17 dive golden fixtures, and the real-public-images job vs the dive CLI — all green on main at the time of tagging.
History note: on 2026-11-06 the git history was rewritten to a single author (revolover00); the previous history is preserved under the backup/*-pre-rewrite-2026-11-06 tags on the remote.
MIT licensed. See CHANGELOG.md for the full changelog and SECURITY.md to report a vulnerability.