Skip to content

Add a daily upstream drift and collision check - #9

Merged
QuicksilverSlick merged 1 commit into
mainfrom
chore/upstream-watch
Sep 3, 2026
Merged

Add a daily upstream drift and collision check#9
QuicksilverSlick merged 1 commit into
mainfrom
chore/upstream-watch

Conversation

@QuicksilverSlick

Copy link
Copy Markdown
Owner

Adds scripts/upstream-watch.sh, the check behind the new daily dreamforge-upstream-watch scheduled task.

Why

It answers three questions in the order that decides whether an upstream range is safe to take:

  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 reason this exists. A clean git merge is not the same as a safe one. During the 2026-09 merge (#8), upstream refactored the buzz-acp inbound author gate; the merge was textually clean, and our refusal log came back demoted from warn! to debug! — 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.rs and e2eBridge.ts, which upstream had touched in 8 commits) merged clean and still needed eyes.

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.

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.

scripts/upstream-watch.sh              # report since the last marked run
scripts/upstream-watch.sh --since HEAD # everything not in our main
scripts/upstream-watch.sh --mark       # record current upstream as seen

Exit codes: 0 nothing new · 1 new commits, no overlap · 2 new 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

`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>
@QuicksilverSlick
QuicksilverSlick merged commit ae7acab into main Sep 3, 2026
10 checks passed
@QuicksilverSlick
QuicksilverSlick deleted the chore/upstream-watch branch September 3, 2026 21:13
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