Add a daily upstream drift and collision check - #9
Merged
Conversation
`scripts/upstream-watch.sh` answers the three questions that decide whether an upstream range is safe to take, in the order that matters: 1. What is new upstream since we last looked? 2. Does any of it touch a file WE have customized? 3. Would merging conflict right now, and where? Question 2 is the one this exists for. A clean `git merge` is not the same as a safe one: upstream can rewrite a function our fork depends on and git will merge it silently. That happened during the 2026-09 merge — upstream refactored the buzz-acp inbound author gate, the merge was textually clean, and our refusal log came back demoted from warn! to debug!, re-hiding a failure we had shipped a fix to surface. The overlap list is the set of files where both sides have landed commits since the fork point, which is exactly where that class of loss hides. It also flags new upstream event kinds, because kind.rs auto-merges without conflict even when both sides claim the same number — a wire-protocol break no test would catch. Read-only: fetches, but never merges, checks out, or writes to a branch. The only file it writes is .git/upstream-watch-state (via --mark). Exit codes: 0 nothing new, 1 new commits with no overlap, 2 new commits plus overlap or predicted conflicts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
scripts/upstream-watch.sh, the check behind the new dailydreamforge-upstream-watchscheduled task.Why
It answers three questions in the order that decides whether an upstream range is safe to take:
Question 2 is the reason this exists. A clean
git mergeis not the same as a safe one. During the 2026-09 merge (#8), upstream refactored thebuzz-acpinbound author gate; the merge was textually clean, and our refusal log came back demoted fromwarn!todebug!— silently re-hiding a failure we had shipped #2 to surface. Git reported no conflict because there wasn't one.The overlap list is the set of files where both sides have landed commits since the fork point. That is exactly where that class of loss hides — and it is strictly larger than the conflict list. On the #8 range it flagged 11 overlapping files where git predicted only 5 conflicts; the other 6 (including
kind.rsande2eBridge.ts, which upstream had touched in 8 commits) merged clean and still needed eyes.It also flags new upstream event kinds, because
kind.rsauto-merges without conflict even when both sides claim the same number — a wire-protocol break no test would catch.Behavior
Read-only. Fetches, but never merges, checks out, or writes to a branch. The only file it writes is
.git/upstream-watch-state, and only via--mark.Exit codes:
0nothing new ·1new commits, no overlap ·2new commits and overlap or predicted conflicts.Verification
Run against the #8 range before it merged, it reproduced the manual analysis exactly: 58 commits, 110 ours / 806 theirs, 11 overlapping files, the same 5 predicted conflicts git actually produced, and
KIND_HUDDLE_LIVENESS(48104) correctly flagged as clear of our ticket kinds (30623, 30624).🤖 Generated with Claude Code