@teamscala/service-boot 0.23.479 → 0.23.481

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "name": "@teamscala/service-boot",
8
8
  "type": "module",
9
- "version": "0.23.479",
9
+ "version": "0.23.481",
10
10
  "sideEffects": false,
11
11
  "imports": {
12
12
  "#service-boot/*": "./src/*",
@@ -105,3 +105,32 @@ describe("resolveReportHalves", () => {
105
105
  ).rejects.toThrow(/matches no quiz response/);
106
106
  });
107
107
  });
108
+
109
+ describe("superseded-pass leak prevention", () => {
110
+ test("the live pass reaches the reader and the superseded pass's wording never does", async () => {
111
+ const SUPERSEDED_MARKER = "SUPERSEDED-PASS-64-PARKED-DOMAIN-CLAIM";
112
+ const superseded = annaResearch({
113
+ id: "research-superseded",
114
+ superseded_at: "2026-09-04T01:00:00Z",
115
+ findings: { intro: `${SUPERSEDED_MARKER}: no website exists.` },
116
+ });
117
+ const live = annaResearch({ id: "research-live", findings: { intro: "launcha.marketing is live and names you." } });
118
+ const client = {
119
+ assessment_research: {
120
+ findFirst: async () => live,
121
+ },
122
+ assessment_responses: {
123
+ findFirst: async () => null,
124
+ findMany: async () => [],
125
+ },
126
+ };
127
+ const halves = await resolveReportHalves({
128
+ input: { response: null, research: superseded, id: superseded.id },
129
+ client,
130
+ params: {},
131
+ });
132
+ const text = JSON.stringify(halves.research);
133
+ expect(text).not.toContain(SUPERSEDED_MARKER);
134
+ expect(text).toContain("launcha.marketing is live and names you");
135
+ });
136
+ });
@@ -128,7 +128,7 @@ describe("research shaping", () => {
128
128
  });
129
129
  expect(data.research.combinedStatement).toContain("17 points higher");
130
130
  expect(data.research.combinedBand).toBe("Recognised");
131
- expect(data.research.reportDate).toBe("2026-09-01");
131
+ expect(data.research.reportDate).toBe("2026-09-04");
132
132
  });
133
133
 
134
134
  test("research-only person: the research score drives the snapshot and the self sections stay absent", () => {
@@ -229,34 +229,5 @@ describe("the rendered text surface is one-person clean", () => {
229
229
  expect(strings).not.toContain(marker);
230
230
  }
231
231
  });
232
-
233
- // "a different person's research never renders here" is enforced UPSTREAM:
234
- // the pairing resolver matches halves by normalised LinkedIn identity, and
235
- // its refusal tests live in fn-routers/assessment-report-pair.test.ts.
236
232
  });
237
233
 
238
- describe("small derivations", () => {
239
- test("gapText is signed and plain", () => {
240
- expect(gapText(54, 71)).toBe("+17");
241
- expect(gapText(71, 54)).toBe("-17");
242
- expect(gapText(54, 54)).toBe("0");
243
- });
244
-
245
- test("prepared-for line reads exactly brand and person", () => {
246
- expect(buildPreparedFor("Launcha Marketing", "Anna Osherov")).toBe(
247
- "Launcha Marketing and Anna Osherov",
248
- );
249
- });
250
-
251
- test("combined statement names the direction, size and band", () => {
252
- const statement = buildCombinedStatement({
253
- selfScore: 54,
254
- researchScore: 71,
255
- bandSteps: 1,
256
- researchBandName: "Recognised",
257
- });
258
- expect(statement).toContain("17 points higher");
259
- expect(statement).toContain("one band higher");
260
- expect(statement).toContain("Recognised");
261
- });
262
- });
@@ -229,7 +229,7 @@ export interface ResearchReportData {
229
229
  methodRawScores: string;
230
230
  methodSources: string;
231
231
  researchedAt: string;
232
- /** the report's date: the quiz completion when a response exists, else the research date */
232
+ /** the report's date: always the research pass date (when the report was produced) */
233
233
  reportDate: string;
234
234
  }
235
235
 
@@ -373,7 +373,7 @@ export function buildResearchReportData(opts: {
373
373
  methodRawScores: findings.rawScoresNote ?? "",
374
374
  methodSources: findings.sourceSummary ?? "",
375
375
  researchedAt: isoDay(research.researched_at),
376
- reportDate: isoDay(response?.completed_at) || isoDay(research.researched_at),
376
+ reportDate: isoDay(research.researched_at),
377
377
  };
378
378
  }
379
379
 
@@ -92,7 +92,7 @@ export function regionSlotsPageData(
92
92
  {
93
93
  templateTitle: (meta.title as string) || undefined,
94
94
  websiteName: (website.name as string) || undefined,
95
- organisationName: (brand.companyName as string) || undefined,
95
+ organisationName: (brand.companyFriendlyName as string) || (brand.companyName as string) || undefined,
96
96
  entityTitle: entityTitle || undefined,
97
97
  },
98
98
  { orgPrefix },
@@ -164,7 +164,7 @@ export function regionSlotsPageData(
164
164
  {
165
165
  templateTitle: (meta.title as string) || undefined,
166
166
  websiteName: (website.name as string) || undefined,
167
- organisationName: (brand.companyName as string) || undefined,
167
+ organisationName: (brand.companyFriendlyName as string) || (brand.companyName as string) || undefined,
168
168
  pageName: contentPageName,
169
169
  entityTitle: entityTitle || undefined,
170
170
  },