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;
9 rows
| requirement | criterion | criterion_text | task | task_status | repo | sha | committed_at | pr_number | pr_title | merged_at | review_state | reviewer | reviewed_at |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| REQ-CLICK-01 | AC-CLICK-101-1 | When PAGER contains extra arguments (for example `less -R`), the temporary-file pager passes those arguments to the pager command instead of dropping them. | TASK-CLICK-1011 | done | pallets/click | a6256bfb5971d5e58585fe7b6c656134e1ade5a4 | 2026-08-19T04:29:26Z | 3777 | Forward all user's parameters set in `PAGER` and improve flag detection | 2026-08-19T15:20:27Z | CHANGES_REQUESTED | Nina Kowalski | 2026-08-18T13:16:12Z |
| REQ-CLICK-01 | AC-CLICK-101-1 | When PAGER contains extra arguments (for example `less -R`), the temporary-file pager passes those arguments to the pager command instead of dropping them. | TASK-CLICK-1011 | done | pallets/click | a6256bfb5971d5e58585fe7b6c656134e1ade5a4 | 2026-08-19T04:29:26Z | 3777 | Forward all user's parameters set in `PAGER` and improve flag detection | 2026-08-19T15:20:27Z | APPROVED | Sofia Reyes | 2026-08-19T05:25:03Z |
| REQ-CLICK-01 | AC-CLICK-101-1 | When PAGER contains extra arguments (for example `less -R`), the temporary-file pager passes those arguments to the pager command instead of dropping them. | TASK-CLICK-1011 | done | pallets/click | a6256bfb5971d5e58585fe7b6c656134e1ade5a4 | 2026-08-19T04:29:26Z | 3777 | Forward all user's parameters set in `PAGER` and improve flag detection | 2026-08-19T15:20:27Z | APPROVED | Jamal Wright | 2026-08-19T12:13:23Z |
| REQ-CLICK-01 | AC-CLICK-101-2 | Raw-mode detection treats only real `-R`/`-r` short-option clusters or `--raw-control-chars` as a raw-mode request, not filenames or option values that happen t | TASK-CLICK-1011 | done | pallets/click | a6256bfb5971d5e58585fe7b6c656134e1ade5a4 | 2026-08-19T04:29:26Z | 3777 | Forward all user's parameters set in `PAGER` and improve flag detection | 2026-08-19T15:20:27Z | CHANGES_REQUESTED | Nina Kowalski | 2026-08-18T13:16:12Z |
| REQ-CLICK-01 | AC-CLICK-101-2 | Raw-mode detection treats only real `-R`/`-r` short-option clusters or `--raw-control-chars` as a raw-mode request, not filenames or option values that happen t | TASK-CLICK-1011 | done | pallets/click | a6256bfb5971d5e58585fe7b6c656134e1ade5a4 | 2026-08-19T04:29:26Z | 3777 | Forward all user's parameters set in `PAGER` and improve flag detection | 2026-08-19T15:20:27Z | APPROVED | Sofia Reyes | 2026-08-19T05:25:03Z |
| REQ-CLICK-01 | AC-CLICK-101-2 | Raw-mode detection treats only real `-R`/`-r` short-option clusters or `--raw-control-chars` as a raw-mode request, not filenames or option values that happen t | TASK-CLICK-1011 | done | pallets/click | a6256bfb5971d5e58585fe7b6c656134e1ade5a4 | 2026-08-19T04:29:26Z | 3777 | Forward all user's parameters set in `PAGER` and improve flag detection | 2026-08-19T15:20:27Z | APPROVED | Jamal Wright | 2026-08-19T12:13:23Z |
| REQ-CLICK-01 | AC-CLICK-101-3 | If an exception is raised while paging on Windows, the original exception is reported instead of a PermissionError from deleting the temporary file. | TASK-CLICK-1014 | done | pallets/click | 1f9cd54f686eb343cec714230ad825ce972739ab | 2026-08-15T19:24:13Z | 3764 | Fix error reporting on Windows when an error is raised in the pager | 2026-08-16T23:40:02Z | APPROVED | Jamal Wright | 2026-08-16T15:01:25Z |
| REQ-CLICK-01 | AC-CLICK-103-4 | Writing a `str` to `get_pager_file()` works on Windows instead of raising TypeError. | TASK-CLICK-1033 | done | pallets/click | a2ac5839f29f61cf7f3f229c67b97d07988e479b | 2026-08-13T09:19:47Z | 3739 | Changed `tempfile.NamedTemporaryFile` mode to `w` | 2026-08-14T18:51:51Z | COMMENTED | Jamal Wright | 2026-08-13T15:38:02Z |
| REQ-CLICK-01 | AC-CLICK-103-4 | Writing a `str` to `get_pager_file()` works on Windows instead of raising TypeError. | TASK-CLICK-1033 | done | pallets/click | a2ac5839f29f61cf7f3f229c67b97d07988e479b | 2026-08-13T09:19:47Z | 3739 | Changed `tempfile.NamedTemporaryFile` mode to `w` | 2026-08-14T18:51:51Z | APPROVED | Nina Kowalski | 2026-08-14T15:28:59Z |