Skip to content
quarry Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 35b258fc183095d6ef5d94ac464a41ca8901ba3a06fe3321a80413e7121c1157
Ticket: 0eafaa19846ca7b004df9d5965b2f3d69dde8dda
Schema-driven ticket form: author every field a tracker defines
User & Date: dmestas on 2026-08-18 21:07:16
Changes

  1. Untracked field cmimetype: "text/x-markdown"
  2. comment changed to:
    quarry reads any ticket field but can only WRITE four: title, status, resolution, comment. Across the corpus every repository defines more — `type`, `severity`, `priority`, `subsystem`, `foundin` are in all five audited, plus `assignee`, `closer`, `submitter`, `closedate` in some. A ticket opened through quarry cannot carry them, and one edited through quarry cannot change them.
    
    That makes quarry a second-class client of its own stores: fossil can express the tracker fully and we cannot.
    
    ## Why the form is fixed today
    
    `ticket.new` and `ticket.set` take a struct with named fields. Fossil ticket schemas are per-repository and user-defined (`/tktsetup_tab` edits the TICKET table SQL), so no fixed struct can match every tracker.
    
    ## Shape
    
    1. **Discover the schema.** quarry has no access to fossil TICKET table DDL — that is repository config, not an artifact. But the field NAMES are observable: `SELECT DISTINCT name FROM ticket_field` is exactly the set the tracker uses, and it is already indexed. Derive the form from what the corpus contains rather than from a schema we cannot see.
    
    2. **Ops take a field map.** `ticket.new` and `ticket.set` accept `fields: {name: value}` alongside the named ones, validated against the discovered set so a typo cannot invent a column that no report will ever surface. Reject unknown names rather than writing them: a J card with a misspelled key is silently ignored by fossil, which is a write that appears to succeed and does nothing.
    
    3. **Ordering and widgets.** Fossil orders and renders fields through TH1 templates. quarry should infer instead: a field whose observed values are few and repeating is a select, one with many distinct values is a text input, one matching a date shape is a date. Inference is checkable against the corpus and needs no per-repository config.
    
    4. **Append vs replace.** The write path must be able to emit `+field` for append, which the fold already understands on read. Today every write replaces.
    
    ## Deliberately not TH1
    
    Fossil customisation is a scripting language embedded in repository config. Adopting it would put an interpreter in quarry render path to solve a problem field discovery plus widget inference solves without one — and it would make every ticket page execute repository-supplied code, which is a much larger security surface than rendering repository-supplied markup.
    
    ## Depends on
    
    Nothing hard. Should land after reports, because reports make the extra fields worth setting.
    
  3. severity changed to: "Important"
  4. status changed to: "Open"
  5. title changed to:
    Schema-driven ticket form: author every field a tracker defines
    
  6. type changed to: "Feature_Request"