From b383d6b613f13adeeabd345e8e272174466db182 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 15:56:33 +0000 Subject: [PATCH 1/3] Initial plan From b778f2f928c7ee25d47f8eec9ce367f31b9a3fdc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 16:02:04 +0000 Subject: [PATCH 2/3] Plan fixes for JavaScript test failures Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> --- .github/workflows/repository-quality-improver.lock.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index 6fd6b4cb7bc..41f0b5136dd 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -29,7 +29,6 @@ name: "Repository Quality Improvement Agent" "on": schedule: - cron: "0 13 * * 1-5" - # Friendly format: daily (scattered) workflow_dispatch: permissions: From 425e96800741acb489388646d333b00bc61321c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Jan 2026 16:06:15 +0000 Subject: [PATCH 3/3] Fix read-only filesystem issue in check_workflow_recompile_needed tests - Add GH_AW_PROMPTS_DIR environment variable to make template path configurable - Update test to use os.tmpdir() instead of hardcoded /opt/gh-aw/prompts - Default to /opt/gh-aw/prompts for production (backward compatible) - Tests now pass in both local and CI environments Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> --- .../js/check_workflow_recompile_needed.cjs | 4 ++- .../check_workflow_recompile_needed.test.cjs | 25 ++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/actions/setup/js/check_workflow_recompile_needed.cjs b/actions/setup/js/check_workflow_recompile_needed.cjs index a0e9fc5c955..d605527b887 100644 --- a/actions/setup/js/check_workflow_recompile_needed.cjs +++ b/actions/setup/js/check_workflow_recompile_needed.cjs @@ -127,7 +127,9 @@ async function main() { const runUrl = context.payload.repository ? `${context.payload.repository.html_url}/actions/runs/${context.runId}` : `${githubServer}/${owner}/${repo}/actions/runs/${context.runId}`; // Read the issue template from the prompts directory - const templatePath = "/opt/gh-aw/prompts/workflow_recompile_issue.md"; + // Allow override via environment variable for testing + const promptsDir = process.env.GH_AW_PROMPTS_DIR || "/opt/gh-aw/prompts"; + const templatePath = `${promptsDir}/workflow_recompile_issue.md`; let issueTemplate; try { issueTemplate = fs.readFileSync(templatePath, "utf8"); diff --git a/actions/setup/js/check_workflow_recompile_needed.test.cjs b/actions/setup/js/check_workflow_recompile_needed.test.cjs index 458010aa27b..b25ff786f7b 100644 --- a/actions/setup/js/check_workflow_recompile_needed.test.cjs +++ b/actions/setup/js/check_workflow_recompile_needed.test.cjs @@ -2,6 +2,7 @@ import { describe, it, expect, beforeEach, afterEach, vi } from "vitest"; import fs from "fs"; import path from "path"; +import os from "os"; describe("check_workflow_recompile_needed", () => { let mockCore; @@ -9,9 +10,17 @@ describe("check_workflow_recompile_needed", () => { let mockContext; let mockExec; let originalGlobals; - const templatePath = "/opt/gh-aw/prompts/workflow_recompile_issue.md"; + let originalEnv; + const testPromptsDir = path.join(os.tmpdir(), "gh-aw-test", "prompts"); + const templatePath = path.join(testPromptsDir, "workflow_recompile_issue.md"); beforeEach(() => { + // Save original environment + originalEnv = process.env.GH_AW_PROMPTS_DIR; + + // Set test prompts directory + process.env.GH_AW_PROMPTS_DIR = testPromptsDir; + // Create the template file for testing const templateDir = path.dirname(templatePath); if (!fs.existsSync(templateDir)) { @@ -140,9 +149,17 @@ The following workflow lock files have changes: }); afterEach(() => { - // Clean up the template file - if (fs.existsSync(templatePath)) { - fs.unlinkSync(templatePath); + // Restore environment variable + if (originalEnv !== undefined) { + process.env.GH_AW_PROMPTS_DIR = originalEnv; + } else { + delete process.env.GH_AW_PROMPTS_DIR; + } + + // Clean up the test directory + const testDir = path.join(os.tmpdir(), "gh-aw-test"); + if (fs.existsSync(testDir)) { + fs.rmSync(testDir, { recursive: true, force: true }); } // Restore original globals