Artifacts Associated With Ticket aa28c880b6097f5719e25e1af188244e71507c38
Ticket change [e2c70559da] (rid 922) by dmestas on 2026-08-18 21:06:50:
- Untracked field cmimetype: "text/x-markdown"
- comment initialized to:
The largest gap against fossil. A tracker of any size is unusable with one list: tk holds 5,809 tickets, sqlite 1,637. What people actually want is "my open tickets", "severity>=Critical in subsystem X", "closed since the last release". ## How fossil does it A `reportfmt` table in the repository holds saved reports: `rn` (integer key), `title`, `owner`, `sqlcode`, `cols`, `mtime`, and a `jx` JSON column carrying a `tag` for stable naming. Surfaces are `/reportlist`, `/rptview`, `/rptnew`, `/rptedit`, `/rptsql`. A report is addressable three ways — by `rn`, by title, and by `jx->>tag`. The report body is literal SQL against the TICKET/TICKETCHNG tables. Column naming drives presentation: a column named `bgcolor` colours the row rather than being displayed. ## What quarry must NOT copy Storing user-authored SQL and executing it. Fossil can do this because its reports are admin-authored config on a repository the admin already controls. quarry serves 23 stores from one process with one index handle each; arbitrary SQL from a form is a read-anything primitive across a shared surface, and `ATTACH`, `pragma` and `load_extension` are all reachable from a SELECT. ## Recommended shape A **structured filter**, not SQL: - Predicates over indexed ticket fields: field, operator (is / is-not / contains / before / after), value. AND-ed, which covers essentially every real report. - Sort field and direction. - Persisted per repository in the forge OLTP (`ticket_report`: repo, tag, title, owner, spec JSON, mtime), NOT in the index — a report is authored state, not derived, so 0001 §11 says it may not live somewhere wipeable. - Compiled to parameterised SQL by quarry. The user chooses fields and operators from what the schema actually has; they never supply syntax. This is strictly less expressive than fossil and covers the real cases. If a genuine gap appears later, the answer is more operators, not an SQL box. ## Surfaces - `report.list`, `report.get`, `report.save`, `report.delete` ops; the query itself is `ticket.list` with a spec. - `/r/{repo}/ticket?report=TAG`, and a report picker beside the open/all toggle. - Report authoring gated at write on the repository, matching fossil admin-only reports. ## Depends on Nothing. This is pure read over the folded `ticket` and `ticket_field` tables that already exist. `ticket_field` will want an index on `(name, value)` for predicate pushdown; measure before adding it. - severity initialized to: "Important"
- status initialized to: "Open"
- title initialized to:
Ticket reports: saved, named queries over the tracker
- type initialized to: "Feature_Request"
Ticket change [ddca166126] (rid 1064) by dmestas on 2026-08-19 11:04:28:
- priority changed to: "Low"
- type changed to: "Feature_Request"
Ticket change [0db76d007b] (rid 1115) by dmestas on 2026-08-19 12:10:43:
- subsystem changed to: "tickets"
Ticket change [d459d7bcda] (rid 2108) by ai-local on 2026-08-23 10:22:03:
- icomment:
Shipped as saved views, without the part this ticket said not to copy: no user-authored SQL. A saved view is a NAME for a report URL the tracker can already produce, stored per account and per listing, and it appears in the rail with a way to forget it. Works on a repository tracker and on the cross-repository /tickets listing.
- mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [62494903f9] (rid 12465) by zeitgeist on 2026-09-24 00:52:56:
- Untracked field number: "30"