8000 Phase 6a: portable release bundle and offline replay gate · Issue #50 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content

Phase 6a: portable release bundle and offline replay gate #50

Closed

Description

@Mnehmos

Context

MathOS 1.0 now has canonical pedagogy through #48/PR #49, but the protected publication artifact still contains no pedagogy or portable release projection. SPEC §§19–20 require canonical state to freeze into a hashed release that verifies after the operational SQLite database is unavailable. Corpus/RL exports must derive only from such a frozen release.

This issue is intentionally limited to the Phase 6a release foundation. MathCorpus/MCIP serialization, RL task families, leakage-aware splits, and Comparator packages remain follow-up slices built on this bundle.

Scope

  • Define a closed, bounded Rust-owned release_manifest/1 contract and committed JSON Schema with deterministic identity, explicit profile, exact root identities, sorted path-safe file inventory, hashes, sizes, licenses/restrictions, and replay metadata.
  • Build one portable release from an exact receipt-bound authoritative publication candidate plus an explicit exact reviewed pedagogy path.
  • Materialize the SPEC minimum layout: manifest.json, objects/, edges/, evidence/, artifacts/, environments/, licenses/, replay/, reports/, and exports/.
  • Revalidate current canonical publication authority, learning-unit references/edges/content, review state, and license policy immediately before materialization.
  • Support private/internal bundles with explicit restrictions; make public profile fail closed on any unresolved, restricted, stale, nonpublic, or training-ineligible member.
  • Verify a copied bundle without opening the operational database: reject unsafe paths, missing/extra files, hash/size/schema/reference/license drift, and replay the exact Lean artifact under its pinned environment before reproducing the same manifest hash.
  • Expose deterministic dry-run/build/verify through one shared application service and first-class CLI release family. Keep arbitrary shell and caller-chosen replay commands out of the interface.
  • Extend the protected Pilot A workflow to retain a private portable release containing its exact proof/refutation state and reviewed pedagogy path, then verify it with the workflow database hidden.

Acceptance criteria

  • release_manifest/1 denies unknown fields, bounds every collection/string/size, uses closed enums, requires strictly sorted unique canonical paths, and has a committed schema equality/golden-hash test.
  • Build output contains every required top-level directory and only manifest-listed regular files; temporary/partial output is never accepted as a release.
  • Every included record, edge, evidence item, environment, and artifact is exact and content-addressed; the manifest binds the authoritative publication receipt and exact reviewed pedagogy root/path.
  • License inventory records either a resolved license or an explicit restriction for every exported member. Public build rejects any incompatible/unresolved license, nonpublic redaction/restriction, stale reference, or learning unit not eligible_public.
  • Build is deterministic across process restart and clean destination roots; dry-run writes nothing; existing nonempty destinations and traversal/symlink inputs fail closed.
  • Offline verify succeeds after copying the bundle and hiding/removing the operational database, rehashes every byte, revalidates canonical documents and internal references, executes only the pinned typed Lean replay, and reproduces the manifest hash.
  • Single-byte corruption, missing/extra files, manifest substitution, unsafe paths, wrong receipt/pedagogy identities, and replay failure are rejected with structured errors.
  • CLI tests and the protected Pilot A run build and offline-verify a private release containing source, claim, formalization, authority/fidelity evidence, logical graph, pedagogy graph, learning content, environment, reports, licenses/restrictions, and replay instructions.
  • Status/checklist documentation records exact evidence and explicitly leaves MathCorpus/MCIP, RL/evaluation export, leakage splits, and Comparator support open.

Verification

  • cargo fmt --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace
  • PYTHONPATH=src PYTHONWARNINGS=error::ResourceWarning python -m unittest discover -s tests -v
  • focused real CLI build/copy/hide-database/verify/corrupt playtest
  • protected merged-tree release build and independent artifact audit
  • git diff --check

Activity

  1. Mnehmos commented on Jul 22, 2026

    @Mnehmos
    OwnerAuthor

    Completed and independently audited on protected main.

    Implementation and gates:

    Portable release result:

    • Profile: private
    • Manifest SHA-256: 0417d31249de47d49609913e79021b6a8ba9ec265105a057a29237337c30913d
    • Dry run, build, downloaded manifest, playtest summary, and offline verification all bind that exact hash.
    • 83 members / 191235 bytes: artifact=45, edge=6, environment=1, evidence=7, export=1, license=1, object=10, replay=3, report=9.
    • Five reviewed learning units remain training-ineligible because their grounded source is intentionally restricted/private.
    • The closed slice contains five exact pedagogy prerequisite edges plus one typed research.repairs edge.
    • No SQLite state, unlisted files, or symlinks are present.

    Authority and replay bindings:

    • Receipt: f5c3bc541b53a7a02d402e227107befc08821846819f4dc78218ae77e6ce3053
    • Authority evidence: 019f874b-4681-7191-b926-da0241692cfc@2a8e6dd76c654f4713588fd9966352010cd8c5600845ba079a8ce225a24a071d
    • Fidelity evidence: 019f874b-4700-7e22-8729-3a033c75f9b7@fa7726b62cf0293164cce41b63bbfdb89bd45d865a454fe861bce40f5919611c
    • Publication report binds the exact merge, tree, run 29881189881, proof outcome, pinned Lean 4.32.0, and zero observed axioms.
    • The protected offline verifier hid SQLite, verified hashes/inventory/schemas/references, and replayed Lean successfully in 232 ms.
    • A second downloaded-artifact audit recomputed every member hash and size. Local Windows verification reached the expected MCL_VERIFIER_PLATFORM_MISMATCH only after structural validation of the Linux-bound bundle.

    All acceptance evidence for #50 is now closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0