This is a submission for DEV's Summer Bug Smash: Clear the Lineup powered by Sentry.

Written with AI assistance (Claude). The measurements, negative controls and verification below are real and reproducible — every number was taken from the runs described.

Project Overview

Typst is a markup-based typesetting system written in Rust — think LaTeX, but with a sane language and compile times measured in milliseconds. You write = Heading, it produces a PDF.

The interesting part for this challenge is how Typst handles introspection. Documents can ask questions about their own finished layout: "what page is this heading on?", "how many figures are there?", "give me every <glossary> label". That's circular by nature — the answer depends on the layout, and the layout depends on the answer. Typst resolves it by compiling the document repeatedly (up to 5 times) until the answers stop changing.