chore(format): prettier sweep across develop

Mostly table column normalisation under docs/audit/ + planning, object-
literal expansion in src/lib/ai/coach/snapshot.ts after the W4 F6 Apple
Health metric block landed, and small wrap/unwrap line adjustments in
the device + APNs routes / tests touched across W3/W4/W5 sessions.
No behavioural change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc-André BombeckandClaude Opus 4.7 committed 2026-05-11 08:27:51 +02:00
1 parent 5dcd3954a0
commit f1e6630958
70 files changed
+899 -660

No files matched your search

@@ -74,8 +74,7 @@ const VALID_ENV = {
APNS_KEY_ID: "ABCDE12345",
APNS_TEAM_ID: "TEAM123456",
APNS_BUNDLE_ID: "test.healthlog.ios",
APNS_KEY:
"-----BEGIN PRIVATE KEY-----\\nMOCKKEY\\n-----END PRIVATE KEY-----",
APNS_KEY: "-----BEGIN PRIVATE KEY-----\\nMOCKKEY\\n-----END PRIVATE KEY-----",
};
function setEnv(over: Record<string, string | undefined> = {}): void {
@@ -269,7 +268,6 @@ describe("sendApnsPush — failure classification", () => {
expect(r.reason).toBe("apns_network_error");
expect(r.shouldDisable).toBeFalsy();
});
});
describe("sendApnsPush — config disabled paths", () => {
@@ -325,7 +323,11 @@ describe("sendViaApns — dispatcher fan-out", () => {
.mockResolvedValueOnce({
sent: [],
failed: [
{ device: "tok-b", status: 410, response: { reason: "Unregistered" } },
{
device: "tok-b",
status: 410,
response: { reason: "Unregistered" },
},
],
});
const r = await sendViaApns("u-1", {
@@ -349,13 +351,21 @@ describe("sendViaApns — dispatcher fan-out", () => {
.mockResolvedValueOnce({
sent: [],
failed: [
{ device: "tok-a", status: 410, response: { reason: "Unregistered" } },
{
device: "tok-a",
status: 410,
response: { reason: "Unregistered" },
},
],
})
.mockResolvedValueOnce({
sent: [],
failed: [
{ device: "tok-b", status: 400, response: { reason: "BadDeviceToken" } },
{
device: "tok-b",
status: 400,
response: { reason: "BadDeviceToken" },
},
],
});
const r = await sendViaApns("u-1", {
+1 -3
View File
@@ -126,9 +126,7 @@ export function loadApnsConfig(): ApnsConfig | null {
// configuring and stopped — surface that as a warning so the
// half-finished state is visible in logs.
const anySet = Boolean(keyId || teamId || bundleId || inlineKey || keyFile);
const allSet = Boolean(
keyId && teamId && bundleId && (inlineKey || keyFile),
);
const allSet = Boolean(keyId && teamId && bundleId && (inlineKey || keyFile));
if (!anySet) {
cachedConfig = null;