diff --git a/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml b/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml index 23d6e1da7c1..cb1173714e3 100644 --- a/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml +++ b/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml @@ -1,5 +1,5 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"2333068fef549b6460cbc1f1c8f3a0de8bae5d9b378b1ecd9a0a7a29d5ec8f28","body_hash":"6ab27c3f0342b3ad9ee63dc0887b84be6b8e6aa0c0aecae8582745ef2618265a","strict":true,"agent_id":"claude","engine_versions":{"claude":"2.1.237"}} -# gh-aw-manifest: {"version":1,"secrets":["ANTHROPIC_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-go","sha":"b7ad1dad31e06c5925ef5d2fc7ad053ef454303e","version":"v7.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"docker/build-push-action","sha":"53b7df96c91f9c12dcc8a07bcb9ccacbed38856a","version":"v7.3.0"},{"repo":"docker/setup-buildx-action","sha":"37fe631027851001ddb9b187196cc803df7f5f0e","version":"v4.3.0"}],"skills":["SylphAI-Inc/skills/skills/glowmotion@490fda5de2427c496d34e914f68896c4c2818fac","cathrynlavery/diagram-design/skills/diagram-design@648c2a597839301e06df1e7434a08bde9f42eed3"],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.7","digest":"sha256:40a1e30b1b8d70642d4292485146cd5af612730d7a6a2e12706ddd13df375059","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.7@sha256:40a1e30b1b8d70642d4292485146cd5af612730d7a6a2e12706ddd13df375059"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.7","digest":"sha256:4f209dd4cbc74d47a6c7379956143de293429d1b1b2fb2647776cdcbf65836a1","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.7@sha256:4f209dd4cbc74d47a6c7379956143de293429d1b1b2fb2647776cdcbf65836a1"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.7","digest":"sha256:fb362a08d4d2f0da6c036e3f5d3b2fd87931e857fec3ca4a241cd2f2b61131f9","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.7@sha256:fb362a08d4d2f0da6c036e3f5d3b2fd87931e857fec3ca4a241cd2f2b61131f9"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.10","digest":"sha256:08bb5fa417aed94b40a14e2b7b3ae457531a5f22b143a32fe58317139d9b8f42","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.10@sha256:08bb5fa417aed94b40a14e2b7b3ae457531a5f22b143a32fe58317139d9b8f42"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e","pinned_image":"ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e"},{"image":"ghcr.io/github/github-mcp-server:v1.10.0","digest":"sha256:097512ddf58af80a620c177ae9cad93448f9a2a55c70ee8fde5cec6714522a8c","pinned_image":"ghcr.io/github/github-mcp-server:v1.10.0@sha256:097512ddf58af80a620c177ae9cad93448f9a2a55c70ee8fde5cec6714522a8c"}],"mcp_servers":[{"name":"agenticworkflows","tools":["*"]},{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["create_discussion","missing_data","missing_tool","noop","upload_artifact"]}]} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"a7592b9f67d5d578d5b75e16f28a243332888d87f53547e161ffea3fac713764","body_hash":"f0e50bf34029446204c18b7d326836af71c8d8bd22a7e28545938ac038986ff0","strict":true,"agent_id":"claude","engine_versions":{"claude":"2.1.237"}} +# gh-aw-manifest: {"version":1,"secrets":["ANTHROPIC_API_KEY","COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-go","sha":"b7ad1dad31e06c5925ef5d2fc7ad053ef454303e","version":"v7.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"docker/build-push-action","sha":"53b7df96c91f9c12dcc8a07bcb9ccacbed38856a","version":"v7.3.0"},{"repo":"docker/setup-buildx-action","sha":"37fe631027851001ddb9b187196cc803df7f5f0e","version":"v4.3.0"}],"skills":["SylphAI-Inc/skills/skills/glowmotion@490fda5de2427c496d34e914f68896c4c2818fac","cathrynlavery/diagram-design/skills/diagram-design@648c2a597839301e06df1e7434a08bde9f42eed3"],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.28.7","digest":"sha256:40a1e30b1b8d70642d4292485146cd5af612730d7a6a2e12706ddd13df375059","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.28.7@sha256:40a1e30b1b8d70642d4292485146cd5af612730d7a6a2e12706ddd13df375059"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.7","digest":"sha256:4f209dd4cbc74d47a6c7379956143de293429d1b1b2fb2647776cdcbf65836a1","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.7@sha256:4f209dd4cbc74d47a6c7379956143de293429d1b1b2fb2647776cdcbf65836a1"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.28.7","digest":"sha256:fb362a08d4d2f0da6c036e3f5d3b2fd87931e857fec3ca4a241cd2f2b61131f9","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.28.7@sha256:fb362a08d4d2f0da6c036e3f5d3b2fd87931e857fec3ca4a241cd2f2b61131f9"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.10","digest":"sha256:08bb5fa417aed94b40a14e2b7b3ae457531a5f22b143a32fe58317139d9b8f42","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.10@sha256:08bb5fa417aed94b40a14e2b7b3ae457531a5f22b143a32fe58317139d9b8f42"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e","pinned_image":"ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e"},{"image":"ghcr.io/github/github-mcp-server:v1.10.0","digest":"sha256:097512ddf58af80a620c177ae9cad93448f9a2a55c70ee8fde5cec6714522a8c","pinned_image":"ghcr.io/github/github-mcp-server:v1.10.0@sha256:097512ddf58af80a620c177ae9cad93448f9a2a55c70ee8fde5cec6714522a8c"}],"mcp_servers":[{"name":"agenticworkflows","tools":["*"]},{"name":"github","tools":["get_commit","get_file_contents","get_latest_release","get_me","get_pull_request","get_pull_request_comments","get_pull_request_diff","get_pull_request_files","get_pull_request_review_comments","get_pull_request_reviews","get_pull_request_status","get_release_by_tag","get_tag","issue_read","list_branches","list_commits","list_issue_types","list_issues","list_pull_requests","list_releases","list_starred_repositories","list_tags","pull_request_read","search_code","search_issues","search_pull_requests","search_repositories"]},{"name":"safeoutputs","tools":["create_discussion","create_pull_request","missing_data","missing_tool","noop"]}]} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # # ___ _ _ @@ -23,11 +23,12 @@ # # For more information: https://github.github.com/gh-aw/introduction/overview/ # -# Weekly animated visual summary of agentic workflow health using glowmotion +# Weekly SVG visual summary of agentic workflow health using glowmotion # # Secrets used: # - ANTHROPIC_API_KEY # - COPILOT_GITHUB_TOKEN +# - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN # - GITHUB_TOKEN @@ -53,7 +54,7 @@ # - ghcr.io/github/gh-aw-node@sha256:bac2192f6374d6262116399b34fc5e143d576f82719e90a18261cae7480f4d4e # - ghcr.io/github/github-mcp-server:v1.10.0@sha256:097512ddf58af80a620c177ae9cad93448f9a2a55c70ee8fde5cec6714522a8c -name: "Archivx — Animated Workflow Visualizer" +name: "Archivx — Workflow Visualizer" on: schedule: - cron: "18 8 * * 1" # Friendly format: weekly on monday around 09:00 (scattered) @@ -71,14 +72,16 @@ concurrency: group: "gh-aw-${{ github.workflow }}" queue: max -run-name: "Archivx — Animated Workflow Visualizer" +run-name: "Archivx — Workflow Visualizer" jobs: activation: runs-on: ubuntu-slim permissions: actions: read - contents: read + checks: write + contents: write + pull-requests: write env: GH_AW_MAX_DAILY_AI_CREDITS: ${{ vars.GH_AW_DEFAULT_MAX_DAILY_AI_CREDITS || '5000' }} GH_AW_RUNTIME_FEATURES: ${{ vars.GH_AW_RUNTIME_FEATURES }} @@ -93,6 +96,10 @@ jobs: lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }} model: ${{ steps.generate_aw_info.outputs.model }} oauth_token_check_failed: ${{ steps.check-oauth-tokens.outputs.oauth_token_check_failed == 'true' }} + pre_created_pull_request_branch: ${{ steps.validate-pre-created-pull-request.outputs.branch }} + pre_created_pull_request_check_run_id: ${{ steps.pre-create-pull-request.outputs.check_run_id }} + pre_created_pull_request_number: ${{ steps.pre-create-pull-request.outputs.pull_request_number }} + pre_created_pull_request_url: ${{ steps.pre-create-pull-request.outputs.pull_request_url }} secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} setup-parent-span-id: ${{ steps.setup.outputs.parent-span-id || steps.setup.outputs.span-id }} setup-span-id: ${{ steps.setup.outputs.span-id }} @@ -117,7 +124,7 @@ jobs: job-name: ${{ github.job }} safe-output-artifact-client: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -130,7 +137,7 @@ jobs: GH_AW_INFO_MODEL: ${{ vars.GH_AW_MODEL_AGENT_CLAUDE || vars.GH_AW_DEFAULT_MODEL_CLAUDE || 'agent' }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AGENT_VERSION: "2.1.237" - GH_AW_INFO_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_INFO_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_INFO_EXPERIMENTAL: "false" GH_AW_INFO_SUPPORTS_TOOLS_ALLOWLIST: "true" GH_AW_INFO_STAGED: "false" @@ -184,7 +191,7 @@ jobs: if: ${{ env.GH_AW_MAX_DAILY_AI_CREDITS != '' }} uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_ID: "archivx-agentic-workflows-analyzer" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_WORKFLOW_DISPATCH_AW_CONTEXT: ${{ github.event.inputs.aw_context || '' }} @@ -233,6 +240,37 @@ jobs: GH_AW_AGENT_FILES: "AGENTS.md CLAUDE.md" run: | bash "${RUNNER_TEMP}/gh-aw/actions/save_base_github_folders.sh" + - name: Pre-create pull request + id: pre-create-pull-request + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" + GH_AW_PR_TITLE_PREFIX: "[archivx] " + with: + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + script: | + const path = require('path'); + const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions'); + const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs')); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require(path.join(actionsDir, 'pre_create_pull_request.cjs')); + await main(); + - name: Validate pre-created pull request branch + id: validate-pre-created-pull-request + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + GH_AW_PRE_CREATED_PULL_REQUEST_NUMBER: ${{ steps.pre-create-pull-request.outputs.pull_request_number }} + GH_AW_PRE_CREATED_PULL_REQUEST_BRANCH: ${{ steps.pre-create-pull-request.outputs.branch }} + GH_AW_EXPECTED_PRE_CREATED_PULL_REQUEST_BRANCH: gh-aw/pre-created/${{ github.run_id }}-${{ github.run_attempt }} + with: + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + script: | + const path = require('path'); + const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions'); + const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs')); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require(path.join(actionsDir, 'validate_pre_created_pull_request.cjs')); + await main(); - name: Check workflow lock file id: check-lock-file uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -302,7 +340,7 @@ jobs: GH_AW_ACTIONS_DIR: ${{ runner.temp }}/gh-aw/actions GH_AW_PROMPT: ${{ runner.temp }}/gh-aw/aw-prompts/prompt.txt GH_AW_SAFE_OUTPUTS: ${{ runner.temp }}/gh-aw/safeoutputs/outputs.jsonl - GH_AW_PROMPT_CONFIG: "{\"items\":[{\"content_env\":\"GH_AW_PROMPT_CONTENT_0000\"},{\"file\":\"xpia.md\"},{\"file\":\"temp_folder_prompt.md\"},{\"file\":\"markdown.md\"},{\"file\":\"safe_outputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0001\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0002\"},{\"file\":\"mcp_cli_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0003\"},{\"file\":\"github_mcp_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0004\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0005\"}]}" + GH_AW_PROMPT_CONFIG: "{\"items\":[{\"content_env\":\"GH_AW_PROMPT_CONTENT_0000\"},{\"file\":\"xpia.md\"},{\"file\":\"temp_folder_prompt.md\"},{\"file\":\"markdown.md\"},{\"file\":\"safe_outputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0001\"},{\"file\":\"safe_outputs_create_pull_request.md\"},{\"file\":\"safe_outputs_pre_create_steer.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0002\"},{\"file\":\"mcp_cli_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0003\"},{\"file\":\"github_mcp_tools_with_safeoutputs_prompt.md\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0004\"},{\"content_env\":\"GH_AW_PROMPT_CONTENT_0005\"}]}" GH_AW_EXPR_1A3A194A: ${{ github.event.discussion.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'discussion' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} GH_AW_EXPR_463A214A: ${{ github.event.pull_request.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'pull_request' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} GH_AW_EXPR_802A9F6A: ${{ github.event.issue.number || (fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_type == 'issue' && fromJSON(github.event.inputs.aw_context || github.event.client_payload.aw_context || '{}').item_number) }} @@ -312,7 +350,7 @@ jobs: GH_AW_GITHUB_RUN_ID: ${{ github.run_id }} GH_AW_GITHUB_WORKSPACE: ${{ github.workspace }} GH_AW_PROMPT_CONTENT_0000: "\n" - GH_AW_PROMPT_CONTENT_0001: "\nTools: create_discussion, missing_tool, missing_data, noop\n" + GH_AW_PROMPT_CONTENT_0001: "\nTools: create_discussion, create_pull_request, missing_tool, missing_data, noop\n" GH_AW_PROMPT_CONTENT_0002: "\n" GH_AW_PROMPT_CONTENT_0003: "\nThe following GitHub context information is available for this workflow:\n{{#if github.actor}}\n- **actor**: __GH_AW_GITHUB_ACTOR__\n{{/if}}\n{{#if github.repository}}\n- **repository**: __GH_AW_GITHUB_REPOSITORY__\n{{/if}}\n{{#if github.workspace}}\n- **workspace**: __GH_AW_GITHUB_WORKSPACE__\n{{/if}}\n{{#if github.event.issue.number || (github.aw.context.item_type == 'issue' && github.aw.context.item_number)}}\n- **issue-number**: #__GH_AW_EXPR_802A9F6A__\n{{/if}}\n{{#if github.event.discussion.number || (github.aw.context.item_type == 'discussion' && github.aw.context.item_number)}}\n- **discussion-number**: #__GH_AW_EXPR_1A3A194A__\n{{/if}}\n{{#if github.event.pull_request.number || (github.aw.context.item_type == 'pull_request' && github.aw.context.item_number)}}\n- **pull-request-number**: #__GH_AW_EXPR_463A214A__\n{{/if}}\n{{#if github.event.comment.id || github.aw.context.comment_id}}\n- **comment-id**: __GH_AW_EXPR_FF1D34CE__\n{{/if}}\n{{#if github.run_id}}\n- **workflow-run-id**: __GH_AW_GITHUB_RUN_ID__\n{{/if}}\n\n\n" GH_AW_PROMPT_CONTENT_0004: "\n" @@ -414,6 +452,7 @@ jobs: permissions: actions: read contents: read + pull-requests: read concurrency: group: "gh-aw-claude-${{ github.workflow }}" queue: max @@ -469,7 +508,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -489,6 +528,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + ref: gh-aw/pre-created/${{ github.run_id }}-${{ github.run_attempt }} - name: Setup Go for CLI build uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: @@ -635,13 +675,12 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs/upload-artifacts" - name: Generate Safe Outputs Config uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_FILE_ROOT: "${{ runner.temp }}/gh-aw" GH_AW_FILE_CONFIG: "{\"files\":[{\"path\":\"safeoutputs/config.json\",\"content_env\":\"GH_AW_SAFE_OUTPUTS_CONFIG\"}]}" - GH_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"category\":\"general\",\"expires\":720,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[archivx] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{},\"upload_artifact\":{\"allowed-paths\":[\"*.html\"],\"max-size-bytes\":104857600,\"max-uploads\":1,\"retention-days\":30}}" + GH_AW_SAFE_OUTPUTS_CONFIG: "{\"create_discussion\":{\"category\":\"general\",\"expires\":720,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[archivx] \"},\"create_pull_request\":{\"allowed_files\":[\"docs/src/assets/archivx/*.svg\"],\"draft\":true,\"expires\":720,\"labels\":[\"automation\",\"diagram\"],\"max\":1,\"max_patch_files\":1,\"max_patch_size\":1024,\"pre_created_branch\":\"${{ needs.activation.outputs.pre_created_pull_request_branch }}\",\"pre_created_pull_request_number\":\"${{ needs.activation.outputs.pre_created_pull_request_number }}\",\"pre_created_pull_request_url\":\"${{ needs.activation.outputs.pre_created_pull_request_url }}\",\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"CLAUDE.md\",\"AGENTS.md\"],\"protected_files_policy\":\"blocked\",\"title_prefix\":\"[archivx] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" with: script: | const path = require('path'); @@ -655,7 +694,8 @@ jobs: GH_AW_TOOLS_META_JSON: | { "description_suffixes": { - "create_discussion": " CONSTRAINTS: Maximum 1 discussion(s) can be created. Title will be prefixed with \"[archivx] \". Discussions will be created in category \"general\"." + "create_discussion": " CONSTRAINTS: Maximum 1 discussion(s) can be created. Title will be prefixed with \"[archivx] \". Discussions will be created in category \"general\".", + "create_pull_request": " CONSTRAINTS: Maximum 1 pull request(s) can be created. Title will be prefixed with \"[archivx] \". Labels [\"automation\" \"diagram\"] will be automatically added. PRs will be created as drafts." }, "repo_params": {}, "dynamic_tools": [] @@ -689,6 +729,65 @@ jobs: } } }, + "create_pull_request": { + "defaultMax": 1, + "fields": { + "base": { + "type": "string", + "sanitize": true, + "maxLength": 128 + }, + "body": { + "required": true, + "type": "string", + "sanitize": true, + "maxLength": 65000 + }, + "branch": { + "required": true, + "type": "string", + "sanitize": true, + "maxLength": 256 + }, + "dependencies": { + "type": "array", + "itemType": "string", + "itemSanitize": true, + "itemMaxLength": 256 + }, + "draft": { + "type": "boolean" + }, + "labels": { + "type": "array", + "itemType": "string", + "itemSanitize": true, + "itemMaxLength": 128 + }, + "repo": { + "type": "string", + "maxLength": 256 + }, + "stack_position": { + "optionalPositiveInteger": true + }, + "stack_root": { + "type": "string", + "sanitize": true, + "maxLength": 256 + }, + "temporary_id": { + "type": "string", + "pattern": "^#?aw_[A-Za-z0-9_]{3,12}$" + }, + "title": { + "required": true, + "type": "string", + "sanitize": true, + "maxLength": 128 + } + } + }, "missing_data": { "defaultMax": 20, "fields": { @@ -761,21 +860,6 @@ jobs: "maxLength": 1024 } } - }, - "upload_artifact": { - "defaultMax": 10, - "fields": { - "filters": { - "type": "object" - }, - "path": { - "type": "string" - }, - "temporary_id": { - "type": "string", - "pattern": "^#?aw_[A-Za-z0-9_]{3,12}$" - } - } } } uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -1200,15 +1284,6 @@ jobs: if [ ! -f /tmp/gh-aw/agent_output.json ]; then echo '{"items":[]}' > /tmp/gh-aw/agent_output.json fi - # Upload safe-outputs upload-artifact staging for the upload_artifact job - - name: Upload upload-artifact staging - if: always() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: safe-outputs-upload-artifacts - path: ${{ runner.temp }}/gh-aw/safeoutputs/upload-artifacts/ - retention-days: 1 - if-no-files-found: ignore # Small dedicated copy of the agent output so safe-output processing # survives a failed or timed-out upload of the larger agent artifact - name: Upload agent output fallback artifact @@ -1256,12 +1331,16 @@ jobs: if: > always() && (needs.agent.result != 'skipped' || needs.activation.outputs.lockdown_check_failed == 'true' || needs.activation.outputs.oauth_token_check_failed == 'true' || needs.activation.outputs.stale_lock_file_failed == 'true' || - needs.activation.outputs.secret_verification_result == 'failed' || needs.activation.outputs.daily_ai_credits_exceeded == 'true') + needs.activation.outputs.secret_verification_result == 'failed' || needs.activation.outputs.daily_ai_credits_exceeded == 'true' || + needs.activation.outputs.pre_created_pull_request_check_run_id != '') runs-on: ubuntu-slim permissions: actions: read + checks: write + contents: write discussions: write issues: write + pull-requests: write concurrency: group: "gh-aw-conclusion-archivx-agentic-workflows-analyzer" cancel-in-progress: false @@ -1291,7 +1370,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -1407,7 +1486,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: "1" - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} @@ -1431,7 +1510,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_DETECTION_CONCLUSION: ${{ needs.detection.outputs.detection_conclusion }} @@ -1451,7 +1530,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_MISSING_TOOL_CREATE_ISSUE: "true" - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} @@ -1468,7 +1547,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} GH_AW_REPORT_INCOMPLETE_CREATE_ISSUE: "true" - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} @@ -1485,7 +1564,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} @@ -1513,6 +1592,8 @@ jobs: GH_AW_ENGINE_API_HOSTS: "api.anthropic.com" GH_AW_CREATE_DISCUSSION_ERRORS: ${{ needs.safe_outputs.outputs.create_discussion_errors }} GH_AW_CREATE_DISCUSSION_ERROR_COUNT: ${{ needs.safe_outputs.outputs.create_discussion_error_count }} + GH_AW_CODE_PUSH_FAILURE_ERRORS: ${{ needs.safe_outputs.outputs.code_push_failure_errors }} + GH_AW_CODE_PUSH_FAILURE_COUNT: ${{ needs.safe_outputs.outputs.code_push_failure_count }} GH_AW_LOCKDOWN_CHECK_FAILED: ${{ needs.activation.outputs.lockdown_check_failed }} GH_AW_OAUTH_TOKEN_CHECK_FAILED: ${{ needs.activation.outputs.oauth_token_check_failed }} GH_AW_STALE_LOCK_FILE_FAILED: ${{ needs.activation.outputs.stale_lock_file_failed }} @@ -1541,7 +1622,7 @@ jobs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: GH_AW_AGENT_OUTPUT: ${{ steps.setup-agent-output-env.outputs.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_REPORT_FAILED_JOBS: "true" @@ -1554,6 +1635,27 @@ jobs: setupGlobals(core, github, context, exec, io, getOctokit); const { main } = require(path.join(actionsDir, 'report_failed_jobs.cjs')); await main(); + - name: Complete pre-created pull request check + if: always() + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + GH_AW_PRE_CREATED_CHECK_RUN_ID: ${{ needs.activation.outputs.pre_created_pull_request_check_run_id }} + GH_AW_PRE_CREATED_PULL_REQUEST_NUMBER: ${{ needs.activation.outputs.pre_created_pull_request_number }} + GH_AW_PRE_CREATED_PULL_REQUEST_BRANCH: ${{ needs.activation.outputs.pre_created_pull_request_branch }} + GH_AW_SAFE_OUTPUT_CREATED_PR_NUMBER: ${{ needs.safe_outputs.outputs.created_pr_number }} + GH_AW_FAILURE_ISSUE_NUMBER: ${{ steps.handle_agent_failure.outputs.failure_issue_number }} + GH_AW_FAILURE_ISSUE_URL: ${{ steps.handle_agent_failure.outputs.failure_issue_url }} + GH_AW_NOOP_COMMENT_BODY: ${{ steps.noop.outputs.noop_comment_body }} + GH_AW_NEEDS: ${{ toJSON(needs) }} + with: + github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + script: | + const path = require('path'); + const actionsDir = path.join(process.env.RUNNER_TEMP, 'gh-aw', 'actions'); + const { setupGlobals } = require(path.join(actionsDir, 'setup_globals.cjs')); + setupGlobals(core, github, context, exec, io, getOctokit); + const { main } = require(path.join(actionsDir, 'complete_pre_created_check_run.cjs')); + await main(); detection: needs: @@ -1589,7 +1691,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -1657,8 +1759,8 @@ jobs: if: always() && steps.detection_guard.outputs.run_detection == 'true' uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" - WORKFLOW_DESCRIPTION: "Weekly animated visual summary of agentic workflow health using glowmotion" + WORKFLOW_NAME: "Archivx — Workflow Visualizer" + WORKFLOW_DESCRIPTION: "Weekly SVG visual summary of agentic workflow health using glowmotion" HAS_PATCH: ${{ needs.agent.outputs.has_patch }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" GH_AW_DETECTION_SKIP_PROMPT_SUMMARY: "true" @@ -1720,8 +1822,8 @@ jobs: MCP_TOOL_TIMEOUT: 60000 RUNNER_TEMP: ${{ runner.temp }} TRACEPARENT: ${{ env.GITHUB_AW_OTEL_TRACE_ID != '' && env.GITHUB_AW_OTEL_PARENT_SPAN_ID != '' && format('00-{0}-{1}-01', env.GITHUB_AW_OTEL_TRACE_ID, env.GITHUB_AW_OTEL_PARENT_SPAN_ID) || '' }} - WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" - WORKFLOW_DESCRIPTION: "Weekly animated visual summary of agentic workflow health using glowmotion" + WORKFLOW_NAME: "Archivx — Workflow Visualizer" + WORKFLOW_DESCRIPTION: "Weekly SVG visual summary of agentic workflow health using glowmotion" HAS_PATCH: ${{ needs.agent.outputs.has_patch }} GH_AW_DETECTION_CONTINUE_ON_ERROR: "true" run: | @@ -1836,7 +1938,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -1875,7 +1977,7 @@ jobs: if: always() uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_EVALS_QUESTIONS: '[{"id":"animated_diagram_generated","question":"Did the agent generate an animated HTML diagram using glowmotion?"},{"id":"discussion_created","question":"Was a discussion created with the visual analysis of agentic workflow health?"}]' + GH_AW_EVALS_QUESTIONS: '[{"id":"animated_diagram_generated","question":"Did the agent generate an SVG diagram using glowmotion?"},{"id":"pull_request_created","question":"Was a pull request created with the generated SVG diagram committed?"}]' GH_AW_EVALS_MODEL: "evals" GH_AW_EVALS_PHASE: setup with: @@ -1990,7 +2092,7 @@ jobs: continue-on-error: true uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - GH_AW_EVALS_QUESTIONS: '[{"id":"animated_diagram_generated","question":"Did the agent generate an animated HTML diagram using glowmotion?"},{"id":"discussion_created","question":"Was a discussion created with the visual analysis of agentic workflow health?"}]' + GH_AW_EVALS_QUESTIONS: '[{"id":"animated_diagram_generated","question":"Did the agent generate an SVG diagram using glowmotion?"},{"id":"pull_request_created","question":"Was a pull request created with the generated SVG diagram committed?"}]' GH_AW_EVALS_MODEL: "evals" GH_AW_EVALS_PHASE: parse GITHUB_RUN_ID: ${{ github.run_id }} @@ -2072,7 +2174,7 @@ jobs: trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -2134,8 +2236,11 @@ jobs: if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success' runs-on: ubuntu-slim permissions: + checks: write + contents: write discussions: write issues: write + pull-requests: write timeout-minutes: 45 env: GH_AW_AGENT_AIC: ${{ needs.agent.outputs.aic }} @@ -2152,13 +2257,15 @@ jobs: GH_AW_THREAT_DETECTION_AIC: ${{ needs.detection.outputs.aic }} GH_AW_WORKFLOW_EMOJI: "🌅" GH_AW_WORKFLOW_ID: "archivx-agentic-workflows-analyzer" - GH_AW_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_WORKFLOW_SOURCE_URL: "${{ github.server_url }}/${{ github.repository }}/blob/${{ github.ref_name }}/.github/workflows/archivx-agentic-workflows-analyzer.md" outputs: code_push_failure_count: ${{ steps.process_safe_outputs.outputs.code_push_failure_count }} code_push_failure_errors: ${{ steps.process_safe_outputs.outputs.code_push_failure_errors }} create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }} create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }} + created_pr_number: ${{ steps.process_safe_outputs.outputs.created_pr_number }} + created_pr_url: ${{ steps.process_safe_outputs.outputs.created_pr_url }} process_safe_outputs_items_applied: ${{ steps.process_safe_outputs.outputs.items_applied }} process_safe_outputs_items_cancelled: ${{ steps.process_safe_outputs.outputs.items_cancelled }} process_safe_outputs_items_deferred: ${{ steps.process_safe_outputs.outputs.items_deferred }} @@ -2169,8 +2276,6 @@ jobs: process_safe_outputs_processed_count: ${{ steps.process_safe_outputs.outputs.processed_count }} process_safe_outputs_status: ${{ steps.process_safe_outputs.outputs.status }} process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} - upload_artifact_count: ${{ steps.process_safe_outputs.outputs.upload_artifact_count }} - upload_artifact_slot_0_tmp_id: ${{ steps.process_safe_outputs.outputs.slot_0_tmp_id }} steps: - name: Checkout actions folder uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -2188,9 +2293,8 @@ jobs: job-name: ${{ github.job }} trace-id: ${{ needs.activation.outputs.setup-trace-id }} parent-span-id: ${{ needs.activation.outputs.setup-parent-span-id || needs.activation.outputs.setup-span-id }} - safe-output-artifact-client: 'true' env: - GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Animated Workflow Visualizer" + GH_AW_SETUP_WORKFLOW_NAME: "Archivx — Workflow Visualizer" GH_AW_CURRENT_WORKFLOW_REF: ${{ github.repository }}/.github/workflows/archivx-agentic-workflows-analyzer.lock.yml@${{ github.ref }} GH_AW_INFO_VERSION: "2.1.237" GH_AW_INFO_AWF_VERSION: "v0.28.7" @@ -2212,6 +2316,26 @@ jobs: if [ -f "/tmp/gh-aw/agent_output.json" ]; then echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/agent_output.json" >> "$GITHUB_OUTPUT" fi + - name: Download patch artifact + continue-on-error: true + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: agent + path: /tmp/gh-aw/ + - name: Checkout repository + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: true + ref: gh-aw/pre-created/${{ github.run_id }}-${{ github.run_attempt }} + token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + - name: Configure Git credentials + if: (!cancelled()) && needs.agent.result != 'skipped' && contains(needs.agent.outputs.output_types, 'create_pull_request') + env: + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_SERVER_URL: ${{ github.server_url }} + GIT_TOKEN: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + run: bash "${RUNNER_TEMP}/gh-aw/actions/configure_git_credentials.sh" - name: Configure GH_HOST for enterprise compatibility id: ghes-host-config shell: bash @@ -2221,12 +2345,6 @@ jobs: GH_HOST="${GITHUB_SERVER_URL#https://}" GH_HOST="${GH_HOST#http://}" echo "GH_HOST=${GH_HOST}" >> "$GITHUB_ENV" - - name: Download upload-artifact staging - continue-on-error: true - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: safe-outputs-upload-artifacts - path: ${{ runner.temp }}/gh-aw/safeoutputs/upload-artifacts/ - name: Process Safe Outputs id: process_safe_outputs uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -2236,7 +2354,8 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_discussion\":{\"category\":\"general\",\"expires\":720,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[archivx] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{},\"upload_artifact\":{\"allowed-paths\":[\"*.html\"],\"max-size-bytes\":104857600,\"max-uploads\":1,\"retention-days\":30}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_discussion\":{\"category\":\"general\",\"expires\":720,\"fallback_to_issue\":true,\"max\":1,\"title_prefix\":\"[archivx] \"},\"create_pull_request\":{\"allowed_files\":[\"docs/src/assets/archivx/*.svg\"],\"draft\":true,\"expires\":720,\"labels\":[\"automation\",\"diagram\"],\"max\":1,\"max_patch_files\":1,\"max_patch_size\":1024,\"pre_created_branch\":\"${{ needs.activation.outputs.pre_created_pull_request_branch }}\",\"pre_created_pull_request_number\":\"${{ needs.activation.outputs.pre_created_pull_request_number }}\",\"pre_created_pull_request_url\":\"${{ needs.activation.outputs.pre_created_pull_request_url }}\",\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"CLAUDE.md\",\"AGENTS.md\"],\"protected_files_policy\":\"blocked\",\"title_prefix\":\"[archivx] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"report_incomplete\":{}}" + GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -2255,3 +2374,13 @@ jobs: /tmp/gh-aw/safe-output-items.jsonl /tmp/gh-aw/temporary-id-map.json if-no-files-found: ignore + - name: Restore actions folder + if: always() + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: github/gh-aw + sparse-checkout: | + actions/setup + sparse-checkout-cone-mode: true + clean: false + persist-credentials: false diff --git a/.github/workflows/archivx-agentic-workflows-analyzer.md b/.github/workflows/archivx-agentic-workflows-analyzer.md index 97bea5b3c81..33facad6676 100644 --- a/.github/workflows/archivx-agentic-workflows-analyzer.md +++ b/.github/workflows/archivx-agentic-workflows-analyzer.md @@ -1,33 +1,40 @@ --- -description: Weekly animated visual summary of agentic workflow health using glowmotion +description: Weekly SVG visual summary of agentic workflow health using glowmotion emoji: 🌅 engine: claude evals: - id: animated_diagram_generated - question: Did the agent generate an animated HTML diagram using glowmotion? -- id: discussion_created - question: Was a discussion created with the visual analysis of agentic workflow health? + question: Did the agent generate an SVG diagram using glowmotion? +- id: pull_request_created + question: Was a pull request created with the generated SVG diagram committed? features: gh-aw-detection: true max-ai-credits: 500 -name: Archivx — Animated Workflow Visualizer +name: Archivx — Workflow Visualizer "on": schedule: weekly on monday around 09:00 workflow_dispatch: null permissions: actions: read contents: read + pull-requests: read safe-outputs: create-discussion: category: General expires: 30d max: 1 title-prefix: "[archivx] " - upload-artifact: - allowed-paths: - - "*.html" - max-uploads: 1 - retention-days: 30 + create-pull-request: + steer: true + expires: 30d + title-prefix: "[archivx] " + labels: [automation, diagram] + draft: true + protected-files: blocked + allowed-files: + - "docs/src/assets/archivx/*.svg" + max-patch-files: 1 + max-patch-size: 1024 sandbox: agent: runtime: cloud-hypervisor @@ -48,9 +55,9 @@ tools: bash: true cli-proxy: true --- -# Archivx — Animated Workflow Visualizer +# Archivx — Workflow Visualizer -You are Archivx, an animated workflow visualizer that creates premium animated HTML summaries of agentic workflow health and activity using the glowmotion skill. +You are Archivx, a workflow visualizer that creates SVG summaries of agentic workflow health and activity using the glowmotion skill. ## Current Context @@ -59,7 +66,7 @@ You are Archivx, an animated workflow visualizer that creates premium animated H ## Mission -Analyze the past 7 days of agentic workflow runs and generate an animated visual summary using the glowmotion skill. Upload the diagram as an artifact and create a discussion with key insights. +Analyze the past 7 days of agentic workflow runs and generate an SVG visual summary using the glowmotion skill. Commit the diagram to the repository through a pull request and create a discussion with key insights. Apply the installed `diagram-design` skill's layout guidance when composing the diagram structure (grouping, hierarchy, labelling, and edge routing), and use `glowmotion` to render it. @@ -97,7 +104,7 @@ find /tmp/gh-aw -name "layout.py" 2>/dev/null | head -1 Derive `GLOWMOTION_SCRIPTS` as the directory containing `layout.py`. If not found, stop and report the error. -## Step 3: Generate the Animated Diagram +## Step 3: Generate the SVG Diagram ### 3a. Author the Graph JSON @@ -116,30 +123,30 @@ Write a graph JSON to `/tmp/gh-aw/agent/glowmotion-graph.json` describing the ag ### 3b. Render -Render directly into the safe-output staging directory so the file is available to `upload_artifact`: +Render directly into the docs assets path in the repository checkout so the file can be included in the pull request: ```bash -mkdir -p "$RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts" -python3 "${GLOWMOTION_SCRIPTS}/layout.py" /tmp/gh-aw/agent/glowmotion-graph.json --render "$RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts/archivx-animated-diagram.html" +mkdir -p docs/src/assets/archivx +python3 "${GLOWMOTION_SCRIPTS}/layout.py" /tmp/gh-aw/agent/glowmotion-graph.json --render docs/src/assets/archivx/agentic-workflows-archivx.svg ``` ### 3c. Verify ```bash -python3 "${GLOWMOTION_SCRIPTS}/check_diagram.py" "$RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts/archivx-animated-diagram.html" +python3 "${GLOWMOTION_SCRIPTS}/check_diagram.py" docs/src/assets/archivx/agentic-workflows-archivx.svg ``` -Fix every violation by editing `/tmp/gh-aw/agent/glowmotion-graph.json` and re-running the Step 3b render command (which rewrites the staged HTML) until the checker prints `0 violations`. +Fix every violation by editing `/tmp/gh-aw/agent/glowmotion-graph.json` and re-running the Step 3b render command (which rewrites the repository SVG) until the checker prints `0 violations`. -## Step 4: Upload the Artifact +## Step 4: Create the Diagram Pull Request -Confirm the staged file exists: +Confirm the generated file exists: ```bash -ls -l "$RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts/archivx-animated-diagram.html" +ls -l docs/src/assets/archivx/agentic-workflows-archivx.svg ``` -Then call `upload_artifact` **exactly once** with `path: "archivx-animated-diagram.html"` (the path is relative to the staging directory, not an absolute path). Only one upload is allowed per run. +Then call `create_pull_request` **exactly once** with a title like `[archivx] Update workflow diagram — YYYY-MM-DD` and a body summarizing the data range, main findings, and validation result. The pull request must include only `docs/src/assets/archivx/agentic-workflows-archivx.svg`. ## Step 5: Create Discussion @@ -167,11 +174,11 @@ Create a discussion titled `[archivx] Agentic Workflow Visual Summary — YYYY-M --- -### Animated Diagram +### Diagram -The animated architecture diagram is attached as workflow artifact **archivx-animated-diagram**. +The SVG architecture diagram has been committed to `docs/src/assets/archivx/agentic-workflows-archivx.svg` in the generated pull request. -> The HTML file opens directly in any browser. It includes a ☀/☾ light-dark toggle and a ⏯ pause button, and honors reduced-motion preferences. +> The SVG can be embedded directly in docs pages using standard markdown image syntax. ---