Skip to content

D47j — kg pull loads the dataset into the working graph, and keeps what is local

  • Status: Accepted — implements D47 (part 3); completes D47c's open question on reconciling local work
  • Date: 2026-09-23
  • Origin: slice 23 build
  • Area: writes

Decision

kg pull [--dataset D] [--stage] [--no-git] does four things:

  1. It runs git pull --ff-only when the dataset is a git repository.
  2. It checks each bundle this graph has not seen (the bundles table) against D47i's checks 1–3, and leaves out any that fail, naming them.
  3. It loads the rest into the working graph through the same loader rebuild uses. A row already present is left alone, sources are matched by URL, and D47h decides whose reviews count. Kept-local rows (D47f), scopes and sweeps, and work not yet exported are untouched.
  4. It runs kg dupes over entities that arrived merged. With --stage it proposes those pairs as same_as merges for a person to confirm. Staged arrivals are compared at review, where kg review flags a new entity that looks like another.

A second pull with nothing new does nothing. The contributor's own bundles are recognised and only recorded.

Why

Rebuild makes a new file (D47c), which is right for a fresh clone and for CI. It is wrong for a person's working graph: that graph holds things the dataset never will, such as rows kept local, scopes, and a sweep in progress. Pulling has to add, never replace.

Alternatives

  • Rebuild, then re-apply local work. "Local work" is several different things (unexported changesets, kept-local rows, working tables), and any of them could be forgotten.