diff --git a/docs/canvas-pilot/changelog.md b/docs/canvas-pilot/changelog.md index fde7f09..f0ab523 100644 --- a/docs/canvas-pilot/changelog.md +++ b/docs/canvas-pilot/changelog.md @@ -6,6 +6,10 @@ ### v0.9.36 +- Fixed theme-pack reproducibility checks across build hosts by using stored ZIP + entries and fixed Unix metadata, avoiding zlib-dependent compressed bytes. + Regenerated all 17 downloads without changing manifests; regression coverage + rebuilds them without zlib and with simulated Windows platform metadata. - Added extra-themes.zip: one import installs all 16 themes, with individual ZIPs still available. Added Dracula, Nord, Gruvbox Dark, Solarized Dark/Light, One Dark, GitHub Dark/Light, Monokai and original Dispatch, Helldivers and Deep Rock Galactic diff --git a/docs/interfaces/theme-packs.md b/docs/interfaces/theme-packs.md index 3cbcb94..a4e7f12 100644 --- a/docs/interfaces/theme-packs.md +++ b/docs/interfaces/theme-packs.md @@ -96,6 +96,11 @@ and `python3 scripts/build-theme-packs.py --check`. Lifecycle tests cover startu selection persistence, live updates, overwrite review/cancellation, changed-file protection, removal, limits, malformed colors/archives and context isolation. +Distributed example ZIPs use stored (uncompressed) entries with a fixed timestamp +and Unix file metadata so exact rebuilds do not depend on the host or zlib version. +Their manifest bytes, pack revisions and version-1 representation are unchanged; +the importer continues to accept both stored and DEFLATE-compressed packs. + ## Bundled collection `docs/theme-packs/extra-themes.zip` is a normal version-1 pack (`extra-themes`, diff --git a/docs/theme-packs/catppuccin.zip b/docs/theme-packs/catppuccin.zip index 2a27994..fcdeac0 100644 Binary files a/docs/theme-packs/catppuccin.zip and b/docs/theme-packs/catppuccin.zip differ diff --git a/docs/theme-packs/deep-rock-galactic.zip b/docs/theme-packs/deep-rock-galactic.zip index 297e42b..f9ad54c 100644 Binary files a/docs/theme-packs/deep-rock-galactic.zip and b/docs/theme-packs/deep-rock-galactic.zip differ diff --git a/docs/theme-packs/detroit-become-human.zip b/docs/theme-packs/detroit-become-human.zip index 8a03f10..fedac8e 100644 Binary files a/docs/theme-packs/detroit-become-human.zip and b/docs/theme-packs/detroit-become-human.zip differ diff --git a/docs/theme-packs/dispatch.zip b/docs/theme-packs/dispatch.zip index 608c296..3d82784 100644 Binary files a/docs/theme-packs/dispatch.zip and b/docs/theme-packs/dispatch.zip differ diff --git a/docs/theme-packs/dracula.zip b/docs/theme-packs/dracula.zip index ea24d06..269b707 100644 Binary files a/docs/theme-packs/dracula.zip and b/docs/theme-packs/dracula.zip differ diff --git a/docs/theme-packs/extra-themes.zip b/docs/theme-packs/extra-themes.zip index b29c10e..fde2a16 100644 Binary files a/docs/theme-packs/extra-themes.zip and b/docs/theme-packs/extra-themes.zip differ diff --git a/docs/theme-packs/github-dark.zip b/docs/theme-packs/github-dark.zip index 9925e8c..f353e30 100644 Binary files a/docs/theme-packs/github-dark.zip and b/docs/theme-packs/github-dark.zip differ diff --git a/docs/theme-packs/github-light.zip b/docs/theme-packs/github-light.zip index f3b74e4..d290085 100644 Binary files a/docs/theme-packs/github-light.zip and b/docs/theme-packs/github-light.zip differ diff --git a/docs/theme-packs/gruvbox-dark.zip b/docs/theme-packs/gruvbox-dark.zip index 98f2a85..2a3fbf0 100644 Binary files a/docs/theme-packs/gruvbox-dark.zip and b/docs/theme-packs/gruvbox-dark.zip differ diff --git a/docs/theme-packs/helldivers.zip b/docs/theme-packs/helldivers.zip index 7894514..19188a0 100644 Binary files a/docs/theme-packs/helldivers.zip and b/docs/theme-packs/helldivers.zip differ diff --git a/docs/theme-packs/minecraft.zip b/docs/theme-packs/minecraft.zip index 8a5b98e..f8b74bb 100644 Binary files a/docs/theme-packs/minecraft.zip and b/docs/theme-packs/minecraft.zip differ diff --git a/docs/theme-packs/monokai.zip b/docs/theme-packs/monokai.zip index 890ae75..0cb5f03 100644 Binary files a/docs/theme-packs/monokai.zip and b/docs/theme-packs/monokai.zip differ diff --git a/docs/theme-packs/nord.zip b/docs/theme-packs/nord.zip index d19ae19..234e7fb 100644 Binary files a/docs/theme-packs/nord.zip and b/docs/theme-packs/nord.zip differ diff --git a/docs/theme-packs/one-dark.zip b/docs/theme-packs/one-dark.zip index df9a6a1..832b332 100644 Binary files a/docs/theme-packs/one-dark.zip and b/docs/theme-packs/one-dark.zip differ diff --git a/docs/theme-packs/solarized-dark.zip b/docs/theme-packs/solarized-dark.zip index df3341e..febac7c 100644 Binary files a/docs/theme-packs/solarized-dark.zip and b/docs/theme-packs/solarized-dark.zip differ diff --git a/docs/theme-packs/solarized-light.zip b/docs/theme-packs/solarized-light.zip index 2dc90f0..03f1440 100644 Binary files a/docs/theme-packs/solarized-light.zip and b/docs/theme-packs/solarized-light.zip differ diff --git a/docs/theme-packs/tokyo-night.zip b/docs/theme-packs/tokyo-night.zip index d0e8197..f95d8b3 100644 Binary files a/docs/theme-packs/tokyo-night.zip and b/docs/theme-packs/tokyo-night.zip differ diff --git a/scripts/build-theme-packs.py b/scripts/build-theme-packs.py index dbf06fe..94e7ac1 100644 --- a/scripts/build-theme-packs.py +++ b/scripts/build-theme-packs.py @@ -13,7 +13,9 @@ def archive(manifest): buffer = io.BytesIO() with zipfile.ZipFile(buffer, 'w') as output: info = zipfile.ZipInfo('manifest.json', (2026, 1, 1, 0, 0, 0)) - info.compress_type = zipfile.ZIP_DEFLATED + # DEFLATE bytes vary with zlib versions, even for identical input. + info.compress_type = zipfile.ZIP_STORED + info.create_system = 3 # Fixed Unix metadata on every build host. info.external_attr = 0o100644 << 16 output.writestr(info, manifest) return buffer.getvalue() diff --git a/tests/test_theme_packs.py b/tests/test_theme_packs.py index efc220a..c46fa12 100644 --- a/tests/test_theme_packs.py +++ b/tests/test_theme_packs.py @@ -4,6 +4,7 @@ import io import json from pathlib import Path import unittest +from unittest import mock import zipfile ROOT = Path(__file__).resolve().parents[1] @@ -13,6 +14,20 @@ spec.loader.exec_module(module) class ThemePackExamples(unittest.TestCase): + def test_rebuild_does_not_depend_on_zlib_or_host_platform(self): + sources = sorted((ROOT / 'docs/theme-packs').glob('*/manifest.json')) + manifests = [source.read_bytes() for source in sources] + manifests.append(module.collection(sources)) + for manifest in manifests: + expected = module.archive(manifest) + with mock.patch.object(zipfile, 'zlib', None), mock.patch('sys.platform', 'win32'): + self.assertEqual(module.archive(manifest), expected) + with zipfile.ZipFile(io.BytesIO(expected)) as archive: + info = archive.getinfo('manifest.json') + self.assertEqual(info.compress_type, zipfile.ZIP_STORED) + self.assertEqual(info.create_system, 3) + self.assertEqual(archive.read(info), manifest) + def test_archives_match_sources_and_rebuild_exactly(self): manifests = list((ROOT / 'docs/theme-packs').glob('*/manifest.json')) self.assertEqual(len(manifests), 16)