Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(desktop): pin incident CSV fixture digest

Alfredo Lopezc135ea1f263d
diff --git a/desktop-app/test/e2e-playwright/helpers/gfsLargeFileCsvFixture.ts b/desktop-app/test/e2e-playwright/helpers/gfsLargeFileCsvFixture.ts
index 596a3598a..6e4a025cf 100644
--- a/desktop-app/test/e2e-playwright/helpers/gfsLargeFileCsvFixture.ts
+++ b/desktop-app/test/e2e-playwright/helpers/gfsLargeFileCsvFixture.ts
@@ -6,6 +6,8 @@ import * as path from 'node:path'
// The Desktop journey that consumes it exercises the Electron IPC path.
export const GFS_LARGE_CSV_SIZE = 3_836_961
export const GFS_OLD_VISUAL_LIMIT = 3_145_728
+export const GFS_LARGE_CSV_INCIDENT_SHA256 =
+ '675b72d7ba4c4c6eca3a49a076ed6adcff72165805e2069bc3619bca333c9bd1'
export interface GfsLargeCsvFixture {
fileName: string
@@ -96,7 +98,8 @@ function countCsvRecords(buffer: Buffer): number {
/**
* Resolve the incident-shaped CSV. CI uses the deterministic synthetic buffer;
* a local run can provide the original customer CSV through
- * `E2E_GFS_LARGE_CSV_PATH`. The original is never copied into the repository.
+ * `E2E_GFS_LARGE_CSV_PATH`; its digest must match the recorded incident copy.
+ * The original is never copied into the repository.
*/
export function resolveGfsLargeCsvFixture(): GfsLargeCsvFixture {
const explicitPath = process.env.E2E_GFS_LARGE_CSV_PATH
@@ -107,6 +110,11 @@ export function resolveGfsLargeCsvFixture(): GfsLargeCsvFixture {
throw new Error(
`E2E_GFS_LARGE_CSV_PATH must contain exactly ${GFS_LARGE_CSV_SIZE} bytes; got ${buffer.byteLength}`
)
+ const sha256 = crypto.createHash('sha256').update(buffer).digest('hex')
+ if (sha256 !== GFS_LARGE_CSV_INCIDENT_SHA256)
+ throw new Error(
+ `E2E_GFS_LARGE_CSV_PATH digest mismatch; expected ${GFS_LARGE_CSV_INCIDENT_SHA256}, got ${sha256}`
+ )
return {
fileName: path.basename(explicitPath),