A worked result
This is an archival worked example produced by running the published 4.19.9
package; it is not a claim about the current public package. Everything on
this page was produced by running the published package. The
output blocks are pasted from a terminal, not written by hand. Most are trimmed
to the lines under discussion; Result 1 is the one shown whole, and no line is
cut short. Two absolute paths are replaced by a placeholder — /path/to/python,
and the directory in front of the malformed-config error — so the page does not
encode one machine’s filesystem. Nothing else was changed.
- Package:
hyodo4.19.9, installed from PyPI withpipx install hyodointo an empty pipx home. - Reported by the tool itself:
HyoDo v4.19.9 - model-agnostic quality gates, withMeasurement: measured by hyodo 4.19.9 (wheel)in the pass, fail, empty-project and malformed-config results below. - Platform: macOS. HyoDo itself ran on Python 3.14.7; the gate below ran on
the
pythonfound onPATH, which is a separate interpreter. That distinction matters, and the next section says why.
The example runs locally. Installing the tools downloads packages; the gate shown here runs your local pytest tests.
Before you run it
Section titled “Before you run it”Two things are easy to skip, and skipping either one changes the exit code you get. Both were reproduced against this same 4.19.9 wheel.
1. The gate command needs its own tool installed. HyoDo does not supply
pytest. The gate below runs python -m pytest, and python there is resolved
from your PATH — not from the environment HyoDo was installed into. pipx
deliberately isolates HyoDo, so installing HyoDo does not put pytest anywhere.
Check the interpreter that will actually run the gate:
python -m pytest --versionIf that fails, install it for that interpreter (python -m pip install pytest).
Otherwise the gate runs and reports a genuine failure that is not about your
code:
FAIL pytest (善 선 Good): /path/to/python: No module named pytestHYODO FAIL — 1/1 gates observed, pytestExit code 1. The gate ran; the command inside it could not.
2. A new gate command set has to be approved once. .hyodo/gates.toml
registers commands that HyoDo will execute, so HyoDo will not run an unreviewed
command set on your behalf. In a non-interactive shell it refuses and says so:
SKIP pytest (善 선 Good): gates.toml command set is not approved -- no commandset has been approved for this checkout yet; run `hyodo check` in a terminal toreview the exact commands and record approval
==================================================No user gates were executedThis is not a validation pass.HYODO UNOBSERVED — 0/1 gates observed, required gates UNOBSERVEDExit code 2, not 0. Run it once in a real terminal to review and approve —
that is the step shown under “The command” below. The recorded decision lives in
per-user state outside your project (~/.hyodo/state/), bound to this checkout’s
path; changing a command invalidates it, and a .hyodo/gates-trust.json shipped
inside a repository is ignored.
The input
Section titled “The input”Two Python files and one HyoDo config make up the example input.
src/pricing.py
def apply_discount(cents: int, percent: int) -> int: """Return the price after a percentage discount.""" return cents - (cents * percent // 100)tests/test_pricing.py
from src.pricing import apply_discount
def test_full_price(): assert apply_discount(1000, 0) == 1000
def test_half_off(): assert apply_discount(1000, 50) == 500
def test_free(): assert apply_discount(1000, 100) == 0.hyodo/gates.toml — this is the Bring-Your-Own-Gates file. HyoDo does not
supply the test runner; it runs the command you already use.
schema = "hyodo.gates/v1"
[gates.pytest]pillar = "goodness"command = ["python", "-m", "pytest", "tests", "-q"]timeout = 120The command
Section titled “The command”hyodo checkThe first time, HyoDo shows the command set it is about to run and waits. This is the approval from “Before you run it”, verbatim:
HyoDo Bring-Your-Own-Gates: .hyodo/gates.toml command set changed or is new. [goodness] pytest: python -m pytest tests -q fingerprint: 2be698af424180e66492c8c54c1481b507789c2ea7a7f05c177ae044c8bd7ca0Trust and run this command set now? [y/N] yThe fingerprint covers the commands, not your source or its location, so editing
pricing.py does not re-prompt but editing the gate command does. It is also the
same value for anyone running this exact gate set on this version of HyoDo: if
you copied the config above, the fingerprint you are asked to approve should
match the one printed here, character for character. A matching fingerprint says
the command text matches. It says nothing about what that command resolves to on
your machine — the interpreter, the installed packages, your project’s code and
the result are all still yours, which is why the prerequisites above matter.
Answering y records the decision and the run continues. With this command set
unchanged, later runs reuse the recorded approval.
Result 1 — the gate passes
Section titled “Result 1 — the gate passes”╭──────────────────────────╮│ HyoDo Code Quality Check │╰──────────────────────────╯Target: /tmp/demoUser gates: /tmp/demo/.hyodo/gates.toml PASS pytest (善 선 Good): ok
==================================================All executed gates passed (1/1 gates ran)Gates support review readiness. Human approval still required.Measurement: measured by hyodo 4.19.9 (wheel)HYODO PASS — 1/1 gates observed, all executed gates passedExit code 0.
Read the approval reminder carefully: “Gates support review readiness. Human approval still required.” A pass is evidence that the gates you registered ran and succeeded. It is not approval to merge or deploy. That is the whole product boundary in one line of output.
Result 2 — a real bug, caught
Section titled “Result 2 — a real bug, caught”Change one line of src/pricing.py to a units mistake — subtracting percent
dollars instead of a percentage:
return cents - percent * 100Same command, no other change:
FAILED tests/test_pricing.py::test_half_off - assert -4000 == 500FAILED tests/test_pricing.py::test_free - assert -9000 == 02 failed, 1 passed in 0.10s
==================================================Some gates failed (1/1 gates ran)Failure details: - pytest: test summary info ============================FAILED tests/test_pricing.py::test_half_off - assert -4000 == 500FAILED tests/test_pricing.py::test_free - assert -9000 == 02 failed, 1 passed in 0.10sNext action: fix the listed gate(s) and re-run hyodo check.Measurement: measured by hyodo 4.19.9 (wheel)HYODO FAIL — 1/1 gates observed, pytestExit code 1. Note 1/1 gates observed — the count of what actually ran is
reported next to the verdict, so a verdict can never quietly rest on zero
measurements.
Result 3 — nothing was measured, and it says so
Section titled “Result 3 — nothing was measured, and it says so”This is the result worth showing on purpose, because an empty run is the easiest one to misread as success. Run the same command in a directory with no gates and no recognizable project:
No project gates were executedThis is not a validation pass.Measurement: measured by hyodo 4.19.9 (wheel)HYODO UNOBSERVED — 0/0 gates observed, required gates UNOBSERVED; Sampled syntax gates only (up to 50 files per language); not a full-project validationExit code 2.
Not 0. An empty run is not a pass. Note what the verdict line carries with it:
with no .hyodo/gates.toml to read, HyoDo falls back to built-in sampled syntax
gates, and it says so in the same breath as the verdict — sampled, not a
full-project validation.
A broken config arrives at the same verdict by a different route, and without
the sampled-gates fallback, because there is a config and HyoDo refuses to guess
what it meant. During the making of this page an early draft omitted the
schema key, and the real output was:
.hyodo/gates.toml: unsupported schema None; expected 'hyodo.gates/v1'This is not a validation pass.Measurement: measured by hyodo 4.19.9 (wheel)HYODO UNOBSERVED — 0/0 gates observed, required gates UNOBSERVEDAlso exit 2. A broken config is reported as not measured, never as green.
The three exit codes, asserted
Section titled “The three exit codes, asserted”Run against the published 4.19.9 wheel:
| Situation | Exit code |
|---|---|
| Registered gates ran and passed | 0 |
| A registered gate failed | 1 |
| Nothing ran, or the config was unreadable | 2 |
What this result does not show
Section titled “What this result does not show”- It does not show that your project is correct. It shows that the commands you registered ran, and what they returned.
- It does not authorize a merge or a deployment. HyoDo produces evidence; the decision stays with you or your host.
- One gate on a three-file project is deliberately small. A larger project registers more gates; the report grows, and the contract above does not change.
- The pass here says nothing about the two tests that were never written. HyoDo reports what was measured, not what was omitted.
- Quickstart — the same steps on your own project.
- Gate syntax reference
— every field
.hyodo/gates.tomlaccepts, and the exact error for a wrong value. - Product boundary — what HyoDo owns and what the host owns.