Files
cozystack/CONTRIBUTING.md
T
Aleksei Sviridkin d0f22f5135 docs(contributing): ask what a new check protects and how a test fails
A repository-wide test merged that read chart sources from a Go
package, pinned hand-typed values, and guarded declarations nothing
read yet. Review checked that it passed and never asked what
requirement it enforced. The next legitimate change went red on it.

Such a check is a new rule for every contributor, and an ordinary
approval of the PR that adds it does not show the rule was weighed,
so the rule is agreed before that PR, and a test plan does not count
as the requirement behind it.

The failure evidence goes into the commit body rather than a separate
failing commit: branches merge without squash, so each commit has to
pass on its own. A test pinning unchanged behaviour has nothing to
revert, so it proves it can fail by a mutation instead. When an e2e
failure cannot be observed locally or in CI, recording that limit and
its reason lets the reviewer decide without inventing evidence.

Validation: the 79 relevant Bats checks pass on the branch and base;
no executable tests or checks are added.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-12-03 10:28:30 +03:00

6.0 KiB

Contributing to Cozystack

Welcome! We are glad that you want to contribute to our Cozystack project! 💖

As you get started, you are in the best position to give us feedbacks on areas of our project that we need help with, including:

  • Problems found while setting up the development environment
  • Gaps in our documentation
  • Bugs in our GitHub actions

First, though, it is important that you read the CNCF Code of Conduct.

The guidelines below are a starting point. We don't want to limit your creativity, passion, and initiative. If you think there's a better way, please feel free to bring it up in a GitHub discussion, or open a pull request. We're certain there are always better ways to do things, we just need to start some constructive dialogue!

Ways to contribute

We welcome many types of contributions including:

  • New features
  • Builds, CI/CD
  • Bug fixes
  • Documentation
  • Issue Triage
  • Answering questions on Slack or GitHub Discussions
  • Web design
  • Communications / Social Media / Blog Posts
  • Events participation
  • Release management

Ask for Help

The best way to reach us with a question when contributing is to drop a line in our Telegram channel, or start a new GitHub discussion.

Patches to other projects' code

A downstream patch is a change Cozystack carries on top of someone else's code: a source patch under packages/*/*/images/*/patches/, a patch to a vendored chart under packages/*/*/patches/, a fork pin, a carried backport. A pull request that adds or changes one links the same change offered upstream: the upstream pull request or patch submission, or at least the upstream issue or thread where it was raised and what came of it. A patch file's header names that link and the condition for dropping the patch. A patch with no upstream counterpart says why, in the pull request and in place of the link in its header, for example that the change is specific to Cozystack and upstream would not take it.

Where do I file?

Cozystack work is split across two repositories. Use this table to land in the right place:

You have… Where it goes
A bug New issue → Bug report in this repo (kind/bug)
A concrete, scoped feature New issue → Feature request in this repo (kind/feature)
A usage question or an early idea GitHub Discussions
A cross-cutting / architectural change — affects multiple components or APIs, or needs a decision before code A design proposal in the community repo
Governance, process, or community matters The community repo

Rule of thumb: bugs and concrete features live here; "what or whether we should build it" lives in community as a design proposal or discussion. A large feature often starts as a Discussion, graduates to a design-proposal PR, then spawns implementation issues here.

A pull request that implements a design proposal waits for that proposal to be accepted, that is, merged into community. An issue can start the discussion, but acceptance requires a merged design-proposal pull request. Until then it stays in draft, however clean the code is: code merged ahead of its design becomes the contract the design then has to follow. Opening the implementation early as a proof of concept is welcome, and linking it from the proposal helps the review. If the proposal is closed without being accepted, the implementation is closed with it.

Raising Issues

When raising issues, please specify the following:

  • A scenario where the issue occurred (with details on how to reproduce it)
  • Errors and log messages that are displayed by the involved software
  • Any other detail that might be useful

Tests and checks in a pull request

Two things reviewers will ask about, so it saves a round to answer them up front.

Show that a new test can fail. Before you commit a test that covers a change in behaviour, run it without that change: revert the fix or break the line the test is about. A test that pins behaviour which is not changing, such as a FIXME(#N) test for a known bug or a test written before a refactor, has nothing to revert; mutate the behaviour it pins instead. Write what you did and the failure message as one line in the commit message. Please do not add a separate failing commit for this. Pull requests are merged with a merge commit, not squashed, so every commit lands on main and has to pass on its own. If the test is an e2e test you cannot run locally, take the failure from a CI run of a temporary commit that you drop before asking for review, or say in the commit message that you could not observe it and why.

Say what a new check protects. A test that reads files outside its own package or chart, a lint, a validator, a schema restriction or a CI gate can fail somebody else's change, so it becomes a rule for the whole repository once it merges. In the "New checks" section of the pull request template, name the requirement of the system's behaviour it protects, with a link to where it is stated, and the code that reads the artifact it checks. A test plan, including the Testing section of a design proposal, is not such a requirement. If the only source is a test plan or how the tree looks today, or nothing reads that artifact yet, agree the rule first in an issue or an accepted design proposal, before you open the pull request that adds the check. Approving that pull request is not the discussion.

The full conventions, written for AI agents and equally valid for people, are in docs/agents/contributing.md.