From 4897bdb5e3a46639de0fd0142bc7862767296067 Mon Sep 17 00:00:00 2001 From: Danny Kim Date: Thu, 24 Sep 2026 05:20:04 +0900 Subject: [PATCH] Fix packaged prompt path --- src/run.ts | 2 +- src/workflow_test.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/run.ts b/src/run.ts index 6b36639..846f104 100644 --- a/src/run.ts +++ b/src/run.ts @@ -152,7 +152,7 @@ async function renderPrompt( ANCHORS_PATH: anchorsPath, }; const template = await Deno.readTextFile( - new URL("prompt.md", import.meta.url), + new URL("../prompt.md", import.meta.url), ); return { prompt: template.replace( diff --git a/src/workflow_test.ts b/src/workflow_test.ts index 1e7dc58..28a4e51 100644 --- a/src/workflow_test.ts +++ b/src/workflow_test.ts @@ -106,6 +106,18 @@ Deno.test("the source protection script stages immutable action files", async () } }); +Deno.test("module-relative runtime assets exist", async () => { + const module = new URL("run.ts", import.meta.url); + const source = await Deno.readTextFile(module); + for ( + const match of source.matchAll(/new URL\("([^"]+)", import\.meta\.url\)/g) + ) { + const asset = new URL(match[1], module); + const stat = await Deno.stat(asset); + assert(stat.isFile, asset.pathname); + } +}); + Deno.test("the repository uses its trusted main action", async () => { const workflow = await yaml(".gitea/workflows/agents.yml"); const job = mapping(mapping(workflow.jobs, "jobs").agent, "jobs.agent"); -- 2.52.0