An ARIA attribute or pressed flag, a focus call after navigation and a badge shown by an existing boolean are glue like the other UI wiring already listed. Logic that decides from data keeps its test.
153 lines
7.9 KiB
YAML
153 lines
7.9 KiB
YAML
classifications:
|
|
- name: no-ads
|
|
description: >-
|
|
A commit message contains a co-authored-by line or other advertising
|
|
for an AI model, such as a "generated with" footer.
|
|
polarity: negative
|
|
threshold: 80
|
|
- name: no-secrets
|
|
description: >-
|
|
The diff adds a secret as literal text: a password, API key, access
|
|
token or private key. A path or name that points at a secret is not
|
|
one.
|
|
polarity: negative
|
|
threshold: 60
|
|
- name: no-lint-suppression
|
|
description: >-
|
|
The diff adds a Rust `#[allow(clippy::...)]` or `#![allow(clippy::...)]`
|
|
attribute instead of fixing what the lint reports.
|
|
polarity: negative
|
|
threshold: 70
|
|
- name: no-debug-leftovers
|
|
description: >-
|
|
The diff adds leftover debugging: a `dbg!` call, a print statement
|
|
that only inspects a value, or a block of commented-out code.
|
|
polarity: negative
|
|
threshold: 70
|
|
- name: no-dead-code
|
|
description: >-
|
|
The diff adds a function, type, option or module that nothing in the
|
|
diff calls, uses or registers, and that is not a test, a trait
|
|
implementation or public API.
|
|
polarity: negative
|
|
threshold: 75
|
|
- name: no-binary-blobs
|
|
description: >-
|
|
The diff adds binary data to the repository: a binary file, or text
|
|
that encodes one, such as base64, hex or PEM-armoured data, a long
|
|
byte array, or a data URI. This holds for test fixtures too. A hash,
|
|
a lockfile pin, a commit id or a short token is not a blob, and neither
|
|
is a text asset such as SVG, CSS or JSON.
|
|
polarity: negative
|
|
threshold: 70
|
|
- name: tests-with-behaviour
|
|
description: >-
|
|
The decision-making logic a change adds or alters in Rust or
|
|
application code has a new or updated test that exercises it: pure
|
|
functions, state transitions, request and response handling, parsing,
|
|
validation. A new code path with real logic and no test does not
|
|
match, and neither does a bug fix with no regression test. Thin glue
|
|
needs no test of its own: UI component wiring, JSX or markup, a
|
|
routing table, registering an event listener, re-exporting, or
|
|
calling a function that is already tested. So does presentational
|
|
layout math: a small helper in UI code that only maps a value to a
|
|
position, size or colour that CSS then draws, such as the place of a
|
|
slider's zone edge. So does UI state wiring with no computation
|
|
behind it: an ARIA attribute or a pressed flag on an element, a focus
|
|
call after navigation, a badge shown or hidden by a boolean the page
|
|
already has. Logic that decides something from data, such as a
|
|
threshold, a filter or a parse, still needs its test. A diff whose
|
|
changed files are all test code (a fixture under `nix/module-eval/`,
|
|
`nix/checks.nix`, a crate's `tests/` directory, or Rust inside
|
|
`#[cfg(test)]` or a `#[test]` function) changes no behaviour: the
|
|
question is not applicable. So is a diff that changes only
|
|
documentation. So is a diff that only deletes code together with the
|
|
tests of that code and adds no logic: nothing new needs a test. A NixOS
|
|
module assertion, a Grafana/alerting rule, or
|
|
the literal text of a log or tracing message is not held to this
|
|
either. A PR that changes logic and tests together matches.
|
|
polarity: positive
|
|
threshold: 65
|
|
- name: docs-updated
|
|
description: >-
|
|
A change to what an operator or user sees, such as a command, flag,
|
|
option, endpoint, service or default, updates the matching page under
|
|
docs/ or the crate's README in the same diff. For a nix option whose
|
|
own default, type or meaning changes, an updated `description` on that
|
|
option counts as the documentation. It does not cover a change in what
|
|
a service does for operators across hosts, such as what it scrapes,
|
|
serves or publishes: that needs a docs/ page or README. A nix option
|
|
declared `internal = true` or `visible = false` is not something an
|
|
operator sees, so adding or changing one needs none of these. A diff
|
|
that changes nothing an operator or user sees makes the question not
|
|
applicable: a pure internal refactor, a move between modules or
|
|
crates, a rename of private items, an edit to comments and doc
|
|
comments, or a purely visual restyle that adds, removes, moves or
|
|
renames no control or label and changes no behaviour, such as colours,
|
|
contrast, spacing or a keyboard focus ring.
|
|
polarity: positive
|
|
threshold: 65
|
|
- name: one-purpose
|
|
description: >-
|
|
Every change in the diff serves what the commit messages say the PR
|
|
does, and nothing unrelated is bundled in.
|
|
polarity: positive
|
|
threshold: 65
|
|
- name: message-claims-match-diff
|
|
description: >-
|
|
Everything a commit message says it changes in a file is in the diff:
|
|
a doc page, a README, a test, a rename or a removal that it names.
|
|
This is the reverse of one-purpose, which checks that the diff has
|
|
nothing the messages do not mention. A commit message that names no
|
|
such change makes the question not applicable.
|
|
polarity: positive
|
|
threshold: 65
|
|
- name: no-code-units-in-operator-docs
|
|
description: >-
|
|
Text added or changed under docs/1-getting-started/ or
|
|
docs/2-handbook/ names a specific code unit or describes how the code
|
|
works inside: a source path or file (`src/…`, `*.rs`, a module), a
|
|
function, struct, type or enum, a table or column, a queue subject or
|
|
wire field, or the mechanics of a protocol or migration. That detail
|
|
belongs in docs/4-implementation/, with a link from the operator
|
|
page. A command, flag, nix option, endpoint, service, systemd unit or
|
|
file an operator runs, sets, sees or edits is not a code unit, and
|
|
neither is the name of a crate or binary used as the service's name.
|
|
A diff that adds or changes nothing under those two directories makes
|
|
the question not applicable, and so do docs/4-implementation/,
|
|
docs/5-project/ and the options reference.
|
|
polarity: negative
|
|
threshold: 70
|
|
- name: option-in-the-wrong-namespace
|
|
description: >-
|
|
A nix option the diff adds or moves under `services.hyperhive.` sits in
|
|
the wrong tree for what it is. `swarm.*` holds swarm-wide facts that
|
|
are the same on every host: the swarm's name and domain, its hives, and
|
|
where each service lives. `deploy.*` holds this host's own deployment
|
|
decisions, which differ from host to host: whether a component runs
|
|
here, and its ports, modes, schedules, packages and file paths, grouped
|
|
under the component that is deployed, as in
|
|
`deploy.hive-controller.egress.forward`. A setting an operator chooses
|
|
per host that lands under `swarm.*`, or under another module's
|
|
namespace such as `network.*` while it configures a component that
|
|
`deploy.*` already names, such as a service or the hive controller, is
|
|
in the wrong tree. So is a per-agent setting placed outside the agent
|
|
options. A read-only output or derived value (a rendered ruleset, a
|
|
script path), an option declared `internal = true` or `visible =
|
|
false`, and a rename that moves an option into the right tree are not
|
|
wrong. A diff that adds or moves no nix option makes the question not
|
|
applicable.
|
|
polarity: negative
|
|
threshold: 70
|
|
- name: docs-describe-current-state
|
|
description: >-
|
|
Text the diff adds or changes under docs/, in a README or in a doc
|
|
comment documents something that no longer exists, instead of the
|
|
current state: "nothing reads this file now", "older versions wrote
|
|
X", "this used to be Y", "the old Z is gone". Docs say what is, not
|
|
what was. A migration or upgrade page, a changelog and a removed-option
|
|
message may name the removed thing, because naming it is their job. A
|
|
diff that adds or changes no documentation makes the question not
|
|
applicable.
|
|
polarity: negative
|
|
threshold: 70
|