Skip to content

Harden MoGe mirror staging - #806

Merged
EHxuban11 merged 2 commits into
devfrom
prep/moge2b-mirror
Aug 20, 2026
Merged

Harden MoGe mirror staging#806
EHxuban11 merged 2 commits into
devfrom
prep/moge2b-mirror

Conversation

@EHxuban11

@EHxuban11 EHxuban11 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor
  • Add MoGe-2B source metadata while keeping its converted artifact disabled until an approved deterministic digest exists.
  • Make mirror staging descriptor-bound, byte-capped, create-only, and race-safe on supported platforms.
  • Pin and verify the model card, composite license, and LFS attributes before publication.
  • Add Windows/POSIX publication, mutation, cleanup, and no-side-effect regressions.

Verified: 49 tests passed, 1 Windows symlink-privilege skip; Ruff, format, diff check, and Greptile passed.

Not verified: no 2B weight was downloaded, converted, benchmarked, staged, or uploaded.

Code provenance

  • Staging, validation, publication, and test code is original LibreYOLO code written for this PR.
  • No third-party implementation code was copied or adapted.
  • Source metadata references Ruicheng/moge-2-vitb-normal@54ad3a693e61907ea4633d13dec6ee682fa09419; legal attribution is pinned to microsoft/MoGe@925b8ed835a7a9cdb7578ba15c658a0afc969030 (MIT). The upstream card/license support bytes are fetched verbatim and SHA-256 verified.

Greptile Summary

The PR adds disabled MoGe-2B source metadata and hardens MoGe mirror staging with pinned support artifacts, descriptor-bound validation, byte caps, and create-only publication.

  • Pins model-card, license, and LFS-attributes bytes by revision, size, and SHA-256.
  • Rejects unapproved or digest-mismatched converted checkpoints before staging.
  • Adds platform-specific race and mutation protections with extensive POSIX and Windows regression coverage.
  • Updates the canonical upload filename whitelist for MoGe-2 normal models.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
scripts/mirror_moge2.py Adds pinned MoGe-2B metadata and a descriptor-bound, digest-verified, create-only staging and publication pipeline.
scripts/_mirror_common.py Allows callers to delay staging-directory creation while preserving eager creation as the default.
tests/unit/test_mirror_moge2.py Adds broad validation, mutation, race, cleanup, publication, and platform-specific regression coverage.
skills/libreyolo-upload-hf-model/SKILL.md Adds the three canonical MoGe-2 normal checkpoint filenames to the upload whitelist.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Parse requested sizes] --> B[Require approved converted digest]
    B --> C[Open and hash source checkpoint]
    C --> D[Fetch and verify pinned support artifacts]
    D --> E[Create private staging directory]
    E --> F[Copy, hash, and load-validate checkpoint]
    F --> G[Write five-file mirror contract]
    G --> H[Validate directory binding and inventory]
    H --> I[Atomic create-only publication]
    I --> J[Final binding and content validation]
Loading

Reviews (2): Last reviewed commit: "Seal Windows mirror staging directory" | Re-trigger Greptile

@EHxuban11
EHxuban11 merged commit 9eacad7 into dev Aug 20, 2026
14 checks passed
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