From 02b15497ece18542df6533bbe18b578f852acbe1 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2026 17:14:32 +0000 Subject: [PATCH 1/3] Export centralTimestamp so its unit test can import it (AFC-344) --- scripts/ios-fleet/asc-api.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ios-fleet/asc-api.mjs b/scripts/ios-fleet/asc-api.mjs index ef60cc2c..7ac65a78 100644 --- a/scripts/ios-fleet/asc-api.mjs +++ b/scripts/ios-fleet/asc-api.mjs @@ -144,7 +144,7 @@ const AGENT_MARKER = new RegExp(`\\[\\s*(?:ag|${AGENT_NAMES})\\s*\\]`, "gi"); // so the final rendered-body assertion tests for that form specifically. const AGENT_NAME_DENY = new RegExp(`(?:\\b(?:${AGENT_NAMES})\\b|\\[\\s*ag\\s*\\])`, "i"); -function centralTimestamp(now = new Date()) { +export function centralTimestamp(now = new Date()) { // AG***-S**C template: "Wed, Aug 12, 2026 at 1:15am" -- the owner's clock // (America/Chicago, so DST is automatic), 12-hour, lower-case am or pm, and // NO timezone abbreviation. Intl yields "1:15 PM" with a space or a narrow From 3e24df86100ec213fe8c1e731d0caeecce92601f Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2026 17:15:45 +0000 Subject: [PATCH 2/3] Add centralTimestamp unit test (AFC-344) --- scripts/ios-fleet/asc-api.timestamp.test.mjs | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 scripts/ios-fleet/asc-api.timestamp.test.mjs diff --git a/scripts/ios-fleet/asc-api.timestamp.test.mjs b/scripts/ios-fleet/asc-api.timestamp.test.mjs new file mode 100644 index 00000000..c68b5ad5 --- /dev/null +++ b/scripts/ios-fleet/asc-api.timestamp.test.mjs @@ -0,0 +1,44 @@ +/** + * centralTimestamp() is the "Released:" clock in TestFlight What to Test. + * + * The template is "Wed, Aug 12, 2026 at 1:15am": America/Chicago, 12-hour, + * lowercase am/pm, no space before the meridiem, and no timezone suffix. + * Intl may put a normal space or U+202F before AM/PM. Both fold away. + * + * 2026-08-12 06:15 UTC is 1:15am CDT. Nothing here calls App Store Connect. + */ +import assert from "node:assert/strict"; +import test from "node:test"; + +import { centralTimestamp } from "./asc-api.mjs"; + +const ONE_FIFTEEN_AM = new Date("2026-08-12T06:15:00.000Z"); +const ONE_FIFTEEN_PM = new Date("2026-08-12T18:15:00.000Z"); + +test("centralTimestamp emits 1:15am with no CT suffix", () => { + const stamp = centralTimestamp(ONE_FIFTEEN_AM); + assert.equal(stamp, "Wed, Aug 12, 2026 at 1:15am"); + assert.match(stamp, /1:15am/); + assert.equal(stamp.includes("CT"), false); + assert.equal(stamp.includes(" AM"), false); + assert.equal(stamp.includes("\u202f"), false); +}); + +test("centralTimestamp emits lowercase pm", () => { + assert.equal(centralTimestamp(ONE_FIFTEEN_PM), "Wed, Aug 12, 2026 at 1:15pm"); +}); + +test("centralTimestamp folds a narrow no-break space before the meridiem", () => { + const Original = Intl.DateTimeFormat; + Intl.DateTimeFormat = class extends Original { + format(value) { + return super.format(value).replace(/ ([AP]M)$/, "\u202f$1"); + } + }; + try { + assert.equal(centralTimestamp(ONE_FIFTEEN_AM), "Wed, Aug 12, 2026 at 1:15am"); + assert.equal(centralTimestamp(ONE_FIFTEEN_PM), "Wed, Aug 12, 2026 at 1:15pm"); + } finally { + Intl.DateTimeFormat = Original; + } +}); From 1d3754e3a658e1b9326c4fc16aa869033255f8b3 Mon Sep 17 00:00:00 2001 From: "swu-rob[bot]" <344781992+swu-rob[bot]@users.noreply.github.com> Date: Fri, 4 Dec 2026 18:25:04 +0000 Subject: [PATCH 3/3] [ROB] Refresh the ios-fleet pin for the asc-api export change --- scripts/ios-fleet.sha256 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ios-fleet.sha256 b/scripts/ios-fleet.sha256 index 684fd37d..561b582a 100644 --- a/scripts/ios-fleet.sha256 +++ b/scripts/ios-fleet.sha256 @@ -2,7 +2,7 @@ # GitHub-hosted macos-latest ships from this copy, not /Users/jay/apps/ios-fleet. # Refresh with: bash scripts/ios-fleet-pin.sh --update (then land it in a PR) e38eb93f5e2b35b9884bf280dd56942ade790cbe8e7119d97f4518faf5fd07a6 ship-testflight.sh -b4d957a5c4dbf1c7368fdcf110df54e0107789f48a9493e6f691e7f186f123db asc-api.mjs +d01686f686ce83cca9bfbadb300a99cd67e7cce011a992722250ab2158a1f5c9 asc-api.mjs b73de468651ab800d0efea38ae3a620e85801e87b5954e195f07fc30435a2644 asc-key.mjs 3de97aa5b28a8f15571eb4ec3c34436d720b99bd43f852c320387d57ea3927ca apps.json b41b09704f40be9e0a14a66ec302589d763b03ef65baf37437c00fdaa55287d0 AppUpdatePrompt.swift