-
Notifications
You must be signed in to change notification settings - Fork 36
Refactor agentic engine error patterns from Go to JavaScript #9303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Created error_patterns.cjs in actions/setup/js with all engine-specific patterns - Added error_patterns.test.cjs with comprehensive test coverage - Updated validate_errors.cjs to load patterns from error_patterns.cjs - Modified compiler to pass GH_AW_ENGINE_ID instead of GH_AW_ERROR_PATTERNS - Added GH_AW_CUSTOM_ERROR_PATTERNS support for custom agentic engines - Updated all engine implementations with deprecation comments - Fixed all related tests to check for new environment variables - Patterns are now loaded at runtime in JavaScript instead of compile-time in Go - Go implementations kept as fallback for backward compatibility Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
Smoke Test Results - Copilot Safe Inputs✅ File Writing: Created and verified test file Overall Status: Note:
|
Smoke Test Results: Copilot Engine (No Firewall)✅ All tests passed
|
Smoke Test Results for Copilot EngineLast 2 merged PRs:
Test Results:
Overall Status: PASS ✅ cc @pelikhan (author and assignee)
|
Smoke Test ResultsPlaywright MCP: ❌ (Tool not available in this environment) Overall Status: FAIL (1/3 tests passed) Note: This workflow appears to use standard Copilot engine without Playwright MCP or safeinputs-gh tools configured.
|
|
Recent merged PRs: Add docs for runtime-import and @path syntax; Move setup action files to /opt/gh-aw for readonly access
|
Smoke Test ResultsLast 2 merged PRs:
Test Results:
Overall Status: PASS (5/5 core tests passed)
|
|
PRs: Add docs for runtime-import and @path syntax; Move setup action files to /opt/gh-aw for readonly access
|
|
@copilot format, lint |
- Fixed trailing whitespace in Go files - Recompiled all workflow lock files with new engine ID approach - All formatting and linting checks pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot now that the regexes are in JavaScript, you can remove them from go. Recompile |
Done! Format and lint completed successfully in commit 2dfd05f. Changes:
The recompiled lock files now use |
- Removed all regex pattern definitions from Go engines (Copilot, Codex, Claude) - GetErrorPatterns() now returns empty arrays - Patterns are now exclusively defined and loaded from JavaScript (error_patterns.cjs) - Updated tests to skip when no Go patterns are available - Compiled workflows continue to use GH_AW_ENGINE_ID for runtime pattern loading Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done! Removed all error pattern regexes from Go implementations in commit 319d7fd. Changes:
The patterns are no longer duplicated between Go and JavaScript - JavaScript is now the single source of truth. |
Refactor Agentic Engine Error Patterns to JavaScript
Completed Tasks
Summary
Successfully refactored agentic engine error patterns from Go to JavaScript, enabling:
error_patterns.cjsGH_AW_CUSTOM_ERROR_PATTERNSenvironment variableImplementation Details
JavaScript Files Created:
actions/setup/js/error_patterns.cjs- Pattern definitions for all engines (copilot, codex, claude, custom)actions/setup/js/error_patterns.test.cjs- 22 comprehensive tests, all passingChanges to Go:
compiler_yaml_ai_execution.goto passGH_AW_ENGINE_IDandGH_AW_CUSTOM_ERROR_PATTERNSGetErrorPatterns()now returns empty arrays with documentation pointing to JavaScriptChanges to JavaScript:
validate_errors.cjsto load patterns fromerror_patterns.cjsgetCustomErrorPatternsFromEnv()for custom engine supportEnvironment Variables:
GH_AW_ENGINE_ID- Engine identifier (copilot, codex, claude, custom)GH_AW_CUSTOM_ERROR_PATTERNS- JSON array of custom error patterns for custom enginesGH_AW_ERROR_PATTERNS- (Legacy) Direct pattern injection (still supported for backward compatibility)Verification
Compiled test workflows confirm correct behavior:
GH_AW_ENGINE_ID: copilotGH_AW_CUSTOM_ERROR_PATTERNSOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Changeset
GH_AW_ENGINE_IDand allow custom patterns viaGH_AW_CUSTOM_ERROR_PATTERNS. Reduces compiled workflow size and preserves Go fallbacks.