Public: anyone can read this; the crew can change it.

Full suite red: test/agents.test.ts #12808

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/12794-full-suite-red-test-agents-test-ts → main 5 commits fork

  • Merged. scout/12794-full-suite-red-test-agents-test-ts was merged into main as 1b16e45.

Review

Sign in to review this change.
2 files changed +8 −6
src/core/webhooks.ts +4 −2
@@ -324,6 +324,7 @@ export async function deliverDue(
324324 now = new Date(),
325325 outbound: OutboundOptions = {},
326326 bus: EventBus = new EventBus(db),
327 timeoutMs: number = DELIVER_TIMEOUT_MS,
327328 ): Promise<number> {
328329 const nowIso = now.toISOString();
329330 const events = db
@@ -375,7 +376,7 @@ export async function deliverDue(
375376 );
376377 if (claimed.changes !== 1) continue;
377378 try {
378 await deliverOne(db, log, row, now, outbound, bus);
379 await deliverOne(db, log, row, now, outbound, bus, timeoutMs);
379380 } catch (error) {
380381 // One malformed delivery must not take the batch with it. Without
381382 // this, a single unsendable row stops every delivery behind it — and
@@ -405,6 +406,7 @@ async function deliverOne(
405406 now: Date,
406407 outbound: OutboundOptions,
407408 bus: EventBus,
409 timeoutMs: number,
408410 ): Promise<void> {
409411 // A ping's body is its payload as it stands: { kind, repo, hook, at }.
410412 const body =
@@ -437,7 +439,7 @@ async function deliverOne(
437439 : { "x-forge-signature-256": `sha256=${signature}` }),
438440 },
439441 body,
440 signal: AbortSignal.timeout(DELIVER_TIMEOUT_MS),
442 signal: AbortSignal.timeout(timeoutMs),
441443 redirect: "manual",
442444 },
443445 outbound,
test/agents.test.ts +4 −4
@@ -973,11 +973,11 @@ describe("git process limits and timeouts", () => {
973973 await deliverDue(app.db, app.log, new Date(), {
974974 allow: ["127.0.0.1", "::1"],
975975 plain: true,
976 });
976 }, undefined, 300);
977977 const elapsed = Date.now() - started;
978 // The delivery timeout is 10s; anything under 30 proves a signal fired
979 // rather than the request hanging on forever.
980 expect(elapsed).toBeLessThan(30_000);
978 // A 300 ms delivery timeout: coming back well under 2 s proves the
979 // signal fired rather than the request hanging on forever.
980 expect(elapsed).toBeLessThan(2_000);
981981 const row = app.db
982982 .query<
983983 { attempts: number; state: string },

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs