Get startedExercises
Exercise 03: bump a pin in a scratch branch
Page actions
- View as Markdown (opens in a new tab)
- Ask ChatGPT (opens in a new tab)
- Ask Claude (opens in a new tab)
ChatGPT and Claude are third-party services. The link gives them this page's public address and a short instruction. This site records nothing.
Preview: the published page may be older or missing.
Change dataset.lock.json to a wrong hash in a scratch branch, watch make dataset-check and the fetcher refuse, restore it — what a dataset bump is and what the integrity gate proves.
https://docs.gurbanisoul.com/exercises/03-bump-a-pin/
Goal. See exactly what a dataset bump is and what refuses a bad one. Needs. the local setup. 30 minutes. Nothing you do here can change the served data.
1. Read the pin
cat dataset.lock.jsonmake dataset-checkExpected: the lock’s commit, sha256 and size; then two green lines — the pin agrees with
contract/_meta.json, and sggs-data publishes that object at the pinned commit.
2. Break it on purpose
git switch -c scratch/exercise-03 integrationpython3 - <<'EOF2'import json, pathlibp = pathlib.Path('dataset.lock.json'); d = json.loads(p.read_text())d['database']['sha256'] = '0' * 64 # a hash sggs-data never publishedp.write_text(json.dumps(d, indent=2) + '\n')EOF2make dataset-check ; echo "exit=$?"Expected: --check-repo fails first — the lock and contract/_meta.json no longer name the same
object — with a non-zero exit. Now try to install it:
python3 scripts/data/fetch_dataset.py ; echo "exit=$?"Expected: the download is refused or the verification fails; db/sggs.sqlite on disk is untouched
(the install is atomic — check its sha256 with shasum -a 256 db/sggs.sqlite before and after).
3. Restore
git switch integration && git branch -D scratch/exercise-03make dataset-check4. What a real bump looks like
Read the dataset pin: a real bump changes the commit and the hash
and the size to values sggs-data published, regenerates the contract with make contract, and
goes through a pull request where the integrity check repeats what you just saw — plus opens the
installed database and counts its lines and Angs.
Self-check
Sri Guru Granth Sahib Ji — Knowledge Base wiki. Generated from commit c3d9360. Updated 25 September 2026. This copy may be out of date; the page is at https://docs.gurbanisoul.com/exercises/03-bump-a-pin/