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:
- It runs
git pull --ff-onlywhen the dataset is a git repository. - It checks each bundle this graph has not seen (the
bundlestable) against D47i's checks 1–3, and leaves out any that fail, naming them. - 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.
- It runs
kg dupesover entities that arrived merged. With--stageit proposes those pairs assame_asmerges for a person to confirm. Staged arrivals are compared at review, wherekg reviewflags 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.