bi-01 step 03 — Archaeology and layering
Goal
Use history and build metadata to answer why, not just what — the two questions source alone cannot answer.
Tasks
-
Date a behaviour. Use
git log -S'<exact string>'to find the commit that introduced a special case you do not understand. Read its message and itsBug:footer.git log -S'CausesFosterParenting' --oneline -- third_party/blink/renderer/core/html/parser/ -
Date a requirement. Find the commit that raised Chromium's macOS SDK floor:
git log -1 --format='%h %ad %s' --date=short \ -S'mac_sdk_official_version = "26.5"' -- build/config/mac/mac_sdk.gniA build failure with a date attached is a decision; without one it is a mystery.
-
Survive a rename. Use
git log --followon a layout file to see it across theng_*rename. Confirm for yourself that any source usingng_prefixes is stale. -
Read the layering. Open
third_party/blink/renderer/DEPSand onecore/*/DEPS. Find one include rule you would not have predicted, and one documented exception with a justifying comment. -
Read the build graph. For a file you have studied:
gn refs out/Default <file> # which targets contain it gn path out/Default //A //B # why does A depend on B(If the build is blocked, do steps 1–4; they need only the checkout.)
Done when
- One puzzling special case explained from its CL message
- One toolchain/behaviour requirement dated exactly
-
One
DEPSexception found and its compromise stated - Findings logged in the shared learning log