3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-02 12:13:25 +00:00
z3/.github
Copilot 022a6505ae
Precompute clang-tidy diagnostics in build-warning-fixer and add issue-context diff handoff (#10336)
This updates the `build-warning-fixer` agentic workflow to front-load
compilation/diagnostic collection before agent execution, reducing
repeated setup work in agent mode. It also improves issue-triggered runs
by requiring explicit git diff output so follow-on PR authoring has
directly usable patches.

- **Pre-agent compile + diagnostics collection**
- Added workflow `steps` in `build-warning-fixer.md` to run checkout,
tool install, CMake configure/build, and diagnostic extraction before
the agent prompt executes.
  - Persisted structured artifacts under `/tmp/gh-aw/agent/`:
    - `prebuild-status.txt`
    - `clang-tidy-configure.log`
    - `clang-tidy-build.log`
    - `clang-tidy-diagnostics.txt`

- **Prompt flow changed to consume prebuilt context**
- Reworked task instructions from “build first” to “inspect prebuild
outputs first.”
- Kept rebuild/fix loop for validated, conservative edits after code
changes.

- **Issue-context PR handoff improvement**
- Added explicit instruction for issue-dispatched runs
(`aw_context.item_type == "issue"`) to include:
    - `git diff --stat`
    - full `git diff` in fenced `diff` output
  - This makes proposed changes directly transferable into PR creation.

- **Workflow metadata refresh**
  - Updated checkout action reference to `actions/checkout@v7.0.1`.
- Recompiled `build-warning-fixer.lock.yml` to reflect source workflow
updates.

```yaml
- name: Prebuild and collect clang diagnostics
  run: |
    CC=clang CXX=clang++ cmake -GNinja -S . -B build \
      -DCMAKE_BUILD_TYPE=Debug \
      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
      -DCMAKE_CXX_CLANG_TIDY=clang-tidy \
      2>&1 | tee /tmp/gh-aw/agent/clang-tidy-configure.log
    cmake --build build --target shell test-z3 -k 0 \
      2>&1 | tee /tmp/gh-aw/agent/clang-tidy-build.log
    grep -nE 'warning:|error:|clang-tidy' /tmp/gh-aw/agent/clang-tidy-build.log \
      > /tmp/gh-aw/agent/clang-tidy-diagnostics.txt || true
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-07-31 20:25:24 -07:00
..
actions Remove z3_tptp5 example build steps from GitHub Actions 2026-07-29 15:53:08 -07:00
agents update aw 2026-06-24 14:08:45 -07:00
aw Recompile agentic workflow lockfiles and refresh pinned AW metadata (#10315) 2026-07-30 16:43:39 -07:00
prompts gitignore 2025-03-12 17:18:37 -07:00
scripts fix memory-safety-report to download artifacts via MCP tools (#8979) 2026-03-15 10:12:49 -07:00
skills update aw 2026-06-24 14:08:45 -07:00
workflows Precompute clang-tidy diagnostics in build-warning-fixer and add issue-context diff handoff (#10336) 2026-07-31 20:25:24 -07:00
CI_MIGRATION.md Fix workflow compilation errors and relocate documentation files (#8295) 2026-01-22 21:05:05 -08:00
CI_TESTING.md Fix workflow compilation errors and relocate documentation files (#8295) 2026-01-22 21:05:05 -08:00
copilot-instructions.md Add .github/copilot-instructions.md with comprehensive Z3 development guide (#7766) 2025-08-12 15:18:52 -07:00
dependabot.yml Fix Academic Citation Tracker agent job: recompile lock file with gh-aw v0.79.8 (#9910) 2026-06-20 12:13:01 -06:00
mcp.json update aw 2026-06-24 14:08:45 -07:00