Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 14:52
· 85 commits to main since this release
3c1acb1

The first ironflowx binary (#139).
Release archives contain the binary and MIT licence, with a separate SHA-256 checksum for each
archive. They target Linux x86-64 and AArch64 (static musl, D81), and macOS on Apple silicon.
The foundation crates and facade share version 0.3.0. The host, CLI, HTTP door and CLI generator
are built from this repository and have publish = false.

  • Server crash tests (#154). Linux and macOS exercise the real host's restart after SIGKILL under load, during drain, and around bootstrap and recovery key publication. The release workflow check rejects builds with the private fault hooks.

  • Serve shutdown (#153): SIGINT or SIGTERM stops admitting calls and drains for up to 10 seconds before closing the engine. A signal during open lets it finish and publish a minted key. A second signal exits 1 immediately. A ledger fault before close exits 8 even without traffic. A control-plane failure still allows serving. The dev and release binaries abort on panic (D63, D72).

  • Docs (#134): corrects 0.2.0's #97 entry and Engine::open's page. A bootstrapping open that fails before its ledger is in place tries to undo itself; if the undo fails, a bootstrap it did not delete stays unmarked, for a later open to finish. If an open's mark commits but it does not return, no later open reports its lost secret. No behavior change.

  • Docs (#135): qualifies 0.2.0's #93, #94, #96, #97 and #98 entries. A control-plane commit that SQLite fails after writing it to the WAL, such as at a failed fsync, is unsettled: the next open of control.db may find it landed, with or without a crash (D48). An open that failed may so have finished its bootstrap, losing a minted secret, or have rotated its seed, against its answer, and a create_key, revoke_key, recover_admin_key or recorded expiry that failed may have taken effect. A failed creation or recovery can therefore leave a key in control.db whose secret the call never returned. architecture.md says what a host does about each. No behavior change.

  • Docs: a review of the docs against the code. ErrorKind::Unavailable's page no longer says that only the ledger answers it, until reopened: a control-plane failure can be retried at once, unless a call has panicked under its lock. Engine's pages list every error kind, what a drop without close does and the need for tokio, and Clock's says that now must not panic. architecture.md adds what a cancelled key change can still do, what a backup is, file modes, and Ledger::open on an engine's root. No behavior change.

  • Secret checks (#131): the check that no error type holds a Secret covers a generic error used with one; the search for stored or logged secrets covers a refused recover_admin_key and escaped bytes; with __fault-points, the key hook is told a recovered key and its secret (TEN-3's stated exception). CI checks the error code each compile_fail doctest names. No behavior change without __fault-points.

  • Error kinds and operations (#141): ErrorKind::retryable() is true for Unavailable only: Unknown and ResourceExhausted are no longer retryable, and their hints still say what to do (D70, which supersedes that half of D44). It promises no second event, not no second key. ErrorKind gains Internal (D69), which breaks an exhaustive match on it, and exit_code(). Operation gains ALL, rpc() and changes_state().

  • A page of events (#142): list_events stops a page before its data and metadata pass 3 MiB, with at least one event if any is left, and next continues from there; until now only the count limited a page, so do not take one shorter than its limit for the last. The read store loads no event past the page. EventsView::events_before takes a PageBudget in place of a count, which breaks an implementation or a call of it: only list_events makes one, and it says, by its size, whether to load each event (D73).

  • Engine health (#143): a host asks an open engine how it is with Engine::health, which reports the control plane and the ledger each alone, and learns of a ledger fault with no traffic from Engine::faulted, a future that resolves once, when the ledger becomes Unavailable; a close in which nothing fails leaves it pending. Neither takes a key, and neither is an operation (TEN-1). Both are in ironflowx-operations, with Health and ControlPlaneState; Ledger gains state and faulted, with LedgerState and Fault. A read whose caller gave up now fails the ledger as any other does, if its query panics or the read store fails; until now a later call found out, or, of a read-store failure that had cleared, none. Ledger::close on a runtime that has shut down, which panics, now waits for the writer before it releases the directory.

  • Serve (#144): ironflowx serve opens the engine in a data directory, writes a minted key to admin.key, and answers whoami over Connect, gRPC and gRPC-Web, with /health and /ready. Two new crates, both unpublished: ironflowx-doors, the HTTP door, and ironflowx-bin, the binary. ironflowx-proto gains its .proto files and three features, none on by default: client, the proto client (Client, InvalidUrl), which carries whoami and answers Internal for every other operation; wire, the generated messages and their mapping; and server, the generated service traits. With none on, its dependencies do not change. D50, D51, D53, D55, D59, D62, D75–D78.

  • CLI (#145): ironflowx whoami asks an engine who a key is, and ironflowx version says what the binary is. A command is generated from the proto at build time, and a method without a command, a summary or a valid example fails the build. An answer is JSON on stdout, with every field that is not optional, in one line or, on a terminal, indented; a failure is one envelope on stderr and its kind's exit code. The key comes from --key-file or IRONFLOWX_KEY, never from admin.key unasked; the engine from --url or IRONFLOWX_URL; a call takes at most 30 s. A usage error, serve's too, is an envelope and exit 2, where serve's was text, and ironflowx alone, which printed help, is one. Two new crates, both unpublished: ironflowx-cli and ironflowx-codegen, the generator. ironflowx-proto's Client gains with_timeout, its wire feature FILE_DESCRIPTOR_SET, and its proto the custom options cli, summary, example and json_text. D52, D61, D64, D65.

  • Keys and environments over the wire (#146): create_key, list_keys, revoke_key and list_environments are served over Connect, gRPC and gRPC-Web, Client carries them, and each is a command: keys create, keys list, keys revoke, environments list. Scopes travel as strings (D71). A request the wire cannot carry (a limit of 0, an unknown scope, a time finer than a millisecond or outside years 0001–9999) is Invalid before the key is read, and Client refuses such an expiry before it sends. Where no engine answered, Client answers Unknown for create_key and revoke_key, and Unavailable for a read as before. The hint of a create_key that answers Unavailable as it stores its key no longer says to retry at once, in process too, but to list the keys before the retry, and again after the engine reopens. The CreateKey answer is the one wire message that holds a key, which its Debug does not print (TEN-3).

  • Events over the wire (#147): emit, emit_batch, get_event and list_events are served over Connect, gRPC and gRPC-Web, so every operation is, and Client carries them all: none is Internal from it any more. Each is a command: events emit, events emit-batch, events get, events list. Data and metadata are JSON text in a string field, stored and returned byte for byte (D54); text that is not UTF-8 is Invalid before the key is read, and Client refuses such data or metadata before it sends, a batch whole (D74). Where no engine answered, Client answers Unknown for emit and emit_batch, a batch answered with another number of results than it has items, and an emit over 16 MiB; its message for the four names the Connect code alone, or that the answer does not decode, since a body can hold event data. Branch on next: a page shorter than its limit is not necessarily the last. A Connect JSON client with a 4 MiB receive limit raises it, to 16 MiB: a page can be nearly 6.5 MiB in JSON, where escaping can double it, and stays under 4 MiB in binary, on gRPC and on gRPC-Web. D49.

  • What the client knows, and https (#148): where no engine answered, Client says what may have happened. A call whose connection never opened is Unavailable, a state change too, where it was Unknown; so a retry of it is safe. A state change that may have run stays Unknown, but for an answer the client cannot tell from the engine's (architecture.md, Wire, known limits). A code of the server's library, sent as a Connect server sends it, with no detail, is its own kind: invalid_argument, out_of_range and failed_precondition are Invalid, resource_exhausted is ResourceExhausted, and unimplemented is Internal, with the hint that the engine is older than the client. A request over 16 MiB is ResourceExhausted and not sent, where a write was Unknown and a read Unavailable. The message of a failure that is not the engine's, of a call that was sent, names the HTTP status, the Connect code, or that the answer does not decode, and nothing of the body, where whoami's, list_environments', list_keys' and revoke_key's held the body's text. The hint of an Unknown emit fits the request, the engine's as the client's own, which had none: an emit with an idempotency key keeps the engine's; one without says to check first what landed, and an emit_batch to retry unchanged only if every item had a key and keeps it. ironflowx-proto gains the feature client-tls, off by default, which adds https URLs to Client, with roots from the system's store; without it they are InvalidUrl, as before. The CLI takes https URLs. D56.

  • Every operation from the CLI (#149): a command takes its request from flags, one per scalar field (ironflowx events emit --name order.placed --data '{"id":1}'), or whole from --json, as text, @<file> or -, stdin; JSON text is sent byte for byte, from a flag or @<file>. --json refuses a field the request does not have, at any depth, where the door ignores it, so a mistyped idempotency_key stores no event (D79); a JSON value in place of JSON text; and an array for a message. Event data and metadata are printed as the JSON they hold, with only the whitespace between tokens removed, where they were a string of it (D65). keys create refuses a label that repeats the caller's own key, since its answer, the new key in it, would not be printed; events get and events list still refuse to print an event that holds it (TEN-3).

  • describe (#150): the CLI lists every operation with its scope, summary and whether it changes state, together with the exit codes. Ask about one operation for its wire request and printed answer schemas, and a request example. Both commands work without a key or a running engine. D67, D82.

  • Host through the engine (#174): ironflowx-operations exports is_bootstrapped, a blocking read of the bootstrap mark that creates no directory or database, and re-exports HostClock, OpenError and StoreError. The binary uses the engine to check whether a bootstrap is marked before it accepts an existing admin.key. The binary drops its direct normal dependencies on the ledger and control plane crates, and CI checks that boundary.

  • Proto client through the facade (#175): ironflowx gains opt-in client and client-tls features. An embedder can use ironflowx::proto::Client as its Operations adapter over HTTP, or over HTTPS with client-tls. Both features are off by default.

  • Host startup (#151): serve reads flags and environment settings, accepts a seed, and probes writes and hard links before it can mint. Refusals exit with the corresponding kind and end stderr with the error envelope. Call logs carry the operation, outcome, duration and any validly formatted presented key's ID. seed generate makes a key and prints it with its ID. D57, D58, D60, D68, D80.

  • Admin-key recovery from the CLI (#152): ironflowx recover-key works with or without a running engine. It checks and probes the file destination before recovering a key to admin.key. Use --stdout to receive the key and its ID as JSON. A delivery failure names the key ID and says how to revoke it. D60.