Skip to content

DIVE-4090 probe: merge-shaped PR must resolve the ratchet base to its second parent (do not merge) - #18

Closed
lodar wants to merge 3 commits into
mainfrom
dive-0000-probe-sync
Closed

lodar wants to merge 3 commits into
mainfrom
dive-0000-probe-sync

Conversation

@lodar

@lodar lodar commented Sep 8, 2026

Copy link
Copy Markdown

Probe for #17, per the DIVE-4090 row's arm: a merge-shaped PR whose second parent is foreign (commit a45493ff7e33e9461186bef9fdebd0042a088435, one new file on top of a main ancestor, never on main). Read the Resolve file size ratchet base step in Detect Changed Paths: it must print ratchet-base: a45493ff7e33e9461186bef9fdebd0042a088435 (second parent of merge commit …, the foreign side of a wholesale merge; 1 first-parent commit(s) on this PR). Whatever the ratchet then says about that diff is not the point; the resolved base is. Close after reading.

…ot a branch name and a pasted sha

The weekly upstream-sync PR carries a merge commit whose second parent is
upstream's tip; the ratchet's default base (HEAD^1, our pre-merge main)
reads every upstream commit as this PR's diff (DIVE-3850). Two fixes keyed
the override on the branch name and pasted the sha: the name slipped in week
4 (DIVE-4069), the widened predicate now over-matches any `dive-*-sync`
feature branch onto week 3's stale sha (DIVE-4090).

- scripts/resolve-file-size-base.sh runs before `File size policy`: on a
  pull_request run it fetches exactly this PR's commits on top of the
  depth-2 checkout (--shallow-exclude=<base>, trees only), walks the PR's
  first-parent chain, and exports the first foreign second parent as
  CHECK_FILE_SIZES_BASE. Anything else keeps HEAD^1. It prints one
  `ratchet-base:` line saying which base the run got and why.
- scripts/test-resolve-file-size-base.sh: four shapes at fetch-depth 2 from
  a bare origin (plain feature, sync + fix-up, feature that merged main,
  push) plus the full-history path.
- ci.yml: fetch-depth back to a plain 2 (upstream-identical), the env
  literal and both name predicates removed.

Receipts: on the week-3 tree (PR #14's merge-ref shape, the case where the
bases disagree) HEAD^1 is rc=1 on `agent_models_tests.rs: 965 -> 1001` and
the derived base c3132c3 is rc=0 on desktop/web/mobile; a depth-2
emulation of week 4's merge ref resolves to 3c7f288 in 1.6s; live PRs #9
and #10 resolve to HEAD^1.
@lodar

lodar commented Sep 8, 2026

Copy link
Copy Markdown
Author

Probe only, never to merge. Closing now that #17 has landed on main so it cannot be merged by accident (DIVE-4090). Its receipt stands in the Detect Changed Paths log of job 102057747567: ratchet-base resolved to a45493f as the second parent of 17a3746.

@lodar lodar closed this Sep 8, 2026
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