Hub 2.0 step 3: releases per product, with requirements

- Release.product and requires; unique (product, version); latest version
  per product (latest_version stays Cross Events' latest)
- Release sources per product (Releases page): repository, tag prefix,
  notes file. Defaults: every product from crosscode-platform plus Cross
  Events' v1.2.3 tags from hope-events. A product's releases are only
  removed when all its sources were read and found tags
- "— requires accounts 1.2.0" in a notes heading: Request update answers
  409 REQUIREMENT_NOT_MET until the church's install of that product is new
  enough; install page and Releases page show it; v2 replies carry requires
- @crosscode/contracts 1.1.0 vendored (optional requires on releases)
- Alerts, dashboard and install lists compare against each product's latest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 15:57:46 +02:00
co-authored by Claude Opus 5.5
parent 0318b4f6f4
commit 816452e1c2
21 changed files with 821 additions and 201 deletions
+16 -4
View File
@@ -20,7 +20,7 @@ Hub 2.0.0, Cross Code Hub, in steps (`docs/HUB-2.0-PLAN.md`).
product licence.
- `npm run check:hub2`: before deploying 2.0, lists customers with two open licences (the 2.0
migration stops on them, naming them). Run it against production first.
- `@crosscode/contracts` 1.0.0, committed as `backend/vendor/crosscode-contracts-1.0.0.tgz`.
- `@crosscode/contracts`, committed as `backend/vendor/crosscode-contracts-<version>.tgz` (1.1.0).
- **Protocol v2** (step 2) next to v1 (`utils/protocol.js`; `/api/public-key` lists `[1, 2]`):
register and heartbeat say which `product` they are (it must match the licence, else
`409 WRONG_PRODUCT`), register sends the install's public key, the heartbeat's stats are per
@@ -30,6 +30,19 @@ Hub 2.0.0, Cross Code Hub, in steps (`docs/HUB-2.0-PLAN.md`).
as before. Tests put every contract sample through the routes and check the replies against the
contract.
- Licence tokens carry `customerId` and `product` (Cross Events 2.1 ignores them).
- **Releases per product** (step 3): each product has its own releases and latest version (an
install is offered its own product's releases and shows as behind against its own latest).
**Release sources** on the Releases page: per product, one or more repositories with a tag prefix
and a notes file. The defaults: every product from `crosscode-platform` (`events@1.2.3`,
`accounts@…`, `website@…`, `app@…`, notes in `apps/<product>/WHATS-NEW.md`) plus Cross Events
before the move from the repository set until now (`v1.2.3` tags). `contracts@` tags are ignored.
A product's releases are only removed when every one of its sources was read and found tags, so
an unreachable source never wipes releases; a product with no source is managed by hand.
- **Requirements between products**: `— requires accounts 1.2.0` in a release's notes heading.
Request update answers `409 REQUIREMENT_NOT_MET` (saying what's needed) until the church's
install of that product runs that version or later, counting every release the update would
bring. The install page shows what's missing; the Releases page shows each release's needs.
Protocol v2 replies carry them (`requires`, contracts 1.1.0); v1 replies are unchanged.
### Changed
@@ -37,9 +50,8 @@ Hub 2.0.0, Cross Code Hub, in steps (`docs/HUB-2.0-PLAN.md`).
licence-token prefix stays: it's part of the protocol).
- Installs register with protocol v1 only with a Cross Events licence (`409 WRONG_PRODUCT`
otherwise); the other products register with protocol v2 (step 2). Only Cross Events licences
can be invoiced until billing per customer (step 4). Until releases per product (step 3), only
Cross Events installs are told about releases or shown as behind.
- Migration `20261104132032_products`.
can be invoiced until billing per customer (step 4).
- Migrations `20261104132032_products`, `20261104150000_releases_per_product`.
## [1.7.0] - 2026-11-03