English | 日本語 | 中文 | Español | Français | हिन्दी | Italiano | Português (BR)
The data gates for Stage 1 role-training sets: one standard-library Python package that decides whether a row, a batch or a frozen set of training items is fit to train on. The trainer (aspire-si) and the dataset generator (role-set) both call it, so what a generator accepts is exactly what the trainer will accept.
Every gate raises or returns a reason you can act on. Nothing is fixed silently.
Install
pip install aspire-si-gates
Python 3.10 or newer. No dependencies.
Use
from aspire_si_gates import DataError, load, validate
rows = load("batch3-t05.jsonl") # one JSON object per line
try:
validate(rows) # every row check, then every whole-set check
except DataError as err:
print(err.code, err.message, err.hint)
A generator that wants to hand refusals back to its writer one item at a time uses the incremental checks instead:
from aspire_si_gates import check_against, check_item
check_item(row) # raises DataError on the first refusal
problems = check_against(row, accepted_rows) # [(code, message), ...] against rows already accepted
The gates
| Call | What it checks |
|---|---|
validate(rows) |
check_item on every row, then check_batch on the whole file. Raises DataError with the first refusal. |
check_item(row) |
The checks that need no other row. It refuses an apply item (split: apply or an -AP- id): apply items are never trained. |
check_apply_item(row) |
An apply item's checks: the same content and shape rules as check_item, plus the apply rules (split: apply and an -AP- id, kind C or D, one turn, no pair, and the lesson's twin field). Refuses any row that is not an apply item. |
check_trace_leaks_label(row) |
Refuses a kind C row whose checker trace names its own planted flaw, or any flaw stem outside the two-step carve-out. Wired into check_batch. |
check_against(row, accepted) |
[(code, message)] for the exclusivity rules (spans, framings, material, puzzle shapes, openings, phrases) against rows already accepted. The codes are in REASONS. |
check_batch(rows) |
The checks that need the finished set: shares, floors, pairs, phrase and formula limits. |
batch_report(rows), freeze_report(rows) |
The figures behind those checks, as dicts. |
gates_identity() |
The package version and a sha256 of its source, to record with each generated item. |
The verifier role's data (lessons, trait names, role words and the pre-amendment lessons) is in constants.py. A
different role changes that module, not the checks. The sealed-set leakage leg is not here; it stays with the trainer.
Security and data
- Reads: the rows you pass in, and the file you give to
load. - Does not touch: the network, the file system beyond that one file, environment variables, or subprocesses. No telemetry.
- Permissions: none beyond reading that file.
Report a vulnerability privately; see SECURITY.md.
Status
Version 1.7.6, first published to PyPI. The source is byte-identical to the package that lived in aspire-si at
6a603baa, so gates_identity() reports the same hash as before the move. Coverage of this repository's own tests is
68% with the floor at 68 (target 90); more gate cases are exercised by aspire-si's Stage 1 tests.
Quality gate
The hard gates (security, errors, docs, shipping hygiene) pass; see SHIP_GATE.md and SCORECARD.md.
Tests
python -m pytest -q
Or run everything the release gate runs: bash scripts/verify.sh.
License
MIT, © mcp-tool-shop.
Built by MCP Tool Shop
Metadata
Release files for aspire-si-gates 1.7.6
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 | Actions |
|---|---|---|---|---|
| aspire_si_gates-1.7.6.tar.gz | 46.2 kB | With provenance | Details for aspire_si_gates-1.7.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aspire_si_gates-1.7.6-py3-none-any.whl | Python 3 | none | any | Details for aspire_si_gates-1.7.6-py3-none-any.whl |
Total release size: 81.5 kB
Release files / aspire_si_gates-1.7.6.tar.gz
| Download URL | aspire_si_gates-1.7.6.tar.gz |
|---|---|
| Size | 46.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
569f916648ed559eab1a12943b17e19e4adca70aced0661c2e6417ffaf48ac5c
|
|
BLAKE2b-256 checksum How to use checksums |
f364d3bd458fb015ba72202143ceb48bbd970cb333e8de53ca8d0dccf257333e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 29, 2026.
Transparency logRelease files / aspire_si_gates-1.7.6-py3-none-any.whl
| Download URL | aspire_si_gates-1.7.6-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce70acbaa48d652a85404567a7ddac086f562cf152d783e62b0a83c51d2bc165
|
|
BLAKE2b-256 checksum How to use checksums |
c0b1d34abf4ca45495c1c7f830ba9bdea32bf4cbf710e0dafe78beb27aa367ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 29, 2026.
Transparency logSecurity for aspire-si-gates 1.7.6
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 aspire_si_gates-1.7.6.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 29, 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.