Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ describe('wrapper ready error parsing', () => {
error: 'WORKSPACE_SETUP_FAILED',
subtype: 'git_clone_timeout',
message: 'Repository clone timed out',
detail: 'termination timeout, elapsed 120000ms, output truncated',
detail: 'termination timeout, output truncated',
retryable: true,
wrapperRunId: 'wrapper_run_1',
})
).toEqual({
error: 'WORKSPACE_SETUP_FAILED',
subtype: 'git_clone_timeout',
message: 'Repository clone timed out',
detail: 'termination timeout, elapsed 120000ms, output truncated',
detail: 'termination timeout, output truncated',
retryable: true,
wrapperRunId: 'wrapper_run_1',
});
Expand Down
4 changes: 2 additions & 2 deletions services/cloud-agent-next/test/unit/wrapper/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('createSafeProcessDiagnostic', () => {
stdoutTruncated: true,
});

expect(detail).toBe('termination nonzero exit, exit code 2, elapsed 42ms, output truncated');
expect(detail).toBe('termination nonzero exit, exit code 2, output truncated');
for (const sensitiveValue of sensitiveValues) expect(detail).not.toContain(sensitiveValue);
});

Expand All @@ -78,7 +78,7 @@ describe('createSafeProcessDiagnostic', () => {
},
{
result: { stdout: '', stderr: '', exitCode: 0, elapsedMs: 7 },
expected: 'termination completed, elapsed 7ms',
expected: 'termination completed',
},
])('reports structured termination metadata', ({ result, expected }) => {
expect(createSafeProcessDiagnostic(result)).toBe(expected);
Expand Down
4 changes: 2 additions & 2 deletions services/cloud-agent-next/wrapper/src/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('session readiness errors', () => {
code: 'WORKSPACE_SETUP_FAILED',
subtype: 'git_clone_timeout',
message: 'Repository clone timed out',
detail: 'termination timeout, elapsed 120000ms, output truncated',
detail: 'termination timeout, output truncated',
retryable: true,
},
}),
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('session readiness errors', () => {
error: 'WORKSPACE_SETUP_FAILED',
subtype: 'git_clone_timeout',
message: 'Repository clone timed out',
detail: 'termination timeout, elapsed 120000ms, output truncated',
detail: 'termination timeout, output truncated',
retryable: true,
});
expect(fetchHandler).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ describe('prepareWrapperBootstrapWorkspace', () => {
});
expect(setupError.message).toBe('Setup command 1 failed');
expect(setupError).toMatchObject({
detail: 'termination nonzero exit, exit code 1, elapsed 17ms, output truncated',
detail: 'termination nonzero exit, exit code 1, output truncated',
});
const projectedError = JSON.stringify(setupError);
for (const sensitiveValue of [
Expand Down
1 change: 0 additions & 1 deletion services/cloud-agent-next/wrapper/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export function createSafeProcessDiagnostic(result: ExecResult): string {
result.terminationReason === undefined && result.exitCode !== 0
? `exit code ${result.exitCode}`
: undefined,
result.elapsedMs === undefined ? undefined : `elapsed ${result.elapsedMs}ms`,
result.stdoutTruncated === true || result.stderrTruncated === true
? TRUNCATION_MARKER
: undefined,
Expand Down