test: cover bootstrap submitted diagnostics
This commit is contained in:
parent
5fcefb9b07
commit
8b97f5c016
2 changed files with 48 additions and 1 deletions
|
|
@ -240,6 +240,8 @@ const MODEL_NO_BOOTSTRAP_PATTERN = new RegExp(
|
|||
'bootstrap not confirmed',
|
||||
'check-in not yet received',
|
||||
'bootstrap_stalled',
|
||||
'did not submit bootstrap prompt',
|
||||
'bootstrap_submit_accepted_without_uuid',
|
||||
'timed out waiting for bootstrap_submitted',
|
||||
'last transport stage:\\s*(?:mailbox_bootstrap_written|bootstrap_prompt_observed|bootstrap_submit_attempted|bootstrap_submitted)',
|
||||
].join('|'),
|
||||
|
|
@ -346,7 +348,7 @@ export function extractLaunchBootstrapTransportBreadcrumb(
|
|||
retryable: retryableRaw === 'true' ? true : retryableRaw === 'false' ? false : null,
|
||||
noStdinWarning: /no stdin data received|proceeding without it/i.test(combined),
|
||||
bootstrapSubmitted:
|
||||
/(?:event["']?\s*:\s*["']bootstrap_submitted["']|bootstrap_submit_accepted|bootstrap submitted)/i.test(
|
||||
/(?:(?:event|type)["']?\s*[:=]\s*["']bootstrap_submitted["']|bootstrap_submit_accepted|bootstrap submitted)/i.test(
|
||||
combined
|
||||
),
|
||||
evidence,
|
||||
|
|
|
|||
|
|
@ -265,6 +265,51 @@ describe('TeamLaunchFailureArtifactPack', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('keeps submitted bootstrap prompts out of stdin_missing classification while waiting for confirmation', () => {
|
||||
const input = {
|
||||
teamName: 'artifact-team',
|
||||
runId: 'run-submitted-no-confirm',
|
||||
reason:
|
||||
'alice: Teammate was registered but did not bootstrap-confirm before timeout. Last transport stage: bootstrap_submitted: messageId=bootstrap-alice-1 Last stderr: Warning: no stdin data received in 3s, proceeding without it.',
|
||||
progressTraceLines: [
|
||||
'mailbox_bootstrap_written detail=messageId=bootstrap-alice-1',
|
||||
'bootstrap_submit_attempted detail=submitting bootstrap prompt',
|
||||
'event="bootstrap_submitted" detail=messageId=bootstrap-alice-1',
|
||||
'Warning: no stdin data received in 3s, proceeding without it.',
|
||||
],
|
||||
};
|
||||
|
||||
expect(classifyLaunchFailureArtifact(input).code).toBe('model_no_bootstrap');
|
||||
expect(extractLaunchBootstrapTransportBreadcrumb(input)).toMatchObject({
|
||||
lastTransportStage: expect.stringContaining(
|
||||
'bootstrap_submitted: messageId=bootstrap-alice-1'
|
||||
),
|
||||
noStdinWarning: true,
|
||||
bootstrapSubmitted: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('classifies accepted-without-uuid bootstrap submit failures as transport evidence', () => {
|
||||
const input = {
|
||||
teamName: 'artifact-team',
|
||||
runId: 'run-submit-accepted-without-uuid',
|
||||
reason:
|
||||
'jack: Teammate process jack@signal-ops did not submit bootstrap prompt: teammate runtime failed before bootstrap_submitted (bootstrap_submit_accepted_without_uuid) Last stderr: Warning: no stdin data received in 3s, proceeding without it.',
|
||||
progressTraceLines: [
|
||||
'mailbox_bootstrap_written detail=messageId=bootstrap-jack-1',
|
||||
'bootstrap_submit_attempted detail=submitting bootstrap prompt',
|
||||
'bootstrap_submit_accepted_without_uuid detail=submit accepted without userMessageUuid',
|
||||
'Warning: no stdin data received in 3s, proceeding without it.',
|
||||
],
|
||||
};
|
||||
|
||||
expect(classifyLaunchFailureArtifact(input).code).toBe('model_no_bootstrap');
|
||||
expect(extractLaunchBootstrapTransportBreadcrumb(input)).toMatchObject({
|
||||
noStdinWarning: true,
|
||||
bootstrapSubmitted: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('classifies provider quota separately from protocol errors', () => {
|
||||
expect(
|
||||
classifyLaunchFailureArtifact({
|
||||
|
|
|
|||
Loading…
Reference in a new issue