
A compatibility dashboard should identify missing tests, including a device that has no row at all for a particular release. The expected matrix must exist before missing cells can be found. Each row is an individual test attempt. A failed attempt can still emit a duration. A missing duration means the measurement is unavailable; it does not assert that the device completed immediately.
Build the small reproduction
The fixture uses a fresh SQLite database. Its small size allows the result to be checked by hand before the query is applied to an export with thousands of rows. The unit of observation matters here because a query can execute cleanly and still answer a different editorial or operational question.
CREATE TABLE runs (
id INTEGER PRIMARY KEY,
build TEXT,
device TEXT,
attempt INTEGER,
ms INTEGER,
passed INTEGER
);
INSERT INTO runs VALUES
(1, 'r1', 'lite', 1, 800, 1),
(2, 'r1', 'pro', 1, 610, 1),
(3, 'r2', 'lite', 1, 1220, 0),
(4, 'r2', 'lite', 2, 880, 1),
(5, 'r2', 'pro', 1, 640, 1),
(6, 'r3', 'lite', 1, NULL, 0);Run the query and inspect its grain
WITH builds AS (SELECT DISTINCT build
FROM runs),devices AS (SELECT DISTINCT device
FROM runs) SELECT b.build,d.device
FROM builds b
CROSS JOIN devices d
WHERE NOT EXISTS(SELECT 1
FROM runs r
WHERE r.build=b.build AND r.device=d.device)
ORDER BY b.build,d.device;| build | device |
|---|---|
| r3 | pro |
This small grid uses observed device names. A production release matrix should come from a versioned list of supported devices.
What changes with one more record?
Append this single row to the same fixture and rerun the query. Its named fields are id = 7, build = r3, device = pro, attempt = 1, ms = 710, passed = 1. Keep the other rows intact so a comparison isolates the effect of this one insert.
INSERT INTO runs VALUES (7, 'r3', 'pro', 1, 710, 1);The original query returned 1 row. After the insert it returns 0. The former row ["r3", "pro"] no longer appears in exactly that form.
Before exporting the result, document what one displayed row represents and which fields decide its order. Look for the same shape of input in an anonymized sample from the application. A query validated only against an empty development database cannot show what happens when a record is missing, repeated or tied with another record.
SQLite reference for coverage grid · SQLite SQL syntax reference
Sources and further reading
Cover photograph: Size comparison of SD card, microSD card, and dime by Nashucks. CC0. Cropped and typeset for this cover. The photograph illustrates the topic.
