Merge branch 'release/v1.47.4' into release/v1.47.5

# Conflicts:
#	src/__tests__/baselines/source-file-lines.json
#	src/__tests__/baselines/source-function-lines.json
#	src/__tests__/baselines/test-as-never.json
#	src/__tests__/baselines/test-source-reads.json
#	src/__tests__/baselines/version-stamp-comments.json
#	src/app/auth/login/page.tsx
This commit is contained in:
Marc-André Bombeck committed 2026-11-12 14:47:38 +01:00
commit 3faf1b1c8b
132 files changed
+4234 -3322

No files matched your search

+2
View File
@@ -93,6 +93,8 @@ export const ERROR_CODE_CATALOGUE: Readonly<Record<string, readonly string[]>> =
"auth.refresh.invalid",
"auth.refresh.reuse",
"auth.refresh.revoked",
"auth.register.invite_invalid",
"auth.register.taken",
"auth.reproof.failed",
"auth.reproof.required",
"auth.reproof.too_weak",
+2 -2
View File
@@ -2301,12 +2301,12 @@ export const authPaths: NonNullable<ZodOpenApiObject["paths"]> = {
},
"403": {
description:
"Refused before any work. Either the operator runs `OIDC_ONLY=true` (`meta.errorCode` = `oidc_only`), or self-registration is closed and the request carried no invite, or the invite it carried was invalid, expired or exhausted. The three are distinguishable by prose but not by code.",
"Refused before any work. Either the operator runs `OIDC_ONLY=true` (`meta.errorCode` = `oidc_only`), or self-registration is closed and the request carried no invite, or the invite it carried was invalid, expired or exhausted (`auth.register.invite_invalid`).",
content: { "application/json": { schema: errorEnvelope } },
},
"409": {
description:
"The email or the username is taken. Deliberately one message for both, so this is not an account-existence oracle. Also the answer when two concurrent signups race past the pre-check and the database unique index catches the second.",
"The email or the username is taken (`auth.register.taken`). Deliberately one message and one code for both, so this is not an account-existence oracle. Also the answer when two concurrent signups race past the pre-check and the database unique index catches the second. `auth.already_authenticated` when the request carries a signed-in session.",
content: { "application/json": { schema: errorEnvelope } },
},
...stdResponses,
@@ -66,34 +66,22 @@ const apnsTestResponse = z
const webPushTestResponse = z
.object({
ok: z.boolean(),
sent: z
.number()
.int()
.describe("1 on success, 0 on failure. Never more than one."),
ok: z
.boolean()
.describe(
"Whether at least one of the account's subscriptions accepted the push.",
),
latencyMs: z
.number()
.int()
.optional()
.describe("Round-trip to the push service. Present on success only."),
perEndpoint: z
.array(
z.object({
host: z
.string()
.describe(
"Host of the push service the test went to — the endpoint path is a routing secret and is never returned.",
),
status: z
.number()
.int()
.nullable()
.describe(
"The push service's HTTP status, or null when the attempt threw before one existed.",
),
}),
)
.describe("One entry: only the newest subscription is tested."),
.describe("Time to send to every subscription. Present on success only."),
reason: z
.string()
.optional()
.describe(
"Why it was not, when `ok` is false. Absent on success. The sender's own classification, the same code a failed reminder records (`web_push_410_gone` when every endpoint is gone, a status-derived code otherwise).",
),
})
.meta({ id: "WebPushTestResponse" });
@@ -200,10 +188,10 @@ export const notificationTransportPaths: NonNullable<
"/api/notifications/web-push/test": {
post: {
tags: ["Notifications"],
summary: "Send a test push to the newest Web Push subscription",
summary: "Send a test push to every Web Push subscription",
description:
"Fires one notification to the caller's MOST RECENT subscription only — a person with a phone, a tablet and a desktop registered should not get three buzzes per click. Takes no body. Rate-limited 5 per minute per user.\n\n" +
"Read `ok`, not the status. A push that the service rejects still answers 200, with `ok: false` and the service's own status in `perEndpoint`. Only the endpoint's HOST is reported: the full endpoint is the routing secret for that subscription, and push services embed it in their own error messages, so it is stripped before anything is logged or returned.",
"Fires one notification to each of the caller's subscriptions, through the same sender real reminders use, with the text in the account's language. The device the test was pressed on gets it whichever subscription is newest. Endpoints the push service reports gone (404/410) are removed, as on a real send. Takes no body. Rate-limited 5 per minute per user.\n\n" +
"Read `ok`, not the status. A push that every service rejects still answers 200, with `ok: false`, a `reason`, and `meta.errorCode`: `upstream_rejected`, or `connection_failed` when no push service answered. No endpoint is returned: the full endpoint is the routing secret for that subscription.",
responses: {
"200": {
description:
+1 -1
View File
@@ -105,7 +105,7 @@ const channelDeliveryStatus = z
state: z
.enum(["active", "auto_disabled", "manually_disabled", "sending_paused"])
.describe(
"Server-derived. `auto_disabled` — the dispatcher turned it off after repeated hard rejects (`disabledReason` says why). `manually_disabled` — the user turned it off. `sending_paused` — still enabled but inside a retry cooldown until `nextRetryAt`. `active` — enabled and sending.",
"Server-derived. `auto_disabled` — the dispatcher turned it off after repeated hard rejects (`disabledReason` says why). `manually_disabled` — the user turned it off. `sending_paused` — still enabled but inside a retry cooldown until `nextRetryAt`, after a transient failure or after a send that had nobody to go to (no browser subscribed, no iPhone paired, a transport the operator has not set up; `lastFailureReason` names it, `consecutiveFailures` is not raised). `active` — enabled and sending.",
),
disabledReason: z
.string()