Skip to content

Commit 934cadd

Browse files
committed
Make postdeploy sanity use fast command-path marker instead of full generation
1 parent 95c1f6f commit 934cadd

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

telegram/scripts/postdeploy-sanity.js

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ async function main() {
264264
console.log('[sanity] capture R2 baseline');
265265
const s3 = createS3(endpoint, accessKeyId, secretAccessKey);
266266
const beforeReq = new Set(await listKeys(s3, bucket, 'logs/requests/'));
267-
const beforeImg = new Set(await listKeys(s3, bucket, 'images/'));
268267

269268
const marker = `sanity-${Date.now()}`;
270-
console.log(`[sanity] webhook generation trigger -> ${marker}`);
271-
await postWebhook(baseUrl, webhookSecret, marker, chatId);
269+
const commandText = `/user ${marker}`;
270+
console.log(`[sanity] webhook command trigger -> ${commandText}`);
271+
await postWebhook(baseUrl, webhookSecret, commandText, chatId);
272272
await assertHealth(baseUrl, 'post-webhook');
273273

274274
console.log('[sanity] wait for request log marker');
@@ -283,17 +283,6 @@ async function main() {
283283
}, 180000, 2500, 'request log marker');
284284
console.log(`[sanity] marker request found: ${requestEntry.key}`);
285285

286-
console.log('[sanity] wait for image artifact growth (live provider path)');
287-
await waitFor(async () => {
288-
await assertHealth(baseUrl, 'image-growth-wait');
289-
const found = await findMarkerRequestEntry(s3, bucket, beforeReq, marker);
290-
if (found && found.obj && found.obj.result && found.obj.result.ok === false) {
291-
throw new Error(`Remote generation failed: ${String(found.obj.result.error || 'unknown error')}`);
292-
}
293-
const keys = await listKeys(s3, bucket, 'images/');
294-
return keys.some((k) => !beforeImg.has(k));
295-
}, 240000, 3000, 'generated images');
296-
297286
console.log('[sanity] telegram API check');
298287
const msg = await sendTelegramMessage(telegramToken, chatId, `Web2Comic sanity passed for marker ${marker}`);
299288
if (!Number(msg?.message_id || 0)) throw new Error('telegram message_id missing');

0 commit comments

Comments
 (0)