Files
cozystack/docs/agents
Aleksei Sviridkin 39c452c260 docs(agents, tests): ask what a new check protects and how a test fails (#5417)
## What this PR does

Adds two asks to the contribution rules, for people and for agents: show
that a new test can fail, and say what a new repository-wide check
protects.

A test merged in #5349 that read chart sources from a Go package, pinned
hand-typed expected values, and guarded declarations that no code read
yet. Review checked that it passed and that the author's claims were
true. Nobody asked what requirement it enforced, and I approved it.
#4508, which ships a chart variant the test did not expect, went red on
it without being wrong.

The template asks what requirement on the system's behaviour a check
protects and who consumes the checked artifact. The contribution guides
ask for failure evidence: revert a behaviour change, or mutate the
behaviour a test pins. A rule that has no existing requirement needs
agreement in an issue or an accepted design proposal before the check's
PR. A test plan alone does not justify the check.

Nothing here is machine-checked. Rules about where a contract should be
enforced (schema against Go test) and about where expected values come
from are left out on purpose: they need a discussion first.

### New checks

None. This PR adds prose rules and no check that can fail a change.

### Screenshots

Not a UI change.

### Downstream repositories

<!--
Cozystack is upstream for repositories that are NOT kept in sync with it
automatically, and nothing in CI compares the two sides, so a change
here can break them silently.

Which change forces what, and which file to touch, is the trigger map in
docs/agents/contributing.md under "Downstream Repositories". Walk it
before you tick anything.

IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM
TO FILL IN:

1. Walk the trigger map against the actual diff of this PR, file by
file. Do not decide from the PR title or from your memory of what you
changed.
2. For every repository you tick, open the follow-up PR there and link
it on the same line. A ticked box with no link claims work that does not
exist, which is worse than an empty box. Search that repository for an
open PR or issue covering it first, and link that instead of filing a
duplicate.
3. When the follow-up is out of scope, or needs a decision that is not
yours to make, open an issue in that repository instead, link that, and
say so in the PR body. Do not push a speculative PR into another
repository just to fill a line here.
4. Do not tick "No downstream repository is affected" to make the
checklist go away. If you are unsure, leave every box empty and say so
in the PR body, so a human decides.
-->

- [ ] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [x] [cozystack/community](https://github.com/cozystack/community) -
follow-up: cozystack/community#139 (an issue: `contributors/README.md`
restates how to fill the template in, and should change once this
merges)

### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same `type(scope):` prefix as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
NONE
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Added guidance for showing that changed tests detect the behavior they
cover, including what to report when tests cannot be run locally.
* Clarified how to document checks that may affect other changes,
including the requirement they protect and the code that uses their
results.
* Added a “New checks” section to the pull request template, with
instructions to describe applicable checks or write “None.”
* Updated review and commit guidance, and linked to detailed conventions
for tests and checks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-12-03 14:58:45 +03:00
..