-
Notifications
You must be signed in to change notification settings - Fork 3
fix: add auth and error handling to build-test workflows #514
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,8 @@ safe-outputs: | |
| run-failure: "**Build Test Failed** [{workflow_name}]({run_url}) - See logs for details" | ||
| timeout-minutes: 30 | ||
| strict: true | ||
| env: | ||
| GH_TOKEN: "${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}" | ||
| --- | ||
|
|
||
| # Build Test: C++ | ||
|
|
@@ -41,7 +43,8 @@ strict: true | |
|
|
||
| Clone and test the following projects from the test repository: | ||
|
|
||
| 1. **Clone Repository**: `git clone https://github.com/Mossaka/gh-aw-firewall-test-cpp.git /tmp/test-cpp` | ||
| 1. **Clone Repository**: `gh repo clone Mossaka/gh-aw-firewall-test-cpp /tmp/test-cpp` | ||
| - **CRITICAL**: If clone fails, immediately call `safeoutputs-missing_tool` with message "CLONE_FAILED: Unable to clone test repository" and stop execution | ||
|
|
||
| 2. **Test Projects**: | ||
| - `fmt`: | ||
|
|
@@ -77,3 +80,13 @@ Add a comment to the current pull request with a summary table: | |
|
|
||
| If ALL builds pass, add the label `build-test-cpp` to the pull request. | ||
| If ANY build fails, report the failure with error details. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| **CRITICAL**: This workflow MUST fail visibly when errors occur: | ||
|
|
||
| 1. **Clone failure**: If repository clone fails, call `safeoutputs-missing_tool` with "CLONE_FAILED: [error message]" | ||
|
||
| 2. **CMake failure**: Report in comment table with ❌ and include error output | ||
| 3. **Build failure**: Report in comment table with ❌ and include failure details | ||
|
|
||
| DO NOT report success if any step fails. The workflow should produce a clear, actionable error message. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,8 @@ safe-outputs: | |
| run-failure: "**Build Test Failed** [{workflow_name}]({run_url}) - See logs for details" | ||
| timeout-minutes: 15 | ||
| strict: true | ||
| env: | ||
| GH_TOKEN: "${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}" | ||
| --- | ||
|
|
||
| # Build Test: Deno | ||
|
|
@@ -50,7 +52,8 @@ strict: true | |
| export PATH="$DENO_INSTALL/bin:$PATH" | ||
| ``` | ||
|
|
||
| 2. **Clone Repository**: `git clone https://github.com/Mossaka/gh-aw-firewall-test-deno.git /tmp/test-deno` | ||
| 2. **Clone Repository**: `gh repo clone Mossaka/gh-aw-firewall-test-deno /tmp/test-deno` | ||
| - **CRITICAL**: If clone fails, immediately call `safeoutputs-missing_tool` with message "CLONE_FAILED: Unable to clone test repository" and stop execution | ||
|
||
|
|
||
| 3. **Test Projects**: | ||
| - `oak`: `cd /tmp/test-deno/oak && deno test` | ||
|
|
@@ -73,3 +76,13 @@ Add a comment to the current pull request with a summary table: | |
|
|
||
| If ALL tests pass, add the label `build-test-deno` to the pull request. | ||
| If ANY test fails, report the failure with error details. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| **CRITICAL**: This workflow MUST fail visibly when errors occur: | ||
|
|
||
| 1. **Clone failure**: If repository clone fails, call `safeoutputs-missing_tool` with "CLONE_FAILED: [error message]" | ||
| 2. **Deno install failure**: Call `safeoutputs-missing_tool` with "DENO_INSTALL_FAILED: [error message]" | ||
| 3. **Test failure**: Report in comment table with FAIL status and include failure details | ||
|
|
||
| DO NOT report success if any step fails. The workflow should produce a clear, actionable error message. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,8 @@ safe-outputs: | |
| run-failure: "**Build Test Failed** [{workflow_name}]({run_url}) - See logs for details" | ||
| timeout-minutes: 15 | ||
| strict: true | ||
| env: | ||
| GH_TOKEN: "${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}" | ||
| --- | ||
|
|
||
| # Build Test: Go | ||
|
|
@@ -45,7 +47,8 @@ strict: true | |
|
|
||
| Clone and test the following projects from the test repository: | ||
|
|
||
| 1. **Clone Repository**: `git clone https://github.com/Mossaka/gh-aw-firewall-test-go.git /tmp/test-go` | ||
| 1. **Clone Repository**: `gh repo clone Mossaka/gh-aw-firewall-test-go /tmp/test-go` | ||
| - **CRITICAL**: If clone fails, immediately call `safeoutputs-missing_tool` with message "CLONE_FAILED: Unable to clone test repository" and stop execution | ||
|
|
||
| 2. **Test Projects**: | ||
| - `color`: `cd /tmp/test-go/color && go mod download && go test ./...` | ||
|
|
@@ -71,3 +74,13 @@ Add a comment to the current pull request with a summary table: | |
|
|
||
| If ALL tests pass, add the label `build-test-go` to the pull request. | ||
| If ANY test fails, report the failure with error details. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| **CRITICAL**: This workflow MUST fail visibly when errors occur: | ||
|
|
||
| 1. **Clone failure**: If repository clone fails, call `safeoutputs-missing_tool` with "CLONE_FAILED: [error message]" | ||
|
||
| 2. **Download failure**: Report in comment table with ❌ and include error output | ||
| 3. **Test failure**: Report in comment table with FAIL status and include failure details | ||
|
|
||
| DO NOT report success if any step fails. The workflow should produce a clear, actionable error message. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,8 @@ safe-outputs: | |
| run-failure: "**Build Test Failed** [{workflow_name}]({run_url}) - See logs for details" | ||
| timeout-minutes: 15 | ||
| strict: true | ||
| env: | ||
| GH_TOKEN: "${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}" | ||
| --- | ||
|
|
||
| # Build Test: Java | ||
|
|
@@ -45,7 +47,8 @@ strict: true | |
|
|
||
| Clone and test the following projects from the test repository: | ||
|
|
||
| 1. **Clone Repository**: `git clone https://github.com/Mossaka/gh-aw-firewall-test-java.git /tmp/test-java` | ||
| 1. **Clone Repository**: `gh repo clone Mossaka/gh-aw-firewall-test-java /tmp/test-java` | ||
| - **CRITICAL**: If clone fails, immediately call `safeoutputs-missing_tool` with message "CLONE_FAILED: Unable to clone test repository" and stop execution | ||
|
||
|
|
||
| 2. **Test Projects**: | ||
| - `gson`: `cd /tmp/test-java/gson && mvn compile && mvn test` | ||
|
|
@@ -69,3 +72,13 @@ Add a comment to the current pull request with a summary table: | |
|
|
||
| If ALL tests pass, add the label `build-test-java` to the pull request. | ||
| If ANY test fails, report the failure with error details. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| **CRITICAL**: This workflow MUST fail visibly when errors occur: | ||
|
|
||
| 1. **Clone failure**: If repository clone fails, call `safeoutputs-missing_tool` with "CLONE_FAILED: [error message]" | ||
| 2. **Build failure**: Report in comment table with ❌ and include error output | ||
| 3. **Test failure**: Report in comment table with FAIL status and include failure details | ||
|
|
||
| DO NOT report success if any step fails. The workflow should produce a clear, actionable error message. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,8 @@ safe-outputs: | |
| run-failure: "**Build Test Failed** [{workflow_name}]({run_url}) - See logs for details" | ||
| timeout-minutes: 15 | ||
| strict: true | ||
| env: | ||
| GH_TOKEN: "${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}" | ||
| --- | ||
|
|
||
| # Build Test: Node.js | ||
|
|
@@ -45,7 +47,8 @@ strict: true | |
|
|
||
| Clone and test the following projects from the test repository: | ||
|
|
||
| 1. **Clone Repository**: `git clone https://github.com/Mossaka/gh-aw-firewall-test-node.git /tmp/test-node` | ||
| 1. **Clone Repository**: `gh repo clone Mossaka/gh-aw-firewall-test-node /tmp/test-node` | ||
| - **CRITICAL**: If clone fails, immediately call `safeoutputs-missing_tool` with message "CLONE_FAILED: Unable to clone test repository" and stop execution | ||
|
|
||
| 2. **Test Projects**: | ||
| - `clsx`: `cd /tmp/test-node/clsx && npm install && npm test` | ||
|
|
@@ -71,3 +74,13 @@ Add a comment to the current pull request with a summary table: | |
|
|
||
| If ALL tests pass, add the label `build-test-node` to the pull request. | ||
| If ANY test fails, report the failure with error details. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| **CRITICAL**: This workflow MUST fail visibly when errors occur: | ||
|
|
||
| 1. **Clone failure**: If repository clone fails, call `safeoutputs-missing_tool` with "CLONE_FAILED: [error message]" | ||
|
||
| 2. **Install failure**: Report in comment table with ❌ and include error output | ||
| 3. **Test failure**: Report in comment table with FAIL status and include failure details | ||
|
|
||
| DO NOT report success if any step fails. The workflow should produce a clear, actionable error message. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,8 @@ safe-outputs: | |
| run-failure: "**Build Test Failed** [{workflow_name}]({run_url}) - See logs for details" | ||
| timeout-minutes: 30 | ||
| strict: true | ||
| env: | ||
| GH_TOKEN: "${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN }}" | ||
| --- | ||
|
|
||
| # Build Test: Rust | ||
|
|
@@ -45,7 +47,8 @@ strict: true | |
|
|
||
| Clone and test the following projects from the test repository: | ||
|
|
||
| 1. **Clone Repository**: `git clone https://github.com/Mossaka/gh-aw-firewall-test-rust.git /tmp/test-rust` | ||
| 1. **Clone Repository**: `gh repo clone Mossaka/gh-aw-firewall-test-rust /tmp/test-rust` | ||
| - **CRITICAL**: If clone fails, immediately call `safeoutputs-missing_tool` with message "CLONE_FAILED: Unable to clone test repository" and stop execution | ||
|
||
|
|
||
| 2. **Test Projects**: | ||
| - `fd`: `cd /tmp/test-rust/fd && cargo build && cargo test` | ||
|
|
@@ -69,3 +72,13 @@ Add a comment to the current pull request with a summary table: | |
|
|
||
| If ALL tests pass, add the label `build-test-rust` to the pull request. | ||
| If ANY test fails, report the failure with error details. | ||
|
|
||
| ## Error Handling | ||
|
|
||
| **CRITICAL**: This workflow MUST fail visibly when errors occur: | ||
|
|
||
| 1. **Clone failure**: If repository clone fails, call `safeoutputs-missing_tool` with "CLONE_FAILED: [error message]" | ||
| 2. **Build failure**: Report in comment table with ❌ and include error output | ||
| 3. **Test failure**: Report in comment table with FAIL status and include failure details | ||
|
|
||
| DO NOT report success if any step fails. The workflow should produce a clear, actionable error message. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tool name
safeoutputs-missing_toolis incorrect. According to the codebase conventions (see .github/aw/debug-agentic-workflow.md:192-193), safe-output tools should NOT have a "safeoutputs-" prefix. The correct tool name is simplymissing_tool. This instruction should be: "If clone fails, immediately callmissing_toolwith reason 'CLONE_FAILED: Unable to clone test repository' and stop execution".