source docs/factory/enforcement.md · view on GitHub ↗

Factory Enforcement

World-class docs are not enough by themselves. posttrainllm needs validators that refuse weak artifacts.

Enforcement Layers

LayerToolWhat It Checks
Run bundle schemaposttrainllm factory-run validate runs/<id>Core typed JSON bundle: config, dataset, baseline, candidate, decision, optional artifact
Publish evidenceposttrainllm factory-run publish-check runs/<id>Required evidence files, report sections, slice metrics, trace review, decision, ship/package constraints
Portable publish smokepython3 scripts/check_factory_run_publish.py runs/<id>Same policy in a no-build Python checker for CI/smokes
Target-specific smokesevals/*-smoke.shNo-GPU fixture checks for scripts and report helpers
Public artifact reviewdocs/factory/public-artifacts.mdHuman-readable release state, blockers, competition context

Publish Check

Report-only artifacts may have blockers, but they still need evidence:

posttrainllm factory-run publish-check --allow-report-only runs/<id>

Shipped artifacts are stricter:

posttrainllm factory-run publish-check runs/<id>

For decision=ship, the check requires:

For every run, the check requires:

Current Gap

The native strict check exists, and the Python checker remains as a portable smoke. A later cleanup can remove duplication by making the Python checker call the native binary in CI once the build is cheap enough everywhere.