You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(models): a second dataset's first model upload 500s — matching_models' unique key is org-scoped, not dataset-scoped #1444
The org's default dataset already had default v1. The version allocator numbers per dataset, but entities/matching_model/entity.yaml declares the unique index on (org_id, name, version). So every dataset after an org's first collides on its first upload under the default name. That covers the starter seed, a train, and any upload that omits name. Uploading under another name works around it.
Check the same scoping in activation and the active read: one active version per name must mean per (dataset, name), or activating a model in one dataset could archive another dataset's.
Done when:
the key and the allocator agree on (org, dataset, name, version);
a second dataset can seed, train and upload under default;
activating in one dataset leaves the other's active model alone;
a pg test proves all three;
a 500 can't come from this path (a conflict is a 409, never a raw db error).
Activity
fix(models): model versions are keyed per dataset, so a second datase…