latch
2cbf5ffb - fix: match the queried image before skipping the create

Commit
94 days ago
fix: match the queried image before skipping the create `is_recorded_in_db` returned the truthiness of the node list rather than checking that a returned node was the image in question. The filter is only correct if the server honours all three fields; one that ignored an unrecognised filter field would report every image in the workspace as a match, `record_in_db` would skip the create, and the upload would exit 0 with the image published and no record of it - the one silent failure the exit codes exist to prevent. Verified against the live API that all three fields are honoured, so this is not reachable today. Matching client-side makes the check independent of filter semantics at no cost. Correct the recovery advice: re-running `upload` pushes again before it records, so it is not a retry of the record. State what is broken instead. Replace the filter test, which passed against a query that filtered on the workspace alone, with tests that feed a non-matching node.
Author
Committer
Parents
Loading