Skip to content

Model Manifests and Governance

tonythethompson edited this page Jul 28, 2026 · 4 revisions

Model Manifests & Governance

Section: AI & Inference · ONNX-Execution-Providers · Home · Hardware-Starter-Packs

Every real model needs a manifest entry (license, task, checksums, runtime expectations). Shipping lane is commercial-safe ONNX only. Unknown license = unsafe.

The governance model adheres to a strict "no fake readiness" policy, where states such as model download, license verification, and hardware availability are tracked as separate, distinct entities. This infrastructure supports the application's local-first philosophy while providing clear gates for commercial eligibility and artifact provenance.


Model Governance Framework

Trackdub implements a tiered governance structure to categorize models based on their stability, licensing, and intended use cases. This prevents "contamination" of commercial projects with restricted models.

Model Lanes

The project defines three explicit lanes for model governance:

  1. Commercial Lane: The default, product-safe lane. Models here must have verified code and weight licenses, recorded SHA-256 checksums, and a commercial_use_verified flag set to true.
  2. Non-Commercial Lane: Models restricted from commercial use (e.g., Demucs/HTDemucs). These are blocked from commercial export workflows and require visible user warnings.
  3. Experimental Lane: Used for unstable or partially proven providers (e.g., GPU-heavy or non-ONNX models). These can be commercial candidates but are not stable enough for default product behavior.

The "No Fake Readiness" Rule

A core tenant of Trackdub governance is the separation of readiness states. The system distinguishes between multiple phases of model availability to ensure transparency.

flowchart TD
    A[Provider Registered] --> B[Model Manifest Present]
    B --> C[Model Files Downloaded]
    C --> D[Checksum Verified]
    D --> E[License Reviewed]
    E --> F{Commercial Allowed?}
    F -- Yes --> G[Commercial Use Verified]
    F -- No --> H[Non-Commercial/Experimental]
    G --> I[Model Ready for Stage]
Loading

The diagram above illustrates the sequential validation steps required before a model is considered fully "ready" for a pipeline stage.


Model Manifest Specification

The model manifest is a JSON-based document that defines the technical and legal metadata for a specific AI model. The structure is governed by a schema that enforces strict property requirements.

Key Manifest Fields

Field Type Description
model_id string Unique identifier for the model (e.g., "example/model").
task string The specific AI task (asr, translation, tts, vad, diarization, etc.).
license string The license type (MIT, Apache-2.0, CC-BY-NC-4.0, etc.).
sha256 string SHA-256 hash of the model artifact for integrity verification.
commercial_use_verified boolean Final product gate indicating both license confidence and artifact integrity are verified.
expected_runtime string Target runtime (e.g., windows-ml, onnxruntime-directml, trt-rtx).
variants array List of model variants including entry paths and aliases.

Validation Logic

The ModelManifestLoader is responsible for parsing and validating these manifests at load time. It specifically enforces commercial policy by checking the commercial_allowed and commercial_use_verified fields.

// Example of validation concept (derived from metadata)
// License: "unknown" must be treated as unsafe for commercial lanes.
// commercial_use_verified must not be true if sha256 is empty.

License Policy & Compliance

Trackdub's license policy is designed to protect users from unintentional copyright or license violations. This is achieved through a combination of manifest metadata and automated evaluators.

Commercial Safety Evaluator

The CommercialSafeEvaluator reads manifest fields to determine if a model can be used in the commercial shipping lane. Unlike some systems, there is no runtime "CommercialSafeMode" flag that can be toggled by a user; the enforcement is hardcoded into the manifest authoring and loading process.

Rules for License Verification:

  • Repository License is Insufficient: Developers must verify pretrained weights, dependency models, and training-data restrictions separately.
  • Unknown Licenses: Models with unknown licenses are treated as unsafe by default.
  • Voice Cloning: Requires an explicit consent flow metadata field in the manifest.
  • Attribution: Models requiring attribution must be tracked so they can appear in project metadata.

Infrastructure & Model Management

The ModelManager serves as the first-startup gate for verifying the readiness of bundled ONNX models. It works in conjunction with the ModelManifestLoader and inventory services.

Model Manifest Architecture

classDiagram
    class ModelManifest {
        +string model_id
        +string task
        +string license
        +string sha256
        +bool commercial_allowed
        +bool commercial_use_verified
    }
    class ModelManifestLoader {
        +LoadManifest(path)
        +ValidateLicense(ModelManifest)
    }
    class BundledModelManifestRegistry {
        +GetModelsByTask(task)
    }
    ModelManifestLoader --> ModelManifest : creates/validates
    BundledModelManifestRegistry o-- ModelManifest : contains
Loading

The class diagram shows the relationship between the manifest data structures, the loading/validation logic, and the central registry.

Artifact Integrity

Integrity is maintained by recording what created an artifact and which model/provider was used. The sha256 field in the manifest is mandatory for any model marked as commercial_use_verified.


Conclusion

The Model Manifests & Governance system in Trackdub is the primary safeguard ensuring that the local-first dubbing workstation remains technically sound and commercially viable. By treating model metadata as code-enforced contracts, Trackdub maintains a transparent pipeline where every AI-driven result can be traced back to its specific model version, license status, and integrity hash. This rigorous approach to governance is essential for a professional workstation that prioritizes user privacy and legal safety.

Clone this wiki locally