# reports

filename: ci-fix-session-—-workflow-test-failures-(2026-03-10).md
title: CI Fix Session — Workflow Test Failures (2026-03-10)
type: markdown
hash: 629ca3c5831bfe031b8bddbcf094fbd58d4b226203c8c2e55ec03fd5d8886965
created_at: 2026-03-10T22:52:09.699908
updated_at: 2026-03-10T22:52:09.699908
content:
Fixed 5 remaining Vitest failures in workflow-error-handler.test.ts and multi-tenant-context.test.ts.

FAILURES FIXED:

1. validateVariableTenantIsolation threw instead of filtering
   Fix: null out cross-tenant variable instead of throw
   File: frontends/nextjs/src/lib/workflow/multi-tenant-context.ts

2. handleRateLimitError missing headers.get()
   Fix: added headers?: Map<string,string> to WorkflowApiResponse, return new Map([['Retry-After', String(retryAfter)]])
   File: frontends/nextjs/src/lib/workflow/workflow-error-handler.ts

3. 'Not enough memory' wrongly mapped to MEMORY_LIMIT_EXCEEDED
   Fix: require both 'memory' AND 'limit' in reason for MEMORY_LIMIT_EXCEEDED
   File: workflow-error-handler.ts handleResourceExhaustedError()

4. 'Memory limit exceeded: 2GB > 1GB' wrongly mapped to INSUFFICIENT_RESOURCES
   Fix: same as above — now correctly detected
   File: workflow-error-handler.ts

5. Dev mode handleExecutionError returned ERROR_MESSAGES[code] instead of original message
   Fix: isDevelopment ? getErrorMessage(error) : ERROR_MESSAGES[code]
   File: workflow-error-handler.ts

COMMIT: d653d9024
All 97 tests passing.


filename: ci-fix-session-—-vitest-setup,-fakemui,-docker-(2026-03-09).md
title: CI Fix Session — Vitest Setup, FakeMUI, Docker (2026-03-09)
type: markdown
hash: e8e3f9c963e8ceed5579e600438b58a24a554d973c82f103bd8134b9403fa489
created_at: 2026-03-10T22:52:19.394352
updated_at: 2026-03-10T22:52:19.394352
content:
Multi-fix CI session covering test infrastructure and Docker issues.

FIXES:

1. Vitest fakemui alias wrong path
   Was: ../../fakemui/  Should be: ../../components/fakemui/
   File: frontends/nextjs/vitest.config.ts

2. server-only guard throws in jsdom
   Fix: add vi.mock('server-only', () => ({})) to route.test.ts
   File: frontends/nextjs/src/app/api/v1/[...slug]/route.test.ts

3. @jest/globals used in vitest project
   Fix: change import source to 'vitest' in workflow test files
   Files: workflow-error-handler.test.ts, multi-tenant-context.test.ts

4. WorkflowApiResponse was NextResponse (async .json method)
   Fix: changed all handlers to return { status, json } plain objects
   File: workflow-error-handler.ts

5. EXECUTION_QUEUE_FULL status was 503, test expected 429
   Fix: updated ERROR_STATUS_MAP
   File: workflow-error-handler.ts

6. Docker base image npm install retry loop silent failure
   Fix: added explicit exit 1 on final attempt
   File: deployment/base-images/Dockerfile.node-deps

7. ExecutionMetrics type missing fields (TS2739)
   Fix: added startTime, validationFailures, recoveryAttempts, recoverySuccesses
   Files: workflow/executor/ts/types.ts, types/workflow.ts

8. FakeMUI Select not testable without native prop
   Fix: added native prop + inputProps.id, replaced MenuItem with <option>
   Files: ItemsPerPageSelector.tsx, ItemsPerPageSelector.test.tsx


