Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ff76452
fix(autofix): make the brake's BLOCKED handoff a first-class round ou…
wenshao Aug 17, 2026
3d2a046
Merge branch 'main' into fix/autofix-handoff-output-contract
qwen-code-dev-bot Aug 17, 2026
ed1ea96
fix(autofix): align the handoff outcome's consumers and pins with its…
qwen-code-dev-bot Aug 17, 2026
5c766ff
fix(autofix): classify a no-commit handoff before the gate's structur…
qwen-code-dev-bot Aug 17, 2026
e5a3106
fix(autofix): reject a no-commit handoff written over a dirty workspa…
qwen-code-dev-bot Aug 17, 2026
c0f1c75
fix(autofix): report a dirty-handoff rejection honestly, not as a fai…
qwen-code-dev-bot Aug 18, 2026
57664b9
Merge branch 'main' into fix/autofix-handoff-output-contract
qwen-code-dev-bot Aug 18, 2026
ef859bd
fix(autofix): reject a handoff written beside a round commit, non-ret…
qwen-code-dev-bot Aug 18, 2026
d8d4845
fix(ci): classify the committed handoff shape as its own non-retryabl…
wenshao Aug 18, 2026
5edd7f8
Merge remote-tracking branch 'wenshao/fix/autofix-handoff-output-cont…
wenshao Aug 18, 2026
9901ba8
fix(ci): count committed-handoff rounds in the milestone census rejec…
qwen-code-dev-bot Aug 18, 2026
8972874
fix(autofix): publish brake violations green and preserve handoffs ac…
qwen-code-dev-bot Aug 18, 2026
f1f2d17
test(ci): give four subprocess-heavy replays explicit budgets
wenshao Aug 19, 2026
a4fa22f
Merge remote-tracking branch 'origin/main' into fix/autofix-handoff-o…
wenshao Aug 19, 2026
cc3a05d
fix(ci): mirror the handoff outcome consumers into the recovery clone…
qwen-code-dev-bot Aug 20, 2026
955a32c
Merge remote-tracking branch 'origin/main' into fix/autofix-handoff-o…
wenshao Aug 20, 2026
8fb2ed0
Merge remote-tracking branch 'origin/main' into fix/autofix-handoff-o…
wenshao Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 60 additions & 2 deletions .github/scripts/run-autofix-review-verification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,62 @@ if [[ -f "${WORKDIR}/failure.md" ]]; then
exit 1
fi

# A handoff claims the round changed NOTHING — dirt beside it is a
# brake-violating partial patch (otherwise reported as a clean stop and
# discarded silently with the runner), and untracked leftovers would trip
# the NEXT round's dirty assert on the persistent pool. The ref-level
# commit diff below is blind to both. Non-retryable like failure.md+dirty
# above (a retryable rejection would engage the repair pass, which deletes
# handoff.md and may commit against the brake), but under its OWN outcome:
# outcome=failed would make the report step dress the rejection as a
# failed FIX ("could not produce a passing fix", or a stale-base retry
# promise) when no fix existed — the report step gives this shape its own
# honest headline.
if [[ -s "${WORKDIR}/handoff.md" && -n "$(git status --porcelain)" ]]; then
Comment thread
wenshao marked this conversation as resolved.
Resolved
echo "❌ Agent wrote handoff.md after leaving a dirty workspace:"
Comment thread
wenshao marked this conversation as resolved.
Resolved
git status --short
sed 's/::/;;/g' "${WORKDIR}/handoff.md"
echo "outcome=dirty_handoff" >> "${GITHUB_OUTPUT}"
exit 1
fi

# The committed sibling of the brake violation above: the round HAS a commit
# beside handoff.md. Judged by dirt alone it slips both guards — the dirty
# check sees a clean tree, and the no-commit handoff branch below requires
# an unchanged ref — so it would reach the structural checks, where
# reject_fix defaults to retryable and the repair pass deletes
# handoff.md and may commit AGAIN against the brake's stop. Non-retryable
# under its OWN outcome: a commit DID happen, so the dirty-handoff headline
# claiming nothing was committed would misreport it. Same reasoning as the
# dirty guard otherwise.
if [[ -s "${WORKDIR}/handoff.md" && "${committed_rc:-0}" -eq 1 ]]; then
echo "❌ Agent wrote handoff.md but the round HAS a commit — a brake violation:"
git log --oneline "origin/${BRANCH}..${BRANCH}"
sed 's/::/;;/g' "${WORKDIR}/handoff.md"
echo "outcome=committed_handoff" >> "${GITHUB_OUTPUT}"
exit 1
fi

# No-commit brake handoff, classified BEFORE the structural checks below:
# those judge the PR's OWN diff (core rebuild, schema freshness, contracts)
# and reject_fix on failure, and the growth brake fires on exactly the red
# PRs whose diff trips them. A compliant handoff commits nothing, so
# running the checks first would reclassify it as a retryable failure —
# the repair pass would delete handoff.md and commit against the brake's
# stop. A handoff claims nothing (acted=false, deferred to a human), so
# the checks' false-no-action rationale does not apply. failure.md
# coexistence keeps the failed classification via the exits above.
if git diff --quiet "origin/${BRANCH}...${BRANCH}" \
&& [[ -s "${WORKDIR}/handoff.md" ]]; then
Comment thread
wenshao marked this conversation as resolved.
Resolved
Comment thread
wenshao marked this conversation as resolved.
Resolved
echo "🤝 Branch unchanged with a handoff — the agent stopped under instruction and deferred this item to a human:"
# Agent-written content: a line-start `::` would be parsed as a workflow
# command (::error::, ::add-mask::), the same reason 'Show run artifacts'
# neutralizes these files.
sed 's/::/;;/g' "${WORKDIR}/handoff.md"
echo "outcome=handoff" >> "${GITHUB_OUTPUT}"
exit 0
fi

# Convention: hooks are severed at EVERY host checkout of the PR
# branch (no secret sits in this step's env, but a post-checkout
# hook still runs branch code on the host).
Expand Down Expand Up @@ -337,7 +393,8 @@ fi
# no-op/unchanged return: on a stale-schema PR the agent can wrongly
# write no-action.md, and without this the no-op path would report the
# feedback as evaluated (acted=false) while CI stays red — the exact bug
# this PR fixes. So it runs on EVERY path. The gate is shared with the
# this PR fixes. So it runs on every path but the no-commit handoff,
# which claims nothing and exits above. The gate is shared with the
# issue-fix verify step (rationale + the generator crash guard live in
# the script); the write is on a tracked file compared by `git status`,
# not the commit-level no-op git-diff below, and it is restored on
Expand All @@ -354,7 +411,8 @@ run_check_no_ab 'cross-package contract verification failed' \
assert_verification_tree

if git diff --quiet "origin/${BRANCH}...${BRANCH}"; then
Comment thread
wenshao marked this conversation as resolved.
Resolved
# No new commit. That is only legitimate as a deliberate no-action.
# No new commit. That is only legitimate as a deliberate no-action; the
# no-commit handoff was classified before the structural checks above.
if [[ -s "${WORKDIR}/no-action.md" ]]; then
echo "🟰 No action needed:"
cat "${WORKDIR}/no-action.md"
Expand Down
Loading
Loading