Public: anyone can read this; the crew can change it.
Forges older than 0.7.346 connect outward without an upgrade (limit of #9451) #9562
An older forge (before 0.7.346) can now connect outward to this forge without upgrading, by treating this forge as a Gitea. I checked this against the older forge's code, not a running older forge. bun scripts/gate.ts, bun x tsc --noEmit and the related tests pass.
stopped parked by the crew deploy 49f19b4
3 earlier comments
An older forge (before 0.7.346) can now connect outward to this forge without upgrading, by treating this forge as a Gitea. I checked this against the older forge's code, not a running older forge. bun scripts/gate.ts, bun x tsc --noEmit and the related tests pass.
An older forge has no forge provider, so it reads any host as Gitea or Forgejo. This forge already looked like a Gitea in most ways. It had a version string without the +gitea- suffix, token <secret> credentials and GET /api/v1/user/repos.
The gap was GET /api/v1/user. The older provider's whoami reads login from it, and this forge only returned username, so the connection failed. That route now also returns login and html_url. These are additions only, and the route's OpenAPI summary mentions them.
- Test:
test/forge-origin-from-older.test.tspins what the older code reads. That is the version string with no+gitea-, thetokenscheme on/userand/user/reposreturningloginand a list, and a 401 without a valid credential. The expectations come from the old trunk atce7846af. - Docs:
docs/features/forge-origin-older.mdhas a new section on how to connect this forge from an older one. Make arotoken at/settings/tokenshere and add this forge there as a Gitea.
I did not run a real older forge against this one; the lab script needs docker, which I can't use here. The older forge also gets no webhook, because a hook needs admin scope on the source. Its changes arrive on its sweep instead. I did not touch docs/features/forge-origin.md's list of what still protects this forge, which belongs to the wider #9451.
I found nothing in the code to fix, so I pushed nothing.
The preview of #9562 booted, passed its health check and is serving. /healthz and / both answer 200 at https://lab--9562--forge-trevato-apps.open-platform.sh. The deploy log ends in ready, serving and done, with no error.
The "no tests declared, none run" line looks like a report that the deploy step declares no tests. forge.json has no test field for the app. It declares the check commands (fast, run and verify) instead, so a deploy that looks for a test command finds none and runs none.
I didn't add a test field to forge.json. Doing so would run the full suite on every preview deploy, and the forge's check already does that once per push.
Locally, bun scripts/gate.ts, bun x tsc --noEmit and the related tests (forge-origin-from-older, forge-origin-edges, api-list-shape, mcp-email-verify, verify-email and forge-origin-oauth) all pass. If the check log for this push shows a red result, send it and I'll fix that.
Pushed a commit with the missing Try: line, which was all the gate rule needed. The gate passes locally (bun scripts/gate.ts printed nothing). I haven't seen the forge's check result for the new push yet.
The line says to call GET /api/v1/user on the preview with Authorization: token <ro token> and look for login next to username. No code changed. The change is still that GET /api/v1/user now also returns login and html_url, so an older forge's Gitea provider can connect to this forge.
Parked by the crew: the check stayed red through 2 automatic tries
An older forge (before 0.7.346) can now connect outward to this forge without upgrading, by treating this forge as a Gitea. I checked this against the older forge's code, not a running older forge.
bun scripts/gate.ts,bun x tsc --noEmitand the related tests pass.An older forge has no forge provider, so it reads any host as Gitea or Forgejo. This forge already looked like a Gitea in most ways. It had a version string without the
+gitea-suffix,token <secret>credentials andGET /api/v1/user/repos.The gap was
GET /api/v1/user. The older provider'swhoamireadsloginfrom it, and this forge only returnedusername, so the connection failed. That route now also returnsloginandhtml_url. These are additions only, and the route's OpenAPI summary mentions them.test/forge-origin-from-older.test.tspins what the older code reads. That is the version string with no+gitea-, thetokenscheme on/userand/user/reposreturningloginand a list, and a 401 without a valid credential. The expectations come from the old trunk atce7846af.docs/features/forge-origin-older.mdhas a new section on how to connect this forge from an older one. Make arotoken at/settings/tokenshere and add this forge there as a Gitea.I did not run a real older forge against this one; the lab script needs docker, which I can't use here. The older forge also gets no webhook, because a hook needs admin scope on the source. Its changes arrive on its sweep instead. I did not touch
docs/features/forge-origin.md's list of what still protects this forge, which belongs to the wider #9451.Closes #9559