Repository navigation
Releases
v0.4.0
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
ironflowxfacade share 0.4.0. The release includes the first packages ofironflowx-execution,ironflowx-doorsandironflowx-codegen, with MIT licences and crate READMEs. Binary releases come fromironflowx/ironflow. The release rehearsal builds the packaged HTTP door and wire-enabled proto in dependency order, withoutprotocorbuf. -
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_stepof 0 sent alone answersInvalid,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:
StartRunRequestgainsinput, JSON text under event data's rules (nullwhen absent), andidempotency_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 isConflict(D102). Execution rules'Command::StartRungainsinputandidempotency_key,EntrygainsStartKey(kind 19; kind 2 keeps its bytes),ExecutionViewgainsstartedandruns_before, andExecutionTablesstart_key.Operationsgainslist_runs(runs list, scoperead): runs newest first, filtered byfunction,statusandevent_id, asRunSummary, without input or output, with its body failures, and its error as aListedError, 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 gainlist_runs,RunFilter,RunPage,RunSummaryandListedError, and event rulescheck_key, the ledgerlist_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, isironflowx_core::cursor.read.dbgainsstart_keysand indexes for the list, so a store from before is rebuilt at open. -
Failure and retries (#225), breaking:
FailStepandFailRunreport 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.codeis optional, and the event's error object omits it when absent. Existing coded ledger entries and protobuf field values keep their encoding.GetRunincludesbody_failures. The operations requireexecuteand generateexecutions fail-stepandexecutions fail. -
Steps, replay and
once(#224), breaking:begin_stepanswers 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 withironflowx.step_order, naming the position and both names, andironflowx.run.failedin the same record (RUN-2, RUN-4); so doescomplete_runwith fewerstepsthan were begun, checked before the open step; step 1,001 fails the run withironflowx.too_many_steps. Each answersended. A step an earlier execution began and left open runs again, recorded for the new execution with its first begin's name,onceand input; aonceone is not begun again but fails withironflowx.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,BeginStepResponseandCompleteStepResponsegainFailed { error }(failed,StepFailed),RunErrorgainsstep: Option<StepRef { position, name }>, andRunEndgainserror, so a struct literal of either needs the field and a match on either answer the arm. Execution rules gainEntry::StepFailed(kind 12), aRunFailedthat names a step (kind 13; kinds 1 to 11 are written and read as before),Begun::Failed,Outcome::StepFailed,Step::errorandStep::resolved,RunError::step,StepRef,RunEnd::error, andExecutionTables::fail_step;begin_stepof a table takes a step the run counts, open, as begun again, andfoldrefuses a second outcome for a step, and a begin of one with an outcome, as the store's error.read.db'srunsandstepsgain columns, so one written before this is rebuilt at open. EXE-011, EXE-012, EXE-014 to EXE-018 (EXE-017's rows butfails 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
runningrun 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'decidetakes the open time besidenow, andExecutionView::claimabletakes it besidenow, which a test view must implement; execution rules gainMAX_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-exportsEventandNewEvent;Run::inputandEntry::RunCreated::inputbecomeorigin: Origin,Claim::inputbecomesorigin: Origin<Event>, andExecutionViewgainstriggeredandrun_event, which a test view must implement.ironflowx-cellre-exportsOrigin. On the wire,Rungainsevent_idandClaimgainsevent, absent for a started run, whoseinputstays; a run an event created has noinput.ironflowx_proto::Rungainsevent_id: Option<EventId>andClaimevent: 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'srunsholds an input or an event ID: aread.dbwritten 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
runningrun 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 withironflowx.executor_lostand appendsironflowx.run.failedin 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).Operationsgainsheartbeat(Heartbeat,executions heartbeat), which renews 1–100 leases in one record and answers each on its own, a renewed deadline or its refusal, andrelease_run(ReleaseRun,executions release), which makes the run due now, counting nothing, and answers its due time, the same when sent again (D109); both needexecuteand meet the fence, so an implementation ofOperationsneeds the two methods, and a match onOperationthe two arms. Until the next claim supersedes it, a released execution's calls answerConflict, "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.Rungainslost_leasesanderror(RunError { code, message }) on the wire and in Rust. Execution rules gainCommand::HeartbeatandRelease, the entriesLeaseRenewed,LeaseLost,ReleasedandRunFailed(ki...
v0.3.0
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.dbmay 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 acreate_key,revoke_key,recover_admin_keyor recorded expiry that failed may have taken effect. A failed creation or recovery can therefore leave a key incontrol.dbwhose secret the call never returned.architecture.mdsays 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 withoutclosedoes and the need for tokio, andClock's says thatnowmust not panic.architecture.mdadds what a cancelled key change can still do, what a backup is, file modes, andLedger::openon an engine's root. No behavior change. -
Secret checks (#131): the check that no error type holds a
Secretcovers a generic error used with one; the search for stored or logged secrets covers a refusedrecover_admin_keyand 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 eachcompile_faildoctest names. No behavior change without__fault-points. -
Error kinds and operations (#141):
ErrorKind::retryable()is true forUnavailableonly:UnknownandResourceExhaustedare 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.ErrorKindgainsInternal(D69), which breaks an exhaustive match on it, andexit_code().OperationgainsALL,rpc()andchanges_state(). -
A page of events (#142):
list_eventsstops a page before its data and metadata pass 3 MiB, with at least one event if any is left, andnextcontinues 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_beforetakes aPageBudgetin place of a count, which breaks an implementation or a call of it: onlylist_eventsmakes 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 fromEngine::faulted, a future that resolves once, when the ledger becomesUnavailable; a close in which nothing fails leaves it pending. Neither takes a key, and neither is an operation (TEN-1). Both are inironflowx-operations, withHealthandControlPlaneState;Ledgergainsstateandfaulted, withLedgerStateandFault. 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::closeon a runtime that has shut down, which panics, now waits for the writer before it releases the directory. -
Serve (#144):
ironflowx serveopens the engine in a data directory, writes a minted key toadmin.key, and answerswhoamiover Connect, gRPC and gRPC-Web, with/healthand/ready. Two new crates, both unpublished:ironflowx-doors, the HTTP door, andironflowx-bin, the binary.ironflowx-protogains its.protofiles and three features, none on by default:client, the proto client (Client,InvalidUrl), which carrieswhoamiand answersInternalfor every other operation;wire, the generated messages and their mapping; andserver, the generated service traits. With none on, its dependencies do not change. D50, D51, D53, D55, D59, D62, D75–D78. -
CLI (#145):
ironflowx whoamiasks an engine who a key is, andironflowx versionsays 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 notoptional, 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-fileorIRONFLOWX_KEY, never fromadmin.keyunasked; the engine from--urlorIRONFLOWX_URL; a call takes at most 30 s. A usage error,serve's too, is an envelope and exit 2, whereserve's was text, andironflowxalone, which printed help, is one. Two new crates, both unpublished:ironflowx-cliandironflowx-codegen, the generator.ironflowx-proto'sClientgainswith_timeout, itswirefeatureFILE_DESCRIPTOR_SET, and its proto the custom optionscli,summary,exampleandjson_text. D52, D61, D64, D65. -
Keys and environments over the wire (#146):
create_key,list_keys,revoke_keyandlist_environmentsare served over Connect, gRPC and gRPC-Web,Clientcarries 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) isInvalidbefore the key is read, andClientrefuses such an expiry before it sends. Where no engine answered,ClientanswersUnknownforcreate_keyandrevoke_key, andUnavailablefor a read as before. The hint of acreate_keythat answersUnavailableas 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. TheCreateKeyanswer is the one wire message that holds a key, which itsDebugdoes not print (TEN-3). -
Events over the wire (#147):
emit,emit_batch,get_eventandlist_eventsare served over Connect, gRPC and gRPC-Web, so every operation is, andClientcarries them all: none isInternalfrom 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 isInvalidbefore the key is read, andClientrefuses such data or metadata before it sends, a batch whole (D74). Where no engine answered,ClientanswersUnknownforemitandemit_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 onnext: 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,Clientsays what may have happened. A call whose connection never opened isUnavailable, a state change too, where it wasUnknown; so a retry of it is safe. A state change that may have run staysUnknown, 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_rangeandfailed_preconditionareInvalid,resource_exhaustedisResourceExhausted, andunimplementedisInternal, with the hint that the engine...
v0.2.0
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_keystores a fresh admin key in a data directory and returns its secret, once: all three scopes, no expiry, originRecovered, labelledrecovered. 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 answersRecoverError::NotReadyand stores no key; acontrol.dbof another format, or a failure to read or write it, isRecoverError::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).
EngineErrorgainsNotAnEngineRoot(a bare ledger's directory),Format(acontrol.dbof another format),Orphaned(the control plane was lost) andLedgerMissing(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 andOpened::lost_secretset, and, without a seed, a replacement is returned. A seeded bootstrap has no such key. The ledger gainsopen_blockingandopen_existing_blocking, which answers the newOpenError::Missinginstead of creating a ledger. - Everything runs through the engine (#95):
LocalOperations,ironflowx-cell'sOperationsadapter over a bare ledger, is removed, andEngineimplementsOperations, which gainswhoamiandlist_environments, soOperationsalways means credentialed (D36). Import the trait to call the engine's operations. An embedder without keys callsLedger::submitandread. A failed ledger's hint says to reopen the engine. The events scenarios, the crash test (D23) andexamples/embedrun through an engine. - Seeds (#96):
Engine::opentakes 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::seedreportsSeedState::CurrentorRevoked. A malformed seed isEngineError::MalformedSeed, before anything is read; one whose key ID is already another key's isSeedConflict, 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_keyanswers the newErrorKind::ResourceExhausted, retryable after a revoke (D44). - List and revoke keys (#93):
list_keyspages 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_keykeeps the row, and the key is refused from its next call (D35). A key change whose calling key was revoked or expired meanwhile isUnauthenticatedand changes no key, except that a calling key that only expired has its expiry recorded (D42, D43). A failed control-plane read or write isUnavailable, retryable at once, except a failure to record an expiry (D44); the engine stays open, and key operations work while the ledger isUnavailable. - Scoped keys (#92):
create_keytakes scopes (readunless asked otherwise), an optional expiry and an optional label, and returns the secret once, in aCreatedKey, whoseKeyInfosays what the key is, itsKeyOrigin(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 exhaustiverequired_scope(D37); without it a call is the newErrorKind::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 andverify(D29, D30). - Emit and read with a key (#107): the engine's
emit,emit_batch,get_eventandlist_eventsadmit the key on every call, with no cache. Each event records the key that emitted it, askey:<key-id>, taken from the verified grant; a lint confinesGrant::submit_asto 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-operationsholds the engine.Engine::openlocks 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-authzholds the credentials: theixk_key format, its SHA-256KeyDigestcompared in constant time, andverify.ironflowx-storeis the control plane,control.db. A call carrying the key is admitted (parse, look up, verify) and can askwhoamiandlist_environments. Core gainsTenantId,ProjectId,Scope,Address,Secret(zeroed on drop, not printable or cloneable),ErrorKind::Unauthenticatedandretryable().Call::with_keyarrives andCalllosesClone;OpErrorgainshint. The behaviors runner runs every feature file and checks each file's count;tenancy.featurelands with ACC-001, 002, 003 and 009 running. D38, D45 and D46. - Attribution (#90): every event records who emitted it. Core gains
KeyId,EmitterandSubmitAs;Ledger::submittakes aSubmitAsbeside the unchangedSubmission,ironflowx_events::foldtakes the record'sEmitter, and both event types gainemitted_by(D36). The ledger format moves to 2, so a 0.1 directory answersFormat(D39). A lint confinesSubmitAs::keyto 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 andironflowx-proto's pages name what they gain. - Ledger (#65): at most 16 submissions wait for the writer; more callers wait for a slot (D24).
opentakes a new<dir>/ledger.lock(D25), so a sealed log, whose own lock is released, still answersLockedto 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 answersIoand is kept, and one with recorded progress answersCorruptbefore genesis is written.opensyncs the parent of each directory it creates. If the writer dies, a submission queued or being decided answersUnavailable, notUnknown; only one whose append began answersUnknown. - 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
Corruptrunbook adds the case where the ledger refuses a record, and narrows when segment-log'srepair truncaterefuses a class F plan. A sealed log's first append makes readsUnavailabletoo. The emit-read diagram's fold runs after the ack, not asynchronously.invariants.md: the public-API check covers every workspace crate, and__fault-pointsis an opt-in no published crate enables, not one no build can enable. - Crash test (#89): the fault hook and
FaultPointmove intoironflowx-core, behind its own__fault-points, whichironflowx-cell's forwards to; no behavior change.ci/no-fault-points.shallows a published crate to turn on a dependency's__fault-pointsonly from its own feature of that name (D23). - Crash test ([...
v0.1.0
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.