Skip to content

chore: use the standard fork remote layout - #55

Merged
anoop-narang merged 3 commits into
mainfrom
chore/standard-remotes
Sep 28, 2026
Merged

anoop-narang merged 3 commits into
mainfrom
chore/standard-remotes

Conversation

@anoop-narang

Copy link
Copy Markdown
Collaborator

Everything in CLAUDE.md that warned about remote names, spelled commands with full URLs, or repeated that FETCH_HEAD holds only the last fetch existed for one reason: this clone had origin pointing at upstream, with our fork on a second remote named fork — the reverse of the convention.

That is a solved problem. I wrote a workaround instead of fixing it, and the workaround produced its own bugs — three wrong instructions from FETCH_HEAD being last-fetch-wins, and a verify step that compared our main against our own fork and so could not fail whatever the sync state.

The fix

origin     hotdata-dev/liquid-cache          ours
upstream   datafusion-contrib/liquid-cache   theirs

The layout every tutorial and every agent already expects. CLAUDE.md now states it up front with the rename commands, and uses origin/main and upstream/main throughout. Those are stable refs, so the ordering hazard disappears instead of needing a warning at each site.

153 lines -> 128
FETCH_HEAD: 11 mentions -> 1

The deleted material is not lost guidance — it was scaffolding holding up a broken foundation.

Every command was executed

Which is how I found one that never worked:

$ git fetch origin upstream
fatal: couldn't find remote ref upstream

git fetch origin upstream does not fetch two remotes — git reads upstream as a refspec on origin. It is git fetch --multiple origin upstream. That line was in the sync recipe and the verify step.

Full run against this repo:

ok  git merge-base main upstream/main
ok  origin is ours
ok  upstream is theirs
ok  git fetch origin
ok  git fetch upstream
ok  git fetch --multiple origin upstream
ok  post-sync verify says ok
ok  upstream branch: self-check lists nothing
ok  guard passes an upstream branch
ok  guard fails a branch off our main
ok  sync merge is a no-op now

11 passed, 0 failed

The guard workflow needs no change: in Actions, actions/checkout sets origin to the repo being built, which is this fork either way.

Everything in this file that warned about remote names, spelled commands
with full URLs, or repeated that `FETCH_HEAD` holds only the last fetch
existed because this clone had `origin` pointing at upstream and the fork
on a second remote named `fork` — the reverse of the convention. That is
a solved problem, and I wrote a workaround for it instead of fixing it.
The workaround then produced its own bugs: three wrong instructions from
`FETCH_HEAD` being last-fetch-wins, and a verify step that compared our
main against our own fork and so could not fail.

The file now states the standard layout up front -- `origin` ours,
`upstream` theirs -- with the rename commands to get there, and uses
`origin/main` and `upstream/main` throughout. Those are stable refs, so
the ordering hazard disappears rather than needing a warning at each
site. 153 lines to 128, and `FETCH_HEAD` from eleven mentions to one.

Every command in the file was executed against this repo. That found
`git fetch origin upstream`, which does not fetch two remotes -- git
reads `upstream` as a refspec on `origin` and fails with "couldn't find
remote ref upstream". It is `git fetch --multiple origin upstream`.
@anoop-narang
anoop-narang requested a review from a team as a code owner September 28, 2026 05:34
@anoop-narang
anoop-narang requested review from shefeek-jinnah and removed request for a team September 28, 2026 05:34
Comment thread CLAUDE.md Outdated
claude[bot]
claude Bot previously approved these changes Sep 28, 2026
The setup block assumed a clone made from upstream and opened with
`git remote rename origin upstream`. Run against a clone of this fork,
whose `origin` is already correct, that renames the right remote away.

Worse, it fails silently. Running part of the block on a fork clone —
the rename and the add, without the `set-url` that used to follow —
leaves both remotes pointing at this fork. `upstream/main` then means our
own `main`, so the sync merges nothing, the post-sync check passes, and
the branch guard sees no fork commits. Every recipe here reports success
while comparing us against ourselves.

Now split by what the clone actually is, with `git remote -v` first:
a clone of the fork adds `upstream`, a clone of upstream renames and adds
`origin`. Both paths run from scratch in a throwaway repo and end
correct; the previous block left case one wrong.

Adds the check that matters, since the failure has no symptom: the two
remotes must name different repositories.
Comment thread CLAUDE.md
claude[bot]
claude Bot previously approved these changes Sep 28, 2026
`git remote rename` rewrites the tracking config of every branch that
followed the renamed remote. The documented rename therefore leaves local
`main` following `upstream/main`: a `git pull` on `main` merges upstream
straight into it, and nothing says so. Verified in a throwaway repo —
before the rename `main` tracks `origin`, after it tracks `upstream`.

The recipe now fetches and re-points `main` at `origin/main` afterwards.

The opening line had the same weakness from the other direction. It
claimed `git merge-base main upstream/main` resolves, which rests on
local `main` being both correctly tracked and current — and with the
tracking bug above it would pass whatever the fork's state was. It now
names `origin/main`, and says why: a local branch can track the wrong
remote or be stale, and neither condition announces itself.

This repo escaped the tracking bug by ordering luck. I re-pointed `main`
at the fork before renaming the remotes, so the rename rewrote it to
`origin` rather than away from it.
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@anoop-narang
anoop-narang merged commit 7c012b2 into main Sep 28, 2026
14 checks passed
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

📊 Benchmark Comparison

Current: 9063f10c (Liquid) vs Baseline: 9063f10c (DataFusionDefault)

Query Cold Time Δ Warm Time Δ CPU Time Δ
Q1 3.0ms (5.0ms) -40.0% 1.0ms (0.000ms) +inf% 0.000ms (0.000ms) +0.0%
Q2 11.0ms (6.0ms) +83.3% 4.5ms (4.5ms) +0.0% 8.0ms (6.0ms) +33.3%
Q3 19.0ms (12.0ms) +58.3% 7.0ms (12.0ms) -41.7% 3.0ms (22.0ms) -86.4%
Q4 19.0ms (12.0ms) +58.3% 4.5ms (12.0ms) -62.5% 3.0ms (26.5ms) -88.7%
Q5 61.0ms (61.0ms) +0.0% 41.0ms (48.5ms) -15.5% 4.0ms (26.0ms) -84.6%
Q6 217.0ms (111.0ms) +95.5% 70.5ms (110.5ms) -36.2% 19.5ms (82.5ms) -76.4%
Q7 1.0ms (1.0ms) +0.0% 1.0ms (0.500ms) +100.0% 0.000ms (0.000ms) +0.0%
Q8 8.0ms (5.0ms) +60.0% 5.0ms (6.0ms) -16.7% 10.5ms (6.0ms) +75.0%
Q9 90.0ms (83.0ms) +8.4% 66.5ms (80.0ms) -16.9% 6.0ms (42.5ms) -85.9%
Q10 90.0ms (83.0ms) +8.4% 65.5ms (83.5ms) -21.6% 7.0ms (62.0ms) -88.7%
Q11 54.0ms (24.0ms) +125.0% 35.0ms (24.0ms) +45.8% 86.5ms (34.5ms) +150.7%
Q12 58.0ms (34.0ms) +70.6% 36.0ms (28.5ms) +26.3% 87.0ms (42.0ms) +107.1%
Q13 233.0ms (119.0ms) +95.8% 86.0ms (115.0ms) -25.2% 79.0ms (88.0ms) -10.2%
Q14 443.0ms (153.0ms) +189.5% 120.5ms (146.5ms) -17.7% 66.5ms (112.0ms) -40.6%
Q15 341.0ms (105.0ms) +224.8% 87.5ms (108.5ms) -19.4% 76.5ms (102.5ms) -25.4%
Q16 91.0ms (103.0ms) -11.7% 81.0ms (93.0ms) -12.9% 5.0ms (26.0ms) -80.8%
Q17 456.0ms (210.0ms) +117.1% 213.5ms (206.0ms) +3.6% 63.5ms (111.5ms) -43.0%
Q18 458.0ms (202.0ms) +126.7% 206.5ms (210.0ms) -1.7% 64.5ms (114.0ms) -43.4%
Q19 826.0ms (362.0ms) +128.2% 338.5ms (397.5ms) -14.8% 97.0ms (153.5ms) -36.8%
Q20 16.0ms (13.0ms) +23.1% 4.5ms (11.5ms) -60.9% 10.0ms (23.5ms) -57.4%
Q21 1.75s (204.0ms) +755.9% 820.0ms (202.0ms) +305.9% 289.0ms (322.5ms) -10.4%
Q22 3.16s (205.0ms) +1441.0% 1.05s (199.5ms) +427.6% 179.0ms (397.5ms) -55.0%
Q23 6.92s (560.0ms) +1134.8% 2.67s (549.0ms) +385.4% 596.0ms (845.5ms) -29.5%
Q24 33.30s (995.0ms) +3247.0% 2.01s (993.5ms) +102.4% 613.5ms (2.69s) -77.2%
Q25 290.0ms (72.0ms) +302.8% 19.0ms (61.5ms) -69.1% 44.0ms (122.5ms) -64.1%
Q26 135.0ms (47.0ms) +187.2% 30.5ms (48.5ms) -37.1% 77.0ms (87.0ms) -11.5%
Q27 296.0ms (74.0ms) +300.0% 26.0ms (65.5ms) -60.3% 66.0ms (129.5ms) -49.0%
Q28 1.70s (252.0ms) +574.6% 1.51s (254.0ms) +495.1% 217.5ms (324.0ms) -32.9%
Q29 3.09s (986.0ms) +213.3% 1.76s (980.0ms) +79.5% 462.0ms (394.0ms) +17.3%
Q30 27.0ms (25.0ms) +8.0% 19.0ms (26.0ms) -26.9% 6.0ms (20.5ms) -70.7%
Q31 566.0ms (103.0ms) +449.5% 78.0ms (106.5ms) -26.8% 74.0ms (148.5ms) -50.2%
Q32 1.14s (108.0ms) +956.5% 292.0ms (103.5ms) +182.1% 112.0ms (151.5ms) -26.1%
Q33 314.0ms (310.0ms) +1.3% 269.0ms (287.0ms) -6.3% 9.5ms (71.5ms) -86.7%
Q34 2.30s (423.0ms) +443.5% 1.01s (413.5ms) +144.9% 167.0ms (323.0ms) -48.3%
Q35 2.71s (408.0ms) +564.0% 1.04s (417.5ms) +148.7% 162.5ms (321.5ms) -49.5%
Q36 90.0ms (80.0ms) +12.5% 76.0ms (84.5ms) -10.1% 5.0ms (24.0ms) -79.2%
Q37 1.23s (108.0ms) +1034.3% 185.0ms (111.0ms) +66.7% 29.5ms (86.5ms) -65.9%
Q38 84.0ms (50.0ms) +68.0% 35.0ms (50.0ms) -30.0% 24.0ms (28.0ms) -14.3%
Q39 1.19s (60.0ms) +1876.7% 60.0ms (56.0ms) +7.1% 18.0ms (83.5ms) -78.4%
Q40 1.50s (214.0ms) +602.3% 369.0ms (202.5ms) +82.2% 67.5ms (148.0ms) -54.4%
Q41 24.0ms (23.0ms) +4.3% 11.0ms (20.5ms) -46.3% 8.0ms (18.0ms) -55.6%
Q42 24.0ms (18.0ms) +33.3% 10.0ms (20.0ms) -50.0% 8.0ms (17.5ms) -54.3%
Q43 21.0ms (17.0ms) +23.5% 11.0ms (14.0ms) -21.4% 8.0ms (9.5ms) -15.8%

⚠️ LiquidCache is slower on 15 queries (warm)

  • Q1: warm +inf% (1.0ms vs 0.000ms)
  • Q28: warm +495.1% (1.51s vs 254.0ms)
  • Q22: warm +427.6% (1.05s vs 199.5ms)
  • Q23: warm +385.4% (2.67s vs 549.0ms)
  • Q21: warm +305.9% (820.0ms vs 202.0ms)
  • Q32: warm +182.1% (292.0ms vs 103.5ms)
  • Q35: warm +148.7% (1.04s vs 417.5ms)
  • Q34: warm +144.9% (1.01s vs 413.5ms)
  • Q24: warm +102.4% (2.01s vs 993.5ms)
  • Q7: warm +100.0% (1.0ms vs 0.500ms)
  • Q40: warm +82.2% (369.0ms vs 202.5ms)
  • Q29: warm +79.5% (1.76s vs 980.0ms)
  • Q37: warm +66.7% (185.0ms vs 111.0ms)
  • Q11: warm +45.8% (35.0ms vs 24.0ms)
  • Q12: warm +26.3% (36.0ms vs 28.5ms)

Compared Liquid vs DataFusionDefault on the same runner
Regressions: warm-time increases of at least 15%. Cold Time: first iteration; Warm Time: median of remaining iterations.

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