Skip to content

refactor: switch to go everywhere#19

Merged
jdrean merged 2 commits into
mainfrom
jules/go-refactor
Jun 10, 2026
Merged

refactor: switch to go everywhere#19
jdrean merged 2 commits into
mainfrom
jules/go-refactor

Conversation

@jdrean

@jdrean jdrean commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Rewrote Modelwrap in Go and added a modelwrap launcher CLI that runs packing inside a digest‑pinned container for reproducible MWP/EMWP artifacts. Removes the Python packer and adds end‑to‑end tests plus CI/release automation.

  • New Features

    • Go module with wrap (packer), unwrap (consumer), and a root package for shared protocol/constants.
    • modelwrap CLI: launches a pinned image by default; supports --model-dir, --encrypt, --verify, --output/--cache, --image, and --local. Secrets like HF_TOKEN are passed via env without leaking to command lines.
    • Multi‑stage Dockerfile builds a static Go CLI; runtime is a minimal, pinned image with huggingface_hub (hf) for downloads; entrypoint is modelwrap.
    • CI runs gofmt/vet/tests in the same pinned Go image and executes an EMWP round‑trip plus CLI smoke test via test/e2e.sh. Release pushes a linux/amd64 packer image, builds a CLI with the image digest baked in, and publishes a GitHub release with checksums.
    • SPEC documents that reproducibility is tied to the specific digest‑pinned packer image; auditors must use the same digest.
  • Bug Fixes

    • Correctly escape Hugging Face model IDs when calling the Hub API to resolve the default branch SHA, preserving org/name separators and encoding special characters.

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

Review in cubic

Base automatically changed from jules/emwp-packing to main June 10, 2026 00:47

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 20 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread wrap/wrap.go Outdated
@jdrean jdrean force-pushed the jules/go-refactor branch from ffc95fc to fd10ab0 Compare June 10, 2026 00:49
@jdrean jdrean merged commit f00c40f into main Jun 10, 2026
3 checks passed
@jdrean jdrean deleted the jules/go-refactor branch June 10, 2026 15:07
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