Skip to content

Commit e035658

Browse files
docs: point contributors at develop and the intent block
AGENTS.md, CONTRIBUTING.md, and desktop/docs/services-backend.md all still told contributors to bump services/versions.json by hand, which CI now rejects. services/readme.md and the pull request template were updated when the rule landed; these three were missed. The internal job that used to enforce this is stripped from the public cut, so for public contributors the rule is new and the docs are the only thing announcing it. CONTRIBUTING.md also told contributors to branch from main and never named develop, walking them straight into a pull request whose declared bumps would be discarded on merge. Records four limits that were real but undocumented: apply resolves only the head commit's pull request, so develop must take one merge per push; the apply workflow must not gain a concurrency group; a literal '### ' line truncates a changelog body; and the gate assumes branch protection requires the check. Also notes that the app and its two settings must exist before the first push to develop. Signed-off-by: Terve <ntervalon@nvidia.com>
1 parent 2d87948 commit e035658

5 files changed

Lines changed: 52 additions & 10 deletions

File tree

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<!-- Set the title and body to n/a when no bump is a release. -->
1212
<!-- The release version users see is NOT declared here: it patch-bumps by
1313
itself whenever any bump above is a release. -->
14+
<!-- Keep the changelog body to prose and bullets. A line starting with "### "
15+
ends the section and silently truncates the rest. -->
1416

1517
<!-- pair-release-intent:v1 -->
1618
### Changelog title

‎AGENTS.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ On Windows, run the underlying npm and `go test` commands directly.
123123
service, the broker relay, every consumer, the desktop bridge under
124124
`desktop/src/electron/service-bridge/`, the tests, and the documentation in the
125125
same change. Then run `npm run service-contracts:check` from `desktop/`.
126-
- **Bump the version of any service binary whose compiled output you change** in
127-
`services/versions.json`, and describe any user-facing change in the pull
128-
request so it reaches the release notes.
126+
- **Declare a bump for any service binary whose compiled output you change** in
127+
the `pair-release-intent:v1` block in your pull request description, and
128+
describe any user-facing change there so it reaches the changelog. Do not edit
129+
`services/versions.json` or `CHANGELOG.md` by hand — automation writes them,
130+
and CI rejects a pull request that modifies them.
129131
[Versioning](services/VERSIONING.md) gives the rules.
130132
- **Sign off every commit** with `git commit -s`. The Developer Certificate of
131133
Origin trailer has to match the commit author, so a missing or mismatched

‎CONTRIBUTING.md‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,20 @@ screenshots and examples.
245245

246246
## Versions
247247

248-
When your change alters a service binary's compiled output, bump that component
249-
in `services/versions.json` in the same pull request.
248+
When your change alters a service binary's compiled output, declare that bump in
249+
the `pair-release-intent:v1` block in your pull request description. The pull
250+
request template contains the block; fill in the severity for each component and
251+
write the changelog title and body there.
252+
253+
**Do not edit `services/versions.json` or `CHANGELOG.md` by hand.** Automation
254+
writes both after your pull request merges, and CI rejects a pull request that
255+
modifies them. If you are adding or removing a component — something the bot
256+
cannot infer — include `<!-- pair-release-intent-allow-owned-files -->` in the
257+
description to override that check.
258+
250259
[Versioning](services/VERSIONING.md) gives the rules for choosing a patch, minor,
251-
or major bump, and covers the `desktop/package.json` version, which follows its
252-
own release cycle.
260+
or major bump, and explains the three version numbers and which of them you are
261+
expected to declare.
253262

254263
Say in the pull-request description which components you bumped and why, so a
255264
reviewer can check the decision rather than infer it from the diff.
@@ -264,7 +273,9 @@ clear description is what makes a change show up there correctly.
264273
Anyone may submit a pull request. Follow this checklist:
265274

266275
1. Fork the repository.
267-
2. Create a focused branch from `main` in your fork.
276+
2. Create a focused branch from `develop` in your fork, and open the pull
277+
request against `develop`. That is the integration branch; `main` receives
278+
`develop` periodically as a release cut.
268279
3. Explain the problem and observable desired outcome.
269280
4. State what is intentionally in and out of scope.
270281
5. Add or update tests and documentation.

‎desktop/docs/services-backend.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,10 @@ The build is cache-aware. CI passes `--force`. Packaging validates that
310310

311311
2. Review component version changes, emitted notifications, handled requests,
312312
and new binary components, then regenerate `docs/services-api.md` with
313-
`service-contracts:write`. Bump the affected components in
314-
`services/versions.json` as `services/VERSIONING.md` describes. Do not
313+
`service-contracts:write`. Declare bumps for the affected components in the
314+
pull request's `pair-release-intent:v1` block as `services/VERSIONING.md`
315+
describes; `services/versions.json` is written by automation and CI rejects
316+
a hand edit. Do not
315317
hardcode product or component versions in this document or
316318
`docs/services-parity.md` — `service-contracts:check` fails if they appear.
317319
3. Read the changed backend `README.md` / `spec.md` and the Go implementation.

‎scripts/release-intent/README.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,30 @@ pieces and a window where the changelog names a version `package.json` does not
6161
yet carry. Moving the ref once avoids that, and a rejected fast-forward is the
6262
concurrency check — the script retries that and only that, up to three times.
6363

64+
## Known limits
65+
66+
**One apply per push.** `apply_pr.py` resolves the pull request for the push's
67+
head commit only. A push carrying two merges — a direct push of a range, or a
68+
merge-queue batch — applies the head commit's intent and **silently skips the
69+
others**. Nothing fails. `develop` must therefore take one merge per push: no
70+
merge queue batching, and no pushing a range of merge commits directly. Lifting
71+
this means iterating the push's commits rather than reading only the head.
72+
73+
**No concurrency group on the apply workflow, on purpose.** GitHub keeps a
74+
single pending run per group and cancels any earlier one, so under a burst of
75+
merges a group would drop bumps rather than serialize them. Ordering is handled
76+
in the script instead, by committing with `force: false` and re-reading the ref
77+
when the branch moved. Do not add one.
78+
79+
**`### ` inside a changelog body truncates it.** `_parse_section` ends a section
80+
at the next line beginning with `### `, so a body containing a literal `### `
81+
line is silently cut at that point. Keep changelog bodies to prose and bullets.
82+
83+
**The gate assumes branch protection.** `develop` should require the
84+
`Release intent check` status check. An admin merge that bypasses it with an
85+
invalid block fails at apply with exit 1, loudly, but the versions simply do not
86+
bump until someone fixes the body and re-runs.
87+
6488
## Idempotency
6589

6690
Each bot commit carries an `Applies-PR: #N` trailer, and every attempt scans the
@@ -80,6 +104,7 @@ and expiring in an hour.
80104
- Configure `RELEASE_INTENT_APP_ID` as a repository variable and
81105
`RELEASE_INTENT_APP_PRIVATE_KEY` as a secret.
82106

107+
**The app and both settings must exist before the first push to `develop`.**
83108
If the credential is missing, `apply_pr.py` exits 2 and says so rather than
84109
silently skipping the bump. Backfill by re-running the job once it is configured,
85110
or apply from a saved body locally.

0 commit comments

Comments
 (0)