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

  1. 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 its Bug: footer.

    git log -S'CausesFosterParenting' --oneline -- third_party/blink/renderer/core/html/parser/
    
  2. 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.gni
    

    A build failure with a date attached is a decision; without one it is a mystery.

  3. Survive a rename. Use git log --follow on a layout file to see it across the ng_* rename. Confirm for yourself that any source using ng_ prefixes is stale.

  4. Read the layering. Open third_party/blink/renderer/DEPS and one core/*/DEPS. Find one include rule you would not have predicted, and one documented exception with a justifying comment.

  5. 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 DEPS exception found and its compromise stated
  • Findings logged in the shared learning log