Context: sync_dataset_to_seek reuses an Investigation a previous push created by looking it up by title within the project (find_investigation_id_by_title). The lookup reads GET /investigations, whose index rows carry only id, attributes.title and links - no relationships block - so _relates_to_project(row, project_id) is always false and the lookup never matches. Verified on the local instance: every re-push of the same dataset created a new Investigation (four copies of 'metaseed live-test' per test run before teardown, six 'CropXR phenotyping example' trees over six probe runs).
Goal: pushing the same dataset twice reuses what the first push created, as the docstring and the docs already promise.
Scope: resolve project membership from the item (GET /investigations/{id}) for title matches only, or filter server-side; cover with a unit test whose fake index omits relationships; extend the live round-trip test to push twice and assert reused is non-empty and no second Investigation exists.
Acceptance criteria: a second push of the live test dataset reports reused Investigation/Study/Assays/Samples and creates nothing new.
Context: sync_dataset_to_seek reuses an Investigation a previous push created by looking it up by title within the project (find_investigation_id_by_title). The lookup reads GET /investigations, whose index rows carry only id, attributes.title and links - no relationships block - so _relates_to_project(row, project_id) is always false and the lookup never matches. Verified on the local instance: every re-push of the same dataset created a new Investigation (four copies of 'metaseed live-test' per test run before teardown, six 'CropXR phenotyping example' trees over six probe runs).
Goal: pushing the same dataset twice reuses what the first push created, as the docstring and the docs already promise.
Scope: resolve project membership from the item (GET /investigations/{id}) for title matches only, or filter server-side; cover with a unit test whose fake index omits relationships; extend the live round-trip test to push twice and assert reused is non-empty and no second Investigation exists.
Acceptance criteria: a second push of the live test dataset reports reused Investigation/Study/Assays/Samples and creates nothing new.