Skip to content

Commit e0117ee

Browse files
QuantQJclaude
andcommitted
Add CI workflow, CHANGELOG, and expanded README
- GitHub Actions CI: test on Python 3.9/3.11/3.12/3.13, auto-publish on tag - CHANGELOG for v1.0.0 - README: badges, comparison table vs OMS, full identity card schema Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 66bd1df commit e0117ee

3 files changed

Lines changed: 105 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: pip install -e ".[dev]"
26+
27+
- name: Run tests
28+
run: pytest tests/ -v --tb=short
29+
30+
publish:
31+
needs: test
32+
runs-on: ubuntu-latest
33+
if: startsWith(github.ref, 'refs/tags/v')
34+
permissions:
35+
id-token: write
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: "3.12"
43+
44+
- name: Install build tools
45+
run: pip install build
46+
47+
- name: Build package
48+
run: python -m build
49+
50+
- name: Publish to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Changelog
2+
3+
## v1.0.0 (2026-03-25)
4+
5+
Initial release.
6+
7+
### Features
8+
9+
- **Ed25519 model signing** with domain-prefixed messages (`modelsign-v1:`)
10+
- **Model Identity Card** — structured, signed metadata (architecture, base model, training, eval metrics, provenance)
11+
- **RFC 8785 canonical JSON** for deterministic, cross-platform signature verification
12+
- **Streaming SHA-256** for large model files (1MB chunks, no full-file memory load)
13+
- **Directory support** — sign multi-file models with recursive manifests
14+
- **TOFU keyring** — trust-on-first-use with persistent trusted key store
15+
- **CLI commands**: `sign`, `verify`, `inspect`, `keygen`, `keyring`, `version`
16+
- **Python SDK** — all modules independently importable
17+
- **Response signing middleware** (optional) for API endpoint authenticity
18+
- **Version migration policy** — forward-compatible .sig format with semver checks

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# modelsign
22

3+
[![CI](https://github.com/QuantQJ/modelsign/actions/workflows/ci.yml/badge.svg)](https://github.com/QuantQJ/modelsign/actions/workflows/ci.yml)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
6+
37
Sign AI models with identity. Verify anywhere.
48

5-
`modelsign` cryptographically binds model files to a signed identity card who made this model, what it's based on, what it claims to be. Ed25519 signatures, zero ML dependencies, works with any model format.
9+
`modelsign` cryptographically binds model files to a signed identity card -- who made this model, what it's based on, what it claims to be. Ed25519 signatures, zero ML dependencies, works with any model format.
610

711
## Install
812

@@ -79,6 +83,37 @@ from modelsign import (
7983
- Model safety, fairness, or legal compliance
8084
- Cryptographic timestamping (timestamps are metadata, not proofs)
8185

86+
## How It Compares
87+
88+
| | modelsign | OpenSSF Model Signing (OMS) |
89+
|---|---|---|
90+
| **Focus** | Simple signing + rich identity | Supply-chain integrity via Sigstore |
91+
| **Identity card** | Embedded (architecture, training, eval metrics) | Minimal (being expanded) |
92+
| **Setup** | `pip install modelsign` | Sigstore toolchain + transparency log |
93+
| **Signing** | Offline, Ed25519, one command | Keyless via OIDC + Rekor transparency |
94+
| **Best for** | Individual fine-tunes, HF uploads, quick sharing | Enterprise supply-chain, NGC publishing |
95+
| **Network required** | No | Yes (Sigstore/Rekor) |
96+
97+
modelsign and OMS are **complementary**. Use modelsign for fast, offline, identity-rich signing. Use OMS when you need transparency logs and keyless verification at enterprise scale.
98+
99+
## Identity Card Schema
100+
101+
| Field | Required | Description |
102+
|---|---|---|
103+
| `name` | Yes | Model name |
104+
| `architecture` | No | Model class (e.g., `LlamaForCausalLM`) |
105+
| `base_model` | No | Parent model name/path |
106+
| `parent_signature` | No | Hash of parent's `.sig` (provenance chain) |
107+
| `version` | No | Semantic version |
108+
| `creator` | No | Person or organization |
109+
| `license` | No | SPDX identifier or name |
110+
| `intended_use` | No | What the model is for |
111+
| `restrictions` | No | What it should NOT be used for |
112+
| `training` | No | `{dataset, dataset_hash, epochs, hardware}` |
113+
| `quantization` | No | Method (e.g., `GPTQ-4bit`) |
114+
| `eval_metrics` | No | Benchmark results (`{mmlu: 0.68}`) |
115+
| `extra` | No | Any additional metadata |
116+
82117
## License
83118

84119
MIT — QJ / ConstantOne (CIP1 LLC)

0 commit comments

Comments
 (0)