Skip to content
quarry Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7c7490daf4607fa3b29e7fedbb258d40c49f0826636332cb08ccb8357b71dfa9
Ticket: 2276e92f75d0c2a472fb1c087422132f80a5c88f
Server errors: capture in a ring, surface on /fleet, notify on first sighting
User & Date: dmestas on 2026-08-19 18:24:29
Changes

  1. Untracked field cmimetype: "text/x-markdown"
  2. comment changed to:
    Today's state: every 500 writes its real error to stderr and shows the
    reader "internal error". Correct hygiene, but stderr is where errors go
    to be unread — on the dev box it is a file in /tmp interleaved with
    ingest chatter. Every 500 found today (the fleet template error, the
    fts corruption) was found by a HUMAN hitting the page and reporting a
    screenshot. The fleet page says "ok" while the web layer burns.
    
    ## Design, in quarry's own idioms
    
    **1. Capture: one seam.** Both funnels already exist — web's fail()
    default case and the API router's 500 branch — plus a new recovery
    middleware for panics (today a handler panic is Go's default: stack to
    stderr, connection dropped, no record). All three report into an
    in-process error journal: a bounded ring (say 500 entries) of
    {first/last seen, count, surface, path, message}, DEDUPED BY MESSAGE
    so a hot loop is one row with a count, not a flood. Alongside it,
    fossil's exact mechanism for durability: an --errorlog file, appended
    plainly, rotated by size. No new storage tier; the ring is process
    state and honest about it.
    
    **2. See: the fleet page.** An Errors panel beside ingest health —
    same badge idiom (red count when nonzero), rows newest-first with
    count and last-seen, admin-gated like the rest of /fleet. The health
    JSON gains errors{total, distinct, lastAt} so the API sees what the
    page sees.
    
    **3. React: the notify plane.** fireNotify already reaches the
    companion; emit quarry-error on FIRST SIGHTING of a new error
    signature (dedup makes this cheap), never per occurrence — an alert
    channel that repeats itself gets muted. Webhook subscribers get the
    same event.
    
    **4. Ticket: a hand on the trigger, not an automaton.** Auto-filing
    tickets from errors is how a tracker fills with 40 duplicates of one
    bad deploy. Instead: each row on the Errors panel carries "file
    ticket", prefilled (title = the message, body = path/surface/count/
    first-last seen, subsystem guessed from the surface). One click, human
    judgment, no noise.
    
    **Non-goals:** external observability vendors (the forge should not
    need one to see itself); stack traces in the ring (the message and
    path locate the code; traces stay in the errorlog).
    
    ## Order
    
    1. Recovery middleware + ring + the two funnel hookups (small, the
       value core).
    2. Fleet panel + health JSON.
    3. notify event.
    4. File-ticket button.
    
  3. priority changed to: "High"
  4. severity changed to: "Important"
  5. status changed to: "Open"
  6. subsystem changed to: "web"
  7. title changed to:
    Server errors: capture in a ring, surface on /fleet, notify on first sighting
    
  8. type changed to: "Feature_Request"