Files
Kamino/docs/contributing/maintaining.md
T
Defame1297 dbe8d5d988 docs(contributing): write maintaining.md for the maintainer's standing procedures
Add docs/contributing/maintaining.md with what only the maintainer does:
the secret rotation list, granting and withdrawing a trusted contributor,
agent and bot accounts, the intended settings and releases. Point to it
from the root AGENTS.md and the CONTRIBUTING.md index.

The two release rules (red nightly, no release while red) are held by
aspirational until their controls exist.

Closes #262

Assisted-by: Claude Code
2026-11-24 17:13:31 +00:00

4.7 KiB

Maintaining

Read this before cutting a release, granting or withdrawing access, rotating a secret, or changing repository or organisation settings. Only the maintainer does these; this file records how, and what the settings should be.

Every rule gives its reason and how it is held: by a control (a named hook, check or setting), by review, or aspirational (checked by nothing and nobody). Most acts here are seen by nobody else, so they are aspirational unless a control is named. The positions are defined in GLOSSARY.md.

Secrets and rotation

Every secret the workflows in .gitea/workflows/ reference:

Secret Used by Account (role) Token scope Issued and stored
PACKAGE_PUSH_USER image.yml Package push bot none: the account's login name Organisation secret
PACKAGE_PUSH_TOKEN image.yml Package push bot write:package Token issued on the bot's account in this Gitea; organisation secret
RENOVATE_BOT_TOKEN renovate.yml Renovate bot write:repository, write:issue, read:package Token issued on the bot's account in this Gitea; organisation secret
GITHUB_TOKEN every workflow none: the job token set per workflow by permissions: Issued by Gitea Actions for each run and expires with it; nothing to rotate
  • When a trusted contributor's access is withdrawn, or a secret may have leaked, rotate every secret in the table: issue a new token on the bot's account, replace the secret, then revoke the old token. Reason: any write-capable token can push a branch whose workflow reads every secret, so one withdrawn or leaked credential exposes them all. Held by: aspirational.

Granting and withdrawing a trusted contributor

  • Grant: make the account a write collaborator on this repository and add it to the merge allowlist of main; save, reload the page and check the name is still there. Reason: the allowlist silently drops an account without write access, and only a listed account can merge. Held by: aspirational.
  • Withdraw: remove the collaborator access and the merge-allowlist entry, then rotate every secret (see above). Reason: write access is secret access, so the secrets the account could read must change. Held by: aspirational.

Agent and bot accounts

  • Only the maintainer creates agent and bot accounts. Reason: self-registration is closed, so every account on this forge is one the maintainer knows. Held by: control (self-registration is off).
  • An agent account names its one accountable person in its Gitea profile. Reason: every change has a human who answers for it, and an agent is not that human. Held by: aspirational.
  • Each account's token carries only the scopes its job needs: the agent account write:issue, write:repository and read:organization; the bots as in the secrets table. Reason: least privilege limits what a leaked or misused token can do through the API. Held by: aspirational.

Intended settings

What the repository and organisation settings should be. The maintainer applies them; check them here after any change.

  • Branch protection on main: required checks Lint, Build and Molecule; zero required approvals; "Require approval from code owners"; "Dismiss stale approvals"; the approvals allowlist is the maintainer.
  • Merge allowlist on main: the maintainer, each trusted contributor and the Renovate bot.
  • Push allowlist on release/*; no rule for renovate/*.
  • Tag protection on v*.
  • The agent account sits in an organisation team on this repository with Code, Issues and Pull requests write and Actions read, so it cannot approve fork runs.
  • Wiki off.
  • The runner is registered for this repository only; the skills source's runner is isolated from it.
  • Self-registration closed.
  • Gitea 28.4.0 or later, because its fork-run approval gate keeps outsiders' forks from running.

Releases

  • The maintainer cuts a release by hand: an annotated tag vX.Y.Z on main, equal to the version in galaxy.yml. Reason: consumers install by tag, so a tag is the release. Held by: control (tag protection on v*; Build's release tag check).
  • The maintainer owns triage of a failed full Molecule run; any trusted contributor may fix it. Reason: the nightly is the only run of the scenarios a pull request's diff did not select. Held by: aspirational.
  • No release while the latest full run on main is red. After a fix, dispatch Molecule on main and release only once it succeeds. Reason: a release must not ship drift the nightly has seen. Held by: aspirational.

A full run is a schedule or workflow_dispatch run of molecule.yml on main.