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

4. Requirements changed after the code for one of their criteria merged.

SQL
-- 4. Requirements changed after the code for one of their criteria merged.
-- Reported per (requirement, criterion): those criteria were built against an older
-- version of the requirement and need re-checking.
WITH criterion_code AS (
    SELECT tc.criterion_id, MAX(pr.merged_at) AS last_merge
    FROM task_criteria tc
    JOIN commit_tasks ct ON ct.task_id = tc.task_id
    JOIN pull_request_commits prc ON prc.commit_id = ct.commit_id
    JOIN pull_requests pr ON pr.id = prc.pull_request_id
    WHERE pr.merged_at IS NOT NULL
    GROUP BY tc.criterion_id
)
SELECT r.key AS requirement,
       r.title,
       r.version,
       a.key AS criterion,
       cc.last_merge AS code_merged_at,
       r.updated_at AS requirement_changed_at,
       rev.change_note
FROM requirements r
JOIN requirement_criteria rc ON rc.requirement_id = r.id
JOIN acceptance_criteria a ON a.id = rc.criterion_id
JOIN criterion_code cc ON cc.criterion_id = rc.criterion_id
LEFT JOIN requirement_revisions rev ON rev.requirement_id = r.id AND rev.version = r.version
WHERE r.updated_at > cc.last_merge
ORDER BY r.updated_at DESC, r.key, a.key;

12 rows

requirementtitleversioncriterioncode_merged_atrequirement_changed_atchange_note
REQ-CLICK-01Terminal output respects user configuration2AC-CLICK-101-12026-08-19T15:20:27Z2026-09-10T16:00:00ZAdded LESS handling and encoding after a customer report.
REQ-CLICK-01Terminal output respects user configuration2AC-CLICK-101-22026-08-19T15:20:27Z2026-09-10T16:00:00ZAdded LESS handling and encoding after a customer report.
REQ-CLICK-01Terminal output respects user configuration2AC-CLICK-101-32026-08-16T23:40:02Z2026-09-10T16:00:00ZAdded LESS handling and encoding after a customer report.
REQ-CLICK-01Terminal output respects user configuration2AC-CLICK-103-42026-08-14T18:51:51Z2026-09-10T16:00:00ZAdded LESS handling and encoding after a customer report.
REQ-REQ-02Public type hints describe what callers may pass3AC-REQ-201-12026-06-04T21:43:21Z2026-06-20T16:00:00ZExtended to attributes after the 2.33 typing review.
REQ-REQ-02Public type hints describe what callers may pass3AC-REQ-202-12026-05-14T16:16:25Z2026-06-20T16:00:00ZExtended to attributes after the 2.33 typing review.
REQ-REQ-02Public type hints describe what callers may pass3AC-REQ-202-22026-05-13T14:42:42Z2026-06-20T16:00:00ZExtended to attributes after the 2.33 typing review.
REQ-HTTPX-01TLS configuration has one obvious way2AC-HTTPX-101-12024-11-12T11:31:42Z2025-01-10T16:00:00ZError type tightened to TypeError to match Python conventions for a wrong argument type.
REQ-HTTPX-01TLS configuration has one obvious way2AC-HTTPX-101-22024-11-28T11:46:59Z2025-01-10T16:00:00ZError type tightened to TypeError to match Python conventions for a wrong argument type.
REQ-HTTPX-01TLS configuration has one obvious way2AC-HTTPX-101-32024-11-28T11:46:59Z2025-01-10T16:00:00ZError type tightened to TypeError to match Python conventions for a wrong argument type.
REQ-HTTPX-01TLS configuration has one obvious way2AC-HTTPX-101-42024-11-15T10:17:42Z2025-01-10T16:00:00ZError type tightened to TypeError to match Python conventions for a wrong argument type.
REQ-HTTPX-01TLS configuration has one obvious way2AC-HTTPX-101-52024-12-04T11:29:09Z2025-01-10T16:00:00ZError type tightened to TypeError to match Python conventions for a wrong argument type.