From 03c4c2e14e9f1e67e17c39115109f47bf703e7ed Mon Sep 17 00:00:00 2001 From: lodar Date: Tue, 8 Sep 2026 03:06:47 +0000 Subject: [PATCH] DIVE-4069: widen file-size ratchet base-ref gate to any dive-*-sync branch --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91b776c8f66..b4e38df623e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: # history for sync branches ONLY; every other PR keeps depth 2. # NB the guard is inverted on purpose: 0 is FALSY in GitHub # expressions, so `cond && 0 || 2` would always yield 2. - fetch-depth: ${{ (!(startsWith(github.head_ref, 'dive-') && endsWith(github.head_ref, '-upstream-sync'))) && 2 || 0 }} + fetch-depth: ${{ (!(startsWith(github.head_ref, 'dive-') && contains(github.head_ref, '-sync'))) && 2 || 0 }} - uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1 - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 id: filter @@ -128,11 +128,15 @@ jobs: # and reproduced by quinn (DIVE-3851): same checker, same tree, only # the base changed -- HEAD^1 rc=1, merge-base rc=1, upstream parent # rc=0. Points the ratchet at the sync merge's upstream parent for - # upstream-sync branches ONLY; every other PR sees an empty string, + # sync branches ONLY; every other PR sees an empty string, # which is falsy, and falls through to HEAD^1 unchanged. + # DIVE-4069: matched on `contains(...,'-sync')`, not a fixed + # `-upstream-sync` suffix -- week-4 branches were `dive--buzz-sync` + # / `-chat-sync` and slipped the old suffix, silently disengaging this + # protection. Any `dive-*-sync` head now qualifies. # The sha is per-sync and MUST be updated by each weekly sync row. # See community/wiki/a-diff-ratchet-based-on-head-caret-1-false-reds-every-wholesale-sync-merge.md - CHECK_FILE_SIZES_BASE: ${{ (startsWith(github.head_ref, 'dive-') && endsWith(github.head_ref, '-upstream-sync')) && 'c3132c3ee982d194cd0198ad07b57ec8bd726e4e' || '' }} + CHECK_FILE_SIZES_BASE: ${{ (startsWith(github.head_ref, 'dive-') && contains(github.head_ref, '-sync')) && 'c3132c3ee982d194cd0198ad07b57ec8bd726e4e' || '' }} run: just file-size-check dead-token-guard: