ois-validator
Reference validator for the Open Intent Schema (OIS). It checks OIS records, bundles and Quality Passports against the specification and reports every problem with its rule ID and level (spec section 11.1):
- violation: a MUST is broken; the input does not conform.
- warning: R8, R12 and R13 ask for a report; the input still conforms.
- info: a SHOULD is not followed.
Status: pre-alpha. The validator checks Appendix B and every rule of section 5 that can be checked from the records at hand (R1–R5, R8–R17) and passes all conformance fixtures. Signatures are not verified yet, so R12 reports every recorded context as self-declared.
Install
uvx ois-validator bundle.json # run without installing
pip install ois-validator # or install; Python 3.13 or later
Validate
ois-validator bundle.json passport.json
ois-validator --format json finding.json
cat bundle.json | ois-validator -
The input is one JSON document per file: a single record, a bundle, or a passport as an in-toto Statement v1. Exit code 0 means every file conforms, 1 means at least one violation, 2 means a file could not be read.
From Python:
from ois_validator import validate
result = validate(document)
result.conforms # False if any report is a violation
result.reports # list of Report(level, rule, message, path)
Level 1: records from JUnit XML
ois-junit turns the JUnit XML that almost every test framework writes (pytest --junitxml,
Maven Surefire, Gradle, jest-junit, Playwright, go-junit-report, ...) into a bundle, as the
quick start in spec section 11.4 describes. Run it in the Git checkout the tests ran in:
ois-junit build/test-results/*.xml \
--namespace https://ois.acme.example \
--suite "Team Billing" \
--run "$CI_PIPELINE_URL" \
--output ois-bundle.json
The bundle holds an actor for the adapter and one for the test suite, a characterization intent
in draft with one criterion per test case, an artifact per test file and an evidence record per
result with derivedFrom: unknown. Intent coverage is zero until intents are approved and
tests are derived from them: the honest baseline for an existing system.
- Ids live under
--namespace, a URI under your domain. Criterion keys areTC-plus a hash of class and test name, so they stay valid and stable for any test name. Artifact ids follow path and content, so a changed test file becomes a new artifact. - Test files come from the
fileattribute, or from the class name (com.acme.InvoiceTestfindssrc/test/java/com/acme/InvoiceTest.java). Their digest is thesha256of the file atHEADplusgitCommit; a test whose file is not found getsgitCommitalone. - Location is
git+<origin>@<HEAD>with any credentials removed;--locationoverrides it. - Timestamps: a test suite's
timestampwith an offset becomesobservedAt; without an offset, which JUnit allows, the time the report file was written is used.
ois-junit validates the bundle before writing it and exits with 1 instead of writing an
invalid one.
Development
Requires uv.
uv sync
uv run pytest
uv run ruff check && uv run ruff format --check
uv run mypy src tests scripts
The schema in src/ois_validator/schemas/, the examples in tests/examples/ and the conformance
fixtures in tests/fixtures/ are copies from the
specification repository. spec.lock
names the commit they come from, and CI fails if a copy differs from that commit. Never edit them
here; update them from a clean checkout of the specification:
uv run scripts/sync_spec.py ../openintentschema
tests/test_fixtures.py runs every fixture and compares the reports for the rules listed in
IMPLEMENTED. Add a rule there once the validator checks it.
Releases
Set version in pyproject.toml, merge, then push a tag v<version>. The workflow
release.yml checks that tag and version match, builds the package, smoke-tests the wheel and
publishes it to PyPI with trusted publishing (no stored token; PyPI records signed attestations).
License
Apache-2.0. Commits need a DCO sign-off (git commit -s).
Metadata
Release files for ois-validator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ois_validator-0.1.0.tar.gz | 23.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ois_validator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.3 kB
Release files / ois_validator-0.1.0.tar.gz
| Download URL | ois_validator-0.1.0.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e1a206217152405d03a8463817fb2ac5d1e99e7d59b2f91fc9889f41c70708b
|
|
BLAKE2b-256 checksum How to use checksums |
e1c007cd757ecc691e1d0d2db7d7c91d7f15d4709dcb5b306aee56dfeb8e0d79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / ois_validator-0.1.0-py3-none-any.whl
| Download URL | ois_validator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 27.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7db08be947dd3574c6021251cb5f7ef212987a04bb724df60e9268f1492ecb95
|
|
BLAKE2b-256 checksum How to use checksums |
6b863d1b976b6bbef73f181043565ee4590ced87e72ff8cf00cb1dd3b5a1952d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for ois-validator 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ois_validator-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.