Skip to content

hydo 0.4.0

Choose a tag to compare

@kakoc kakoc released this 18 Nov 17:32
75db9ff

hydo 0.4.0

hydo runs your whole system (its services, their disks and network) in a virtual machine,
breaks it with faults, and replays every failure exactly. This release walks through a web app's
pages by itself, also on a Mac, records chosen values at every call and checks rules over them,
fuzzes single Rust functions, compares two versions of a system, and explores configuration
settings. Projects that pin hydo_version: "0.3" keep working.

Before you upgrade

  • Images built by 0.4.0 get new bytes and new fingerprints on every engine. The fingerprint
    epoch is 4 now. A saved regression is no longer inside the image: hydo build writes the
    regressions beside it as <image>.regressions.json, so saving or editing one leaves the image's
    bytes as they were. The guest mounts cgroup2 on /sys/fs/cgroup at every boot
    (guest.cgroup2: false turns it off). On the Mac and on KVM a fingerprint hashes the disk and
    the RAM as trees of 4 KiB blocks, so a fingerprint of a 4 GiB guest takes about 43 ms instead
    of about 1 s. A timing-dependent verdict can change too: of the examples' recorded schedules,
    four on hvx, one on the Mac and two on KVM gave another verdict at epoch 4 and were replaced
    (docs/REBASELINE.md section 26). On KVM the quickstart's lost write is disk=cut | run C=12 R=everysec again, as on the other engines. An image built before keeps its bytes, its
    fingerprints and its verdicts.
  • Copy <image>.regressions.json with an image. hydo repro --regressions and hydo ci run
    read the saved regressions from that file.
  • Rebuilt images with fakes, proxies or generated gRPC drivers get new bytes. hydo's own guest
    programs (hydo-world, hydo-world-tls, hydo-grpc) carry the version.
  • On Linux with hvx, keep the kernel module you have. It did not change since 0.3.1.
  • The onboarding skill is 2.3.3. Claude Code offers the update (claude plugin update hydo@hydo). For other AI tools, run hydo skill update.

New

  • Walks through a web app's pages. browser.explore needs no test. hydo clicks, types, and
    saves through the pages from a seed (the token I=), watches each page for uncaught errors,
    spinners that stay, and failed requests the page never shows, and shrinks a failing walk to a
    few actions. Every run leaves the walk as a Playwright test, screens/repro.spec.ts, and a
    recording replay adds a video and a trace of the run that failed. Screenshots go to the run
    folder, and browser.screens: compare compares each page with a recorded reference.
  • Web apps on the Mac. browser: and browser.explore run on an Apple Silicon Mac. Such an
    image's root is a read-only file system on its disk (guest.root: disk).
  • Value history and value properties. // hydo: key and // hydo: record lines next to a
    function record chosen values at every call, and hydo inspect values shows each key's values
    in the run's order. A // hydo: keep line says what must hold along each key's history, and a
    run that breaks it fails with a finding that names the line. On the Blnk example the run without
    faults, where every business rule held, fails on the overdraft limit. Mac engine first.
  • Function fuzzing. hydo fuzz tests one Rust function at a time, with inputs generated from
    its requires and input lines, judges each call by its ensures, and shrinks a failure to an
    input that replays. Each function ends with one verdict, also vacuous when nothing was
    tested. hydo fuzz --vm runs the calls inside the virtual machine under power cuts, disk
    errors, clock steps and pauses, and // hydo: durable checks each call again after a cut.
  • Faults inside a call. A named call (E=) reports its start, and a reaction cuts the power,
    steps the clock, pauses the call or its thread, or kills it a few milliseconds later.
  • Two versions side by side. hydo compare-versions runs the same schedules on two versions
    and reports where the verdicts, the client's outcomes, or the stored state differ
    (services[].compare). It writes compare.json.
  • Configuration settings. configs: lists a build parameter's values, and hydo explore --configs explores one image per combination with the same seeds. Its table names the values
    each failure needs, and a setting's documented trade-off.
  • hydo in CI. hydo ci page writes the history store as one web page that loads nothing. The
    pull-request comment shows only what the change did and is edited in place. A workflow_run
    recorder handles pull requests from forks, and seeds_from: history turns a time budget into a
    seed count.
  • Devices. guest.reboot lets a guest program ask for a real reboot (the console line
    HYDO-REBOOT), and guest.disks adds up to four disks with write caches of their own (Mac and
    KVM). A cf= power cut comes at the first stop after its flush.
  • Containers in the guest. guest.kernel: containers boots a guest kernel with what runc and
    Kubernetes need, on the Mac and on KVM.
  • Loops without VM exits. On KVM, guest.branch_tick stops a loop that makes no VM exits after
    a fixed count of the guest's branches, on Intel hosts whose counters count a guest. On the Mac,
    TigerBeetle's single replica boots.
  • Function contracts read more types (Rust strings, vectors, Option, Result; Go strings
    and slices) and run on KVM too.
  • hydo guide strategies lists the testing techniques that found bugs with hydo, what each
    needs, and what each misses, with a first table from a type of system to the techniques.
  • Examples for TiKV, Restate, Dragonfly, Redpanda, SurrealDB, Meilisearch, Vikunja, Memos,
    RAUC, SWUpdate and Mender, each with its findings in its RESULTS.md.

Fixed

  • On KVM, boots on some hosts stopped as SPIN in the guest kernel's early boot. A 4 GiB boot now
    takes 5 s instead of 25 s.
  • The step numbers of a report, a finding and repro.spec.ts now follow the schedule's own
    numbers, from 0.
  • The CI history page's headline counts the open findings of every branch it lists, and each run
    shows the time it started.
  • hydo explore lists the fault kinds that its options draw, and prints a progress line every
    30 s when its output is not a terminal.
  • A busy element of a page that the walk left no longer stays open until the test ends.
  • hydo setup of a hydo built from a checkout names the guest files that the release lacks,
    instead of calling the release damaged.
  • hydo doctor on a machine where another user loaded the kernel module names hydo module build
    first, so that following its advice never reloads that module.
  • The report of a run that passed says that the run repeats, not that a failure repeats.
  • The hydo_version: comment that hydo init writes says that "0.3" builds on 0.3 and every
    newer 0.x.
  • The README, docs/INSTALL.md, docs/ONBOARD.md and both quickstarts were checked by two fresh
    readers against release candidates (release step 6a), on a Mac and on Linux with hydo's kernel
    module, and corrected: the fingerprint epoch, the rebuild before hydo repro --regressions,
    hydo report --details for a messages check's claims, what hydo explore prints outside a
    terminal, the accept keys of a problem that failed in several ways, and the terms the pages
    used before their definition.

Known and deferred

  • From the docs review, deferred to a later release:
    • hydo repro --regressions exits with status 0 when the image has no saved regressions beside
      it. A failing exit would break every CI job of a project without regressions; the message
      names the file, and docs/ONBOARD.md now builds again before the replay.
    • hydo explore on a fresh hydo init folder reports the placeholders' failures as problems
      without naming the placeholders. The quickstarts now say to explore only after hydo build --check warns about no placeholder.
    • The README's animation shows an exploration of 30 schedules with 13 failures; the quickstart's
      has 20 and 11.
  • On KVM, a fingerprint on Intel differs from the one on AMD; the verdicts are the same.
  • guest.disks, value history and browser.explore on the Mac are new and were proven on one or
    two engines each.

Downloads

Every file below is built from the release commit 75db9ff93b1608181cd5ad8d9a8eaf004eacd052, the commit of the tag v0.4.0;
hydo --version names it.

  • hydo-linux-0.4.0.tar.gz (x86_64 Linux: Intel VT-x with hydo's kernel module, or KVM) and
    hydo-mac-0.4.0.tar.gz (Apple Silicon Mac, signed and notarized).
  • hydo-linux-0.4.0-sources.tar.gz and hydo-mac-0.4.0-sources.tar.gz: the corresponding source
    of the third-party software in each tarball (THIRD-PARTY.md in each tarball lists it).
  • hydo-mac-0.4.0-signatures.tar.gz: the Mac programs' signatures. The published Mac tarball is
    the unsigned build of this tag with these signatures attached
    (hydo/dist/mac/attach-signatures.sh, docs/design/signing.md).
  • SHA256SUMS lists all five files.