Skip to content

refactor: strip lean-zip to the verified DEFLATE core - #2893

Merged
kim-em merged 3 commits into
masterfrom
strip-to-deflate-core
Aug 20, 2026
Merged

refactor: strip lean-zip to the verified DEFLATE core#2893
kim-em merged 3 commits into
masterfrom
strip-to-deflate-core

Conversation

@kim-em

@kim-em kim-em commented Aug 20, 2026

Copy link
Copy Markdown
Owner

This PR strip the repository down to the pure-Lean verified DEFLATE codec, splitting everything else into sibling repositories. Everything removed here remains available at the pre-split tag.

This PR remove the zlib FFI bindings (now lean-zlib), the tar/ZIP archive layer (moving to lean-archive), the benchmark lab (moving to lean-zip-benchmark, dashboard frozen at the August 2026 refresh), and the process artifacts of the agent-driven development campaign (PLAN.md, PROGRESS.md, 1,131 progress files, plans/, the 557KB SECURITY_INVENTORY.md, pod skills/commands, and the video drafts).

What remains is Zip/Native/, Zip/Spec/ (~32k lines of proof, sorry-free), the four stopgap C primitives, and the native test suite — the library and its tests now build with no system C dependencies (CI's main job installs nothing but elan). The native-vs-zlib conformance suite, RFC-interop checks, and the inflate fuzz harness move to a new dev-only conformance/ sub-package that requires lean-zlib from git, using the same pattern the old bench/ sub-package used to keep test-only dependencies out of the shipped library. The two hero graphs are committed as frozen artifacts under graphs/, the README is rewritten for the reduced scope, and corpus-backed tests fall back to deterministic synthetic data unless LEAN_ZIP_CORPORA_DIR points at a corpora checkout.

Verified locally: lake build && lake test green on a bare shell with no zlib; lake -d conformance build && lake -d conformance test green under nix-shell; sorry count 0.

🤖 Prepared with Claude Code

kim-em and others added 3 commits August 20, 2026 02:11
Split the monorepo into four repositories (everything removed here is
preserved at the pre-split tag):

- the zlib FFI bindings move to kim-em/lean-zlib
- the tar/ZIP archive layer moves to kim-em/lean-archive
- the benchmark dashboard and comparator harness move to
  kim-em/lean-zip-benchmark (frozen at the August 2026 refresh)
- process artifacts (PLAN.md, PROGRESS.md, progress/, plans/,
  SECURITY_INVENTORY.md, agent-harness skills/commands, video drafts)
  are deleted from HEAD

What remains is the pure-Lean verified codec: Zip/Native/, Zip/Spec/,
the four stopgap C primitives, and the native test suite. The library
now builds with no system C dependencies; the native-vs-zlib
conformance tests (including RFC interop and the inflate fuzz harness)
live in the new dev-only conformance/ sub-package, which requires
lean-zlib from git — solving Lake's lack of test-only dependencies via
the same pattern the bench/ sub-package used.

The two hero graphs are committed as frozen artifacts under graphs/;
the README's usage, requirements, and organization sections are
rewritten for the reduced scope, and the four SECURITY_INVENTORY
docstring citations in the core are now self-contained. Corpus-backed
tests (PackedTokens, L7Adaptive, OptimalParse) read real corpora only
when LEAN_ZIP_CORPORA_DIR points at a lean-zip-benchmark checkout,
falling back to deterministic synthetic data.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Findings from an adversarial second-opinion review: point docstrings at
lean-archive's Archive.Zip and lean-zlib's Zlib modules instead of the
removed Zip.Archive / Zip/Gzip.lean / Zip/RawDeflate.lean; state
explicitly that the proofs are about the C primitives' Lean reference
bodies (the C is trusted to match, cross-checked by the conformance
sweeps) and that these plus the runtime are the codec's trusted
computing base; document level 0 and the above-10 clamp; and soften
'proofs re-checked from scratch on every commit' to what CI actually
does under caching.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
'lake -R build' in conformance/ was a no-op (no default targets), so
the CI build step verified nothing; mirror the old bench package's
@[default_target, test_driver] annotation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kim-em
kim-em merged commit 86fde8b into master Aug 20, 2026
3 checks passed
@kim-em
kim-em deleted the strip-to-deflate-core branch August 20, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant