Skip to content

Jules/go refactor#18

Closed
jdrean wants to merge 4 commits into
mainfrom
jules/go-refactor
Closed

Jules/go refactor#18
jdrean wants to merge 4 commits into
mainfrom
jules/go-refactor

Conversation

@jdrean

@jdrean jdrean commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Rewrite modelwrap in Go with a deterministic packer/consumer, add encrypted EMWP artifacts, and ship a pinned modelwrap CLI that launches the packer in a digest-pinned container. Adds a formal spec, CI/e2e, and a release that publishes both image and CLI.

  • New Features

    • Go module github.com/tinfoilsh/modelwrap: wrap (packer) and unwrap (consumer) with a shared protocol in the root package.
    • modelwrap CLI launcher runs packing inside the pinned image; supports --model-dir, --encrypt, --key-file, --verify, --image, and --local. Secrets (HF_TOKEN, PRIVATE_MODEL_KEY_B64) are passed through without leaking values.
    • EMWP: GPT + dm-crypt over MWP with HKDF-SHA256 key derivation; emits .emwp and .emwp.info; deterministic UUIDs. Offline verify for MWP/EMWP supported.
    • Replaces Python pack.py; downloads via hf from huggingface_hub. EROFS and dm-verity parameters are explicitly pinned for reproducibility.
    • Spec added (SPEC.md). CI runs fmt/vet/tests and e2e; release builds linux/amd64 image and a static CLI embedding the image digest and creates a GitHub release.
  • Migration

    • Container entrypoint is now modelwrap (not python3 pack.py). Update run commands accordingly.
    • For EMWP, pass --encrypt and provide a 64-byte master key via --key-file, PRIVATE_MODEL_KEY_FILE, or PRIVATE_MODEL_KEY_B64; run with --privileged.
    • Plain MWP remains compatible; .mpk and .info are unchanged (legacy mpk alias still accepted).
    • Image targets linux/amd64 only. Override the packer image with --image or MODELWRAP_IMAGE; use --local to bypass the container if needed.

Written for commit ffc95fc. Summary will update on new commits.

Review in cubic

@jdrean jdrean closed this Jun 10, 2026
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