In the qa_testlistinstance table, there is currently only a unique constraint on the primary key. So there is nothing preventing an API client from pushing the same results multiple times needlessly.
I have been working around that by checking for an existing TestListInstance by filtering by UTC and work_started, and not posting if a TestListInstance is found. It’s not ideal, since work_started is an editable column, someone could change it and there is still potential for collisions.
Thoughts: Do you think it would be a good idea to add a unique column, say uid, that the client app could populate to uniquely identify test results once? Or create a unique index of utc_id and work_started since, in theory, no one can perform the same testlist on the same unit at the same time?