Skip to content

Write small typed stubs defining your API. STITCH++ automatically fuzzes valid combinations of endpoints, generates arguments, and finds crashes, exceptions, and failed checks.

Are you an agent? Read this instead:https://hgarrereyn.github.io/STITCHplusplus/agents/overview.raw.md

TutorialLanguage referenceRead the paperUseful? Cite our work :)

A STITCH++ spec

A STITCH++ spec is written in the target language and consists of endpoint stubs and object definitions. Each stub describes what inputs are required to invoke library functions and what outputs they produce. Specs can also contain generators for structured datatypes, such as custom text formats.

import kvlib
import stitch
from stitch import Borrow, New, Str, Take
Store = stitch.object("Store")
Snapshot = stitch.object("Snapshot")
KvText = stitch.datatype("KvText")
@stitch.decoder(KvText)
def kv_text(s):
lines = []
while s.more():
key = s.token() if s.coin(0.3) else s.str(8)
lines.append(f"{key}={s.str(12)}")
return "\n".join(lines)
@stitch.endpoint
def new_store() -> New[Store]:
return kvlib.Store()
@stitch.endpoint(bails_on=(ValueError,))
def load(text: Str[256, KvText]) -> New[Store]:
return kvlib.load(text)
@stitch.endpoint(bails_on=(ValueError,))
def put(st: Borrow[Store], key: Str[16], value: Str[32]):
st.put(key, value)
@stitch.endpoint
def remove(st: Borrow[Store], key: Str[16]):
st.remove(key)
@stitch.endpoint(bails_on=(ValueError,))
def snapshot(st: Borrow[Store]) -> New[Snapshot]:
return kvlib.load(st.dump())
@stitch.endpoint
def merge(st: Borrow[Store], snap: Take[Snapshot]):
st.merge(snap)
@stitch.endpoint
def roundtrip(st: Borrow[Store]):
again = kvlib.load(st.dump())
stitch.check(dict(again.items()) == dict(st.items()), "dump/load roundtrip")
#include <stitch.h>
extern "C" {
#include <kv.h>
}
STITCH_OBJECT(Store, kv_store*);
STITCH_DROP(Store, [](kv_store* st) { kv_free(st); });
STITCH_OBJECT(Snapshot, kv_store*);
STITCH_DROP(Snapshot, [](kv_store* st) { kv_free(st); });
STITCH_DATATYPE(KvText);
STITCH_DECODER(KvText, [](stitch::Source& s) {
std::string out;
while (s.more()) out += (s.coin(0.3) ? s.token() : s.str(8)) + "=" + s.str(12) + "\n";
return out;
});
New<Store> new_store() { return kv_new(); }
STITCH_ENDPOINT(new_store);
New<Store> load(Str<256, KvText> text) {
kv_store* st = kv_load(text.c_str());
stitch::require(st, "invalid text");
return st;
}
STITCH_ENDPOINT(load);
void put(Borrow<Store> st, Str<16> key, Str<32> value) {
stitch::require(kv_put(st, key.c_str(), value.c_str()) == 0, "invalid key or value");
}
STITCH_ENDPOINT(put);
void remove_key(Borrow<Store> st, Str<16> key) { kv_remove(st, key.c_str()); }
STITCH_ENDPOINT(remove_key);
New<Snapshot> snapshot(Borrow<Store> st) {
char* text = kv_dump(st);
kv_store* copy = kv_load(text);
free(text);
stitch::require(copy, "dump did not load");
return copy;
}
STITCH_ENDPOINT(snapshot);
void merge(Borrow<Store> st, Take<Snapshot> snap) {
kv_merge(st, snap);
kv_free(snap);
}
STITCH_ENDPOINT(merge);
void roundtrip(Borrow<Store> st) {
char* text = kv_dump(st);
kv_store* again = kv_load(text);
free(text);
stitch::require(again, "dump did not load");
size_t n = kv_len(again);
kv_free(again);
stitch::check(n == kv_len(st), "dump/load roundtrip");
}
STITCH_ENDPOINT(roundtrip);
const stitch = require("stitch");
const { Borrow, New, Str, Take } = stitch;
const kv = require("kvjs");
const Store = stitch.object("Store");
const Snapshot = stitch.object("Snapshot");
const KvText = stitch.datatype("KvText");
stitch.decoder(KvText, (s) => {
const lines = [];
while (s.more()) lines.push(`${s.coin(0.3) ? s.token() : s.str(8)}=${s.str(12)}`);
return lines.join("\n");
});
stitch.endpoint("new_store", {}, New(Store), () => new kv.Store());
stitch.endpoint("load", { text: Str(256, KvText) }, New(Store), ({ text }) => kv.load(text),
{ bailsOn: [RangeError] });
stitch.endpoint("put", { st: Borrow(Store), key: Str(16), value: Str(32) }, null, ({ st, key, value }) => {
st.put(key, value);
}, { bailsOn: [RangeError] });
stitch.endpoint("remove", { st: Borrow(Store), key: Str(16) }, null, ({ st, key }) => st.remove(key));
stitch.endpoint("snapshot", { st: Borrow(Store) }, New(Snapshot), ({ st }) => kv.load(st.dump()),
{ bailsOn: [RangeError] });
stitch.endpoint("merge", { st: Borrow(Store), snap: Take(Snapshot) }, null, ({ st, snap }) => st.merge(snap));
stitch.endpoint("roundtrip", { st: Borrow(Store) }, null, ({ st }) => {
const again = kv.load(st.dump());
const keys = (o) => JSON.stringify([...o].sort());
stitch.check(keys(Object.keys(again.data)) === keys(st.order), "dump/load roundtrip");
});
import demo.kv.Store;
import stitch.*;
public class Stubs {
@Decoder("KvText")
public static String kvText(Source s) {
StringBuilder b = new StringBuilder();
while (s.more()) b.append(s.coin(0.3) ? s.token() : s.str(8)).append('=').append(s.str(12)).append('\n');
return b.toString();
}
@Endpoint
public static Store newStore() {
return new Store();
}
@Endpoint(bailsOn = {IllegalArgumentException.class})
public static Store load(@Str(max = 256, type = "KvText") String text) {
return Store.load(text);
}
@Endpoint(bailsOn = {IllegalArgumentException.class})
public static void put(Store st, @Str(max = 16) String key, @Str(max = 32) String value) {
st.put(key, value);
}
@Endpoint
public static void remove(Store st, @Str(max = 16) String key) {
st.remove(key);
}
@Endpoint(bailsOn = {IllegalArgumentException.class})
@Obj("Snapshot")
public static Store snapshot(Store st) {
return Store.load(st.dump());
}
@Endpoint
public static void merge(Store st, @Take @Obj("Snapshot") Store snap) {
st.merge(snap);
}
@Endpoint
public static void roundtrip(Store st) {
Store again = Store.load(st.dump());
Stitch.check(again.size() == st.size(), "dump/load roundtrip");
}
}
package harness
import (
"example.com/kvgo"
"stitch"
)
type Snapshot struct{ *kvgo.Store }
func init() {
stitch.Object[*kvgo.Store]("Store", nil)
stitch.Object[*Snapshot]("Snapshot", nil)
stitch.Decoder("KvText", kvText)
stitch.Endpoint("new_store", newStore)
stitch.Endpoint("load", load, "text:max=256,type=KvText")
stitch.Endpoint("put", put, "st", "key:max=16", "value:max=32")
stitch.Endpoint("remove", remove, "st", "key:max=16")
stitch.Endpoint("snapshot", snapshot, "st")
stitch.Endpoint("merge", merge, "st", "snap:take")
stitch.Endpoint("roundtrip", roundtrip, "st")
}
func kvText(s *stitch.Source) string {
out := ""
for s.More() {
k := s.Str(8)
if s.Coin(0.3) {
k = s.Token()
}
out += k + "=" + s.Str(12) + "\n"
}
return out
}
func newStore() *kvgo.Store { return kvgo.New() }
func load(text string) (*kvgo.Store, error) { return kvgo.Load(text) }
func put(st *kvgo.Store, key, value string) error { return st.Put(key, value) }
func remove(st *kvgo.Store, key string) { st.Remove(key) }
func snapshot(st *kvgo.Store) (*Snapshot, error) {
copy, err := kvgo.Load(st.Dump())
if err != nil {
return nil, err
}
return &Snapshot{copy}, nil
}
func merge(st *kvgo.Store, snap *Snapshot) error { return st.Merge(snap.Store) }
func roundtrip(st *kvgo.Store) {
again, err := kvgo.Load(st.Dump())
stitch.Require(err == nil, "dump did not load")
stitch.Check(again.Len() == st.Len(), "dump/load roundtrip")
}
use stitch::*;
object!(Store, kvrs::Store);
object!(Snapshot, kvrs::Store);
datatype!(KvText);
decoder!(KvText, fn kv_text(s: &mut Source) -> String {
let mut out = String::new();
while s.more() {
let k = if s.coin(0.3) { s.token() } else { s.str(8) };
out += &format!("{k}={}\n", s.str(12));
}
out
});
endpoint! {
fn new_store() -> New<Store> {
New::new(kvrs::Store::new())
}
}
endpoint! {
fn load(text: Str<256, KvText>) -> Result<New<Store>, String> {
Ok(New::new(kvrs::load(&text)?))
}
}
endpoint! {
fn put(st: Borrow<Store>, key: Str<16>, value: Str<32>) -> Result<(), String> {
st.put(&key, &value)
}
}
endpoint! {
fn remove(st: Borrow<Store>, key: Str<16>) {
st.remove(&key);
}
}
endpoint! {
fn snapshot(st: Borrow<Store>) -> Result<New<Snapshot>, String> {
Ok(New::new(kvrs::load(&st.dump())?))
}
}
endpoint! {
fn merge(st: Borrow<Store>, snap: Take<Snapshot>) -> Result<(), String> {
st.merge(&snap.into_inner())
}
}
endpoint! {
fn roundtrip(st: Borrow<Store>) {
let again = kvrs::load(&st.dump());
require(again.is_ok(), "dump did not load");
check(again.unwrap().len() == st.len(), "dump/load roundtrip");
}
}
require "stitch"
require "kvrb"
include Stitch::DSL
Store = Stitch.object("Store")
Snapshot = Stitch.object("Snapshot")
KvText = Stitch.datatype("KvText")
Stitch.decoder(KvText) do |s|
lines = []
while s.more
key = s.coin(0.3) ? s.token : s.str(8)
lines << "#{key}=#{s.str(12)}"
end
lines.join("\n")
end
Stitch.endpoint :new_store, {}, New[Store] do
Kvrb::Store.new
end
Stitch.endpoint :load, { text: Str[256, KvText] }, New[Store], bails_on: [ArgumentError] do |text|
Kvrb.load(text)
end
Stitch.endpoint :put, { st: Borrow[Store], key: Str[16], value: Str[32] }, bails_on: [ArgumentError] do |st, key, value|
st.put(key, value)
end
Stitch.endpoint :remove, { st: Borrow[Store], key: Str[16] } do |st, key|
st.remove(key)
end
Stitch.endpoint :snapshot, { st: Borrow[Store] }, New[Snapshot], bails_on: [ArgumentError] do |st|
Kvrb.load(st.dump)
end
Stitch.endpoint :merge, { st: Borrow[Store], snap: Take[Snapshot] } do |st, snap|
st.merge(snap)
end
Stitch.endpoint :roundtrip, { st: Borrow[Store] } do |st|
again = Kvrb.load(st.dump)
Stitch.check(again.items.to_h == st.items.to_h, "dump/load roundtrip")
end
import KVSwift
import Stitch
enum Store: StitchObject { typealias Handle = KVSwift.Store }
enum Snapshot: StitchObject { typealias Handle = KVSwift.Store }
enum KvText: Decoded {
static func decode(_ s: Source) -> String {
var lines: [String] = []
while s.more() {
let key = s.coin(0.3) ? s.token() : s.str(8)
lines.append("\(key)=\(s.str(12))")
}
return lines.joined(separator: "\n")
}
}
let newStore = endpoint("new_store") { () -> New<Store> in
New(KVSwift.Store())
}
let load = endpoint("load") { (text: Str<256, KvText>) throws -> New<Store> in
New(try KVSwift.load(text.value))
}
let put = endpoint("put") { (st: Borrow<Store>, key: Str<16, Plain>, value: Str<32, Plain>) throws in
try st.value.put(key.value, value.value)
}
let remove = endpoint("remove") { (st: Borrow<Store>, key: Str<16, Plain>) in
st.value.remove(key.value)
}
let snapshot = endpoint("snapshot") { (st: Borrow<Store>) throws -> New<Snapshot> in
New(try KVSwift.load(st.value.dump()))
}
let merge = endpoint("merge") { (st: Borrow<Store>, snap: Take<Snapshot>) throws in
try st.value.merge(snap.value)
}
let roundtrip = endpoint("roundtrip") { (st: Borrow<Store>) throws in
let again = try KVSwift.load(st.value.dump())
try check(Dictionary(again.items(), uniquingKeysWith: { a, _ in a })
== Dictionary(st.value.items(), uniquingKeysWith: { a, _ in a }),
"dump/load roundtrip")
}
#import <Stitch/Stitch.h>
#import "KVStore.h"
STITCH_OBJECT(Store, KVStore *);
STITCH_OBJECT(Snapshot, KVStore *);
STITCH_DECODER(KvText) {
NSMutableArray *lines = [NSMutableArray array];
while ([s more]) {
NSString *key = [s coin:0.3] ? [s token] : [s str:8];
[lines addObject:[NSString stringWithFormat:@"%@=%@", key, [s str:12]]];
}
return [lines componentsJoinedByString:@"\n"];
}
STITCH_ENDPOINT(New(Store), new_store) {
return [KVStore new];
}
STITCH_ENDPOINT(New(Store), load, Str(256, KvText) text) {
KVStore *st = [KVStore storeWithText:text error:NULL];
STRequire(st != nil, @"invalid text");
return st;
}
STITCH_ENDPOINT(void, put, Borrow(Store) st, Str(16) key, Str(32) value) {
STRequire([st putValue:value forKey:key error:NULL], @"invalid key or value");
}
STITCH_ENDPOINT(void, remove, Borrow(Store) st, Str(16) key) {
[st removeKey:key];
}
STITCH_ENDPOINT(New(Snapshot), snapshot, Borrow(Store) st) {
KVStore *copy = [KVStore storeWithText:[st dump] error:NULL];
STRequire(copy != nil, @"dump did not load");
return copy;
}
STITCH_ENDPOINT(void, merge, Borrow(Store) st, Take(Snapshot) snap) {
STRequire([st mergeStore:snap error:NULL], @"invalid entry");
}
STITCH_ENDPOINT(void, roundtrip, Borrow(Store) st) {
KVStore *again = [KVStore storeWithText:[st dump] error:NULL];
STCheck(again != nil && [[again dictionary] isEqual:[st dictionary]], @"dump/load roundtrip");
}

Programs

The fuzzer stitches together (millions of) different combinations of endpoints into graphs (left) and executes them dynamically. Each program graph is equivalent to a specific sequential program (right).

    StoreSnapshotfuzzed value (not an object)taken

    Example crash

    When the fuzzer finds a crashing testcase, it minimizes it and generates an external reproducer.

    loadtextremovekeysnapshot
    1. st = load("tmp=")
    2. remove(st, "tmp")
    3. snap = snapshot(st)

    KeyError: 'tmp'

    Show the stack trace
    1. Store.items__init__.py:26library
    2. Store.dump__init__.py:34library
    3. snapshotstubs.py:41spec
    loadtextputkeyvalueremove_keykeysnapshot
    1. auto st = load("");
    2. put(st, "tmp", "");
    3. remove_key(st, "tmp");
    4. auto snap = snapshot(st);

    heap-use-after-free: READ of size 8

    Show the stack trace

    Where it crashed

    1. kv_dumpkv.c:77library
    2. snapshotstubs.cpp:37spec
    3. 8 frames in the runtime and system libraries
      1. void stitch::detail::Endpoint<&snapshot(stitch::Borrow<Store>)>::call<0ul>(stitch::detail::Ctx&, std::integer_sequence<unsigned long, 0ul>)stitch.h:904
      2. stitch::run_program(std::vector<stitch::PNode, std::allocator<stitch::PNode>> const&, bool)runtime.cpp:1368
      3. stitch_execruntime.cpp:1545
      4. stitch_run_fileruntime.cpp:1565
      5. mainmain_repro.cpp:99
      6. ?libc.so.6
      7. __libc_start_mainlibc.so.6
      8. _startrepro

    Where the memory was freed

    1. freerepro
    2. remove_keystubs.cpp:33spec
    3. 8 frames in the runtime and system libraries
      1. void stitch::detail::Endpoint<&remove_key(stitch::Borrow<Store>, stitch::Str<16ul, void>)>::call<0ul, 1ul>(stitch::detail::Ctx&, std::integer_sequence<unsigned long, 0ul, 1ul>)stitch.h:902
      2. stitch::run_program(std::vector<stitch::PNode, std::allocator<stitch::PNode>> const&, bool)runtime.cpp:1368
      3. stitch_execruntime.cpp:1545
      4. stitch_run_fileruntime.cpp:1565
      5. mainmain_repro.cpp:99
      6. ?libc.so.6
      7. __libc_start_mainlibc.so.6
      8. _startrepro

    Where it was allocated

    1. mallocrepro
    2. kv_putkv.c:35library
    3. putstubs.cpp:29spec
    4. 8 frames in the runtime and system libraries
      1. void stitch::detail::Endpoint<&put(stitch::Borrow<Store>, stitch::Str<16ul, void>, stitch::Str<32ul, void>)>::call<0ul, 1ul, 2ul>(stitch::detail::Ctx&, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>)stitch.h:902
      2. stitch::run_program(std::vector<stitch::PNode, std::allocator<stitch::PNode>> const&, bool)runtime.cpp:1368
      3. stitch_execruntime.cpp:1545
      4. stitch_run_fileruntime.cpp:1565
      5. mainmain_repro.cpp:99
      6. ?libc.so.6
      7. __libc_start_mainlibc.so.6
      8. _startrepro
    loadtextremovekeysnapshot
    1. const st = load("tmp=");
    2. remove(st, "tmp");
    3. const snap = snapshot(st);

    TypeError: Cannot read properties of undefined (reading 'trim')

    Show the stack trace
    1. anonymous@index.jsindex.js:24library
    2. Store.dumpindex.js:24library
    3. stitch.endpoint.bailsOn [as fn]stubs.js:26spec
    loadtextremovekeyroundtrip
    1. var st = load("tmp=\n");
    2. remove(st, "tmp");
    3. roundtrip(st);

    NullPointerException: Cannot invoke "String.trim()" because the return value of "java.util.Map.get(Object)" is null

    Show the stack trace
    1. Store.dumpStore.java:30library
    2. Stubs.roundtripStubs.java:45spec
    loadtextputkeyvalueremovekeysnapshot
    1. st, _ := load("")
    2. put(st, "tmp", "")
    3. remove(st, "tmp")
    4. snap, _ := snapshot(st)

    nil pointer dereference: runtime error: invalid memory address or nil pointer dereference

    Show the stack trace
    1. kvgo.Store.Dumpkv.go:58library
    2. stitchharness.snapshotstubs.go:44spec
    loadtextremovekeysnapshot
    1. let st = load("tmp=\n")?;
    2. remove(&st, "tmp");
    3. let snap = snapshot(&st)?;

    called `Option::unwrap()` on a `None` value

    Show the stack trace
    1. kvrs::Store::dump::{{closure}}lib.rs:41library
    2. kvrs::Store::dumplib.rs:41library
    3. stitch_harness::stubs::snapshotstubs.rs:42spec
    loadtextremovekeysnapshot
    1. st = load("tmp=")
    2. remove(st, "tmp")
    3. snap = snapshot(st)

    KeyError: key not found: "tmp"

    Show the stack trace
    1. Hash#fetchkvrb.rb:27library
    2. block in Kvrb::Store#itemskvrb.rb:27library
    3. Array#mapkvrb.rb:27library
    4. Kvrb::Store#itemskvrb.rb:27library
    5. Kvrb::Store#dumpkvrb.rb:31library
    6. block in <top (required)>stubs.rb:35spec
    7. <main>stitch-rb:8
    loadtextremovekeyroundtrip
    1. let st = try load("tmp=")
    2. remove(st, "tmp")
    3. try roundtrip(st)

    Unexpectedly found nil while unwrapping an Optional value

    Show the stack trace
    1. Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value<compiler-generated>
    2. closure #1 in Store.items()KV.swift:29library
    3. specialized Collection.map<A, B>(_:)<compiler-generated>
    4. Store.items()KV.swift:29library
    5. Store.dump()KV.swift:36library
    6. closure #1 in variable initialization expression of roundtripstubs.swift:43spec
    7. 15 frames in the runtime and system libraries
      1. closure #1 in endpoint<A>(_:file:_:)Endpoints.swift:98
      2. partial apply for closure #1 in endpoint<A>(_:file:_:)<compiler-generated>
      3. thunk for @escaping @callee_guaranteed (@unowned Call) -> (@error @owned Error)<compiler-generated>
      4. partial apply for thunk for @escaping @callee_guaranteed (@unowned Call) -> (@error @owned Error)<compiler-generated>
      5. closure #1 in static Runtime.setup()Stitch.swift:527
      6. void (anonymous namespace)::invoke<6>(stitch::detail::Ctx&)bridge.cpp:47
      7. stitch::run_program(std::vector<stitch::PNode, std::allocator<stitch::PNode>> const&, bool)runtime.cpp:1368
      8. stitch_execruntime.cpp:1545
      9. stitch_run_fileruntime.cpp:1565
      10. stitch_repro_main(int, char**)main_repro.cpp:99
      11. stitchMain(argNames:_:)Stitch.swift:595
      12. worker_mainmain.swift:7
      13. ?libc.so.6
      14. __libc_start_mainlibc.so.6
      15. _startworker
    loadtextremovekeyroundtrip
    1. KVStore *st = load(@"tmp=");
    2. remove(st, @"tmp");
    3. roundtrip(st);

    NSInvalidArgumentException: Tried to init array with nil object

    Show the stack trace
    1. 6 frames in the runtime and system libraries
      1. objc_exception_throwstitch_objc_throw.c:30
      2. -[NSException raise]NSException.m:1611
      3. +[NSException raise:format:arguments:]NSException.m:1490
      4. +[NSException raise:format:]NSException.m:1475
      5. -[GSInlineArray initWithObjects:count:]GSArray.m:419
      6. +[NSArray arrayWithObjects:count:]NSArray.m:277
    2. -[KVStore items]KVStore.m:65library
    3. -[KVStore dump]KVStore.m:81library
    4. stub_roundtripstubs.m:45spec
    For humansTutorial and conceptsQuick tutorial for harnessing a simple kv-store libraryFor agentsoverview.mdThe guide and workflow agents follow

    Install

    pip install stitch-fuzz
    stitch setup --lang python

    Requires Docker. The library, the harness and the fuzzer run in containers.

    FAQ

    How do I use this?

    Point your coding agent at this repo and tell it to fuzz your library :)

    What kinds of things can I fuzz?

    The main use case is fuzzing libraries that define an API (both large and small).

    How is STITCH++ different from ___?

    vs libFuzzer, AFL++, honggfuzz, ...

    Those are fuzzing engines which require a harness. Each of them makes different choices about how to collect coverage, mutate, keep track of inputs, etc...

    STITCH++ introduces both a fuzzable specification (which replaces a traditional fuzz harness) and a new fuzzing engine designed to support this specification.

    The STITCH++ fuzzing engine is built with LibAFL (same authors as AFL++) and can still make use of modern fuzzing features, for example sanitizer coverage, compare-logging, forkserver, etc...

    vs FUDGE, FuzzGen, PromptFuzz, PromeFuzz, CKGFuzzer, OGHarn, oss-fuzz-gen, ...

    Lots of prior work explores the idea of automatically generating fuzz harnesses (both with and without LLMs).

    STITCH++ instead creates a fuzzable specification, a replacement of (many) traditional fuzz harnesses.

    vs STITCH

    Work on stitching started in early 2025 and the original tool (which we describe in our paper) was built in a LLM-pipeline world, not yet an agent-powered world.

    Many of the design choices we made were necessary at the time for weaker models, and are no longer necessary.

    STITCH++ is an agent-forward rebuilt version of STITCH, where we retain only the fuzzing core and we extend support to many more languages.

    vs GraphFuzz

    I'm also the author of GraphFuzz :)

    In a sense, stitching is the LLM-powered successor. It makes possible what used to be very tedious to do by hand.

    The key innovation was introducing extrinsic type-state allowing the spec to model open-ended constraints. There are also a lot of engineering improvements with STITCH++.

    How expensive is it?

    The code is free and open-source; the only cost is writing the specification (most likely using an agent), compute to run the fuzzer, and any costs associated with triaging bugs (also probably an agent).

    Note that once the spec is created, the fuzzing itself is purely computational, no LLM usage.

    Will it find false positives?

    Yes, sort of, but we expect this to improve:

    All the bug reports contain real runnable code, so there is no hallucination risk. The only risk is that a bug may be misusing the target API.

    You could also use STITCH++ bug reports as input to some other kind of triage system.

    The fuzzing engine accurately respects the specification. So if your specification perfectly defines the expected way to use the API, you will be fine.

    In practice, for any non-trivial API, it's basically impossible to produce an accurate specification (let alone understand what the API should do in certain edge cases), even for an expert human.

    In practice, what we observed with STITCH (the predecessor) is that most API-misuse bugs are "obvious in retrospect" — that is, while it may be hard to spot a slightly broken specification ahead of time, it is generally very obvious if a specific testcase is abusing the API in a way that is clearly unintended. Thus, after seeing such a testcase, one can go back and fix the specification to avoid it.

    We expect specification development to undergo this sort of refinement loop via dynamically testing the specification. In practice, agents are already really good at this and we expect them to continue to get better.