10 shipped = sources.shipped_drawings_dir()
11 lib = tmp_path /
"library"
12 (lib /
"blobs").mkdir(parents=
True)
13 he = shipped /
"copv_study_he.json"
15 changed = json.loads(he.read_text())
16 changed[
"nodes"][0][
"data"][
"label"] =
"COPV-PULLED"
17 (lib /
"blobs" /
"pulled.json").write_text(json.dumps(changed))
18 shutil.copy(he, lib /
"blobs" /
"same.json")
19 (lib /
"manifest.json").write_text(json.dumps([
20 {
"kind":
"diagram",
"name":
"stand from pid-designer",
"filename":
"pulled.json",
"source":
"pid-designer:local/x",
21 "imported_at":
"2026-10-01T10:00:00+00:00"},
22 {
"kind":
"diagram",
"name":
"copv_study_he",
"filename":
"same.json",
"source":
"shipped:copv_study_he.json",
23 "imported_at":
"2026-09-12T04:03:32+00:00"},
24 {
"kind":
"engine",
"name":
"an engine",
"filename":
"e.yaml"},
26 monkeypatch.setenv(
"LAYERX_FEEDTWIN_LIBRARY", str(lib))
27 sources._SHIPPED_CACHE.clear()
29 names = [d.name
for d
in listed]
30 assert "stand from pid-designer" in names
31 assert names.count(
"copv_study_he") == 1
32 pulled = next(d
for d
in listed
if d.name ==
"stand from pid-designer")
33 assert pulled.source.startswith(
"feed-twin library")