mirror of
https://github.com/Z3Prover/z3
synced 2026-02-19 15:04:42 +00:00
Enable automatic std::optional refactoring PRs in Code Conventions Analyzer (#8284)
* Initial plan * Modify Code Conventions Analyzer to create PRs for std::optional refactoring Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Complete Code Conventions Analyzer workflow modification Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix reference clarity in workflow documentation Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
d055eea24e
commit
d2e0354ce4
8 changed files with 827 additions and 501 deletions
133
.github/workflows/api-coherence-checker.lock.yml
generated
vendored
133
.github/workflows/api-coherence-checker.lock.yml
generated
vendored
|
|
@ -13,7 +13,7 @@
|
|||
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
|
||||
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
|
||||
#
|
||||
# This file was automatically generated by gh-aw (v0.37.2). DO NOT EDIT.
|
||||
# This file was automatically generated by gh-aw (v0.37.9). DO NOT EDIT.
|
||||
#
|
||||
# To update this file, edit the corresponding .md file and run:
|
||||
# gh aw compile
|
||||
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
comment_repo: ""
|
||||
steps:
|
||||
- name: Setup Scripts
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.2
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.9
|
||||
with:
|
||||
destination: /opt/gh-aw/actions
|
||||
- name: Check workflow file timestamps
|
||||
|
|
@ -71,7 +71,7 @@ jobs:
|
|||
GH_AW_ASSETS_BRANCH: ""
|
||||
GH_AW_ASSETS_MAX_SIZE_KB: 0
|
||||
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
|
||||
GH_AW_SAFE_OUTPUTS: /tmp/gh-aw/safeoutputs/outputs.jsonl
|
||||
GH_AW_SAFE_OUTPUTS: /opt/gh-aw/safeoutputs/outputs.jsonl
|
||||
GH_AW_SAFE_OUTPUTS_CONFIG_PATH: /opt/gh-aw/safeoutputs/config.json
|
||||
GH_AW_SAFE_OUTPUTS_TOOLS_PATH: /opt/gh-aw/safeoutputs/tools.json
|
||||
outputs:
|
||||
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }}
|
||||
steps:
|
||||
- name: Setup Scripts
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.2
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.9
|
||||
with:
|
||||
destination: /opt/gh-aw/actions
|
||||
- name: Create gh-aw temp directory
|
||||
|
|
@ -131,19 +131,7 @@ jobs:
|
|||
env:
|
||||
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
|
||||
- name: Install GitHub Copilot CLI
|
||||
run: |
|
||||
# Download official Copilot CLI installer script
|
||||
curl -fsSL https://raw.githubusercontent.com/github/copilot-cli/main/install.sh -o /tmp/copilot-install.sh
|
||||
|
||||
# Execute the installer with the specified version
|
||||
# Pass VERSION directly to sudo to ensure it's available to the installer script
|
||||
sudo VERSION=0.0.388 bash /tmp/copilot-install.sh
|
||||
|
||||
# Cleanup
|
||||
rm -f /tmp/copilot-install.sh
|
||||
|
||||
# Verify installation
|
||||
copilot --version
|
||||
run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389
|
||||
- name: Install awf binary
|
||||
run: bash /opt/gh-aw/actions/install_awf_binary.sh v0.10.0
|
||||
- name: Determine automatic lockdown mode for GitHub MCP server
|
||||
|
|
@ -157,7 +145,7 @@ jobs:
|
|||
const determineAutomaticLockdown = require('/opt/gh-aw/actions/determine_automatic_lockdown.cjs');
|
||||
await determineAutomaticLockdown(github, context, core);
|
||||
- name: Download container images
|
||||
run: bash /opt/gh-aw/actions/download_docker_images.sh ghcr.io/github/github-mcp-server:v0.29.0 ghcr.io/githubnext/gh-aw-mcpg:v0.0.74 node:lts-alpine
|
||||
run: bash /opt/gh-aw/actions/download_docker_images.sh ghcr.io/github/github-mcp-server:v0.29.0 ghcr.io/githubnext/gh-aw-mcpg:v0.0.76 node:lts-alpine
|
||||
- name: Write Safe Outputs Config
|
||||
run: |
|
||||
mkdir -p /opt/gh-aw/safeoutputs
|
||||
|
|
@ -328,10 +316,49 @@ jobs:
|
|||
}
|
||||
}
|
||||
EOF
|
||||
- name: Generate Safe Outputs MCP Server Config
|
||||
id: safe-outputs-config
|
||||
run: |
|
||||
# Generate a secure random API key (360 bits of entropy, 40+ chars)
|
||||
API_KEY=""
|
||||
API_KEY=$(openssl rand -base64 45 | tr -d '/+=')
|
||||
PORT=3001
|
||||
|
||||
# Register API key as secret to mask it from logs
|
||||
echo "::add-mask::${API_KEY}"
|
||||
|
||||
# Set outputs for next steps
|
||||
{
|
||||
echo "safe_outputs_api_key=${API_KEY}"
|
||||
echo "safe_outputs_port=${PORT}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "Safe Outputs MCP server will run on port ${PORT}"
|
||||
|
||||
- name: Start Safe Outputs MCP HTTP Server
|
||||
id: safe-outputs-start
|
||||
env:
|
||||
GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-config.outputs.safe_outputs_port }}
|
||||
GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-config.outputs.safe_outputs_api_key }}
|
||||
GH_AW_SAFE_OUTPUTS_TOOLS_PATH: /opt/gh-aw/safeoutputs/tools.json
|
||||
GH_AW_SAFE_OUTPUTS_CONFIG_PATH: /opt/gh-aw/safeoutputs/config.json
|
||||
GH_AW_MCP_LOG_DIR: /tmp/gh-aw/mcp-logs/safeoutputs
|
||||
run: |
|
||||
# Environment variables are set above to prevent template injection
|
||||
export GH_AW_SAFE_OUTPUTS_PORT
|
||||
export GH_AW_SAFE_OUTPUTS_API_KEY
|
||||
export GH_AW_SAFE_OUTPUTS_TOOLS_PATH
|
||||
export GH_AW_SAFE_OUTPUTS_CONFIG_PATH
|
||||
export GH_AW_MCP_LOG_DIR
|
||||
|
||||
bash /opt/gh-aw/actions/start_safe_outputs_server.sh
|
||||
|
||||
- name: Start MCP gateway
|
||||
id: start-mcp-gateway
|
||||
env:
|
||||
GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }}
|
||||
GH_AW_SAFE_OUTPUTS_API_KEY: ${{ steps.safe-outputs-start.outputs.api_key }}
|
||||
GH_AW_SAFE_OUTPUTS_PORT: ${{ steps.safe-outputs-start.outputs.port }}
|
||||
GITHUB_MCP_LOCKDOWN: ${{ steps.determine-automatic-lockdown.outputs.lockdown == 'true' && '1' || '0' }}
|
||||
GITHUB_MCP_SERVER_TOKEN: ${{ secrets.GH_AW_GITHUB_MCP_SERVER_TOKEN || secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
|
|
@ -348,7 +375,7 @@ jobs:
|
|||
# Register API key as secret to mask it from logs
|
||||
echo "::add-mask::${MCP_GATEWAY_API_KEY}"
|
||||
export GH_AW_ENGINE="copilot"
|
||||
export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e DEBUG="*" -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_LOCKDOWN -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/githubnext/gh-aw-mcpg:v0.0.74'
|
||||
export MCP_GATEWAY_DOCKER_COMMAND='docker run -i --rm --network host -v /var/run/docker.sock:/var/run/docker.sock -e MCP_GATEWAY_PORT -e MCP_GATEWAY_DOMAIN -e MCP_GATEWAY_API_KEY -e DEBUG="*" -e MCP_GATEWAY_LOG_DIR -e GH_AW_MCP_LOG_DIR -e GH_AW_SAFE_OUTPUTS -e GH_AW_SAFE_OUTPUTS_CONFIG_PATH -e GH_AW_SAFE_OUTPUTS_TOOLS_PATH -e GH_AW_ASSETS_BRANCH -e GH_AW_ASSETS_MAX_SIZE_KB -e GH_AW_ASSETS_ALLOWED_EXTS -e DEFAULT_BRANCH -e GITHUB_MCP_SERVER_TOKEN -e GITHUB_MCP_LOCKDOWN -e GITHUB_REPOSITORY -e GITHUB_SERVER_URL -e GITHUB_SHA -e GITHUB_WORKSPACE -e GITHUB_TOKEN -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RUN_ATTEMPT -e GITHUB_JOB -e GITHUB_ACTION -e GITHUB_EVENT_NAME -e GITHUB_EVENT_PATH -e GITHUB_ACTOR -e GITHUB_ACTOR_ID -e GITHUB_TRIGGERING_ACTOR -e GITHUB_WORKFLOW -e GITHUB_WORKFLOW_REF -e GITHUB_WORKFLOW_SHA -e GITHUB_REF -e GITHUB_REF_NAME -e GITHUB_REF_TYPE -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GH_AW_SAFE_OUTPUTS_PORT -e GH_AW_SAFE_OUTPUTS_API_KEY -v /opt:/opt:ro -v /tmp:/tmp:rw -v '"${GITHUB_WORKSPACE}"':'"${GITHUB_WORKSPACE}"':rw ghcr.io/githubnext/gh-aw-mcpg:v0.0.76'
|
||||
|
||||
mkdir -p /home/runner/.copilot
|
||||
cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh
|
||||
|
|
@ -365,42 +392,10 @@ jobs:
|
|||
}
|
||||
},
|
||||
"safeoutputs": {
|
||||
"type": "stdio",
|
||||
"container": "node:lts-alpine",
|
||||
"entrypoint": "node",
|
||||
"entrypointArgs": ["/opt/gh-aw/safeoutputs/mcp-server.cjs"],
|
||||
"mounts": ["/opt/gh-aw:/opt/gh-aw:ro", "/tmp/gh-aw:/tmp/gh-aw:rw", "${{ github.workspace }}:${{ github.workspace }}:rw"],
|
||||
"env": {
|
||||
"GH_AW_MCP_LOG_DIR": "\${GH_AW_MCP_LOG_DIR}",
|
||||
"GH_AW_SAFE_OUTPUTS": "\${GH_AW_SAFE_OUTPUTS}",
|
||||
"GH_AW_SAFE_OUTPUTS_CONFIG_PATH": "\${GH_AW_SAFE_OUTPUTS_CONFIG_PATH}",
|
||||
"GH_AW_SAFE_OUTPUTS_TOOLS_PATH": "\${GH_AW_SAFE_OUTPUTS_TOOLS_PATH}",
|
||||
"GH_AW_ASSETS_BRANCH": "\${GH_AW_ASSETS_BRANCH}",
|
||||
"GH_AW_ASSETS_MAX_SIZE_KB": "\${GH_AW_ASSETS_MAX_SIZE_KB}",
|
||||
"GH_AW_ASSETS_ALLOWED_EXTS": "\${GH_AW_ASSETS_ALLOWED_EXTS}",
|
||||
"GITHUB_REPOSITORY": "\${GITHUB_REPOSITORY}",
|
||||
"GITHUB_SERVER_URL": "\${GITHUB_SERVER_URL}",
|
||||
"GITHUB_SHA": "\${GITHUB_SHA}",
|
||||
"GITHUB_WORKSPACE": "\${GITHUB_WORKSPACE}",
|
||||
"DEFAULT_BRANCH": "\${DEFAULT_BRANCH}",
|
||||
"GITHUB_RUN_ID": "\${GITHUB_RUN_ID}",
|
||||
"GITHUB_RUN_NUMBER": "\${GITHUB_RUN_NUMBER}",
|
||||
"GITHUB_RUN_ATTEMPT": "\${GITHUB_RUN_ATTEMPT}",
|
||||
"GITHUB_JOB": "\${GITHUB_JOB}",
|
||||
"GITHUB_ACTION": "\${GITHUB_ACTION}",
|
||||
"GITHUB_EVENT_NAME": "\${GITHUB_EVENT_NAME}",
|
||||
"GITHUB_EVENT_PATH": "\${GITHUB_EVENT_PATH}",
|
||||
"GITHUB_ACTOR": "\${GITHUB_ACTOR}",
|
||||
"GITHUB_ACTOR_ID": "\${GITHUB_ACTOR_ID}",
|
||||
"GITHUB_TRIGGERING_ACTOR": "\${GITHUB_TRIGGERING_ACTOR}",
|
||||
"GITHUB_WORKFLOW": "\${GITHUB_WORKFLOW}",
|
||||
"GITHUB_WORKFLOW_REF": "\${GITHUB_WORKFLOW_REF}",
|
||||
"GITHUB_WORKFLOW_SHA": "\${GITHUB_WORKFLOW_SHA}",
|
||||
"GITHUB_REF": "\${GITHUB_REF}",
|
||||
"GITHUB_REF_NAME": "\${GITHUB_REF_NAME}",
|
||||
"GITHUB_REF_TYPE": "\${GITHUB_REF_TYPE}",
|
||||
"GITHUB_HEAD_REF": "\${GITHUB_HEAD_REF}",
|
||||
"GITHUB_BASE_REF": "\${GITHUB_BASE_REF}"
|
||||
"type": "http",
|
||||
"url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT",
|
||||
"headers": {
|
||||
"Authorization": "\${GH_AW_SAFE_OUTPUTS_API_KEY}"
|
||||
}
|
||||
},
|
||||
"serena": {
|
||||
|
|
@ -431,8 +426,8 @@ jobs:
|
|||
engine_name: "GitHub Copilot CLI",
|
||||
model: process.env.GH_AW_MODEL_AGENT_COPILOT || "",
|
||||
version: "",
|
||||
agent_version: "0.0.388",
|
||||
cli_version: "v0.37.2",
|
||||
agent_version: "0.0.389",
|
||||
cli_version: "v0.37.9",
|
||||
workflow_name: "API Coherence Checker",
|
||||
experimental: false,
|
||||
supports_tools_allowlist: true,
|
||||
|
|
@ -450,7 +445,7 @@ jobs:
|
|||
allowed_domains: [],
|
||||
firewall_enabled: true,
|
||||
awf_version: "v0.10.0",
|
||||
awmg_version: "v0.0.74",
|
||||
awmg_version: "v0.0.76",
|
||||
steps: {
|
||||
firewall: "squid"
|
||||
},
|
||||
|
|
@ -955,7 +950,7 @@ jobs:
|
|||
total_count: ${{ steps.missing_tool.outputs.total_count }}
|
||||
steps:
|
||||
- name: Setup Scripts
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.2
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.9
|
||||
with:
|
||||
destination: /opt/gh-aw/actions
|
||||
- name: Debug job inputs
|
||||
|
|
@ -1054,7 +1049,7 @@ jobs:
|
|||
success: ${{ steps.parse_results.outputs.success }}
|
||||
steps:
|
||||
- name: Setup Scripts
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.2
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.9
|
||||
with:
|
||||
destination: /opt/gh-aw/actions
|
||||
- name: Download agent artifacts
|
||||
|
|
@ -1138,19 +1133,7 @@ jobs:
|
|||
env:
|
||||
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
|
||||
- name: Install GitHub Copilot CLI
|
||||
run: |
|
||||
# Download official Copilot CLI installer script
|
||||
curl -fsSL https://raw.githubusercontent.com/github/copilot-cli/main/install.sh -o /tmp/copilot-install.sh
|
||||
|
||||
# Execute the installer with the specified version
|
||||
# Pass VERSION directly to sudo to ensure it's available to the installer script
|
||||
sudo VERSION=0.0.388 bash /tmp/copilot-install.sh
|
||||
|
||||
# Cleanup
|
||||
rm -f /tmp/copilot-install.sh
|
||||
|
||||
# Verify installation
|
||||
copilot --version
|
||||
run: /opt/gh-aw/actions/install_copilot_cli.sh 0.0.389
|
||||
- name: Execute GitHub Copilot CLI
|
||||
id: agentic_execution
|
||||
# Copilot CLI tool arguments (sorted):
|
||||
|
|
@ -1216,7 +1199,7 @@ jobs:
|
|||
process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }}
|
||||
steps:
|
||||
- name: Setup Scripts
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.2
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.9
|
||||
with:
|
||||
destination: /opt/gh-aw/actions
|
||||
- name: Download agent output artifact
|
||||
|
|
@ -1253,7 +1236,7 @@ jobs:
|
|||
permissions: {}
|
||||
steps:
|
||||
- name: Setup Scripts
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.2
|
||||
uses: githubnext/gh-aw/actions/setup@v0.37.9
|
||||
with:
|
||||
destination: /opt/gh-aw/actions
|
||||
- name: Download cache-memory artifact (default)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue