Repository navigation
all: move time onto darkbio-clock, bump to v0.12.0 - #18
Merged
Merged
Conversation
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>
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>
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.
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::Readandtransport::Writegainclock(), defaulting to the real clock.memory::duplextakes a clock,Verifier::verifytakes the clock's wall time, andStream,Session,RequesterandResponderexpose the clock for computing deadlines.Stream::newpanics on halves with different clocks. wire re-exports darkbio-clock asclock, and the version moves to v0.12.0..cargo/clippy.tomlbans 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::waitreceives untimed while the session's deadline worker settles every timeout, andPromise::notifytakes 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 aTestClockand 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 withnotify_alland 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 itsnotify_onehand-off and reports a passed deadline as the current time. wire only usesnotify_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 checknow needs cargo-nextest. Clippy with default features fails on alarge_enum_variantin the session state, as it does on main.