Skip to content

Commit 4aadcd2

Browse files
authored
Merge pull request #21 from mogilventures/feat/v0.1.0-publish-readiness
feat: prepare Mogil Bench v0.1.0 public alpha
2 parents 27e1601 + 96973e8 commit 4aadcd2

18 files changed

Lines changed: 4855 additions & 20 deletions

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@ jobs:
3030
mogil-bench run packs/sample-v1.yaml --output-dir /tmp/mogil-bench-ci
3131
mogil-bench artifact validate /tmp/mogil-bench-ci/blindbench.json
3232
33+
distribution:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-python@v5
38+
with:
39+
python-version: "3.12"
40+
cache: pip
41+
- run: python -m pip install --upgrade pip build
42+
- run: python -m build
43+
- name: Clean wheel install and credential-free CLI smoke
44+
run: |
45+
python -m venv /tmp/mogil-wheel-smoke
46+
/tmp/mogil-wheel-smoke/bin/python -m pip install dist/*.whl
47+
/tmp/mogil-wheel-smoke/bin/mogil-bench --help
48+
/tmp/mogil-wheel-smoke/bin/mogil-bench pack validate packs/sample-v1.yaml
49+
/tmp/mogil-wheel-smoke/bin/mogil-bench run packs/sample-v1.yaml \
50+
--output-dir /tmp/mogil-wheel-sample
51+
/tmp/mogil-wheel-smoke/bin/mogil-bench artifact validate \
52+
/tmp/mogil-wheel-sample/blindbench.json
53+
3354
docker-smoke:
3455
runs-on: ubuntu-latest
3556
steps:

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses [Semantic Versioning](https://semver.org/).
4+
5+
## [Unreleased]
6+
7+
## [0.1.0] - Unreleased
8+
9+
Initial public-alpha release candidate.
10+
11+
### Added
12+
13+
- Versioned benchmark packs and deterministic local sample execution.
14+
- Harbor 0.18.0 Docker and optional Daytona 0.196.0 execution boundaries.
15+
- Pi 0.80.6 trajectory capture, strict evidence validation, checksummed run bundles, and reviewer-safe projections.
16+
- Guarded BlindBench legacy-artifact and strict-evidence upload commands.
17+
- Deterministic two-arm BlindBench paired-comparison CSV export.
18+
- Public contribution, security, release, and compatibility documentation.
19+
20+
### Security
21+
22+
- Deny-by-default command/agent execution, bounded evidence, strict identity/count reconciliation, secret-reference policies, and failure-safe artifact publication.
23+
24+
[Unreleased]: https://github.com/mogilventures/mogil-bench/compare/v0.1.0...HEAD
25+
[0.1.0]: https://github.com/mogilventures/mogil-bench/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Contributing
2+
3+
Mogil Bench is a public-alpha project. Small, reviewable changes that preserve its fail-closed evidence and execution boundaries are welcome.
4+
5+
## Development setup
6+
7+
Python 3.12 and Docker are required for the full suite.
8+
9+
```bash
10+
python -m venv .venv
11+
. .venv/bin/activate
12+
python -m pip install -e '.[dev]'
13+
```
14+
15+
Before opening a pull request, run:
16+
17+
```bash
18+
pytest -q -m 'not daytona_smoke'
19+
ruff check .
20+
mypy
21+
pytest -q -m docker_smoke tests/test_harbor_docker_smoke.py
22+
git diff --check
23+
```
24+
25+
Tests must not require paid provider calls unless they use the existing explicit live gate. Add behavior-first tests for changes to validation, publication, uploads, or evidence handling. Do not add credentials, customer data, verifier canaries, generated run output, or mutable runtime references.
26+
27+
## Pull requests
28+
29+
- Link the issue and explain the observable behavior change.
30+
- Keep dependency and runtime-pin changes separate and explicitly approved.
31+
- Update user or release documentation when a command or operational boundary changes.
32+
- Do not weaken count reconciliation, identity checks, checksum checks, cleanup checks, or reviewer blinding to make a test pass.
33+
34+
By contributing, you agree that your contribution is licensed under the repository's MIT license.

README.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Mogil Bench
22

3-
Mogil Bench v1 is a local Python CLI for running versioned, real-work-like benchmark packs. It keeps Hermes/text and Pi/coding tasks distinct while exporting both as BlindBench `eval-record` v1 JSON and JSONL for blind human review.
3+
[![CI](https://github.com/mogilventures/mogil-bench/actions/workflows/ci.yml/badge.svg)](https://github.com/mogilventures/mogil-bench/actions/workflows/ci.yml)
4+
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)
5+
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
6+
[![Status: public alpha](https://img.shields.io/badge/status-public_alpha-orange.svg)](CHANGELOG.md)
7+
8+
Mogil Bench 0.1.0 is a **public alpha** CLI for reproducible coding-agent evaluation: versioned benchmark packs, Harbor execution, checksummed evidence, reviewer-safe BlindBench exports, and deterministic paired comparisons. Its core execution/evidence path is live-proven, but command and evidence contracts may still change before a stable release.
9+
10+
## Status and boundaries
11+
12+
- Supported: Python 3.12, `harbor==0.18.0`, optional `daytona==0.196.0`, and container Pi `0.80.6`.
13+
- Credential-free local sample and Docker fixture workflows are continuously tested.
14+
- Provider execution requires explicit pack and CLI gates; paid Daytona parity remains manually gated.
15+
- Local Docker is not VM-grade isolation. BlindBench campaign creation, training, PyPI publication, and backend/storage changes are outside this alpha.
16+
- Never use customer data or secrets in packs. See [`SECURITY.md`](SECURITY.md), [`CONTRIBUTING.md`](CONTRIBUTING.md), and the [release runbook](docs/release.md).
417

518
## Install
619

@@ -212,16 +225,38 @@ A completed run can be re-exported offline from its retained, checksummed per-at
212225
mogil-bench evidence re-export /tmp/mogil-daytona-provider-parity
213226
```
214227

215-
Create a **fresh BlindBench project** for a corrected re-export; do not upload it into a project containing rows from an earlier diagnostic import. Validate and dry-run the exact fresh-project uploads before adding `--confirm`:
228+
Turn that completed two-arm run into BlindBench's paired-comparison CSV without rerunning a provider. Candidate configuration IDs are selected explicitly on the command line; rows are ordered by immutable task ID and one-based attempt, and only a complete quality-eligible matrix with stable task revisions is accepted. For the shipped 3-task × 2-arm × 3-attempt profile this writes exactly nine cases. Re-exporting the same evidence produces identical bytes, and validation finishes before the destination is replaced.
229+
230+
```bash
231+
mogil-bench export paired-comparison /tmp/mogil-daytona-provider-parity \
232+
--candidate-a anthropic-direct \
233+
--candidate-b openrouter-routed \
234+
--output /tmp/mogil-daytona-provider-parity/paired-comparison.csv
235+
```
236+
237+
`context`, `candidate_a`, and `candidate_b` come only from the blinded reviewer projection. The standard `candidate_a_model`, `candidate_b_model`, and harness columns retain owner-visible, provider-qualified route and harness provenance; Mogil emits no ignored custom owner columns and adds no arm labels to reviewer-visible text. Import the CSV through BlindBench's paired-comparison flow; campaign creation remains a manual BlindBench operation.
238+
239+
A credential-free, fixture-backed reproduction of the nine-case contract is available from a repository checkout:
240+
241+
```bash
242+
mogil-bench export paired-comparison tests/fixtures/completed-parity-run \
243+
--candidate-a anthropic-direct \
244+
--candidate-b openrouter-routed \
245+
--output /tmp/mogil-fixture-comparison.csv
246+
python -c 'import csv; print(len(list(csv.DictReader(open("/tmp/mogil-fixture-comparison.csv")))))'
247+
# 9
248+
```
249+
250+
Create a **fresh BlindBench project** for a corrected re-export; do not upload it into a project containing rows from an earlier diagnostic import. Validate and dry-run the exact fresh-project uploads before adding `--confirm`. The default upload timeout is 120 seconds (bounded to at most 600); set `--timeout 120` explicitly in recorded runbooks:
216251

217252
```bash
218253
mogil-bench evidence validate /tmp/mogil-daytona-provider-parity/mogil.harbor-evidence.jsonl
219254
mogil-bench artifact validate /tmp/mogil-daytona-provider-parity/blindbench.jsonl
220255
mogil-bench evidence upload /tmp/mogil-daytona-provider-parity/mogil.harbor-evidence.jsonl \
221-
--endpoint https://BLINDBENCH_HOST/ingest/v1/eval-runs
256+
--endpoint https://BLINDBENCH_HOST/ingest/v1/eval-runs --timeout 120
222257
BLINDBENCH_AUTOMATION_TOKEN='project-token' mogil-bench evidence upload \
223258
/tmp/mogil-daytona-provider-parity/mogil.harbor-evidence.jsonl \
224-
--endpoint https://BLINDBENCH_HOST/ingest/v1/eval-runs --confirm
259+
--endpoint https://BLINDBENCH_HOST/ingest/v1/eval-runs --timeout 120 --confirm
225260
```
226261

227262
The private envelope retains provider/model provenance and stable logical task/configuration identity. Its `reviewer` projection contains the shared task identity, blinded `isolated-sandbox` class, trajectory, objective outcomes, and bounded evidence—but no provider, model, vendor, configuration ID, credential, canary, absolute path, secret name, or secret value—so BlindBench can group same-task attempts without exposing the comparison arm to reviewers.
@@ -250,10 +285,10 @@ Upload is dry-run by default and validates both artifact and endpoint without ma
250285

251286
```bash
252287
mogil-bench artifact upload /tmp/mogil-sample-run/blindbench.json \
253-
--endpoint https://DEPLOYMENT.convex.site/ingest/v1/traces
288+
--endpoint https://DEPLOYMENT.convex.site/ingest/v1/traces --timeout 120
254289
```
255290

256-
A real upload additionally requires `BLINDBENCH_INGEST_TOKEN` and `--confirm`. Only HTTPS `*.convex.site/ingest/v1/traces` endpoints are accepted. The CLI never prints the token or record content and reports only response counts. It treats `invalid > 0`, `truncated: true`, a malformed counts response, or an imported-plus-deduped count that differs from the intended batch size as an upload failure. Tests make no network calls.
291+
A real upload additionally requires `BLINDBENCH_INGEST_TOKEN` and `--confirm`. Only HTTPS `*.convex.site/ingest/v1/traces` endpoints are accepted. Both upload paths default to a bounded 120-second timeout suitable for the canonical 18-record batch and accept `--timeout` values only through 600 seconds. A timeout means the outcome is unknown—the server may have completed—so Mogil never retries automatically. Check destination state, then resend the exact artifact if needed; deterministic IDs make that retry idempotent. HTTP errors report only status and a bounded, sanitized diagnostic. The CLI never prints the token or request content and reports only response counts. It treats `invalid > 0`, `truncated: true`, a malformed counts response, or an imported-plus-deduped count that differs from the intended batch size as an upload failure. Tests make no external network calls.
257292

258293
Prompts and outputs are reviewer-visible and free text is not automatically scrubbed by legacy BlindBench exports. Never benchmark secrets or customer data; set `privacy_class` accurately. Hidden verifier expectations are not exported.
259294

@@ -270,9 +305,9 @@ Upload is dry-run by default. The public endpoint must be HTTPS (HTTP is accepte
270305

271306
```bash
272307
mogil-bench evidence upload EVIDENCE.json \
273-
--endpoint https://blindbench.example/ingest/v1/eval-runs
308+
--endpoint https://blindbench.example/ingest/v1/eval-runs --timeout 120
274309
BLINDBENCH_AUTOMATION_TOKEN='project-token' mogil-bench evidence upload EVIDENCE.json \
275-
--endpoint https://blindbench.example/ingest/v1/eval-runs --confirm
310+
--endpoint https://blindbench.example/ingest/v1/eval-runs --timeout 120 --confirm
276311
```
277312

278313
The request body is a bounded batch of complete authoritative Pydantic artifacts, not reviewer projections or legacy trace records:
@@ -301,7 +336,7 @@ A successful consumer response uses exactly these completion counters (additiona
301336
}
302337
```
303338

304-
`complete` must equal the submitted `runs` count, `imported + deduped` must equal that same count, and `invalid` must be zero. A conflict or partial batch must not report a complete count. The token is a project Automation token and is never printed. Errors disclose only exception classes, never token, response body, prompts, or outputs.
339+
`complete` must equal the submitted `runs` count, `imported + deduped` must equal that same count, and `invalid` must be zero. A conflict or partial batch must not report a complete count. The token is a project Automation token and is never printed. HTTP errors disclose only status and a bounded, sanitized diagnostic—never authorization, request payloads, or unrestricted response bodies.
305340

306341
## Explicit deferrals
307342

SECURITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Security Policy
2+
3+
## Supported versions
4+
5+
Mogil Bench is a public alpha. Security fixes are applied to the latest code on `main`; no older release line is currently supported.
6+
7+
## Reporting a vulnerability
8+
9+
Do **not** open a public issue with vulnerability details, credentials, customer data, or benchmark evidence. Use the repository's **Security** tab to submit a private vulnerability report. If private reporting is unavailable, contact the repository owner, [@nmogil](https://github.com/nmogil), privately and ask for a secure reporting channel before sharing details.
10+
11+
Include the affected version/commit, impact, minimal reproduction, and any suggested mitigation. Remove all live credentials and private evidence from the report. Maintainers will acknowledge receipt, coordinate validation and remediation privately, and publish an advisory when appropriate.
12+
13+
## Operational boundaries
14+
15+
Mogil Bench intentionally treats benchmark packs, provider credentials, retained trajectories, hidden verifiers, and upload destinations as sensitive boundaries. The local Docker backend is not a VM-grade isolation boundary. Follow the README's explicit execution gates and never place secret values in packs, command arguments, logs, fixtures, or repository files.

docs/release.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# v0.1.0 release runbook
2+
3+
This is an operator checklist, not authorization to publish. A human maintainer must review the release candidate and explicitly approve tagging and the GitHub release. PyPI publication is deferred.
4+
5+
## 1. Establish a clean release candidate
6+
7+
- [ ] Confirm the implementation PR is reviewed, merged, and all required GitHub checks pass.
8+
- [ ] Start from an up-to-date, clean `main`; `git status --short` must be empty.
9+
- [ ] Confirm `pyproject.toml`, `CHANGELOG.md`, and the intended tag all say `0.1.0` / `v0.1.0`.
10+
- [ ] Confirm Python 3.12, Harbor 0.18.0, Daytona SDK 0.196.0, and container Pi 0.80.6 pins are unchanged.
11+
- [ ] Run `git diff --check`.
12+
13+
## 2. Run the release gates
14+
15+
From a fresh Python 3.12 environment:
16+
17+
```bash
18+
python -m pip install -e '.[dev,daytona]'
19+
pytest -q -m 'not daytona_smoke'
20+
ruff check .
21+
mypy
22+
docker info
23+
pytest -q -m docker_smoke tests/test_harbor_docker_smoke.py
24+
```
25+
26+
The Docker smoke must pass; a skip is not success. The paid/manual Daytona smoke is not a release requirement.
27+
28+
## 3. Build and inspect distributions
29+
30+
```bash
31+
rm -rf build dist
32+
python -m pip install build
33+
python -m build
34+
python -m zipfile --list dist/mogil_bench-0.1.0-py3-none-any.whl
35+
```
36+
37+
- [ ] Both wheel and sdist exist.
38+
- [ ] The wheel includes `mogil_bench/py.typed` and no tests, credentials, run output, or customer data.
39+
- [ ] Package metadata and project URLs are accurate.
40+
41+
Create a clean environment and exercise the installed wheel from the repository checkout:
42+
43+
```bash
44+
python -m venv /tmp/mogil-v010-wheel
45+
/tmp/mogil-v010-wheel/bin/python -m pip install dist/*.whl
46+
/tmp/mogil-v010-wheel/bin/mogil-bench --help
47+
rm -rf /tmp/mogil-v010-sample
48+
/tmp/mogil-v010-wheel/bin/mogil-bench pack validate packs/sample-v1.yaml
49+
/tmp/mogil-v010-wheel/bin/mogil-bench run packs/sample-v1.yaml \
50+
--output-dir /tmp/mogil-v010-sample
51+
/tmp/mogil-v010-wheel/bin/mogil-bench artifact validate \
52+
/tmp/mogil-v010-sample/blindbench.json
53+
```
54+
55+
## 4. Security and immutable-runtime review
56+
57+
- [ ] Run the organization-approved secret scan over the checkout **and Git history**; investigate every finding without printing credential values.
58+
- [ ] Confirm fixtures and docs contain only fictional/public data.
59+
- [ ] Confirm `packs/daytona-provider-parity-v1.yaml` uses the reviewed immutable `image@sha256` reference.
60+
- [ ] Follow `docs/daytona-runtime-image.md` to verify that immutable runtime reference and its Python 3.12, `/bin/sh`, and Pi 0.80.6 contract. Do not rebuild or repoint it as part of this release.
61+
- [ ] Confirm the release commit is exactly the reviewed clean `main` commit.
62+
63+
## 5. Publish after explicit approval
64+
65+
- [ ] Create the annotated `v0.1.0` tag at the reviewed release commit and push it without rewriting history.
66+
- [ ] Create the GitHub release from that tag, mark it as a pre-release/public alpha, and use the `CHANGELOG.md` notes.
67+
- [ ] Attach the freshly built wheel and sdist and record their SHA-256 digests.
68+
- [ ] Recheck the tag, GitHub release assets, and immutable runtime reference from a fresh client.
69+
- [ ] Do not publish to PyPI until package-data policy and trusted publishing receive separate approval.

pyproject.toml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,23 @@ build-backend = "hatchling.build"
55
[project]
66
name = "mogil-bench"
77
version = "0.1.0"
8-
description = "Safe local benchmark runner and BlindBench artifact exporter"
8+
description = "Safe Harbor-based coding evaluation and BlindBench evidence CLI"
99
readme = "README.md"
1010
requires-python = ">=3.12,<3.13"
1111
license = {text = "MIT"}
12+
authors = [{name = "Mogil Ventures"}]
13+
maintainers = [{name = "Noah Mogil"}]
14+
keywords = ["benchmark", "coding-agents", "evaluation", "harbor"]
15+
classifiers = [
16+
"Development Status :: 3 - Alpha",
17+
"Environment :: Console",
18+
"Intended Audience :: Developers",
19+
"License :: OSI Approved :: MIT License",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.12",
23+
"Typing :: Typed",
24+
]
1225
dependencies = [
1326
"harbor==0.18.0",
1427
"pydantic>=2.7,<3",
@@ -31,6 +44,12 @@ dev = [
3144
[project.scripts]
3245
mogil-bench = "mogil_bench.cli:app"
3346

47+
[project.urls]
48+
Homepage = "https://github.com/mogilventures/mogil-bench"
49+
Repository = "https://github.com/mogilventures/mogil-bench"
50+
Issues = "https://github.com/mogilventures/mogil-bench/issues"
51+
Changelog = "https://github.com/mogilventures/mogil-bench/blob/main/CHANGELOG.md"
52+
3453
[tool.hatch.build.targets.wheel]
3554
packages = ["src/mogil_bench"]
3655

0 commit comments

Comments
 (0)