fix(fuzz): repair API drift, make fuzz hermetic, add GHA smoke test - #162
Merged
Merged
Conversation
The fuzz target no longer compiled: decode_persistent_event gained a commit_group argument and UndecodableEventError a commit_group field (lane-typed delivery, #156) but the target was never updated (E0061 / E0027). The stale fuzz/Cargo.lock (es-entity 0.12.3, job 0.7.1) was refreshed by cargo to match the workspace (es-entity 0.13.1, job 0.15.3). nix run .#fuzz also was not hermetic: SQLX_OFFLINE was only set in the devshell, so a bare invocation (as CI would do) tried to reach a live Postgres for the query! macros. The fuzz app and `make fuzz` now export SQLX_OFFLINE=true, matching cala. Adds a PR-time GitHub Actions fuzz smoke test (10s/target via `nix run .#fuzz`) so fuzz breakage is caught at PR time instead of the weekly 24h Concourse run.
nicolasburtey
marked this pull request as ready for review
September 21, 2026 20:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the fuzz hardening from GaloyMoney/job#222 to obix, plus repairs the fuzz target which no longer compiled.
What was broken
decode_persistent_eventgained acommit_groupargument andUndecodableEventErroracommit_groupfield (lane-typed delivery, feat(out)!: lane-typed delivery — one handler API for both lanes, exact flush position, lane-aware fence, commit lane opt-in #156), butfuzz_decode_persistent_eventwas never updated →cargo fuzz buildfailed (E0061/E0027). The weekly Concourse fuzz job would have failed on next run.fuzz/Cargo.lock— es-entity 0.12.3 / job 0.7.1 vs the workspace's es-entity 0.13.x / job 0.15.x; refreshed by cargo.nix run .#fuzznot hermetic —SQLX_OFFLINEwas only set in the devshell, so a bare invocation (as CI does) tries to reach a live Postgres for thequery!macros. The fuzz app andmake fuzznow exportSQLX_OFFLINE=true, matching cala.New
.github/workflows/fuzz.yml— PR-time smoke test: buildsfuzz/and runs each target 10s vianix run .#fuzz(same entry point as Concourse), withfuzz/targetcaching, so fuzz breakage is caught at PR time instead of the weekly 24h Concourse run.Verification
cargo fuzz build(via app) compiles;FUZZ_SECONDS=3 nix run .#fuzz— ~296k execs, no crashenv -u DATABASE_URL nix run .#fuzz— works hermetically (no DB, like a CI runner)Note
Low Risk
Changes are limited to fuzz targets, lockfile refresh, and CI/Makefile/Nix fuzz entrypoints; no production runtime or auth/data-path changes.
Overview
Fixes broken fuzz builds by aligning
fuzz_decode_persistent_eventwith the currentdecode_persistent_event/UndecodableEventErrorAPI (commit_groupargument and field) and refreshingfuzz/Cargo.lockso fuzz crates match the workspace.Makes fuzz runs hermetic by setting
SQLX_OFFLINE=trueinmake fuzzand thenix run .#fuzzwrapper so CI and bare Nix invocations do not require Postgres for sqlx compile-time queries.Adds PR-time fuzz coverage via
.github/workflows/fuzz.yml: Nix-based 10s-per-target smoke runs throughnix run .#fuzz, with caching offuzz/targetartifacts, so compile/API drift is caught before the weekly Concourse job.Reviewed by Cursor Bugbot for commit 38d790d. Configure here.