Skip to content

gitflarePublicPartly agent-ready50

cf-workflows-pipeline

Durable content pipeline on Cloudflare Workflows: ingest, extract, summarise with Workers AI via AI Gateway, human approval, publish.

Fix pipeline runs failing at ingest (steps.attempt NOT NULL)629b2fa
TypeScript18 lines728 B
import { describe, it, expect, vi } from "vitest";vi.mock("cloudflare:workers", () => ({ WorkflowEntrypoint: class {} }));import { handle } from "../src/index";import type { Env } from "../src/env"; describe("deep links", () => {  it("never requests .html from ASSETS", async () => {    const seen: string[] = [];    const env = { ASSETS: { fetch: async (r: Request) => { seen.push(new URL(r.url).pathname); return new Response("shell"); } } } as unknown as Env;    for (const p of ["/runs", "/runs/abc-1"]) {      const r = await handle(new Request("http://x" + p), env);      expect(r.status).toBe(200);    }    expect(seen.length).toBe(2);    expect(seen.some((p) => p.endsWith(".html"))).toBe(false);  });});