fix(automerge): run do_automerge_tick after the validated set is built #256
No reviewers
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
2 participants
Notifications
Total time spent: 1 minute 10 seconds
Due date
igor
1 minute 10 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor!256
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/automerge-cascade-order"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug the live demo flushed out on its first run. Every auto-merge gate condition was green for porksicle #60 — your APPROVE, CI success, cleanly mergeable, eligible (
agent.json .smoke.url), shadow verdict COMMENT — yet the live tick kept going idle without merging.Root cause:
do_automerge_tickwas wired in early (just after the deploy barrier, above the health gate), but it iteratesVALIDATED_REPOS_JSON— which the validation sweep builds lower down in the cascade. So it looped over an empty repo set every tick and silently did nothing.Fix: the deploy barrier stays early (it keys off
.deploystate, needs no repo set), butdo_automerge_tickmoves to right after the validation sweep — same populated setdo_review_tickuses. Ordering dependency now documented at both spots.The unit tests stub
VALIDATED_REPOS_JSON, so they pass regardless of cascade position — this was an integration/placement bug, not a logic one.bash -n+check-syncgreen.No reviewer. Once this deploys, the live tick will pick up #60 (still approved + green) and run the loop for real — merge → barrier → smoke.
🤖 Review —
COMMENT(automated)CI for
9a414d1b: successSummary: Moves
do_automerge_tick && exit 0from just-after the deploy barrier (early, above the health gate) to just-after theVALIDATED_REPOS_JSONempty-check, so it iterates a populated validated set instead of an empty one. The core fix is plausible and in scope, but it carries a behavior change the description doesn't surface, and it lands with no regression guard — so I can't clear it for the human cold.What checks out
if [ -z "$VALIDATED_REPOS_JSON" ]; then ... exit 0; fi, so at that point the validated set is guaranteed non-empty. That directly addresses the stated "looped over an empty set" bug.success.What the human should weigh before merging
claude_health_blockedgate. I can't see whether that gate hard-exits or merely skips model sections, but if it exits the tick (which the original design — deliberately hoisting non-model work above it — strongly implies), then auto-merge will no longer run during a Claude health cooldown. That may be an acceptable trade (you fundamentally can't buildVALIDATED_REPOS_JSONabove the gate either), but it's a real regression of a documented property and the PR description doesn't acknowledge it. Worth a one-line confirmation that delaying merges until cooldown clears is intended.VALIDATED_REPOS_JSONand "pass regardless of cascade position" — which is exactly why this bug shipped. The fix adds nothing to catch a future re-ordering. I understand an ordering bug in a bash cascade is awkward to unit-test, but as-is there's zero protection against the same class of bug recurring. At minimum, consider an assertion/test thatdo_automerge_tickis invoked only with a non-empty set, or an integration smoke that fails if it's placed above the sweep.What I couldn't verify from the diff
do_automerge_tick(does it correctly read the populated set?).claude_health_blockedexits or continues, which determines the cooldown impact above.None of these is a confirmed defect, so this isn't a block — but the undocumented cooldown trade-off plus the absent regression guard are enough that a human should glance before merging rather than take an auto-APPROVE.
Independent review by the harness on
claude-opus-4-8. The human reviewer is requested once Igor has reviewed; a human still merges.