DIVE-4069: widen the file-size ratchet base-ref gate to any dive-*-sync branch - #9
Merged
Merged
Conversation
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.
What this fixes
The DIVE-3850 file-size-ratchet protection is gated on a branch-NAME suffix, and week-4's sync
branches did not have it — so the protection has been silently disengaged.
Week 3 used
dive-3708-upstream-syncand matched. Week 4 useddive-4051-buzz-sync/dive-4051-chat-syncand does not end in-upstream-sync, so the predicate is false, the envis the empty string, and
resolveBaseRef(scripts/check-file-sizes-core.mjs:45-51) falls back toHEAD^1underGITHUB_ACTIONS. On a wholesale sync mergeHEAD^1is our PRE-merge main, so theratchet reads ~77 upstream commits as this PR's own diff — the exact false-red DIVE-3850 was built
to kill.
fetch-depthalso drops to 2, so the history the fix needs is not even fetched.Why it was not noticed
It did not fire. No size check went red on week 4 (
buzz#15@76ec11e9f,5dive-chat#8@8334236d3) —the sync happened not to trip a threshold. A disengaged guard and a satisfied guard are the same
colour. The next sync that touches a big file eats the false-red plus the skip cascade: the red
early gate SKIPS the Mobile/Unit matrix, and the weekly sync stops being gradeable without a human.
The change
Both lines move from
endsWith(head_ref, '-upstream-sync')tocontains(head_ref, '-sync'),keeping the
startsWith(head_ref, 'dive-')leg. Chosen over the alternative — "rename the weeklysync branch to the old convention and write it down" — because that one depends on a human
remembering a suffix every week, which is the failure that produced this.
A comment naming DIVE-4069 is added so the next reader sees why the predicate is loose.
Residual, deliberately NOT fixed here
CHECK_FILE_SIZES_BASEis a hardcoded per-sync sha (c3132c3e, week 3's upstream parent) that theexisting comment says "MUST be updated by each weekly sync row". Widening the predicate means a
sync row that forgets to update the sha now gets a stale base instead of falling through to
HEAD^1— a different silent-disengagement of the same class. That is a real follow-up and it isout of scope for a two-line predicate repair; it needs the sha derived rather than pasted.
Provenance
Found by quinn while grading DIVE-4056 (week-4 buzz upstream sync), independently re-derived on
BOTH forks at the graded heads; olivia signed the same finding in her own grade rather than hiding
it, and authored this fix. The identical change is already open as 5dive-ai#16 — both forks vendor
the same gate, and these two lines have now drifted to the same predicate twice.
DIVE-4069.