Skip to content

fix(workflows): add integrity heuristic and per-file compile loop to recompile-safe-output-fixtures#868

Merged
jamesadevine merged 1 commit into
mainfrom
fix/recompile-fixtures-integrity-and-per-file-compile
Jun 5, 2026
Merged

fix(workflows): add integrity heuristic and per-file compile loop to recompile-safe-output-fixtures#868
jamesadevine merged 1 commit into
mainfrom
fix/recompile-fixtures-integrity-and-per-file-compile

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

Summary

Fixes two bugs in the recompile-safe-output-fixtures agentic workflow that surfaced on the v0.31.1 run (run 27020309715):

  1. Silent no-op on directory argument. The compile step ran ado-aw compile tests/safe-outputs/, which exits 0 with 0 compiled, N skipped because compile only accepts a single .md file or no args (autodiscovery). The agent then correctly saw "no diff" and emitted noop, masking the fact that nothing was actually compiled. Replaced with a per-file for md in tests/safe-outputs/*.md; do ado-aw compile --force "$md"; done loop run from the repo root. Tracked as a separate compiler bug in compile: directory argument silently no-ops instead of auto-discovering or erroring #867.

  2. Missing drift detection. The previous version relied solely on git status after recompile. If the on-disk lock files were stamped by a non-release ado-aw build (which is what triggered the manual recompile in the first place), the agent could conclude "already up to date" against the wrong baseline. Added two integrity checkpoints:

    • Step 2.5 (pre-flight) runs ado-aw check against every lock file before recompile and records the count of files that fail integrity.
    • Step 3.5 (post-compile) re-runs ado-aw check against every recompiled lock file and hard-fails with report-incomplete if any still fail.
    • Step 4 decision logic now emits noop only when the git diff is empty AND pre-flight integrity passed for every file. An empty diff plus failed integrity now emits report-incomplete so the failure is visible.

Test plan

  • Manually inspected the per-file loop against tests/safe-outputs/*.md to confirm it walks all 26 fixtures.
  • Verified ado-aw check <lock.yml> exit codes against modified vs unmodified fixtures.
  • Lock file regenerated with gh aw compile recompile-safe-output-fixtures against the local gh aw install.
  • End-to-end run will be exercised against the next ado-aw release.

Related: #867 (the compiler bug that allows the directory argument to silently no-op).

…recompile-safe-output-fixtures

The previous iteration of the workflow silently no-op'd on release v0.31.1
because `ado-aw compile tests/safe-outputs/` exits 0 with "0 compiled,
N skipped" when given a directory argument (issue #867). It also did not
catch the case where the on-disk lock files were stamped by a non-release
build, which is what triggered the manual recompile in the first place.

This change:

- Replaces `ado-aw compile tests/safe-outputs/` with a per-file loop
  `for md in tests/safe-outputs/*.md; do ado-aw compile --force "$md"; done`
  run from the repo root. `--force` is required to bypass the GitHub-remote
  guard inside this repo.
- Adds Step 2.5 (pre-flight `ado-aw check`) to detect drift between the
  released binary and the committed lock files independent of any version
  string comparison.
- Adds Step 3.5 (post-compile sanity) that re-runs `ado-aw check` against
  every recompiled lock file and hard-fails with `report-incomplete` if
  any still report drift.
- Updates the no-op decision logic so the agent only emits `noop` when both
  the git diff is empty AND pre-flight integrity passed for every file.
  An empty diff plus failed integrity now emits `report-incomplete`.
- Updates the PR body and "When NOT to open a PR" guidance to reference
  the new integrity signals.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit 665ad0e into main Jun 5, 2026
13 checks passed
@jamesadevine jamesadevine deleted the fix/recompile-fixtures-integrity-and-per-file-compile branch June 5, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant