@@ -1363,7 +1363,7 @@ jobs:
13631363 path : |
13641364 audit.json
13651365 audit_output.txt
1366- retention-days : 30
1366+ retention-days : 14
13671367
13681368 actions-build :
13691369 runs-on : ubuntu-latest
@@ -1707,107 +1707,6 @@ jobs:
17071707 - name : Run ${{ matrix.tool.name }} security scan on poem workflow
17081708 run : ./gh-aw compile poem-bot ${{ matrix.tool.flag }} --verbose
17091709
1710- logs-token-check :
1711- if : false
1712- runs-on : ubuntu-latest
1713- permissions :
1714- contents : read
1715- actions : read
1716- concurrency :
1717- group : ci-${{ github.ref }}-logs-token-check
1718- cancel-in-progress : true
1719- steps :
1720- - name : Checkout code
1721- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1722-
1723- - name : Set up Go
1724- id : setup-go
1725- uses : actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
1726- with :
1727- go-version-file : go.mod
1728- cache : true
1729-
1730- - name : Build gh-aw
1731- run : make build
1732-
1733- - name : Run logs command with JSON output
1734- id : logs_check
1735- run : |
1736- set -e # Fail on first error
1737- # Run the logs command and capture only stdout (JSON output)
1738- # stderr is not redirected, so warning messages go to console
1739- ./gh-aw logs smoke-copilot -c 2 --json --verbose > logs_output.json
1740-
1741- # Display the output for debugging
1742- echo "Logs command output:"
1743- cat logs_output.json
1744-
1745- # Check if the JSON structure is valid
1746- echo "## Validating JSON Structure"
1747-
1748- # Check if token count is found in the JSON output
1749- if jq -e '.summary.total_tokens' logs_output.json > /dev/null 2>&1; then
1750- TOKEN_COUNT=$(jq '.summary.total_tokens' logs_output.json)
1751- echo "✅ Token count found: $TOKEN_COUNT"
1752-
1753- # Validate that token count is greater than 0
1754- if [ "$TOKEN_COUNT" -gt 0 ]; then
1755- echo "✅ Token count is greater than 0: $TOKEN_COUNT"
1756- echo "token_count=$TOKEN_COUNT" >> $GITHUB_OUTPUT
1757- else
1758- echo "❌ Token count is 0 - expected tokens to be parsed from logs"
1759- exit 1
1760- fi
1761- else
1762- echo "❌ Token count not found in JSON output"
1763- exit 1
1764- fi
1765-
1766- # Check if runs array exists (even if empty)
1767- if jq -e '.runs' logs_output.json > /dev/null 2>&1; then
1768- RUNS_COUNT=$(jq '.runs | length' logs_output.json)
1769- echo "✅ Runs array found: $RUNS_COUNT runs"
1770- else
1771- echo "❌ Runs array not found in JSON output"
1772- exit 1
1773- fi
1774-
1775- # If there are runs, validate that key fields are resolved
1776- if [ "$RUNS_COUNT" -gt 0 ]; then
1777- # Check if agent (engine_id) field exists in first run
1778- if jq -e '.runs[0] | has("agent")' logs_output.json > /dev/null 2>&1; then
1779- AGENT=$(jq -r '.runs[0].agent // "null"' logs_output.json)
1780- echo "✅ Agent field found in run: $AGENT"
1781- else
1782- echo "❌ Agent field not found in run data"
1783- exit 1
1784- fi
1785-
1786- # Check if workflow_path field exists in first run
1787- if jq -e '.runs[0] | has("workflow_path")' logs_output.json > /dev/null 2>&1; then
1788- WORKFLOW_PATH=$(jq -r '.runs[0].workflow_path // "null"' logs_output.json)
1789- echo "✅ Workflow path field found in run: $WORKFLOW_PATH"
1790- else
1791- echo "❌ Workflow path field not found in run data"
1792- exit 1
1793- fi
1794-
1795- # Check if workflow_name is present
1796- if jq -e '.runs[0].workflow_name' logs_output.json > /dev/null 2>&1; then
1797- WORKFLOW_NAME=$(jq -r '.runs[0].workflow_name' logs_output.json)
1798- echo "✅ Workflow name found in run: $WORKFLOW_NAME"
1799- else
1800- echo "❌ Workflow name not found in run data"
1801- exit 1
1802- fi
1803- else
1804- echo "ℹ️ No runs found to validate (this is ok)"
1805- fi
1806-
1807- echo "✅ All JSON structure validations passed"
1808- env :
1809- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1810-
18111710 health-smoke-copilot :
18121711 runs-on : ubuntu-latest
18131712 timeout-minutes : 10
0 commit comments