Fix read-only filesystem errors in check_workflow_recompile_needed tests#9979
Merged
Conversation
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- 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>
Copilot
AI
changed the title
[WIP] Fix CI failures caused by read-only filesystem
Fix read-only filesystem errors in check_workflow_recompile_needed tests
Jan 14, 2026
pelikhan
approved these changes
Jan 14, 2026
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests for
check_workflow_recompile_neededfailed in CI withEROFS: read-only file systemwhen attempting to write template files to/opt/gh-aw/prompts/. The hardcoded path caused 4 test failures in CI Run #29542.Changes
Added
GH_AW_PROMPTS_DIRenvironment variable to make template path configurable/opt/gh-aw/prompts(backward compatible)os.tmpdir()for isolationUpdated test cleanup to use
fs.rmSync()instead offs.unlinkSync()Example
Other Reported Issues
The other 44 failures mentioned in CI Run #29542 (
collect_ndjson_outputandsafe_outputs_mcp_server_defaults) are not reproducible in the current codebase—all 109 tests pass without modification.Original prompt
This section details on the original issue you should resolve
<issue_title>[CI Failure Doctor] JS Test Failures - 46 Tests Failing in CI Environment (Run #29542)</issue_title>
<issue_description># 🏥 CI Failure Investigation - Run #29542
Summary
The CI workflow failed with 46 JavaScript test failures across 4 test files in the
jsjob. The failure is NOT caused by code changes in PR #9954 (which only adds documentation), but exposes pre-existing test environment issues.Failure Details
js(step 7: Run tests)Root Cause Analysis
🔴 Primary Issue: Read-Only Filesystem (4 failures)
File:
check_workflow_recompile_needed.test.cjsError:
EROFS: read-only file system, open '/opt/gh-aw/prompts/workflow_recompile_issue.md'Root Cause: Tests attempt to write template files to
/opt/gh-aw/prompts/which is read-only in CI. The CI workflow's "Setup prompt templates for tests" step copies files to this location but doesn't make it writable.Impact: All 4 tests in this file fail during setup and teardown.
🟡 Secondary Issue: Empty Output Validation (38 failures)
File:
collect_ndjson_output.test.cjsError:
expected [] to have a length of X but got +0Root Cause: Tests expect
parsedOutput.itemsto contain validation results, but receiving empty arrays. This suggests validation logic changed without updating tests.Example failing tests:
should validate required fields for add-labels typeshould validate required fields for create-pull-request typeshould respect max limits from config🟢 Tertiary Issue: MCP Server Timeouts (2 failures)
File:
safe_outputs_mcp_server_defaults.test.cjsError:
Test timed out in 10000msTests:
should have optional branch parameter for create_pull_requestshould have optional branch parameter for push_to_pull_request_branchTest Summary
Investigation Findings
Important Context
PR #9954 only adds documentation - it creates a new file
docs/src/content/docs/setup/cli.mdwith 490 lines of CLI documentation. No changes to JavaScript code or tests.This means: The test failures are pre-existing issues that were exposed by this CI run, not introduced by the PR.
Reproduction Steps
Recommended Actions
🔴 HIGH PRIORITY - Fix Filesystem Issue
File:
actions/setup/js/check_workflow_recompile_needed.test.cjsReplace hardcoded
/opt/gh-aw/prompts/path with temp directory:Alternative: Make
/opt/gh-aw/promptswritable in CI:🟡 MEDIUM PRIORITY - Fix Validation Tests
File:
actions/setup/js/collect_ndjson_output.test.cjsInvestigate why
parsedOutput.itemsis empty:🟢 LOW PRIORITY - Fix MCP Server Tests
File:
actions/setup/js/safe_outputs_mcp_server_defaults.test.cjsIncrease timeout from 10000ms to 30000ms or add server startup verification.
Prevention Strategies
Pre-Commit Checklist
Test Writing Rules
os.tmpdir()for temp files, never/opt/or/var//opt/directories are writable in CIExample Pattern
AI Team Self-Improvement
Add to AI agent instructions: