fix(ui): isolate shrinking worker state - #1609
Conversation
Signed-off-by: DefiAudit0x <1.17640355e+08+DefiAudit0x@users.noreply.github.com>
|
Follow-up on the Windows CI result: The only failing check is This failure is outside the scope of this PR: #1609 changes only the timeout-triggered shrinking worker state, while this coverage test does not exercise that path. The exact base I prepared a separate test-only PR, #1610, which pins |
Summary
Fixes #1601 by isolating the shrinking worker's mutable
WorkerStatefrom the reporting state used by the main fuzzing worker.When a timeout triggers shrinking, the shrink-only pass starts from
initialWorkerState. Reusing the same state reference causes the reporting counters to be reset to zero, so the final status can incorrectly report zero calls and zero gas even though the worker performed work before timing out.This change gives the shrink-only agent a throwaway
IORef initialWorkerState. The reporting reference remains owned by the main worker and is not overwritten by the shrinking pass.Changes
IORef WorkerStateparameter to the fuzzer-agent construction path.mkFuzzerAgentto make agent construction testable.Validation
All 1 tests passedAll 167 tests passed (630.81s)git diff --check: passedThe full suite was run after configuring the required libff, Foundry, Bitwuzla/Z3, solc 0.8.25, and Slither/crytic-compile dependencies. No unrelated tests were changed or weakened.
Scope
This PR is intentionally limited to the worker-state aliasing/reset issue described in #1601.