From 23220ea48506fa2c7a044921826b076785849c85 Mon Sep 17 00:00:00 2001 From: mintaka Date: Fri, 11 Sep 2026 11:12:12 -0400 Subject: [PATCH 1/2] fix(ui): correct a stale boot-order comment in the analytics test (RIG-2874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit T5 record hygiene. The test comment asserted that boot builds the transport before analytics, which the T4 reorder inverted, and it contradicted the matching comment on the traceId getter (analytics.ts:53). The test behaviour is unchanged and still correct: the getter picks up a trace id that arrives after createAnalytics. The module header (analytics.ts:1-16) needed no change — "built once at boot from the resolved AnalyticsConfig" is still accurate after the reorder. Co-authored-by: Matt Wilkinson --- apps/ui/src/analytics/analytics.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/ui/src/analytics/analytics.test.ts b/apps/ui/src/analytics/analytics.test.ts index 24da649e6..78976f207 100644 --- a/apps/ui/src/analytics/analytics.test.ts +++ b/apps/ui/src/analytics/analytics.test.ts @@ -264,8 +264,9 @@ describe("$ai_trace_id stamping", () => { test("a trace id arriving AFTER createAnalytics is picked up by a later capture", () => { // The whole reason the source is a getter over a mutable slot: boot builds - // the transport before analytics, so the first trace id lands later. A - // read-once-at-construction regression would capture undefined forever. + // analytics BEFORE the transport, so the slot is still empty here and the + // first trace id lands later. A read-once-at-construction regression would + // capture undefined forever. const fake = makeFake(); let current: string | undefined; const analytics = createAnalytics(config, { From 6939ed5ef8b638f39c00ba2f3d731cd039630e5a Mon Sep 17 00:00:00 2001 From: mintaka Date: Fri, 11 Sep 2026 12:56:46 -0400 Subject: [PATCH 2/2] fix(ui): tighten the boot-order comment to two lines (RIG-2874) Review nit on #1081: the comment sat exactly on the four-line ceiling, and "the slot is still empty here" described the test local rather than the production sink it stands in for. Same fact, two lines, no conflation. Co-authored-by: Matt Wilkinson --- apps/ui/src/analytics/analytics.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/ui/src/analytics/analytics.test.ts b/apps/ui/src/analytics/analytics.test.ts index 78976f207..47dc8074e 100644 --- a/apps/ui/src/analytics/analytics.test.ts +++ b/apps/ui/src/analytics/analytics.test.ts @@ -263,10 +263,8 @@ describe("$ai_trace_id stamping", () => { }); test("a trace id arriving AFTER createAnalytics is picked up by a later capture", () => { - // The whole reason the source is a getter over a mutable slot: boot builds - // analytics BEFORE the transport, so the slot is still empty here and the - // first trace id lands later. A read-once-at-construction regression would - // capture undefined forever. + // Boot builds analytics BEFORE the transport, so no trace id exists yet at + // construction; reading once here would capture undefined forever. const fake = makeFake(); let current: string | undefined; const analytics = createAnalytics(config, {