Skip to content

all: move time onto darkbio-clock, bump to v0.12.0 - #18

Merged
karalabe merged 11 commits into
dark-bio:mainfrom
karalabe:clock
Sep 26, 2026
Merged

karalabe merged 11 commits into
dark-bio:mainfrom
karalabe:clock

Conversation

@karalabe

@karalabe karalabe commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Moves wire's time onto darkbio-clock, one reviewed commit per step.

  • all: threads the clock in from the stream adapters and reads every deadline, timeout and handshake time from it. transport::Read and transport::Write gain clock(), defaulting to the real clock. memory::duplex takes a clock, Verifier::verify takes the clock's wall time, and Stream, Session, Requester and Responder expose the clock for computing deadlines. Stream::new panics on halves with different clocks. wire re-exports darkbio-clock as clock, and the version moves to v0.12.0. .cargo/clippy.toml bans the real-time calls the clock replaces.
  • fuzz, Makefile: builds the fuzz targets' dependencies as plain release code and keeps debug assertions and overflow checks on the wire alone, which makes the crypto-bound targets 2.4 to 3.1 times faster.
  • memory, protocol, transport: moves the four condvars onto the clock's locks. Promise::wait receives untimed while the session's deadline worker settles every timeout, and Promise::notify takes a callback that runs, and whose captures drop, outside every wire lock.
  • cargo: bumps darkbio-cobs to v1.0.1, a README-only release.
  • all: runs every test and fuzz mock on a TestClock and removes the watchdogs, so no test or fuzz target waits on real time. The duplex and connection fuzz targets replay their corpora about 8 times faster. CI runs the tests under nextest, which kills a test after 120 s, and clippy now covers the tests. The socket round trip moves onto a memory duplex, so it runs on every platform.
  • README: rewrites the overview by topic, adding the module map, the verifier choices, the request semantics and limits, and the stream's clock.
  • cargo: bumps darkbio-clock to v0.3.0, whose timed waits report timeouts like std and whose advances wake only the waits they reach. wire only notifies with notify_all and rechecks its deadlines after every wait, so no code changes.
  • transport: fixes a race in the duplex mock's silent handshake scenario, which the fuzzer hit once. Taking the ACK's fault wakes the parked server, and the clock unlists a wait while it wakes, so the scenario reads the server's deadline off its pipe rather than the clock.
  • fuzz: replaces the corpus with a set-cover minimization of it plus about 8,500 units from a 7.5 hour campaign on the clock 0.3 code, 4,552 units in all.
  • cargo: bumps darkbio-clock to v0.3.1, which fixes its notify_one hand-off and reports a passed deadline as the current time. wire only uses notify_all, so no code changes.
  • fuzz: minimizes the corpus again after a 30 minute round on v0.3.1 without findings, 4,380 units in all.

On the real clock nothing changes, and the vectors, fuzz seeds and generated sources come out identical. Mutation checks pointed 20 time sites at the real clock and broke 10 of the third commit's guarantees, and every one fails a test, some by hanging until nextest's kill. make check now needs cargo-nextest. Clippy with default features fails on a large_enum_variant in the session state, as it does on main.

karalabe and others added 4 commits September 25, 2026 22:53
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Astra <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…by callback

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Astra <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Astra <noreply@openai.com>
karalabe and others added 6 commits September 26, 2026 00:00
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Astra <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@karalabe
karalabe merged commit f38fad2 into dark-bio:main Sep 26, 2026
12 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