mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 05:25:14 +09:00
docs(agents): document the backport default and its escape hatch
AGENTS.md's labeling section describes what the labeler derives from a title, so the new default belongs there: a `fix` gets `backport`, the decision is made by removing the label rather than by remembering to add it, and the removal sticks because the label is seeded on `opened` alone. Also states what the default does not buy, so nobody reads it as a claim that the resulting backport is correct. contributing.md's "special handling" list said `[Backport release-1.x]` titles get both `area/release` and `backport`. That has been wrong since the recursive-backport fix removed the second one, and it now contradicts the exclusion this change encodes, so it is corrected in place alongside the new bullet. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -40,6 +40,7 @@ This file provides structured guidance for AI coding assistants and agents worki
|
||||
- For `triage/*`: `.github/workflows/issue-triage.yaml` labels an issue on arrival and sweeps daily for any open issue carrying none, so change a triage decision by replacing the label rather than removing it — remove the only `triage/*` label an issue has and the next sweep puts one back
|
||||
- For `area/*`: accuracy outweighs reuse. If no existing `area/*` truly fits the change, propose a new one via PR (extend `.github/labels.yml` and the scope mapping in `.github/workflows/pr-labeler.yaml`) — do not shoehorn the change into a wrong area. `area/uncategorized` is the auto-labeler fallback; treat it as a signal to pick a fit, create a new area, or correct the PR title
|
||||
- PR titles: a Conventional Commits header (`type(scope): description`, types from [`contributing.md`](./docs/agents/contributing.md)) auto-applies `kind/*` and `area/*` via `.github/workflows/pr-labeler.yaml`. Append `!` (or add a `BREAKING CHANGE:` footer) to apply `kind/breaking-change`
|
||||
- For `backport`: a `fix` PR gets it by default, so decide by REMOVING it rather than by remembering to add it. Forgetting the label costs a release-branch fix; removing it during review costs a click, and [`backport.yaml`](./.github/workflows/backport.yaml) fires only on merge, so the whole review window is available. Unlike `kind/*` and `area/*`, which are derivations from the title and are re-applied on every run, this one is seeded once — on the `opened` event and no other — so a removal sticks across pushes and across close/reopen. Do not "fix the inconsistency" by making it behave like the others; `hack/pr-labeler-contract.bats` pins it. Not applied to a backport PR itself, to a breaking change, or to the scopes `ci`, `e2e`, `tests`, `build`, `deps`, `agents`, `release`, `backport`, `migrations` — one excluded scope in a composite title is enough to suppress it. The default says nothing about whether the backport is correct: a cherry-pick can apply cleanly and still be wrong, because the action imports whole files the target branch lacks, so the reviewer still owns whether the change belongs on the release line. `backport-previous` stays manual
|
||||
|
||||
**Important rules:**
|
||||
- ✅ **ONLY read the file if the task matches the documented process scope** - do not read files for tasks that don't match their purpose
|
||||
|
||||
@@ -105,7 +105,8 @@ git commit --signoff -m "docs(contributing): add installation guide"
|
||||
|
||||
**Special handling:**
|
||||
|
||||
- `[Backport release-1.x]` prefix is stripped before parsing; `area/release` and `backport` labels are added.
|
||||
- `[Backport release-1.x]` prefix is stripped before parsing; `area/release` is added. `backport` is deliberately NOT — auto-applying it to a backport PR is what caused recursive backports (see [`release.md`](../release.md)).
|
||||
- `fix` → `backport` by default, applied only when the PR is opened so that removing it during review sticks. Not applied to a backport PR, to a breaking change, or to the scopes `ci`, `e2e`, `tests`, `build`, `deps`, `agents`, `release`, `backport`, `migrations`; one excluded part of a composite scope suppresses it.
|
||||
- Composite scope (`feat(platform, system, apps): ...`) — each comma-separated part is mapped independently.
|
||||
- `!` after type or `BREAKING CHANGE:` footer in the body → `kind/breaking-change`.
|
||||
- Unmapped scope or non-conventional title → `area/uncategorized` (signals the PR needs manual area selection).
|
||||
|
||||
Reference in new issue
Block a user