Events 2.4.0 frontend, deploy and docs: Linked products, linked events, seo

- Site settings → Linked products (Connect, Show events from, Publish my
  events), help, command palette.
- Events from linked products on /events, the home and campus pages, and
  /events/linked/<product>/<id> (markdown with HTML off, canonical to the
  origin, no JSON-LD, not in the sitemap).
- Event page JSON-LD from @crosscode/seo; lib/eventSchema.ts removed.
- Readiness check for linked products' sync; e2e spec with a fake
  Church Website (not run yet: needs the e2e Postgres).
- crosscode: install and build the shared packages Events uses first
  (an older tag still builds as before); scripts/tests/events.bats.
- Release notes, changelogs, handovers, hub-protocol.md, and the plan's
  "Changes while building".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 12:58:50 +02:00
co-authored by Claude Opus 5.5
parent 8a930d07c6
commit 716d47242a
28 changed files with 929 additions and 130 deletions
+40 -3
View File
@@ -1,7 +1,10 @@
# Cross Events 2.4.0 — protocol v2, Linked products, the event feed and `packages/seo`
Phase **2** of [ROADMAP-v3.md](./ROADMAP-v3.md) (§4, §5 "Sibling discovery", §9, §11; decisions
5, 20). Written 2026-11-18. **Not started.**
5, 20). Written 2026-11-18. **Built 2026-11-18** on branches (contracts 1.4.0 and Events 2.4.0 on
`feat/events-2.4` here, Hub 2.2.0 on `feat/link-public-key`, crosscode-site on
`feat/linked-products`); not tagged yet. The decisions below were taken as proposed. Where the
build differs from this plan, see [Changes while building](#changes-while-building).
**What 2.4.0 is:** Cross Events becomes a full member of a church stack. It reports to the Hub as
`product: "events"` (protocol v2), shows the church's other products under **Settings → Linked
@@ -35,8 +38,9 @@ sample feeds (§8). It's ready for the Website (phase 4) without another Events
8. [What changes in each repo](#7-what-changes-in-each-repo)
9. [Testing](#8-testing)
10. [Releasing and rolling it out](#9-releasing-and-rolling-it-out)
11. [Decisions](#decisions)
12. [Still open](#still-open)
11. [Changes while building](#changes-while-building)
12. [Decisions](#decisions)
13. [Still open](#still-open)
---
@@ -365,6 +369,39 @@ Order, each with its CHANGELOG entry and `npm run check` first:
4. crosscode-site `v1.4.0`, deployed.
5. Each church updated through the Hub (a scheduled update, ROLLOUT-1.0 §5).
## Changes while building
1. **A different public key never fails the heartbeat** (§1 said `409 PUBLIC_KEY_MISMATCH`): the
heartbeat also refreshes the licence, so failing it could lock a church out after 30 days. The
Hub keeps the saved key, answers `publicKeyStatus: "mismatch"` and opens an alert on the
install; the site keeps sending its key until it gets `saved` or `matches`, so it's saved
right after Joshua clears the old one. Events shows the mismatch on Linked products.
2. **Update requests and AI calls stay on protocol 1** (every Hub accepts them); only register and
heartbeat move to v2. A Hub that refuses a v2 body (`UNSUPPORTED_PROTOCOL` or
`INVALID_REQUEST`) gets the same heartbeat again as v1, and v1 is used for a day. The v2
health fills in what v1 could leave empty (`jobs`, `pendingMigrations`), and the body is
checked against the contract before it's sent.
3. **`event.changed` is tried once more after a minute, then left to the 15-minute poll** (§3
said the webhooks' 1 min … 12 h schedule): retrying longer than the poll interval adds nothing.
4. **The feed is also refreshed before it's served** when the last refresh is over a minute old,
so it's right even with the jobs switched off (e2e, `FEED_JOBS_ENABLED=false`).
5. **Imported events must come from that link's install** (`origin.installId` and `product`),
so one product can't publish events as another. Others are skipped and counted.
6. **JSON-LD**: `organizer` stays an `Organization` (the snapshot rule allowed only additions);
`Church` JSON-LD is in `@crosscode/seo` for the Website. The price range is now from main
tickets only (before, an add-on such as a T-shirt could set the lowest price). The description
goes in as plain text, not the feed's markdown-escaped copy.
7. **The deploy builds the shared packages**: `scripts/products/events.sh` installs and builds
`packages/contracts` and `packages/seo` before Events when the checkout's Events uses them
(an older tag still builds as before; `scripts/tests/events.bats`).
8. **`FEED_JOBS_ENABLED`** (optional, default `true`) switches the `feed` and `feed-sync` jobs,
like the other job flags (in `.env.example` and SETTINGS.md, not the env templates).
9. The readiness check is on the existing readiness page; contracts 1.4.0 also adds
`FEED_PATHS` and `typesVersions` (so `@crosscode/contracts/signing` has types under the
Events backend's `moduleResolution: node`).
10. **Not run yet:** the e2e spec (`e2e/linked-products.spec.ts`, needs the e2e Postgres) and the
VM test (§8): this machine has neither Postgres nor WSL. Both before tagging.
## Decisions
Proposed in this plan, to confirm before building: