Skip to content
quarry History Of Ticket aa28c880b6097f5719e25e1af188244e71507c38
Login

History Of Ticket aa28c880b6097f5719e25e1af188244e71507c38

Artifacts Associated With Ticket aa28c880b6097f5719e25e1af188244e71507c38

  1. Ticket change [e2c70559da] (rid 922) by dmestas on 2026-08-18 21:06:50:

    1. Untracked field cmimetype: "text/x-markdown"
    2. 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.
      
    3. severity initialized to: "Important"
    4. status initialized to: "Open"
    5. title initialized to:
      Ticket reports: saved, named queries over the tracker
      
    6. type initialized to: "Feature_Request"
  2. Ticket change [ddca166126] (rid 1064) by dmestas on 2026-08-19 11:04:28:

    1. priority changed to: "Low"
    2. type changed to: "Feature_Request"
  3. Ticket change [0db76d007b] (rid 1115) by dmestas on 2026-08-19 12:10:43:

    1. subsystem changed to: "tickets"
  4. Ticket change [d459d7bcda] (rid 2108) by ai-local on 2026-08-23 10:22:03:

    1. 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.
      
    2. mimetype: "text/x-markdown"
    3. resolution changed to: "Fixed"
    4. status changed to: "Closed"
  5. Ticket change [62494903f9] (rid 12465) by zeitgeist on 2026-09-24 00:52:56:

    1. Untracked field number: "30"