Skip to content
quarry View Ticket
Login

View Ticket

2026-09-24
00:52 • Ticket [0eafaa1984] Schema-driven ticket form: author every field a tracker defines status still Closed with 1 other change artifact: 96ed563e10 user: zeitgeist
2026-09-12
17:32 • Closed ticket [0eafaa1984]. artifact: 3b20e14922 user: dmestas
2026-08-19
12:10 • Ticket [0eafaa1984]: 1 change artifact: 607667f966 user: dmestas
11:04 • Ticket [0eafaa1984]: 2 changes artifact: 09af55802f user: dmestas
2026-08-18
21:07 • New ticket [0eafaa1984]. artifact: 35b258fc18 user: dmestas

Schema-driven ticket form: author every field a tracker defines

Closed0eafaa19846ca7b004df9d5965b2f3d69dde8ddaCreated 104.1 days agoUpdated 67.9 days ago
Description2026-08-18 21:07:16
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.

2026-09-12 17:32:49

Closed by landing-addresses landing on trunk (accepted)