Dev Tracking Data Compilersqlite

Saved queries

The six questions this database is built to answer. Each runs unchanged on SQLite and Postgres.

1. Acceptance criteria with no linked commits or no linked tests2. Commits not tied to any task3. Cycle time4. Requirements changed after the code for one of their criteria merged5. Review turnaround by reviewer6. Full trace for one requirement

6. Full trace for one requirement: requirement -> criteria -> tasks -> commits -> PRs -> reviews.

REQ-CLICK-01 REQ-CLICK-02 REQ-CLICK-03 REQ-HTTPX-01 REQ-HTTPX-02 REQ-HTTPX-03 REQ-REQ-01 REQ-REQ-02 REQ-REQ-03 SUB-CLI-01 SUB-HTTP-01 SYS-01
SQL
-- 6. Full trace for one requirement: requirement -> criteria -> tasks -> commits -> PRs -> reviews.
-- LEFT JOINs keep the gaps visible: a criterion with no task shows NULLs to the right.
SELECT r.key AS requirement,
       a.key AS criterion,
       a.text AS criterion_text,
       t.key AS task,
       t.status AS task_status,
       c.repo,
       c.sha,
       c.committed_at,
       pr.number AS pr_number,
       pr.title AS pr_title,
       pr.merged_at,
       rv.state AS review_state,
       rp.display_name AS reviewer,
       rv.submitted_at AS reviewed_at
FROM requirements r
JOIN requirement_criteria rc ON rc.requirement_id = r.id
JOIN acceptance_criteria a ON a.id = rc.criterion_id
LEFT JOIN task_criteria tc ON tc.criterion_id = a.id
LEFT JOIN tasks t ON t.id = tc.task_id
LEFT JOIN commit_tasks ct ON ct.task_id = t.id
LEFT JOIN commits c ON c.id = ct.commit_id
LEFT JOIN pull_request_commits prc ON prc.commit_id = c.id
LEFT JOIN pull_requests pr ON pr.id = prc.pull_request_id
LEFT JOIN reviews rv ON rv.pull_request_id = pr.id
LEFT JOIN people rp ON rp.id = rv.reviewer_id
WHERE r.key = ?
ORDER BY a.key, t.key, c.committed_at, rv.submitted_at;

5 rows

requirementcriterioncriterion_texttasktask_statusreposhacommitted_atpr_numberpr_titlemerged_atreview_statereviewerreviewed_at
REQ-REQ-02AC-REQ-201-1`Request.hooks` has a type annotation.TASK-REQ-2014donepsf/requests1190afd14fca74292946d62c4c8169880a47ff672026-06-04T21:43:21Z7498Add type annotation for `Request.hooks`2026-06-04T21:43:21ZAPPROVEDNina Kowalski2026-06-04T15:44:37Z
REQ-REQ-02AC-REQ-202-1`Request.headers` is typed as a read-only `Mapping[str, str | bytes]`.TASK-REQ-2021donepsf/requestse511bc72777a94c45d004e010c597925092e1efe2026-05-13T19:16:50Z7431Fix mutability issues with headers input types2026-05-13T19:16:50ZAPPROVEDJamal Wright2026-05-13T11:18:52Z
REQ-REQ-02AC-REQ-202-1`Request.headers` is typed as a read-only `Mapping[str, str | bytes]`.TASK-REQ-2022donepsf/requests84d10f0be83e8f6aeca8a05230c52216431c4d0b2026-05-14T16:16:25Z7441Move Request.headers back to Mapping2026-05-14T16:16:25ZAPPROVEDNina Kowalski2026-05-14T12:35:43Z
REQ-REQ-02AC-REQ-202-2`Response.reason` is typed as `str`.TASK-REQ-2024donepsf/requests2144213c307691710c9d665700860fc4993c30352026-05-13T14:42:42Z7437Constrain Response.reason to str2026-05-13T14:42:42ZCHANGES_REQUESTEDSofia Reyes2026-05-13T00:31:56Z
REQ-REQ-02AC-REQ-202-2`Response.reason` is typed as `str`.TASK-REQ-2024donepsf/requests2144213c307691710c9d665700860fc4993c30352026-05-13T14:42:42Z7437Constrain Response.reason to str2026-05-13T14:42:42ZAPPROVEDJamal Wright2026-05-13T11:53:37Z