Skip to content

Commit 664c119

Browse files
committed
test(logs): assert only the boundary behavior in the execute-workflow case
1 parent 5e9aea8 commit 664c119

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

‎apps/sim/executor/types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export interface ExecutionContext {
489489
resolvedSecretTraceRegistry?: ResolvedSecretTraceRegistry
490490
/** Exact candidates that may be carried by this block's terminal error, never its normal output. */
491491
errorResolvedSecretTraceRegistry?: ResolvedSecretTraceRegistry
492-
/** The provider call behind this block's terminal error, for its failure line; set per block. */
492+
/** Provider and model behind this block's terminal error, added to its failure line. */
493493
errorDiagnosticDetails?: { provider?: string; model?: string }
494494
workflowVariables?: Record<string, any>
495495
workflowVariableResolvedSecretTraceProvenance?: Record<string, ResolvedSecretTraceProvenanceV1>

‎apps/sim/lib/workflows/executor/execute-workflow.test.ts‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { posthogServerMock } from '@sim/testing/mocks/posthog-server.mock'
77
import { tableEventsMock } from '@sim/testing/mocks/table-events.mock'
88
import { beforeEach, describe, expect, it, vi } from 'vitest'
99
import type { BillingAttributionSnapshot } from '@/lib/billing/core/billing-attribution'
10-
import { classifyFailure, logFailureOnce } from '@/lib/core/errors/failure-log'
10+
import { logFailureOnce } from '@/lib/core/errors/failure-log'
1111
import { CredentialRevokedError } from '@/lib/oauth/credential-revoked'
1212
import type { ExecutionSnapshot } from '@/executor/execution/snapshot'
1313
import type { ExecutionCallbacks } from '@/executor/execution/types'
@@ -267,13 +267,9 @@ describe('executeWorkflow', () => {
267267
})
268268

269269
it.each([
270-
[
271-
'a revoked credential, attributed to its owner,',
272-
new CredentialRevokedError('Reconnect your account'),
273-
'user',
274-
],
275-
['an internal fault', new Error('connection pool exhausted'), 'internal'],
276-
] as const)('logs %s once for its execution', async (_name, executionError, kind) => {
270+
['a revoked credential', new CredentialRevokedError('Reconnect your account')],
271+
['an internal fault', new Error('connection pool exhausted')],
272+
] as const)('logs %s once for its execution', async (_name, executionError) => {
277273
executeWorkflowCoreMock.mockRejectedValueOnce(executionError)
278274

279275
await expect(
@@ -287,7 +283,6 @@ describe('executeWorkflow', () => {
287283
)
288284
).rejects.toBe(executionError)
289285

290-
expect(classifyFailure(executionError)).toBe(kind)
291286
/** The boundary logged it for this execution, so a later boundary in the same run skips it. */
292287
expect(
293288
logFailureOnce(createLogger('OuterBoundary'), 'probe', executionError, {

0 commit comments

Comments
 (0)