3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-02 20:23:27 +00:00
Commit graph

12 commits

Author SHA1 Message Date
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
Copilot
1a73005048
Convert build-warning-fixer into a clang-tidy-driven PR workflow (#10326)
This updates the existing agentic workflow from generic build-warning
cleanup to a clang-tidy-based loop: compile Z3 with Clang, inspect
clang-tidy/compiler diagnostics, and open a PR only for small,
semantics-preserving fixes.

- **Workflow scope**
- Renames and repurposes `build-warning-fixer` as a clang-tidy warning
fixer.
- Keeps the existing agentic PR flow, but narrows it to clang/clang-tidy
findings from the current run.

- **Build/analyze path**
- Switches the authored workflow prompt to use the repo’s CMake + Ninja
build with `clang`/`clang++`.
- Enables `CMAKE_CXX_CLANG_TIDY=clang-tidy` and exports compile commands
for tool-driven analysis.
- Captures configure/build logs in the agent artifact directory for
post-run diagnosis.

- **Agent behavior**
- Instructs the agent to classify clang-tidy warnings, compiler
warnings, and build errors from the build log.
- Biases toward localized fixes only: e.g. `override`,
`[[maybe_unused]]`, `nullptr`, dead locals.
- Explicitly prefers `noop` over speculative edits when diagnostics are
broad, risky, or design-affecting.

- **Generated workflow**
- Regenerates the compiled lockfile to reflect the new prompt and
current auth/permission model used by other agentic workflows in this
repo.

```yaml
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
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-07-31 10:15:18 -07:00
Copilot
24242ec2a1
Suppress auto-created failure issues for agentic workflows (#9834)
This change stops agentic workflows from opening GitHub issues when a
run fails due to workflow/tooling conditions such as missing-tool
reports or token-budget exhaustion. It applies the repository-wide
suppression suggested by the failure issue itself, so these runs can
still fail without creating issue noise.

- **What changed**
- Added `safe-outputs.report-failure-as-issue: false` to each top-level
agentic workflow source under `.github/workflows/*.md`
- Regenerated the corresponding compiled `.lock.yml` workflows so the
runtime configuration matches the source frontmatter

- **Effect**
  - Agentic workflow runs continue to report failure in Actions
- Automatic `[aw] ... failed` issue creation is disabled for these
workflows
- Existing safe outputs such as `noop` and `missing-tool` remain
unchanged

- **Scope**
- Applied consistently across the repository’s top-level agentic
workflows, including `zipt-code-reviewer`, `build-warning-fixer`,
`code-conventions-analyzer`, `workflow-suggestion-agent`, and related
workflows

- **Configuration pattern**
  ```yaml
  safe-outputs:
    report-failure-as-issue: false
    create-issue:
      ...
    missing-tool:
      create-issue: true
    noop:
      report-as-issue: false
  ```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-11 20:57:43 -07:00
Copilot
4a1f448a06
Fix agentic workflow compilation errors (gh-aw v0.68 compat) (#9275)
* Start: recompile agentic workflows, fix errors and security issues

Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/88b80d94-e7d6-4e8f-a106-baa2e7e212d6

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Fix agentic workflow compilation errors: remove glob/view tools, resolve merge conflict, fix serena tool and missing imports

Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/88b80d94-e7d6-4e8f-a106-baa2e7e212d6

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>
2026-04-11 10:19:45 -07:00
copilot-swe-agent[bot]
3bc7623f03 Add noop report-as-issue: false to all agentic workflow frontmatter
Prevents no-op workflow runs from posting comments to the [aw] No-Op
Runs tracking issue by setting safe-outputs.noop.report-as-issue: false
in all 13 agentic workflow .md files.

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-12 20:01:30 +00:00
Nikolaj Bjorner
e2486eff77 upgrade workflows
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-13 08:57:00 -08:00
Copilot
7c4a22d865
Upgrade agentic workflows to gh-aw v0.37.0 (#8261)
* Initial plan

* Upgrade workflows to gh-aw v0.37.0 (latest)

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>
2026-01-20 09:42:30 -08:00
Copilot
d29fc3eef3
Build Warning Fixer: Build Z3 directly instead of reading workflow logs (#8148)
* Initial plan

* Update Build Warning Fixer to build Z3 directly instead of reading logs

- Change workflow to pick a random build configuration and build Z3 directly
- Remove GitHub Actions toolset and agentic-workflows tool dependencies
- Update instructions to extract warnings from direct build output
- Increase timeout from 30 to 60 minutes to accommodate build time
- Add examples for wip.yml, cross-build.yml, and coverage.yml workflows

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>
2026-01-10 20:25:01 -08:00
Copilot
bac004047b
[WIP] Fix build warning fixer to access daily build logs (#8133)
* Initial plan

* Update build-warning-fixer with correct tool usage and examples

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Add specific workflow targets to build-warning-fixer

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>
2026-01-08 21:10:27 -08:00
Copilot
22061a7452
Remove GITHUB_READ_ONLY flag blocking Actions log retrieval in build-warning-fixer (#8128)
* Initial plan

* Remove GITHUB_READ_ONLY=1 flag to allow log retrieval in build-warning-fixer

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>
2026-01-08 20:07:16 -08:00
Copilot
936952dd00
Enable workflow log access for build-warning-fixer agent (#8123)
* Initial plan

* Enable agentic-workflows MCP server for workflow log access

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>
2026-01-08 15:06:57 -08:00
Nikolaj Bjorner
69bc608a18 Add GitHub Actions workflow for automatic build warning detection and fixing
This workflow analyzes build warnings from CI runs of the Z3 theorem prover codebase. It extracts compiler warnings, creates fixes for straightforward issues, and generates pull requests with the changes. The process is designed to be conservative, ensuring that only safe and minimal changes are made to the codebase.
2026-01-08 18:45:57 +00:00