Skip to main content

quality

Homepage: https://github.com/infinito-nexus/quality

Install

flake.lock is the only pin source (requirement 001, decision 18). On a host with Nix, install packages.default, the runner wrapped with every tool by absolute store path, and call it by absolute path:

nix profile install github:infinito-nexus/quality/<release-tag>
~/.nix-profile/bin/quality check --staged

Dev stack

Hosts without Nix, CI and dev stacks use packages.image (nix build .#image), the OCI image of the same closure, published to ghcr by digest; the digest is in the release notes. A dev stack adds it as a compose service under the profile tools and a make target that runs it:

services:
  quality:
    image: ghcr.io/infinito-nexus/quality@sha256:<digest>
    profiles: [tools]
    network_mode: none
    read_only: true
    tmpfs: [/tmp]
    user: "65534"
    working_dir: /src
    volumes:
      - .:/src:ro
quality-check:
	docker compose --profile tools run --rm quality check --staged

--staged needs no database. --base and --all add the deep tier, which reads the bundle of quality db update: mount it with - <db>:/db:ro and pass --db /db. --rule <id>, repeatable, runs only the named catalogue rules in any of the three modes, the checks the runner does itself and .qualityignore.yml staleness included; the database is then needed only when a named rule is of the deep tier, so quality check --base origin/main --rule test.text-presence runs without --db, and an id outside the catalogue stops the check with exit 2. quality db update --licenses <repo>, repeatable, also stores the registry licences of the exact pins at each named repository's HEAD and in its staging index for legal.dependency-license; a pin without an SPDX licence there stays unchecked, and an update without --licenses keeps the stored licences. Run the service from a main checkout, because a linked worktree's .git file points outside /src.

CI

Another repository calls the reusable workflows by the commit of a release tag. Each workflow builds its tools from the flake at the commit it is called at (job.workflow_sha), so that uses: line is the only pin, and Dependabot's github-actions ecosystem moves it to the next release. quality.yml gates the range a pull request or push adds and scans every commit of it for secrets; tool.yml runs one tool of the flake, under its package name, over the whole tree:

jobs:
  quality:
    uses: infinito-nexus/quality/.github/workflows/quality.yml@<commit> # <release-tag>
  ruff:
    uses: infinito-nexus/quality/.github/workflows/tool.yml@<commit> # <release-tag>
    with:
      tool: ruff
      args: check src tests

Layer contracts

A repository that holds .quality/architecture.yml gets the rules architecture.layer and architecture.cycle (requirement 005, decision 3); each new hit lowers the architecture score by 25. Python runs through lint-imports of import-linter, JavaScript through depcruise of dependency-cruiser, both bundled like every other tool. Each section is optional, every key inside it is required, and a malformed file stops the check with an error naming the key. source is the directory holding the code, . for the root, and for JavaScript also the scope of the cycle check; layers lists the highest layer first, and no layer may import one above it:

python:
  source: src
  packages: [shop]
  layers: [shop.web, shop.domain]
  forbidden:
    - {from: [shop.domain], to: [shop.web]}
javascript:
  source: web
  layers: [web/ui, web/core]
  forbidden: []

Waivers

A comment on the finding's line waives it: nocheck: <rule> -- <reason> in any comment syntax, where a group such as coding names all its rules. A .nocheck file waives rules for its folder and every folder below it, one # nocheck: <rule> -- <reason> per line; a line naming nothing in the catalogue is left to the project's own lints, and a catalogue line without a reason stops the check with exit 2. Hard and changed_only rules are waived only in .qualityignore.yml, whose --base entries come from the base side, so a change cannot waive its own finding there: a .nocheck line naming a group waives only its other rules, and one naming nothing else exits 2. --all stops on a .nocheck or .qualityignore.yml entry that waives nothing.

Text presence tests

test.text-presence flags a test that reduces a source file to the presence of text, which core's docs/contributing/actions/testing/regression.md forbids: parse, render or run the file and assert on the result instead. It flags a test function (Python test*, a JavaScript or TypeScript test or it callback, PHP test* or #[Test], Rust #[test], Go Test*(t *testing.T), Java @Test, Ruby test_* or an it block, a shunit2 test*() shell function) that reads a file, asserts at least once that the read text contains something, asserts nothing but containment, and neither parses, renders, writes nor runs anything. A test whose containment checks are all negative, such as a policy scan, stays clean, as does one on runtime output or on a fixture it writes itself. For Python the check is a builtin that follows the read text through assignments, slices, splits, regex extracts, comprehensions and line filters, through module constants, class attributes and setUp/setUpClass, and through helpers of the same file or of other modules of the repository it imports; a lint scan that collects the files missing a text and asserts the list empty counts as a positive check, one that collects the files holding a text as a negative one, also where it first narrows the scan to the files holding a scope text. What production code returns stays clean unless its name says it reads, and a lexer or address parse counts as running code, as does a test helper named for evaluating a condition or an order, such as holds or *_precedes_*. A YAML, JSON or TOML parse counts only where the condition that produces a finding uses the structure itself, a key, a type, a count bound or a leaf's equality with a value; a containment, regex, startswith or endswith on a string leaf of the parsed data is text presence, also where parsed structure merely selects or exempts files. A text read from one file and looked for in another is a cross-reference, and text the test plants into a read file, by +, replace, re.sub, a literal line beside it or a copy.deepcopy of parsed data, makes its check a different one, as does a comparison with a module of the code under test. The finding sits on the test's first line, so its nocheck goes there: def test_x(): # nocheck: test.text-presence -- <reason>.

Hosted scan

The role web-app-cst-quality-check serves the scan as a web page (requirement 002).

Command What it does
make up Builds the images and serves the page at http://localhost:18098/, or on the port QUALITY_DEV_PORT names; make down removes the stack and its volumes. Needs a vulnerability bundle at $QUALITY_DEV_DB/bundle (default ~/.cache/quality-check/dev-db/bundle), created once with quality db update --db <that path>. An exported INFINITO_CACHE_PACKAGE_URL makes the Nix builds use that package cache's raw-nixos-cache repository.
make test-service Unit tests of the web app and the launcher, in a virtual environment under .venv/service.
make test-egress INFINITO_CORE_DIR=<core> EGRESS_RUNTIMES="<runtimes>" Egress tests against the stack of make up; the step flags run through that core checkout's container wrapper, and every launcher and test-proxy test runs once under each runtime of EGRESS_RUNTIMES, such as "runc sysbox-runc", which docker info must offer.
make verify-test INFINITO_CORE_DIR=<core> Pulls the role into a core checkout with custom-role support and runs core's full test suite, lints included.
make verify-compose INFINITO_CORE_DIR=<core> Runs verify-test first, then deploys the role with Keycloak through that checkout and runs its Playwright spec.

Distribution

Command What it does
make test-distribution Builds packages.default and packages.image, then checks pins, notices, quality doctor and the image.
make test-e2e QUALITY_E2E_SKILLS=<repo> QUALITY_E2E_PACKAGE_MANAGER=<repo> QUALITY_E2E_RUNTIME=<runtime> Builds both outputs and checks that the host binary and the image, run under that Docker runtime (core's SANDBOX_RUNTIME, such as runsc), print the same quality doctor output and report the same findings on both repositories; needs Docker and the test bundle make test-integration fetches.

Benchmarks

The speed criteria of requirement 001 and its recall bound on core run apart from test-unit and test-integration. The core checkout is only read.

Command What it does
make test-bench QUALITY_CORE_DIR=<core> QUALITY_DB_DIR=<db> Times quality --version of the built packages.default against 0.15 s as the median of 9 runs and its quality check --all on core, deep tier included, against 360 s on 20 CPUs, both timings skipped with the measured load as the reason when 50 % or more of the CPUs are busy in the 5 s before or after them, and checks that clean.default-value finds every shell, Python and JavaScript default of tests/bench/default-value-hits.json, the hits of defaults.py of the kvb-code-clean skill on the core commit named there, which QUALITY_CORE_DIR must hold. Needs nix build .#default of this tree and a fresh bundle of quality db update.

Author

Kevin Veen-Birkenbach kevin@veen.world

Metadata

Release files for kvb-quality 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kvb-quality 0.3.0
File Size Uploaded Provenance Actions
kvb_quality-0.3.0.tar.gz 145.3 kB With provenance Details for kvb_quality-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kvb-quality 0.3.0
File Interpreter ABI Platform Actions
kvb_quality-0.3.0-py3-none-any.whl Python 3 none any Details for kvb_quality-0.3.0-py3-none-any.whl

Total release size: 327.5 kB

Release files / kvb_quality-0.3.0.tar.gz

Download URL kvb_quality-0.3.0.tar.gz
Size 145.3 kB
Tags Source
SHA-256 checksum
How to use checksums
74d85b6ff907ca88fcd464c98266c662a088e3b046658eec42a5eac7cd8d4185
BLAKE2b-256 checksum
How to use checksums
c01a4a8e9e0ea3f8c3f8dbf9c642731318c40cfdcd30ec4f23ad564997e72aa2
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 Nov 26, 2026.

Transparency log

Release files / kvb_quality-0.3.0-py3-none-any.whl

Download URL kvb_quality-0.3.0-py3-none-any.whl
Size 182.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6e01a1953fd1db7cac61c4e0bf097963173b952907d8ecb55fa93060ccde139
BLAKE2b-256 checksum
How to use checksums
96735dc473c72a0a3d4803adcccfefb39b31946894c441772712e188bb1e0b71
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 Nov 26, 2026.

Transparency log

Security for kvb-quality 0.3.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kvb_quality-0.3.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 Nov 26, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page