Skip to content

Releases

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 17:06
1225d65

Functions trigger durable runs, and an executor in any language can claim a run and replay its
steps through the engine (#209).
The ledger and control-plane formats change. Start 0.4 with a fresh data directory.

  • Release prep (#231). Foundation crates and the ironflowx facade share 0.4.0. The release includes the first packages of ironflowx-execution, ironflowx-doors and ironflowx-codegen, with MIT licences and crate READMEs. Binary releases come from ironflowx/ironflow. The release rehearsal builds the packaged HTTP door and wire-enabled proto in dependency order, without protoc or buf.

  • Runs close-out (#230). Tests cover execution request limits on the engine and through the door, repeats after lost lease replies, and waiting claims that take retries on the host clock or after a manual clock step. Wire tests cover all 23 operations on every protocol. The architecture and invariant tables describe the 0.4 implementation and its proofs.

  • Execution model (#228): seeded command histories check RUN-1 to RUN-11 against the ledger and compare run queries before and after rebuilding the read store. CI runs 8 histories per platform, and the soak runs 128 (D123).

  • FailRun validates step zero before the lease (#256). A failed_step of 0 sent alone answers Invalid, a step position is from 1, before the fence or the execution-over answer. The lookup of a positive position still follows both.

  • Starting runs directly, and listing runs (#222), breaking: StartRunRequest gains input, JSON text under event data's rules (null when absent), and idempotency_key, 1–256 bytes with no NUL; a start checks both, then that the function exists, then the key. Start keys are a space of their own, beside events' keys, and last as long as the run: a start again with the same key and function answers the first run, duplicate: true, whatever the input; with another function it is Conflict (D102). Execution rules' Command::StartRun gains input and idempotency_key, Entry gains StartKey (kind 19; kind 2 keeps its bytes), ExecutionView gains started and runs_before, and ExecutionTables start_key. Operations gains list_runs (runs list, scope read): runs newest first, filtered by function, status and event_id, as RunSummary, without input or output, with its body failures, and its error as a ListedError, its code when it has one and the step it names, without its message: a run with an error lists one ({} for a failure of neither code nor step), told by its message as the read store tells it, and a run with none lists none; an event ID or function that names nothing, or an event ID that does not parse, is an empty page (D115). Execution rules gain list_runs, RunFilter, RunPage, RunSummary and ListedError, and event rules check_key, the ledger list_runs. A lost start's hint says a retry with its key is safe, and that one without starts a second run. The page cursor's codec, once in event rules and execution rules, is ironflowx_core::cursor. read.db gains start_keys and indexes for the list, so a store from before is rebuilt at open.

  • Failure and retries (#225), breaking: FailStep and FailRun report failures, with attempts per step and for the body. Retries use the current function policy and store an absolute due time. A final step failure is replayable, and a terminal run failure commits with its event. RunError.code is optional, and the event's error object omits it when absent. Existing coded ledger entries and protobuf field values keep their encoding. GetRun includes body_failures. The operations require execute and generate executions fail-step and executions fail.

  • Steps, replay and once (#224), breaking: begin_step answers every case of the Steps table (D89, D91, D93, D110). A begin that names another step than the one recorded at its position fails the run with ironflowx.step_order, naming the position and both names, and ironflowx.run.failed in the same record (RUN-2, RUN-4); so does complete_run with fewer steps than were begun, checked before the open step; step 1,001 fails the run with ironflowx.too_many_steps. Each answers ended. A step an earlier execution began and left open runs again, recorded for the new execution with its first begin's name, once and input; a once one is not begun again but fails with ironflowx.unknown_outcome, its recorded outcome and the run's last error, and the execution goes on (RUN-5). A recorded failure is answered to every later begin and completion of the step, as an output is (RUN-3). On the wire and in Rust, BeginStepResponse and CompleteStepResponse gain Failed { error } (failed, StepFailed), RunError gains step: Option<StepRef { position, name }>, and RunEnd gains error, so a struct literal of either needs the field and a match on either answer the arm. Execution rules gain Entry::StepFailed (kind 12), a RunFailed that names a step (kind 13; kinds 1 to 11 are written and read as before), Begun::Failed, Outcome::StepFailed, Step::error and Step::resolved, RunError::step, StepRef, RunEnd::error, and ExecutionTables::fail_step; begin_step of a table takes a step the run counts, open, as begun again, and fold refuses a second outcome for a step, and a begin of one with an outcome, as the store's error. read.db's runs and steps gain columns, so one written before this is rebuilt at open. EXE-011, EXE-012, EXE-014 to EXE-018 (EXE-017's rows but fails step 2), EXE-034, EXE-044 and EXE-045 pass.

  • Restarts, clocks and the open (#227), breaking: an open lapses no lease. The ledger notes the event time when it opens, the later of its clock and the last record, in memory only, and a claim takes a running run only once its lease's deadline, and that open time plus the lease's length, have both been reached; a lapsed lease is due, for the claim's order and a waiting claim's wake, at the later of the two (RUN-18, D96). The open writes nothing: the deadline a run shows, the fence and the lost-lease count are unchanged, and a release still makes a run due at once. Execution rules' decide takes the open time beside now, and ExecutionView::claimable takes it beside now, which a test view must implement; execution rules gain MAX_LEASE_SECONDS (900). EXE-053 and EXE-054 pass on the engine.

  • Events create runs in their own record (#221), breaking: an emit, or a batch, creates one run of each function triggered by each new event's name, in function-name order, in the event's own record; an idempotent repeat, a refused batch item and the engine's own events create none, and an emit's answer is unchanged (D100, D104). The run stores the event's ID, and a claim of it carries the event whole (D101). Execution rules gain trigger, Origin<E = EventId> (Event(E) | Input(Vec<u8>)) and the re-exports Event and NewEvent; Run::input and Entry::RunCreated::input become origin: Origin, Claim::input becomes origin: Origin<Event>, and ExecutionView gains triggered and run_event, which a test view must implement. ironflowx-cell re-exports Origin. On the wire, Run gains event_id and Claim gains event, absent for a started run, whose input stays; a run an event created has no input. ironflowx_proto::Run gains event_id: Option<EventId> and Claim event: Option<Event>, so a struct literal of either needs the field. A run an event created is a record entry of a new kind, 11; kind 2, a run created with an input, is encoded as before, so a format-3 log written before reads the same. read.db's runs holds an input or an event ID: a read.db written before this is rebuilt at open. FUN-011 to FUN-014 pass on the engine and through the door.

  • Leases and the fence (#223), breaking: a claim also takes a running run whose lease's deadline has been reached, a lapsed lease due at its deadline, as the next execution held by the claiming key, and counts one lost lease; the tenth in a row fails the run with ironflowx.executor_lost and appends ironflowx.run.failed in the claim's record, and the claim goes on to the next run, failing at most 100 (D97). A step's outcome sets the count back to 0; a lost lease spends no attempt. Every accepted call that appends renews its lease to now plus its length; a late executor whose run nobody took keeps it (D94). Operations gains heartbeat (Heartbeat, executions heartbeat), which renews 1–100 leases in one record and answers each on its own, a renewed deadline or its refusal, and release_run (ReleaseRun, executions release), which makes the run due now, counting nothing, and answers its due time, the same when sent again (D109); both need execute and meet the fence, so an implementation of Operations needs the two methods, and a match on Operation the two arms. Until the next claim supersedes it, a released execution's calls answer Conflict, "this execution is over", but its release sent again, which answers the same due time, and a step's completion where the step has an output, which answers it. Run gains lost_leases and error (RunError { code, message }) on the wire and in Rust. Execution rules gain Command::Heartbeat and Release, the entries LeaseRenewed, LeaseLost, Released and RunFailed (ki...

Read more

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 14:52
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...

Read more

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 17:35
b5c15c7

The second release, 0.2 Tenancy (#64): every call carries a scoped key, and the engine knows who exists. It adds three crates, ironflowx-operations, ironflowx-authz and ironflowx-store, and the facade re-exports them as operations, authz and store. examples/embed bootstraps an engine, emits an event, reads it back with a read key and sees that key's emit refused. A 0.1 ledger directory is refused, not migrated (D39).

  • Admin-key recovery (#98): recover_admin_key stores a fresh admin key in a data directory and returns its secret, once: all three scopes, no expiry, origin Recovered, labelled recovered. It is a host's function, not an operation: reaching the directory is the authority. It blocks, takes no engine lock and works beside a running engine, whose next call accepts the key. On a directory never bootstrapped, or whose bootstrap its transaction finds unmarked, it answers RecoverError::NotReady and stores no key; a control.db of another format, or a failure to read or write it, is RecoverError::Store. Revoking the last admin key needs no guard (D34).
  • Open safety (#97): every refused or failed open has a defined outcome, and the engine never deletes a ledger (D32, D40, D41). EngineError gains NotAnEngineRoot (a bare ledger's directory), Format (a control.db of another format), Orphaned (the control plane was lost) and LedgerMissing (the ledger was lost). A bootstrapping open that fails before its ledger is in place undoes itself. An open that finds a committed but unmarked bootstrap and succeeds finishes it: a minted key, whose secret no open returned, is revoked and Opened::lost_secret set, and, without a seed, a replacement is returned. A seeded bootstrap has no such key. The ledger gains open_blocking and open_existing_blocking, which answers the new OpenError::Missing instead of creating a ledger.
  • Everything runs through the engine (#95): LocalOperations, ironflowx-cell's Operations adapter over a bare ledger, is removed, and Engine implements Operations, which gains whoami and list_environments, so Operations always means credentialed (D36). Import the trait to call the engine's operations. An embedder without keys calls Ledger::submit and read. A failed ledger's hint says to reopen the engine. The events scenarios, the crash test (D23) and examples/embed run through an engine.
  • Seeds (#96): Engine::open takes an optional seed, a key the host supplies to be the bootstrap key, and then mints none. On a later open, a seed with a new key ID revokes the current seed and takes its place, leaving other keys alone; a revoked seed opens and stays revoked. Opened::seed reports SeedState::Current or Revoked. A malformed seed is EngineError::MalformedSeed, before anything is read; one whose key ID is already another key's is SeedConflict, and no key changes (D33). Each write of an open holds the root's lock until it ends, even when the open is cancelled.
  • Expiry sticks, and the key cap (#94): a key refused as expired has its expiry recorded, and from then on is never accepted again, whatever the clock does later, across restarts too. If recording fails, the refusal is the same, but a clock set back can accept the key until a later refusal records it (D42). At most 1,000 created keys per environment hold a slot, until each is revoked or its expiry is recorded; at the cap create_key answers the new ErrorKind::ResourceExhausted, retryable after a revoke (D44).
  • List and revoke keys (#93): list_keys pages newest first, 100 keys by default and 1,000 at most, with each key's label, scopes, origin, creator, times and status, never a secret. revoke_key keeps the row, and the key is refused from its next call (D35). A key change whose calling key was revoked or expired meanwhile is Unauthenticated and changes no key, except that a calling key that only expired has its expiry recorded (D42, D43). A failed control-plane read or write is Unavailable, retryable at once, except a failure to record an expiry (D44); the engine stays open, and key operations work while the ledger is Unavailable.
  • Scoped keys (#92): create_key takes scopes (read unless asked otherwise), an optional expiry and an optional label, and returns the secret once, in a CreatedKey, whose KeyInfo says what the key is, its KeyOrigin (in core) included. A key holds no scope its creator lacks and expires no later than its creator (D27, D28). Every operation's scope comes from one exhaustive required_scope (D37); without it a call is the new ErrorKind::PermissionDenied, and its hint names the scope (D31). A key is refused from its expiry on, by the ledger's clock.
  • Bad keys (#108): no key, or an empty one, is Unauthenticated "authentication required". A malformed key is "invalid API key", with a hint naming the key format. An unknown key, a wrong secret and another engine's key get one identical answer with no hint, as a revoked or expired key does; a key of another environment or incarnation is refused by both the lookup and verify (D29, D30).
  • Emit and read with a key (#107): the engine's emit, emit_batch, get_event and list_events admit the key on every call, with no cache. Each event records the key that emitted it, as key:<key-id>, taken from the verified grant; a lint confines Grant::submit_as to the engine (D36).
  • Fixed: secrets in freed memory (#124): parsing and minting a key leave no copy of its secret in freed heap memory (TEN-3). Which keys are accepted does not change.
  • Engine tracer (#91): three new crates. ironflowx-operations holds the engine. Engine::open locks the root, bootstraps a fresh data directory in one control-plane transaction, builds the ledger in staging and renames it into place, and returns the bootstrap key's secret once. ironflowx-authz holds the credentials: the ixk_ key format, its SHA-256 KeyDigest compared in constant time, and verify. ironflowx-store is the control plane, control.db. A call carrying the key is admitted (parse, look up, verify) and can ask whoami and list_environments. Core gains TenantId, ProjectId, Scope, Address, Secret (zeroed on drop, not printable or cloneable), ErrorKind::Unauthenticated and retryable(). Call::with_key arrives and Call loses Clone; OpError gains hint. The behaviors runner runs every feature file and checks each file's count; tenancy.feature lands with ACC-001, 002, 003 and 009 running. D38, D45 and D46.
  • Attribution (#90): every event records who emitted it. Core gains KeyId, Emitter and SubmitAs; Ledger::submit takes a SubmitAs beside the unchanged Submission, ironflowx_events::fold takes the record's Emitter, and both event types gain emitted_by (D36). The ledger format moves to 2, so a 0.1 directory answers Format (D39). A lint confines SubmitAs::key to the credentials crate.
  • README and crate pages (#63, #102): the README states the purpose and what 0.2 is, and shows the architecture with the crate and emit-then-read diagrams. Its links and images are absolute, so they work on crates.io; 0.1.0's example link there is broken. The emit-then-read diagram shows the committed head and applied position as p + 1, as the code does. ironflowx-core's and ironflowx-proto's pages name what they gain.
  • Ledger (#65): at most 16 submissions wait for the writer; more callers wait for a slot (D24). open takes a new <dir>/ledger.lock (D25), so a sealed log, whose own lock is released, still answers Locked to a second opener. A read store whose newest event disagrees with the log is rebuilt. With an empty log, a read store whose applied position cannot be read answers Io and is kept, and one with recorded progress answers Corrupt before genesis is written. open syncs the parent of each directory it creates. If the writer dies, a submission queued or being decided answers Unavailable, not Unknown; only one whose append began answers Unknown.
  • Docs: the C3 and restart diagrams no longer show a pending view or a rollback, and the restart diagram writes the applied position as one past the record. The Corrupt runbook adds the case where the ledger refuses a record, and narrows when segment-log's repair truncate refuses a class F plan. A sealed log's first append makes reads Unavailable too. The emit-read diagram's fold runs after the ack, not asynchronously. invariants.md: the public-API check covers every workspace crate, and __fault-points is an opt-in no published crate enables, not one no build can enable.
  • Crash test (#89): the fault hook and FaultPoint move into ironflowx-core, behind its own __fault-points, which ironflowx-cell's forwards to; no behavior change. ci/no-fault-points.sh allows a published crate to turn on a dependency's __fault-points only from its own feature of that name (D23).
  • Crash test ([...
Read more

v0.1.0

Choose a tag to compare

@sahina sahina released this 21 Nov 22:36
6b68bd7

The first release: the 0.1 ledger (#34). Depend on the ironflowx facade; examples/embed opens a ledger, emits an event and reads it back.

  • ironflowx-core: validated opaque IDs, the environment reference, stored and event-clock time, the clock trait and the error kinds.
  • ironflowx-events: the event rules: what an event is and when an emit is refused.
  • ironflowx-proto: the Operations interface and its request and answer types.
  • ironflowx-cell: the ledger, one environment's durable commit log (on segment-log) and read store, and LocalOperations. A read sees every write acknowledged before it. A crash test kills the process at every named fault point and checks that every acknowledged write survives (invariants.md).
  • ironflowx: every foundation crate, re-exported.