Skip to content

hydo 0.3.0

Choose a tag to compare

@kakoc kakoc released this 08 Nov 13:08
76a5140

hydo 0.3.0

hydo runs a whole system (your services, their disks and network) in a deterministic virtual
machine, injects faults, and replays every failure bit for bit. This release explains why a run
failed and lets you look inside it, runs bigger guests, adds HTTPS fakes, ready-made SQL
workloads and storage faults of one service, and refuses schedules that would pass without
testing anything.

New

  • Why a run failed. A failed hydo run writes a diagnosis into result.json and prints
    it: the failing service and process (its exit status or signal, and whether hydo sent it), the
    readiness check (out of time or died), the kernel's out-of-memory and crash lines, and for an
    ERROR the evidence of one replay of the run (each service's log tail, the readiness check run
    once, dmesg, free, ps). --no-diagnose skips the replay. hydo guide inspect explains
    it.
  • hydo inspect: look inside a run without changing it. hydo inspect events <run dir>
    lists the run's events by stop. hydo inspect start <run dir> --at end|<conversation>:<stop>
    replays the run to that stop and holds it, and exec, read, ls, logs, ps, sockets
    and advance look at the held guest. Every call answers with one JSON document, so an AI
    agent can drive it. The recorded run is only read.
  • Guest RAM up to 8 GiB on every engine (guest.ram_mib up to 8192; on x86_64 the RAM above
    3 GiB is placed above 4 GiB). On Linux with hvx this needs the kernel module of this release
    (hydo module install).
  • HTTPS for fake outside services. tls: {hosts: [...], port: 443} on a fake or a proxy:
    hydo build makes the image's own test certificate authority and a certificate per endpoint,
    maps the names in /etc/hosts, and makes the guest and every service image trust it. The new
    guest program guest/hydo-world-tls serves TLS 1.3 and is staged only for such manifests.
  • A writable root for image services: writable: true on a service built from a Docker/OCI
    image gives it the image's tree as a writable layer on the data disk.
  • Fakes that remember: save: and load: objects keep what a fake answered (also across a
    power cut), and webhook.sign: signs webhooks with HMAC-SHA256.
  • Ready-made SQL workloads and checks. hydo sql-gen --dialect postgres|mysql|libsql --endpoint NAME=ADDRESS[,replica] ... writes a project's workload commands and checks: bank,
    list-append, register, set and counter workloads, batch and interactive, routed to primaries
    and replicas, with the checks the routes allow. They run the new guest program
    guest/hydo-sql. A non-executable checks/<kind>_<name>.sql is a query that must return no
    rows. hydo guide workloads explains it.
  • Storage faults of one service. services[].storage names a service's data directory
    (optionally its own ext4 file system with size_mib). G=<svc>@<step>:flip|zero|trunc
    corrupts a file in it (while the service runs or while it is down), and L=<svc>@<step>+<down>
    is a power loss of that service alone. hydo explore --storage-faults draws both.
  • root.share_images: true: services built from one image share one unpacked tree.
  • guest.outcomes_after_cut: true: the recovery boot after a power cut sees the first boot's
    outcomes in $HYDO_OUTCOMES (opt-in).

Fixed

  • Saved regressions of a project with its own workload now replay that workload; before, a
    project whose hydo/ folder had only regressions/ or checks/ ran empty composer rounds
    instead of the manifest's workload.run, so its saved regressions passed without running it.
  • hydo repro <run dir> and hydo inspect on a run directory use the engine the run recorded
    when neither --backend nor HYDO_BACKEND is given. Before, a KVM run was repeated on hvx,
    which needs the kernel module and sudo.
  • On the KVM engine, the explorer report's commands carry --backend kvm. After a build, the
    hydo: next: line names the image when hydo-out/ holds two, and carries --backend kvm on a
    machine whose only engine is KVM.
  • install.sh --no-module on a machine where only /dev/kvm is usable ends with
    hydo doctor --backend kvm instead of a doctor that fails the module checks.
  • hydo run --help prints the run's usage instead of looking for an image.
  • hydo init also adds hydo-out/ to .gitignore.
  • The report's property table cites hydo/ASSERTIONS.md, the file's place in the releases.
  • On the Mac, a run that went through rewind mode says so in plain words.
  • hydo guide faults has a table of the host tokens (disk=, dseed=, cf=, tj=, tjpm=,
    tjmax=, pct=, spin=rewind).
  • The README and both quickstarts were checked by fresh readers against the release candidate
    (release step 6a) and corrected.

Known and deferred

  • hydo run exits with status 0 whenever the run finishes, whatever its verdict; a script reads
    verdict.kind in the run's result.json. Exit codes per verdict come with a later CI command,
    so that this release changes no exit status.
  • The header of a hydo.yaml that hydo compose writes still names the old path
    hvx/onboard/hydo-compose. Changing the text changes every recorded Compose answer, so it waits
    for a release that re-records them.
  • The report keeps its property table for projects without SDK assertions (it then shows
    NOT EXERCISED lines). Hiding it changes the recorded reports, so it waits too.

Changed

  • No silent passes. A schedule that names a service, link, fake, proxy, route, knob or
    composition the image does not have is refused before any VM starts, and the message names
    what the image has. hydo run warns about a pass that tested nothing (no acknowledged
    operation, a history check over no operations, a reaction whose event never came), and prints
    the final verdict when the host's checks changed it. An image without a manifest is no longer
    explored with a built-in fault space.
  • hydo_version: in a plan. A plan that pins hydo_version: "0.2" is refused by 0.3.0 (the
    pin means the same major.minor). Change it to "0.3" (or ">=0.2"), or build with
    HYDO_VERSION_CHECK=warn. hydo init now writes "0.3". Projects without the key are not
    affected.
  • Images that contain hydo's guest programs hydo-world (fakes and proxies) or hydo-grpc
    (generated gRPC drivers), or the assertion SDKs, have new bytes in this release and so new
    fingerprints; their verdicts are unchanged. Images built by 0.2.0 keep running under 0.3.0 and
    give their old values.
  • hydo doctor never downloads anything; it names hydo setup --get <version> for a missing
    release file.
  • hydo compose imports services with build: as local builds. The liveness table of reports
    shows each eventually check's deadline and its slowest late episode. hvx keeps 64 KiB of a
    guest's console, and hydo run warns when it is full.
  • The hydo crate and the assertion SDKs have rewritten package pages; every code example on
    them is a test.
  • The registry packages (crates.io, PyPI, npm, the Go module) are published by the release
    workflow on GitHub Actions with trusted publishing.

Downloads

Every file below is built from the release commit 76a51408658413512f6e2b698a4a3d340bf44fd8,
the commit of the tag v0.3.0; hydo --version names it.

  • hydo-linux-0.3.0.tar.gz (x86_64 Linux: Intel VT-x with hydo's kernel module, or KVM) and
    hydo-mac-0.3.0.tar.gz (Apple Silicon Mac, signed and notarized).
  • hydo-linux-0.3.0-sources.tar.gz and hydo-mac-0.3.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.3.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.