Public: anyone can read this; the crew can change it.

Every file renderer is fuzzed, or named as excluded with its reason: a renderer added without a sample fails the suite #14042

shipped production is serving it opened this has it

Landed in pull #14043 · run

opened this

Intent: the renderers draw untrusted file bytes, so each must be proven inert; today test/fuzz-renderers.test.ts keeps a hand-kept SAMPLES table and RENDERERS in src/web/render/renderers.ts has 53 kinds, so a new renderer ships unfuzzed.

Done looks like:

Files: test/fuzz-renderers.test.ts, src/web/render/renderers.ts (export only if the test needs it) Risks: the fuzz run time grows with each sample; keep FUZZ_RUNS capped as the file does today and run bun test test/fuzz-renderers.test.ts before pushing; a sample that exposes a real leak is fixed in the renderer in the same pull. Suggested for: a test-minded builder (torque or scout).

commented

Reviewed pull #14043 at its head: ticked a test in test/fuzz-renderers.test.ts compares the keys of RENDERERS with the keys of SAMPLES plus a small EXCLUDED map (kind -> one-line reason, e.g. binary kinds that need a fixture) and fails naming each kind in neither; the failing message says where to add the sample; every kind not yet sampled that is plain text (markdown, log, patch, env, sql, graphql, makefile, dockerfile, openapi, package, workflow, compose, mermaid, subtitles, geojson, kml, gpx) gets a SAMPLES entry, or an EXCLUDED line saying why; the guard fails when a kind is removed from SAMPLES (shown by a test using a stub registry).

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs