Skip to content

fix(fuzz): repair API drift, make fuzz hermetic, add GHA smoke test - #162

Merged
nicolasburtey merged 1 commit into
mainfrom
fix/fuzz-target-api-drift
Sep 21, 2026
Merged

nicolasburtey merged 1 commit into
mainfrom
fix/fuzz-target-api-drift

Conversation

@nicolasburtey

@nicolasburtey nicolasburtey commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

Ports the fuzz hardening from GaloyMoney/job#222 to obix, plus repairs the fuzz target which no longer compiled.

What was broken

  1. Fuzz target API driftdecode_persistent_event gained a commit_group argument and UndecodableEventError a commit_group field (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), but fuzz_decode_persistent_event was never updated → cargo fuzz build failed (E0061/E0027). The weekly Concourse fuzz job would have failed on next run.
  2. Stale 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.
  3. nix run .#fuzz not hermeticSQLX_OFFLINE was only set in the devshell, so a bare invocation (as CI does) tries to reach a live Postgres for the query! macros. The fuzz app and make fuzz now export SQLX_OFFLINE=true, matching cala.

New

.github/workflows/fuzz.yml — PR-time smoke test: builds fuzz/ and runs each target 10s via nix run .#fuzz (same entry point as Concourse), with fuzz/target caching, 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 crash
  • env -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_event with the current decode_persistent_event / UndecodableEventError API (commit_group argument and field) and refreshing fuzz/Cargo.lock so fuzz crates match the workspace.

Makes fuzz runs hermetic by setting SQLX_OFFLINE=true in make fuzz and the nix run .#fuzz wrapper 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 through nix run .#fuzz, with caching of fuzz/target artifacts, so compile/API drift is caught before the weekly Concourse job.

Reviewed by Cursor Bugbot for commit 38d790d. Configure here.

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
nicolasburtey marked this pull request as ready for review September 21, 2026 20:52
@nicolasburtey
nicolasburtey merged commit 3371c5b into main Sep 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant