Skip to content

fix(fork): check sync merge whitespace against the upstream side only - #112

Merged
wianvdm merged 1 commit into
mainfrom
t3/fix-validate-merge-check
Nov 15, 2026
Merged

wianvdm merged 1 commit into
mainfrom
t3/fix-validate-merge-check

Conversation

@wianvdm

@wianvdm wianvdm commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Traceability

Part of #110

Problem

scripts/upstream-sync.ts validate-merge (run by the Upstream Sync Merge CI job from the trusted base) ran git diff --check and the conflict-marker scan against both merge parents. Against the fork parent, the diff contains all of upstream's incoming changes, and upstream ships files that trip --check (trailing whitespace in patches/*.patch, a generated byte table). So the first real sync PR (#111, v0.1.9) fails validation although its resolution is clean. The runbook's verify already checks against the upstream side only.

Change

validateUpstreamSyncMerge checks whitespace and conflict markers against the upstream parent (the tag commit) only: exactly what the fork side (resolution plus fork delta) adds on top of upstream.

Compatibility

Sync tooling only.

Verification

  • New case in scripts/upstream-sync.test.ts: an upstream-added file with trailing whitespace passes; a resolution that adds trailing whitespace fails. It fails on the old code with the same error as chore(sync): merge upstream v0.1.9 #111.
  • vp test run scripts/upstream-sync.test.ts: 68 passed; scripts typecheck, lint and fmt clean.
  • Real merge: validate-merge with chore(sync): merge upstream v0.1.9 #111's arguments prints Validated the sync merge 875e8c5e18 of v0.1.9 (24e77473ec) onto 8ee05a30f1.

Model and harness: Claude Opus 5.5 (orchestration), Claude Sonnet 5.5 (implementation), via Claude Code in T3 Code.

🤖 Generated with Claude Code

- validate-merge diffed against both parents, so upstream's own trailing whitespace (patches/*.patch, C hex arrays) failed every real sync merge
- Run the conflict-marker scan and `git diff --check` against the upstream parent only, matching verify
- Test: upstream-side whitespace passes, resolution-added whitespace fails
@github-actions github-actions Bot added plusplus-only Advisory: PR touches fork-owned code only; not an upstream proposal. size:S labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 87b4f58.

This comment will update automatically after the next completed run.

@wianvdm
wianvdm merged commit 8677b8b into main Nov 15, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plusplus-only Advisory: PR touches fork-owned code only; not an upstream proposal. size:S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant