Skip to content
quarry Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8e014fc972a82a39e61df36db44867744ec890c15da10eb34e8487901f971e4f
Ticket: 8a2f7bf96d312c610bf3c34798329df1c17ef30d
Repository avatars: let a project upload an icon
User & Date: zeitgeist on 2026-09-16 05:40:52
Changes

  1. icomment:
    Built, 2026-09-16, with a different answer to the storage question than
    either candidate above - and teams got it too, at dmestas's ask.
    
    WHERE THE BYTES LIVE: the forge's own bucket (oltp.ForgeBucket), which
    did not exist when this was written. It arrived so attachments would
    work on a forge whose users have no storage account of their own, and
    an uploaded mark is one more small object in a bucket the operator
    already runs and already pays for.
    
    That respects RFC 0001 ยง11 the same way candidate A does - the image is
    not derived, so it is not in the index - without putting binary in the
    OLTP, which is a poor home for bytes served on every listing. Candidate
    B stays blocked on unversioned files and is still the nicer answer the
    day that lands.
    
    The privacy objection RFC 0018 raised against avatars is kept by
    construction rather than waived: the FORGE serves the bytes and the
    page never links the bucket. An img pointed at R2 would have broken
    "the interface loads nothing from another host" for every reader of
    every page a mark appears on.
    
    What shipped:
    - one table keyed by (kind, name), because a mark is a mark; the kind
      is half the key since a team and a repository may hold the same name
    - avatar.set / avatar.get / avatar.clear, gated on `a` on the
      repository or ownership of the team - the same authority that
      already decides the name and description
    - the type read from the BYTES, never from what the upload claimed;
      SVG refused, since it is a document that can carry script and would
      be served from our own origin; RIFF checked for the WEBP form
    - the digest in the KEY and in the URL, so replacing a mark writes a
      new object and arrives at a new address; served immutable with a 304
      on revalidation
    - an Image section on both settings pages; with no storage bound it
      says WHY rather than offering a control that refuses
    - 512 KiB, and no re-encode: the ticket suggested stripping metadata
      server-side, which needs an image decoder in the request path. Worth
      its own ticket if wanted - the cap and the type check are what keep
      this safe, not the re-encode.
    
    RFC 0018's "An uploaded avatar" is struck through with the reversal
    recorded underneath; that section asked to read as a decision.
    
    Landed across 2daaaf849fee, 8ce04ede106d and b31bcd1ad97c.
    
    NOT closed yet: nothing is bound at /fleet/settings on zeitforge, so
    no image has been uploaded end to end. Binding also could not have
    worked until today - BindBucket refused the empty name the forge's own
    binding uses, which is in b31bcd1ad97c.
    
  2. mimetype: "text/x-markdown"