Skip to content

Releases

All notable changes to this project are documented here. The format follows Keep a Changelog and the project uses Semantic Versioning.

[Unreleased]

Added

  • cairn-operator-train-local trains on one CUDA GPU when one is available: train/lora, train/eval-loss and the train.lora stage take device and precision (both auto by default), with bf16 from compute capability 8.0 and fp16 below it (a T4), and the unchanged fp32 CPU run on a machine without CUDA; a Mac stays on the CPU unless device: mps is asked for. A named device that is unavailable, or fp16/bf16 off CUDA, is refused. The stage’s stats report device, precision and peak_gpu_mem_gb. cairn-contracts-train 1.1.0 adds revision 1.1.0 of train.finetune and train.eval_loss beside 1.0.0, which is unchanged: new files and rows whose input schemas gain the two fields, and nothing else. The two operations declare only 1.1.0. The hello-cairn tiny-finetune pipeline takes device and precision inputs. In a checkout, reinstall cairndev after pulling (uv sync --reinstall-package cairndev): the contract files are copied into the installed package, and a launch is refused with “no such capability revision is installed” until they are. (ADR-0167)

Removed

  • Slimmed down the core. cairndev now carries only train/lora, train/eval-loss, dataflow/run, ml/run and artifact/promote, with the train, dataflow and artifact contracts.
  • These operator packs are no longer part of cairndev: dataflow-metaflow, dataflow-skypilot, remote, monitor-threshold, rag-local, rag-rerank, memory-local, secrets-infisical, mcp, artifact-local, audit-store, data-profile, redact-regex, secrets-env. Neither are the remote, rag, memory, mcp, monitor, storage, audit, data, redact and secrets contracts.
  • The metaflow, skypilot, infisical, rerank-cross-encoder and rerank-cohere extras.
  • The example pack’s ask-the-docs and nightly-ops pipelines, and the prod-infisical and secure profiles.

Changed

  • The example pipeline profile-and-publish is now check-and-publish: a flow, a person gate and a promotion. With no audit or redaction operator installed, audit events are dropped and LLM calls are not redacted.
  • tiny-finetune no longer profiles its data or writes a model card. Its loss-ok gate reads the training leg’s eval loss directly.
  • The builtin dataflow engine runs on the engine’s own machine only and refuses a target. An environment that set dataflow_target or ml_target under builtin must change. A leg on an engine named ssh is priced by its connection.

[0.5.0] - 2026-11-03

The old command names are gone, and a cost cap now stops a run.

Upgrade notes

  • The old command names are gone, as 0.4 warned. cairn dev, doctor, gate, preflight, replay, ls, validate, export, test, lock, visualize, lineage, init, audit, compute, config, connect, demo, deploy, worker, flow, pipeline and remote run nothing now. Each says its new name on stderr and exits 2, so a script still using one fails where it used to warn. cairn --help and the CLI reference have the new names.
  • Approval notifications and failure messages name the new commands. Anything that matches their text sees cairn decide <id> approve --step <step> and cairn status <id> --results.
  • A template or task leg that spends more than $1 now stops, unless you raise MAX_COST_USD. The deployment’s limit is $1 by default and wins over a higher budget.max_cost_usd. It always existed, but LangChain swallowed it. Set MAX_COST_USD to the most a run may spend, or to 0 to turn it off. A template’s own cap still applies.
  • A leg over its cost cap now ends failed and stops its pipeline, where it could end done and the next leg ran. A skill run ends failed too. Anything that reads a capped run’s status sees the change, and a capped run fires run.failed rather than run.finished. The budget_exceeded output is still there.
  • A malformed eval_cutoff is now refused at launch and at run start, where it switched the holdout check off.
  • No storage migration, no route changed. The example pack cairn-pack-hello is 0.2.9.

Removed

  • The old command names, after their one minor version of warning (ADR-0165 D12). (#415)

Added

  • The example pack ships a sample preset, so the Quickstart runs on its own rows with --preset sample, from an installed wheel, without downloading a file. cairn-pack-hello needs the release that carries it. (#317)
  • The example pack’s tiny-finetune takes an output_dir, so its promoted adapter can live somewhere the system won’t delete. Without it the adapter stays in the engine’s temp workdir, and the README says so. (#253)
  • A page on the holdout door and eval cutoff, and examples/holdout, which you can run to see it refuse. The noop stage takes register_role, so a file can be registered as a test set without a pack of your own. (#333)
  • A GitHub Action for gating CI on a check: uses: cairndev-sh/cairn/actions/gate@<ref> installs a pinned cairndev, runs cairn run --check and fails the job with the check’s own exit code, 2 included. Inputs check, set, fail-on, working-directory, cairndev-version, python-version; outputs verdict, exit-code, report. (#350)
  • A pipeline.finished run-hook event. An installed cairn.run_hooks provider learns when a pipeline reaches done, failed or cancelled, including a pipeline that ends on a gate, a cancel or a deferred failure. The payload is pipeline_id, pipeline_ref, status and workspace_id. The in-process pipeline bridge fires it once per pipeline per process, after the record is stored with its final status and, on done, its resolved outputs. It is notify-only: a failing provider is logged and never affects the pipeline. (#306)
  • A registered directory artifact gets a durable copy. When an artifact object store is configured, registering a directory (a LoRA adapter, for example) copies its tree to …/artifacts/<content_hash>/<name>/ and records that root as durable_uri, the way a file was already copied. The artifact then reads durable in cairn doctor and the registry health check after the producing machine is gone. The CAIRN_ARTIFACT_RELAY_MAX_BYTES cap counts the whole tree. A tree that holds a symlink is not copied. File relay is unchanged (#286).
  • benchmark/budget_overshoot.py publishes how far past a cost cap a template’s spend gets, on the in-process and DBOS runtimes. (#325)
  • The example pack’s over-budget pipeline shows a budget refusing a run before its engine starts, with no key and no spend, and cairn run now prints why a leg failed (#368).
  • The failing and warning rows of cairn setup --check now end with — fix: and the command or setting that resolves it, on the same line, so the failures cairn setup prints carry it too. Rows that read unset (optional) are unchanged.

Fixed

  • A run that ends while the reconciler is judging it keeps its own reason, where the reconciler’s note could overwrite it and publish a second terminal event. The reconciler also leaves a run alone while its own task is still running in that process, so it can’t fail the pipeline first. A capped run on DBOS could lose over budget either way.
  • The example pack’s tiny-finetune pipeline now gates loss-ok on the loss the trainer measures over the rows it held out. It used to gate on a figure that mostly re-scored training rows. Its training data now holds 48 distinct rows instead of 10 repeated ones, so no held-out row is also a training row, and the separate eval leg is gone (#252).
  • cairn setup --seed from a checkout no longer fails its checks: with no profile set, the example pack runs under its own profiles/hello.toml, which names the MCP server it requires. It also writes that profile’s audit log to ./audit.jsonl.
  • The pages written against an older tree describe this repository: the architecture overview’s system description, examples/README.md (which said max_cost_usd is not enforced; it is) and the engine’s test lists. The fine-tune guide says what the finetune-ssh profile’s audit log records. (#255)
  • examples/ci gates on a check that ships. It named a pack that isn’t in the public install, so every run exited 2; it now uses examples/ci/templates/dataset-check.md, which needs only pip install cairndev. (#255)
  • Following a run no longer retries forever with no message when the engine stops answering. It backs off for about two minutes, then says the run may still be live, prints the command to re-attach and exits 1. A 5xx on the status check counts as temporary, and a quiet run is never given up on while the status check answers. (#46)
  • cairn deploy doctor --values no longer fails a Helm values file with ingress.enabled: false and no host for a missing CADDY_DOMAIN; the chart renders that file, and an enabled ingress with no host still fails (#76).
  • A malformed eval_cutoff ("last tuesday", "06/01/2026", 5) is now refused at launch and at run start, where it used to switch the holdout check off and admit overlapping data. Use an ISO-8601 date or timestamp, or leave it out. One holdout row with an unreadable dated_at no longer voids the check either: the row stays in the comparison, with a warning that also reaches the run’s record.
  • budget.max_cost_usd now stops a template’s model calls. LangChain was swallowing BudgetExceeded, so spending passed the cap, including the deployment-wide max_cost_usd, and the run ended done. This includes the deployment’s MAX_COST_USD, which is $1 by default and wins over a higher template cap, so a template or task leg that spends more than $1 now stops there until you raise it (0 turns it off). The call that crosses a cap has been paid for, so expect to pass it by up to one call, or further with calls in flight in a parallel map. A capped leg now ends failed, where it could end done with a budget_exceeded output, and its pipeline stops. The audit log gets a leg.budget_exceeded row, and what the leg spent counts against its series. A run resumed after a person’s approval now counts what it spent before the pause. Under Temporal the worker only meters, so the run fails when it ends, with its calls already made.
  • A skill run stopped by a cost cap now ends failed and writes a run.budget_exceeded audit row, where it ended done. It skips its critique, actions and cascade, and a critique that runs counts towards the same cap, where it started again from $0. A skill run’s cost now carries its model spend, where it read $0.
  • A dry run now reads a top-level eval_cutoff the way the holdout door does. It ignored it, so it could report an overlap the door would admit, or call a malformed cutoff ready where the door refuses it.

[0.4.1] - 2026-11-03

A patch release: fixes to the CLI only, and one of them stops a secret being printed.

Upgrade notes

  • If you shared cairn setup --check or cairn doctor output from 0.3.2 through 0.4.0 with SLACK_WEBHOOK_URL set, rotate the webhook. Its token was printed in full.
  • cairn gate and cairn run --check now exit 2 when a check doesn’t finish: a failed step, a pause at an approval, or no usable verdict. They used to exit 0. A job gating on them can now fail where it passed before, and that failure is real.
  • --expect-head on cairn admin lineage needs the full hash or at least 12 characters. Anything shorter, or an empty value, used to pass on a log with rows cut from its end, and now exits 2.
  • No storage migration, no route changed. The example pack cairn-pack-hello is 0.2.8.

Fixed

  • cairn setup --check and cairn doctor no longer print the path of a secret URL. They show https://hooks.slack.com/***; a database URL keeps its name. (#402)
  • cairn gate and cairn run --check don’t pass a check that didn’t finish. (#394)
  • --expect-head refuses a value that can’t mean anything, and a match exits 0 in both the plain and --json forms when the log has no lineage records. (#380)
  • cairn status --replay reads a run from the local engine. (#382)
  • A named endpoint is never replaced by local data in cairn status --replay. (#388)
  • cairn admin lineage says the chain is broken, not that the log was altered: a crash mid-write and racing writers look the same. (#385)

[0.4.0] - 2026-11-02

The CLI is five commands: cairn setup, run, status, decide and pack (ADR-0165). cairn run stays with a pipeline to the end, asking at each gate and following any pipeline its events start. cairn setup starts a local engine and returns once it works. Every other command moved under cairn admin or into one of the five, and the old names still work for this one minor version.

Upgrade notes

  • The old command names still work, are hidden from --help, and say the new name on stderr. They go in the next minor version. A script that reads their stdout keeps working; one that merges stderr into stdout will see the extra line. The CLI reference has the new name for each.
  • cairn dev, and the temporary engine cairn run starts when nothing is running, now listen on 127.0.0.1. To reach one from a container, a VM or another machine, set CAIRN_TRIGGER_HOST. A deployed engine (cairn-server, the image, the chart) is unchanged.
  • cairn pipeline run now exits 2 at a human gate instead of polling forever, with the record kept. cairn run asks at the gate instead.
  • cairn run <pipeline> starts it, where it used to refuse and point at cairn pipeline run. cairn run <flow> is still refused: a flow runs as a leg of a declared pipeline.
  • cairn run exits 0, 1, 2 or 77. A refused launch is 1, where cairn pipeline run gives 3; the old names keep their own codes. -i K=V parses the value as JSON everywhere, so -i ticket=123 sends a number, where remote launch, remote submit and gate --set sent a string.
  • A cairn.cli provider from a cairn-pack-*, cairn-operator-* or cairn-contracts-* distribution is now refused, logged and listed by cairn setup --check (ADR-0165 D8). An app’s provider still mounts.
  • No storage migration, no route changed. The example pack cairn-pack-hello is 0.2.7.

Added

  • cairn --help leads with the main commands, then the headings installed providers name, then cairn admin. cairn pack gains new, test, lock, ls (--flows, --pipelines), show (--plan, --split, --graph) and export (--to pipeline|metaflow), and cairn pack check takes paths and does cairn validate’s work. cairn admin holds connect, trigger, preset, audit, lineage, compute, config, deploy, worker, worker-token, hash-password, console, demo, backfill and respell-packs. The old names (cairn init, ls, validate, test, lock, export, visualize, flow, pipeline ls and show, connect, audit, lineage, compute, config, deploy, worker, demo, and the rest of cairn remote) still work for one more minor version, hidden, and say the new name on stderr. A test pins the command tree to the ADR’s table. Part of #362 (ADR-0165). (#360)
  • A cairn.cli provider names its --help heading with Typer’s rich_help_panel; without one, the heading comes from its entry-point name. A provider from a cairn-pack-*, cairn-operator-* or cairn-contracts-* distribution is refused before its code is imported, logged, and shown by the doctor check. (#360)
  • The example’s hello.toml binds audit.sink, and the Quickstart runs under it, so a first run’s audit.jsonl shows each step and each decision a person made, with the signed-in user. The local-dev default is unchanged (#367).
  • cairn setup starts a local engine in the background, signs in, runs the checks and returns once the engine answers. --enable <pipeline> turns on that pipeline’s declared triggers, and nothing else does. --stop stops the engine. --server, --check and --foreground take the place of cairn remote login, cairn doctor and cairn dev, which still work for one more minor version, hidden, and say the new name on stderr. Part of #362 (ADR-0165). (#359)
  • install.sh takes CAIRN_PACKS: CAIRN_PACKS="finetune[laptop] dataset-prep" installs those packs in the tool’s own environment. It also prints the PATH line to paste when cairn isn’t on PATH yet. (#359)
  • A pack’s preset can name a file inside its pack, $pack/data/sample.jsonl, so the same preset works on any machine. A path outside the pack is refused. (#359)
  • cairn run is the one command that starts work: a pipeline through the launch door, following it to the end, asking at each gate, following any pipeline its events start, and ending with the results. With no terminal to ask on, it prints the cairn decide command and exits 2. --dry-run, --check and --skill take the place of cairn pipeline explain and cairn preflight, cairn gate, and cairn remote submit. cairn pipeline run, cairn remote launch and those three still work for one more minor version, hidden, and say the new name on stderr. Part of #362 (ADR-0165). (#358)
  • cairn status [id] and cairn decide <id> approve|reject|cancel: one door to look and one to decide, for a pipeline or a run (ADR-0165). cairn status --follow stays with a pipeline and asks at each gate. cairn replay, and cairn remote pipelines, pipeline, ps, status, watch, findings, logs, advance, approve, reject, cancel and cancel-pipeline, still work for one minor version and print the new spelling on stderr; they leave --help now. What the CLI suggests next uses the new names. (#357)
  • A pipeline gate’s evidence is on its step: step_state.<gate>.gate_context holds the show: fields, the approvers, the spend against the budget cap, the cost estimate and the admission decision, so GET /pipelines/{id} and cairn remote pipeline <id> carry it, and cairn remote launch --watch and cairn remote advance print it at each pause. Before, it reached only the audit event and the review record, so someone approving from the CLI decided without the numbers. Under the Temporal owner, a gate carries no evidence yet (#212). (#258)

Fixed

  • cairn dev and the temporary engine cairn run starts now listen on 127.0.0.1, as cairn setup does. They run with the fixed dev/dev login and used to listen on every interface. To reach one from outside this machine, a container or a VM, set CAIRN_TRIGGER_HOST. (#359)
  • cairn pipeline run no longer polls forever at a human gate it has no way to answer: it says so and exits 2, with the record kept. (#260)

[0.3.3] - 2026-10-30

A pipeline can start another: one pipeline’s results, announced as an event when it finishes, start the next through a trigger a person turns on, and the started pipeline’s record names the one that fed it. A pipeline cancel now stops its running task legs before the teardown, so a GPU box being started is never left billing. Also: task-leg spend is measured and governed, and a gated finalizer can be decided during teardown.

Upgrade notes

  • A pipeline cancel now cancels its running task legs. Before, a running task: leg was left to finish; now the bridge that runs it cancels it, waits up to 60 s, and settles it cancelled before any finalizer: runs (ADR-0159). A task leg owned by another process, and cancelling a single run, are unchanged (#207).
  • outputs: expressions are checked when a pipeline loads. A value that is neither the <step>.<field> shorthand nor a valid expression now fails the load, naming the output. Every pipeline in this repository and in cairn-extensions loads unchanged.
  • A declared event or webhook trigger is still written paused. Turn one on with cairn remote enable-trigger <id> (cairn remote triggers lists them). An event trigger applies to the next event; a webhook trigger at the next server start.
  • The example pack cairn-pack-hello is 0.2.6 in this release (unchanged apart from the version).

Added

  • A stored trigger (event or webhook) can be turned on or paused: GET /triggers/stored and PATCH /triggers/stored/{id}, cairn remote triggers, enable-trigger <id> and disable-trigger <id>, and CairnClient.stored_triggers() / set_trigger_enabled(). A trigger a pipeline declares is written paused (ADR-0131), and until now nothing could turn it on. Each change is audited with the caller. (ADR-0160, #290)
  • A pipeline’s outputs: now mean something: they are resolved when it ends done (the <step>.<field> shorthand, or an expression in the predicate: grammar) and stored on its record (outputs, with outputs_errors for any that did not resolve). A pipeline-level emits: <topic> publishes them once, when it ends done, so another pipeline can start on them with a kind: event trigger. Before, outputs: was parsed and documented but never resolved, and only a step could emit, so no event could leave after a pipeline’s last gate. (ADR-0161, #293)

Fixed

  • A template run on the Temporal or DBOS worker records its LLM spend: each graph node’s cost is measured and carried on its node event, so the run’s total is no longer $0. (#130, thanks to mikemikimike)
  • Under the Temporal owner, a pipeline record’s read-modify-writes on the leg path (the run pin, the engine handle) run inside the pipeline’s critical section, so a stale write can no longer erase them, and heartbeats start before the wait so the wait cannot retry the activity. (#126, thanks to mikemikimike)
  • A pipeline started by a kind: event trigger records who published the event: its trigger carries the bus message’s publisher and correlation_id, so a pipeline started by another pipeline’s emits: names that pipeline (pipeline:<id>). (#289)
  • Cancelling a pipeline stops its running task: legs before the teardown. The bridge cancels each task leg it is executing, waits for it (at most 60 s), and settles it cancelled (step skipped/cancelled, run cancelled, remote jobs and budget holds closed) before any finalizer: runs. Before, a cancel left a running task leg alone and ran the finalizers at once, so a compute/acquire still starting the box could start it after compute/release had found it stopped, and the box billed until its lease ran out. compute/acquire now finishes a start that was in flight when it was cancelled and stops the box itself, and compute/release waits (at most 180 s) for a box that is still pending, which EC2 refuses to stop. A task leg owned by another process, and cancelling a single run, are unchanged (still #207). (ADR-0159, #219, part of #207)
  • A finalizer: whose operator a profile or policy gates (for example compute/release, risk external_write) can be approved or rejected while the pipeline finalizes. Before, advance_step and reject_step refused every step once the terminal intent was set, so the gated finalizer waited forever, the pipeline stayed running, and the machine it releases kept billing until its lease ran out. Approving runs the finalizer and the pipeline settles; rejecting settles it failed. Every other step stays refused during teardown. (#218)
  • A pipeline task: leg’s spend is measured and governed. Its operator now runs inside a cost scope, so model calls made through build_chat_model are recorded on the leg’s run (cost, and llm_cost_usd in its result) and count in gate cost lines and in later legs’ budget checks; the global max_cost_usd backstop now applies to it. Under a capped governance.series the leg reserves its estimate before it runs (refused, and audited, when the pipeline’s spend would pass the cap) and settles what it actually spent, on success, failure or cancel, as a flow leg does. A task operator that reports its own cost in its output (gpu_usd, actual_usd, storage_usd) is counted the way a template run counts it. (#129, part of #63)
  • Cancelling a run stops a train/lora fine-tune: the trainer checks for the cancel between steps, batches and the save, and the operator waits for its training thread to stop before the cancel completes, so a cancelled run never returns an adapter. train/lora now declares supports_cancel. (#124)
  • cairn pipeline explain reports the run store as the store chooses it: an unrecognised CAIRN_STORAGE is “refused” (naming at most its scheme), not “falls back to CAIRN_RUN_DB / in-memory”, since the store has refused it since #1855; CAIRN_RUN_DB alone is sqlite (CAIRN_RUN_DB), not in-memory. cairn doctor’s run_db row names the scheme through the same helper as the other diagnostics. (#274)
  • [profile.approval] works: a profile.toml may now carry mode ("off" or "enforce") and default_on_risk (operator risk classes), and with "enforce" every operator of a listed risk needs a human approval, as ADR-0034 describes. The approval resolver always read it, but the closed profile schema refused the key, so the switch never fired. The table is closed: an unknown key, a missing or unknown mode, or an unknown risk class fails at load. extends replaces per key. (#256)
  • cairn connect test (and the probe cairn connect add runs) reaches an SSH connection’s host and a Postgres/pgvector DSN’s host. Before, every such connection with a host failed blocked: no host in URL, because the host went through the URL guard as //host and lost its hostname. The host is now checked directly with the same SSH/DSN rule, on every host of a multi-host DSN: private hosts are allowed, and cloud instance-metadata endpoints are refused as blocked: cloud instance-metadata endpoint. The metadata check compares addresses, not strings: all of 169.254.0.0/16 (IMDS and ECS task metadata) and fd00:ec2::254, also when written with a zone id or embedded in an IPv4-mapped, IPv4-compatible, 6to4, Teredo or NAT64 address; the URL guard shares it. A host name that cannot be encoded (box..example.com) is reported as unresolvable instead of raising. (#77)

Changed

  • The pipeline YAML reference says a gate’s timeout: is shown to the approver, not enforced; ADR-0158 (PROPOSED) describes the expiry. (#259)

[0.3.2] - 2026-10-29

A patch release: a governed pipeline run leaves a complete, verifiable trail. Its governance decisions and spend reach the hash-chained audit log, cairn audit verify checks that log, a pipeline gate can be rejected with an attributed reason, a pipeline run is one OpenTelemetry trace, and a deployment can set a budget default and ceiling. New fields and tables are additive and off by default; the behaviour changes below are tightenings of governance that was weaker than documented. It also fixes a security issue: storage and bus URLs, passwords included, were printed by cairn doctor and a storage error (GHSA-gw2v-3922-g7gm).

Security

  • A storage or bus URL’s user and password are no longer printed (GHSA-gw2v-3922-g7gm, reported by Hannah Lyons). default_store()’s refusal of an unrecognised CAIRN_STORAGE names at most its scheme instead of echoing the value. In cairn doctor, the set: rows show a URL as <scheme>://host:port/path (no user, password or query) and a value with an @ but no scheme as ***; this covers CAIRN_BUS, CAIRN_TRIGGER_INBOX and CAIRN_JOB_CHANNEL, which printed a valid DSN in full, and CAIRN_STORAGE, whose mask kept the first 8 characters. The config[<key>] rows show a backend kind: a value with no scheme that is not a plain kind word is unrecognized, never the value, and CAIRN_BUS resolves to its kind (postgres) as CAIRN_STORAGE does. Anyone who shared cairn doctor output or kept CI logs from a deployment whose storage or bus URL carries a password should rotate that password.

Upgrade notes

  • A policy-injected gate needs its own decision. A gate a policy adds (applies_to.pipeline_legs with require_hitl) is no longer satisfied by approving the leg it guards or another gate; approve the injected gate itself. Its approval_role is now enforced as the gate’s approvers, so an approver outside that role is refused.
  • A pipeline_legs-only policy applies when the pipeline is planned, not at run admission. A policy that sets only applies_to.pipeline_legs no longer also matches each leg’s run.
  • POST /approvals/dismiss and the cancel routes record the token’s identity as the actor when sign-in is on; a body-supplied actor is ignored there.
  • A local rate prices local legs. If you set local_hourly_usd in [profile.budget], a flow leg the builtin engine runs on its own machine is priced and must declare a timeout; a pipeline that launched before can be refused for a missing timeout or an estimate that does not fit its cap. Without the setting nothing changes.
  • The example pack cairn-pack-hello is 0.2.5 in this release (unchanged apart from the version).

Added

  • A governed pipeline run’s hash-chained audit log (audit.sink) now records every governance decision and spend, so cairn audit verify shows a complete trail. Through the one audit_emit chokepoint, with ids, refs, states, amounts and actors only: pipeline.admitted and pipeline.refused (the launch door, with the reasons), pipeline.gate_approved / pipeline.step_advanced / pipeline.gate_rejected (the actor is the token’s identity), pipeline.cancelled and leg.cancelled / run.cancelled (POST /pipelines/{id}/cancel and POST /runs/{id}/cancel now record who cancelled), approval.expired / approval.dismissed, leg.submitted and leg.finished for task, flow and template legs (engine, compute target, attempts, estimated and settled cost, the reason a leg failed, was cancelled or skipped), leg.retrying, leg.budget_refused, leg.compute_acquired / leg.compute_released / leg.promoted, and pipeline.finished with the total spend. The in-process bridge (and DBOS) and the Temporal owner (from activities) write the same rows; with no sink bound nothing is written. PipelineBridge.cancel_pipeline, RunDispatcher.cancel, expire_run and expire_stale_approvals take an optional actor. (#233)
  • A pipeline run is one OpenTelemetry trace. A short cairn.pipeline root span at launch stores its W3C context on the PipelineRecord (trace_context, an additive field in the record’s JSON; no column), and every leg, gate and flow stage starts as its child in whichever request or process starts it: a gate approved in a later request, a restarted server, the Temporal pipeline owner’s activities. New spans: cairn.flow_leg (with cairn.flow_stage children), cairn.gate (pause to decision, with decision and actor) and cairn.pipeline.settle; task legs’ cairn.operator and each leg’s cairn.run join the same trace and Run.trace_id records it. span() takes an additive parent= (and start_time=); remote jobs get TRACEPARENT beside CAIRN_PARENT_RUN. With no exporter, or without the telemetry extra, nothing is created or stored. See docs/observability.md. (#222)
  • cairn audit verify [--audit-log PATH] [--json] checks the audit log’s hash chain, read-only: it prints the row count, the first and last ts, the head hash and the first broken row. Exit 0 verified (an empty log verifies), 2 broken or a corrupt line, 1 no log. The hash rule now lives once, in cairn.core.obs.audit (GENESIS_HASH, canonical, chain_hash, verify_chain, also re-exported by cairn.core.operator), and audit/store, cairn lineage and the new command use it; the log format is unchanged. (#246, ADR-0156)
  • A pipeline gate can be rejected, attributed: POST /pipelines/{id}/steps/{step}/reject (reason required; the gate’s approvers: are enforced as for approve; under sign-in the decider is the token’s identity). The step ends skipped with the verdict rejected, the pipeline ends failed (finalizers run), the review is decided rejected, and pipeline.rejected is published. The Temporal owner takes a new reject_step signal. cairn remote reject <pipeline> <step> --reason TEXT [--approver NAME] and CairnClient.reject_step / AsyncCairnClient.reject_step call it; cairn remote reject <run_id> is unchanged. (#257, ADR-0156)
  • [profile.budget] gives a deployment a budget: default_usd (the cap of a pipeline that declares no governance.budget), ceiling_usd (the most any launch is capped at; a pipeline can lower its cap, and a declared figure above the ceiling runs under the ceiling) and local_hourly_usd (the rate of the engine’s own machine). The launch door records the effective cap and its source on PipelineRecord.admission.budget, and the reservations, the Temporal activity, the gate’s cost line and cairn pipeline explain read that figure. With no [profile.budget] behaviour is unchanged. (ADR-0155, #250, #251)
  • A flow leg the builtin engine runs on its own machine is priced at local_hourly_usd × timeout when the profile sets a rate, checked at the launch door and settled on every outcome like a leg on a priced compute.ssh box. (ADR-0155, #251)
  • cairn pipeline explain and cairn pipeline show --plan take --preset <name>, resolved by the launch door’s own preset step (expand_preset, now shared with launch_pipeline_def): the same lookup, the same refusal of a preset key the pipeline no longer declares, and -i keys layered over the preset. Each input shows the layer it came from (← preset 'name'). (#231)
  • A cairn remote session the server refuses ends in one line, session expired at HH:MM — run cairn remote login (or session refused by the server (401)), and exit code 77, in every verb: launch --watch (with how to re-attach; the pipeline keeps running), logs --follow and approve --watch included. Before, a watch could go quiet or a follow could end with exit 0. The CLI still does not renew its sign-in (ADR-0142 D8). (#230)
  • /healthz reports store_fingerprint, a short hash naming the connection store the engine reads (CAIRN_STORAGE, else CAIRN_CONNECTIONS_DB, else the shared SQLite file; never its path or DSN). (#229)

Changed

  • cairn pipeline explain shows the budget the launch door enforces (the pipeline’s figure, or the deployment’s default or ceiling) and no longer lists a workspace’s cost_cap_usd variable as a source of a pipeline’s budget, because the launch door never read it for a pipeline. The variable keeps its run-dialog role for workflow runs. (ADR-0155 D7)
  • cairn connect add and cairn connect rm check, before writing, that the engine at the endpoint cairn remote uses reads the store this CLI writes. On a mismatch nothing is written and the command exits 3, naming this CLI’s store without credentials; --force writes anyway (on add, --force already meant overwrite). cairn doctor reports the same comparison as engine_store. When no engine answers, the write goes ahead and names the store. (#229)
  • ~/.cairn/config.toml is created with mode 0600 and replaced whole, instead of written and then restricted. (#230)

Fixed

  • A policy-injected gate (applies_to.pipeline_legs with require_hitl) is satisfied only by its own decision: an upstream gate stands in for it only when it always asks (no when:) and, if the rule sets approval_role, is staffed by that role. Before, any upstream gate counted, including one a when: could skip. A loop’s later iterations still run on the first iteration’s decision; that is unchanged and open for a decision.
  • approval_role on a require_hitl rule is enforced for a policy-injected gate: it becomes the gate’s approvers, and the approve door applies it. (A per-operation approval still records the role without checking the decider.)
  • A policy that sets only applies_to.pipeline_legs is matched when a pipeline is planned and no longer applies to individual operator calls at dispatch. (#34)
  • audit/store keeps one hash chain per log however many writers share it: each append takes an exclusive file lock and reads the last row’s hash from the file, instead of chaining off a head held in memory per instance. The service sink, a task: audit/store leg and a second process (the server and a CLI run under one CAIRN_AUDIT_LOG) now extend the same chain, and cairn lineage verifies it. Pack version 0.1.1.
  • cairn lineage --expect-head <hash> compares the log’s last row with a receipt quoted earlier, so rows missing from the end of a log are reported (the chain alone verifies the same with or without them); the broken-chain warning no longer says “truncated” for what the chain alone can show.
  • POST /approvals/dismiss records the token’s identity as the actor when auth is on, as gate decisions do; a different actor in the body is ignored and logged.
  • Failed and retried flow-leg attempts now retain known partial spend in run cost accounting and subsequent budget reservations.
  • cairn lineage (text mode) reports a broken audit chain (warning, exit 2) even when no lineage.record row matches, as --json already did; an intact chain with no match still exits 1. (#247)
  • Setting OTEL_EXPORTER_OTLP_ENDPOINT without cairndev[telemetry] no longer stops the server at startup: init_tracing logs one warning naming the extra and runs with tracing off, as metrics already did (whose warning now names cairndev[telemetry], not cairn[telemetry]). (#248)
  • cairn doctor’s run_db row reads the run store the way the store chooses it: CAIRN_STORAGE first (a Postgres DSN is reported as postgres host:port/db, a sqlite:// URL by its file), then CAIRN_RUN_DB, else in-memory. It no longer warns “in-memory” when CAIRN_STORAGE persists runs, names the file it checked, and fails on a CAIRN_STORAGE that is not a storage URL, as the store refuses it. (#61)

[0.3.1] - 2026-10-26

A patch release: GPU time on a priced compute.ssh box is counted in the budget, and a public pipeline can start and stop its box. Everything is additive or internal; nothing that worked on 0.3.0 changes unless a pipeline runs on a compute.ssh connection that sets hourly_usd.

Upgrade notes

  • Priced boxes are now checked at launch. A pipeline with a flow leg on a compute.ssh connection that sets hourly_usd must give that leg a timeout, and the leg’s worst-case cost must fit what its budget has left; otherwise the launch is refused before any record exists, with the reason. A connection without hourly_usd is “not priced” and launches as before. (ADR-0151, ADR-0152)
  • cancelled is a job state. remote/exec and the builtin SSH engine report a cancelled job as cancelled (terminal, never retried) instead of a retriable death. A third-party consumer of JobStatus that treats any state other than succeeded/failed as running should treat cancelled as terminal. (ADR-0151 D9)
  • Another pack that registers compute/acquire or compute/release must drop them in the same upgrade, or whichever loads last wins with a warning (see Added).
  • The example pack cairn-pack-hello is 0.2.4 in this release (unchanged apart from the version).

Added

  • compute/acquire and compute/release ship in the builtin remote pack (cairn-operator-remote), so a public pipeline can start the EC2 instance a compute.ssh connection names after a person approved the spend, and stop it when the run ends (ADR-0151 D6, #201). They keep the refs, input and output schemas, risk classes (acquire paid_compute, rated high and passing the approval chokepoint; release external_write, never approval-gated), capabilities and reports of the platform’s cairn-operator-compute 0.1.0, with no contract URI yet (D7). release is idempotent: an instance already stopped is a success, so a finalizer: true release can run again after a restart. acquire writes the cairn:managed lease tag (and cairn:release-after when max_hours > 0, and cairn:acquired-by) before it starts the instance, the reverse of the platform’s order, so a crash between the two calls never leaves a running box that cairn compute sweep cannot see (D8). The operator contract cairn.core.operator re-exports the compute_lifecycle functions they call (load_box, ec2_client, describe_state, stamp_lease, start_instance, stop_instance, wait_port_open, iso, BILLING_STATES, STOPPED_STATES). Upgrade note: the platform’s cairn-operator-compute must drop its copies of these two operators in the same release. If both are installed, the engine does not refuse to start: production loads operators non-strictly, so the second registration of each name replaces the first with a warning (operator 'compute/acquire' re-registered), whichever entry point loads last wins, and the lease-before-start order is not guaranteed. (ADR-0151 D6 says both installed would fail with DuplicateOperatorError; that holds only for a strict load, which no production path uses.)

Changed

  • On a pipeline cancel, a running flow leg on a box the pipeline releases (its recorded compute target is the connection of a finalizer: step providing compute.release) has its engine job cancelled before the finalizers run, so stopping the box is never the only kill (ADR-0151 D9). The leg’s run still settles through its own path; a job cancel that fails is logged and audited (pipeline.leg_job_cancel, sent: false) and the release still stops the box. Other running legs are left alone, as before (#209). remote/exec’s cancel now writes a cancelled marker in the job’s workdir before it kills the job, and its poll reads that marker first: a killed job reports cancelled (not retriable) instead of “remote process exited without an exit code” (retriable), so the leg is not relaunched and its run settles cancelled. The builtin SSH engine passes cancelled through. A job that dies without the marker is still a recoverable death. cancelled is now a documented JobStatus state (terminal, never retriable): the remote-job control loop closes such a record cancelled and resumes its run with {"status": "cancelled"} (it no longer counts it as running or hands it to the learning gate), run_job_lifecycle ends with the new JobCancelled (a JobFailed), a resumed durable node raises it instead of pausing again, and dataflow/run and ml/run pass an engine’s cancelled through. A cancel that reaches a job before its process has started (no pid yet) marks it cancelled, kills nothing and logs it; the pull lane (/jobs heartbeat) does not carry cancelled. (#209)
  • A flow leg whose compute target is a compute.ssh connection with hourly_usd is priced (ADR-0151 D1–D5, as read by ADR-0152). Only the builtin engine’s target is priced: another engine’s <kind>_target, such as a legacy Metaflow metadata root, reads “not priced” and launches as before. The launch door estimates it at hourly_usd × timeout, refuses the launch before any record when the priced legs’ sum does not fit what the budget has left (the cap less the series’ live holds; nothing is reserved at the door) or when a priced leg declares no timeout (“declare a timeout to price this leg”), and records each leg’s estimate, rate, hours and connection under admission.cost_estimate. The leg reserves that recorded figure, even if the connection’s rate changes later. The approval gate before the first priced leg shows estimate_usd and estimate_basis in its evidence. Every attempt settles hourly_usd × its wall-clock on success, failure, timeout or cancel (instead of releasing a failed attempt), and the leg’s Run.cost.gpu_usd is the sum of its attempts; engine-reported cost stays in llm_usd. The estimate is the bounded worst case: a priced leg inside a loop counts max_iterations times, and a leg that may retry counts each attempt (a declared retry: {max_attempts}, else 1 for ml and 2 for data legs); each attempt still reserves one attempt’s figure. A governance.budget.usd with no series is checked at the door against the cap alone; such a pipeline’s legs reserve nothing, so the door is its only budget check. A price that cannot be read (the target selection, the connection store, a target connection that is not registered, a malformed hourly_usd) refuses the launch with the reason; only a target with no hourly_usd, another connection kind or a worker: pool reads “not priced”, never $0. An adopted leg after a restart settles the hold its dead process left, at its window less what the run already settled; the backoff between two fresh attempts is not billed, and an adopted window (from the leg’s start) over-estimates box time rather than counting it twice (ADR-0152). A pipeline that launched before can be refused now when its priced legs exceed its budget, have no timeout, or cannot be priced. (#200, #211)

Removed

  • PipelineBridge.run_bundle, an internal method with no callers since the launch door replaced it; start_pipeline keeps the Temporal routing it duplicated. Comments and test reasons in the source cite internal issues as plain text. (#205, #210, #214)

[0.3.0] - 2026-10-24

A minor release because it contains breaking changes: the artifact registry migrates its storage in place (ADR-0147, ADR-0148), and the Helm chart’s pull-worker values change (docs/compatibility.md: a break before 1.0 is a MINOR bump with migration notes). See Upgrade notes.

Workspace-scoped artifact tags and reads, a hardened SSH path for remote training boxes, a Secret of its own for the Helm chart’s pull worker, and launch-time refusals under the Temporal runtime. The artifact registry migrates on first start, and the Helm chart changes for pull-worker users: read the upgrade notes before upgrading.

Upgrade notes

  • Upgrade every server process that shares one database together. The artifact registry migrates in place on the first start of the new version (ADR-0147, ADR-0148; see Migration). An older process on a migrated database registers artifacts no workspace can see, drops (SQLite) or fails on (Postgres) their parents, cannot promote a tag, and still reads across workspaces.
  • Rotate credentials forwarded to compute.ssh boxes. Deployments that ran flow legs on a compute.ssh box before this release should rotate MLFLOW_TRACKING_PASSWORD and any other value forwarded to those jobs. Job records written earlier hold those values; GET /pipelines/{id} now shows them as [hidden], and stored records are not rewritten (ADR-0149).
  • The builtin SSH engine has no default image. Image mode needs an image named (the compute.ssh connection’s image, remote_image or CAIRN_TRAIN_IMAGE); otherwise the leg is refused before submit. auto, the default, runs the box’s virtualenv when no image is named (ADR-0150).
  • Helm, breaking for pull-worker users (pullWorker.enabled=true): the chart refuses to render without pullWorker.token or pullWorker.existingSecret; the worker has its own ConfigMap and ServiceAccount (<release>-pull-worker); a cloud identity binding (IRSA trust policy, GKE Workload Identity binding, EKS Pod Identity association) must be keyed to the new ServiceAccount name; env.extra keys the worker’s jobs rely on move to pullWorker.extraEnv (credentials to the worker’s Secret). See Breaking (Helm chart).
  • CAIRN_RUNTIME=temporal refuses at launch a pipeline with a task: leg or a finalizer: step, before any record exists (HTTP 403, exit 3). Run such pipelines under inprocess or dbos.
  • New: remote_env (control-plane variables forwarded to an SSH job by name), comma-separated values for type: list inputs, and cairn ls <pack> listing the pack’s deployment profiles.

Breaking (Helm chart)

  • A chart with pullWorker.enabled=true and neither pullWorker.token nor pullWorker.existingSecret (a whitespace-only token counts as unset) now refuses to render. Upgrade: mint a worker-pool token (cairn remote worker-token --name <pool>) and set one of the two; anything else the worker’s jobs read from the control plane’s Secret must be put in the worker’s own Secret. (#194)
  • The pull worker no longer reads the shared ConfigMap or the release’s ServiceAccount. It stops receiving the database DSN family, OTEL_EXPORTER_OTLP_HEADERS, env.extra (apart from the CAIRN_ENGINE_URL / OBS_ENGINE_URL fallback), CAIRN_RUNTIME, CAIRN_REQUIRE_AUTH, CAIRN_TEMPORAL_ADDRESS and CAIRN_CHECKPOINTER. Upgrade: env.extra keys a worker’s jobs relied on move to pullWorker.extraEnv (or the worker’s Secret, for credentials). The worker’s ServiceAccount is now <release>-pull-worker (or pullWorker.serviceAccount.name with create: false), and cloud-side bindings are keyed to that name: an IRSA trust policy, a GKE Workload Identity binding or an EKS Pod Identity association must be updated for it, not only the annotation moved to pullWorker.serviceAccount.annotations. A ConfigMap, ServiceAccount or Secret already named <release>-pull-worker collides. (#194)

Migration

  • Artifact registry (ADR-0147, ADR-0148). The first start on an existing database migrates it in place, once: SQLite rebuilds artifact_tags onto the key (workspace_id, name) and Postgres swaps its primary key, with every existing tag in default; the new artifact_owners table is backfilled so that default owns every existing artifact, as do the workspace of the run that produced it (when that run is in the same database) and every workspace that registered a dataset version of it, each with the artifact’s existing registration; artifact_parents is rebuilt per workspace, each existing parent going to every owner of its child. Single-workspace deployments see no change. Upgrade every process that uses the registry together. An older version on a migrated database registers artifacts no workspace can see, drops (SQLite) or fails on (Postgres) their parents, cannot promote a tag, and still reads across workspaces. A tag promoted from another workspace before the upgrade is now in default; promote it again in its workspace. A library or route that calls the registry outside any workspace scope passes workspace_id=. (#192)

Added

  • A pipeline input declared type: list takes a comma-separated string as well as JSON: -i report_to=mlflow,wandb gives ["mlflow", "wandb"] (items trimmed, empty items dropped). The launch door types it, so the CLI, the console and schedules agree, and cairn pipeline explain -i shows the typed value and refuses what the launch refuses, declared defaults included. A value that parses as JSON keeps the JSON rule; a value that opens with [ but is not valid JSON, and one with no items (-i report_to=), are refused as before. An empty list is []. (#197) (#208)
  • cairn ls <pack> lists the deployment profiles the pack ships (profiles/*.toml beside its pack.toml), each with its visibility and its absolute installed path, so CAIRN_PROFILE can be set without looking in site-packages. --json carries the same under profiles (name, path, absolute_path, visibility). (#196) (#208)
  • remote_env ([profile.backends], or CAIRN_REMOTE_ENV): names of control-plane environment variables the builtin SSH engine forwards to the job on the box, each when set (for example CAIRN_CHECKPOINT_BUCKET, CAIRN_CHECKPOINT_PREFIX, AWS_DEFAULT_REGION). A name containing KEY, SECRET, TOKEN or PASSWORD, a malformed entry, or one the engine sets itself refuses the leg before submit, naming the variable (a malformed entry only by its position) and not its value. Unset, nothing beyond the existing set is forwarded. (#193)
  • An engine may declare needs_durable_inputs = True (the builtin SSH engine does): the leg executor then resolves the leg’s dataset: refs to their durable copies (ADR-0149). An engine that does not declare it is treated as co-located. (#193)
  • The registry catalog lists a pack that ships pipelines and no agentic (flows/*.md) flows as a domain_pack with its pipelines, installed when one of them is present as <pack>/<pipeline> (it was left out of the catalog). Finding them lists pipeline files and reads pack manifests; it parses no pipeline. Packs with agentic flows stay template_pack, unchanged. A live domain_pack carries no install name, so a catalog entry’s distribution name is kept when the two merge. (#167)

Changed

  • Under CAIRN_RUNTIME=temporal, the launch door refuses a pipeline with a task: leg or a finalizer: step before any record exists, naming each such step and pointing to inprocess or dbos: HTTP 403 from /pipelines/launch and /start, exit 3 from cairn pipeline run, and a reported problem in cairn pipeline explain. The Temporal pipeline owner does not run either yet, so such a pipeline used to start and fail when it reached the step. The check reads what the owner declares it runs (cairn.core.runtime.temporal.PIPELINE_OWNER_LEG_KINDS, PIPELINE_OWNER_RUNS_FINALIZERS). inprocess and dbos are unchanged. (#199, ADR-0151 D10) (#208)
  • The builtin engine’s SSH dispatch has no built-in container image. Image mode runs only an image named by the compute.ssh connection’s image or by remote_image / CAIRN_TRAIN_IMAGE. When the leg’s mode resolves to image and no image is named, submit refuses the leg before anything reaches the box, with a message naming the settings to change; for a connection’s own mode = image it names the connection’s image and mode. A connection’s mode and image still override the environment per box. auto, the default, runs the box’s virtualenv when no image is named, as before. cairn doctor reports each compute target’s execution unit from the connection and the environment’s remote_exec_mode / remote_image, in the engine’s order: venv is OK with no image suggestion, and image mode with no image anywhere fails the row. operator_dataflow.engines_ssh.DEFAULT_TRAIN_IMAGE is removed. (#204, ADR-0150)
  • Sign-up, a Google or GitHub sign-in that would create an account, and invite redemption refuse a username or email equal to the deployment admin’s name (CAIRN_API_USER, admin when unset), compared trimmed and case-insensitively. The name reads as taken (already_registered / username_taken); nothing is created and the invite stays usable. (#190)
  • With auth on, a durable remote job started from an operation node (CAIRN_REMOTE_JOB_DURABLE, pushed or on a worker:<pool> target) is recorded under the workspace in scope; with no workspace in scope the node is refused before anything is registered or dispatched, instead of recording the process default. (#190)
  • A flow leg resumes only from a checkpoint a run of its own workspace relayed. A checkpoint whose producing run cannot be read is not used, and the leg starts from the beginning. (#190)
  • Artifact tags belong to a workspace (ADR-0147). A tag is keyed by workspace and name, so each workspace has its own prod; resolve reads and promote moves only the tag of the workspace named (workspace_id=) or in scope, and promote refuses an artifact that workspace did not register (KeyError, the same answer as an unknown id). (#192)
  • An artifact is visible only to the workspaces that registered it (ADR-0148). Every registration is kept per workspace: identical bytes registered by two workspaces stay one content-addressed identity, and each workspace reads only its own registration (URI, durable copy, stats, schema, producing run and job, account, time) and the parents it declared. get, find_by_uri, list_artifacts, resolve and lineage answer only from the workspace’s own registrations (another workspace’s reads as not found), the lineage tree walks only into the workspace’s own artifacts, and a dataset version can name only an artifact its workspace registered. A leg’s outputs, URI parents and relayed checkpoints are registered and looked up in its run’s workspace, so a dataset reference or a checkpoint resume points at the workspace’s own copy. cairn doctor checks the registry of the process’s workspace (CAIRN_WORKSPACE, else default). (#192)
  • With auth on, an artifact registry call (register, get, find_by_uri, list_artifacts, lineage, resolve, promote) with no workspace_id= and no workspace in scope raises WorkspaceScopeRequired before anything is read or written. (#192)
  • A dataset: ref read by a flow leg on a compute.ssh box resolves to the version’s durable copy (durable_uri, the object store) when the workspace’s own registration has one (ADR-0149). Any other leg still gets the registered location, unless that is a local path that no longer exists and a durable copy exists. The registration itself is unchanged. (#193)
  • A flow leg on a compute.ssh box (the builtin engine with a <kind>_target) is refused before submit when a dataset version it reads exists only at a control-plane path (file://…#sha256=… or /…#sha256=…); the error says how to give the version a durable copy. A plain local path from an upstream leg is still uploaded. (#193)
  • remote/exec creates the job’s runner.sh exclusively with mode 0600, after removing a stale copy; if a copy is still there, the submit fails instead of reusing the file. (#193)
  • The builtin SSH engine’s job handles no longer record forwarded environment values: the persisted handle keeps the exec input without its environment and lists the forwarded names (env_names). Job records written before this release may still hold those values, including MLFLOW_TRACKING_PASSWORD. GET /pipelines/{id} no longer shows them: each env value in a step’s job handle reads [hidden] and the names stay; stored records are not rewritten. The values were readable before this release, so deployments that ran flow legs on a compute.ssh box should rotate those credentials. (#193)
  • The SSH engine’s refusal of control-plane-only dataset versions also looks inside nested config values and the spec’s own config, and treats every file: URI form as local. (#193)
  • The example pack cairn-pack-hello is 0.2.3 in this release (0.2.1 shipped it as 0.2.2).

Changed (Helm chart)

  • The Helm chart’s pull worker reads its worker-pool token (CAIRN_ENGINE_TOKEN) from a Secret of its own (pullWorker.token, rendered into <release>-pull-worker, or pullWorker.existingSecret) and no longer reads the control plane’s Secret (CAIRN_JWT_SECRET, CAIRN_API_PASSWORD_HASH, POSTGRES_PASSWORD, the model key, the SSH key). Its settings come from a ConfigMap of its own (an allowlist: CAIRN_ENGINE_URL, CAIRN_BACKEND, CAIRN_PROFILE, MLFLOW_TRACKING_URI, OTEL_EXPORTER_OTLP_ENDPOINT and the CAIRN_ARTIFACT_S3_* endpoint, bucket and region, plus the new pullWorker.extraEnv), so it receives no database settings, no OTEL headers and no env.extra, and it runs under a ServiceAccount of its own with no API token mounted (pullWorker.serviceAccount.annotations for its cloud identity). The token is trimmed. A pullWorker.extraEnv name that looks like a secret or a database setting, or a value with a password in a URL, refuses to render (names and URL credentials only; other credentials belong in the worker’s Secret). pullWorker.serviceAccount.create / .name let a deployment name a pre-provisioned ServiceAccount, never the control plane’s. Rendering refuses a token equal to secrets.obsJwtSecret, existingSecret set to the control plane’s Secret, both values at once, and a non-string token; cairn deploy doctor --values reports the same cases (it warns where the release name is unknown). Notes: deploy/helm/cairn/README.md. (#194)

Fixed

  • cairn pipeline show (including --plan) and explain resolve a bare ref shared with a flow to the declared pipeline, as pipeline run does. The run argument help now states that a bare flow without a pipeline is refused (ADR-0106 D1, #113). Data/ML flow YAML already validates through the flow parser; new CLI controls cover valid and unknown-stage files. (#186)
  • A pipeline step whose required wire resolves to nothing fails the pipeline and stops there: no later step starts on the failed record, advance_step records no approval and rejects the step’s review with the cited reason, and the failure is announced once (including after a passed gate step). (#190)
  • With auth on, a re-adopted leg refused because its record names no workspace (a flow leg re-attached after a restart, the Temporal flow-leg activity, the remote-job control worker’s poll and relaunch) cancels the engine job recorded for it, best-effort, instead of leaving it running unwatched. (#190)
  • Cancelling a job on a compute.ssh box (remote/exec, the builtin SSH engine) and pulling its checkpoints back authenticate with the connection’s PRIVATE_KEY, the credential submit used, instead of SSH_PRIVATE_KEY from the control plane’s environment. The job handle records the connection’s name and account (and the workspace), and cancel resolves the connection in that account, so it also works with no workspace in scope (a learning-gate abort, a run cancel). The connection the handle names is used even if the engine’s target changed since. A job handle recorded before this release, which names no connection, uses the engine’s target, else SSH_PRIVATE_KEY. When the box cannot be reached, cancel and pull-back log a warning naming the host, workdir and connection, and a cancel is reported as failed (cancel_recorded_job returns False; a run cancel does not count the job) instead of failing silently. (#193)

[0.2.1] - 2026-10-23

A patch release: two additive core features for the training and dataset-preparation packs of cairn-extensions (cairndev-sh/cairn#187). Nothing that worked on 0.2.0 changes; a result or pipeline that uses neither feature reads and runs as before.

Added

  • A dataflow stage can return several products (ADR-0141): outputs: [<name>, …] with flat outputs.<name>.output, .content_hash, .kind, .rows, .bytes, .register_as and .register_role stats. Each name becomes an artifact descriptor in the new DataflowResult.named_outputs, with the stage’s parents; output_artifacts still holds one descriptor per stage, and the next stage still descends from the stage’s own product. A split stage can register its train, val and test files as three dataset versions from one stage. named_outputs is left out of the result’s JSON while empty, so a run without named products is read the same by an older control plane. A stage that returns no outputs is unchanged.
  • Dataset-version registration from a flow takes the role a stage gives (register_role), which may be training, validation or test; any other role, golden included, refuses the leg before anything registers. Without it the version keeps the dataset’s default role, as before. The holdout door therefore sees a test split a flow registers as test.
  • A pipeline input may declare the role of the dataset version it takes (ADR-0146): role: training | validation | test | golden and verdict: required. The launch door then refuses a value that is not a registered dataset: ref, a version with another role (a test set passed as training data), or one with no intake verdict when one is required, before any record exists, and records each check under admission.expectations. An unknown role or another verdict: value fails when the pipeline loads. A pipeline that declares neither is decided as before.

Changed

  • The example pack cairn-pack-hello is 0.2.2 in this release (0.2.0 shipped it as 0.2.1).

[0.2.0] - 2026-10-23

A minor release: it changes behaviour that operators, operator packs and library callers rely on (docs/compatibility.md: a break pre-1.0 is a MINOR bump with migration notes). Single-node and auth-off deployments, where everything belongs to the default workspace and account, are unaffected by the workspace, tenant and dataset changes below.

Breaking

  • No workspace in scope is refused with auth on. Resolving a connection, a secret or a dataset reference with auth on and no workspace in scope raises WorkspaceScopeRequired; it no longer resolves as the deployment. A template run, resume, pipeline leg or remote-job poll whose record names no workspace, or a workspace no store holds, is refused; a pipeline step whose record names no workspace ends failed (verdict workspace_unresolved) and fails its pipeline once. ctx.launch with no workspace in scope is refused.
  • A tenant run resolves only its own account’s connections and secrets. A connection name that only the deployment holds no longer resolves for a tenant’s run, the deployment’s bound SecretStore is not read for a tenant run (ADR-0143), and a tenant connection resolves only secret references stored for its account: a bare environment-variable name, ${env:NAME}, the deployment’s stored secrets and a reference stored before account namespacing resolve to nothing.
  • A tenant run’s declared secrets arrive in ctx.secrets, not the process environment. An operator that reads a credential from os.environ in a tenant run receives none.
  • mcp_server_spec, resolve_corpus_source and index_workspace_corpus refuse by default. A stdio MCP server needs allow_stdio=True; an http/sse URL that fails the address guard (loopback, link-local, cloud metadata, or a private address unless CAIRN_PROBE_ALLOW_PRIVATE is set) needs allow_private_network=True; a file:// source, a local path, or an ssh or file: git remote needs allow_local=True. Without allow_private_network the spec carries a no-redirect client factory and is not JSON-serialisable. A tenant corpus clone ignores the server’s system and global gitconfig.
  • Knowledge collection keys change for some workspaces and long pgvector names. A workspace’s collections carry the prefix ws_<id>__, with the id’s dashes turned into underscores, when the id is a lowercase slug ([a-z0-9] runs joined by single dashes) of at most 40 characters; such workspaces, and default (whose names are bare), keep their collections. Any other id (not a slug, or a slug longer than 40 characters) now uses ws__<hash>__, the first 16 hex characters of the id’s SHA-256, so its corpora and episodic memory start empty under the new names. A pgvector collection whose name is longer than 63 bytes is stored in a new hashed table (pg_table_name) and starts empty. New workspace ids are capped at 40 characters and corpus names at 48 (add raises ValueError for a longer one).
  • Dataset references resolve within the workspace. dataset:<name>, a pinned @N and @latest see only the run’s workspace’s versions; another workspace’s version reads as not found, and @latest is the workspace’s own newest version. The default workspace no longer resolves or lists other workspaces’ datasets.
  • pipeline.launching fails closed. When a cairn.run_hooks provider is installed, the new event fires on every pipeline launch, and a provider that raises anything other than AdmissionRefused on it refuses the launch. A provider that raises on events it does not expect therefore refuses every pipeline launch. A provider entry point that fails to load still fails open on every event: it is skipped, recorded (run_hook_load_failures) and shown by cairn doctor. Every other event, run.admitting included, still fails open.
  • Claiming pull-lane work needs a worker credential. With auth on, POST /jobs/claim and job heartbeats take a worker-pool token or the deployment admin’s (CAIRN_API_USER) token; a signed-in user’s token gets 403. POST /registry/install|uninstall need the deployment admin. Deciding a paused saga through POST /triggers/approve/{workflow_id} needs an action handler that implements workspace_of for anyone but the deployment admin.

Migration

  1. Pull workers (auth on). Where CAIRN_JWT_SECRET is set, mint a token per pool with cairn remote worker-token --name <name> [--days N] (default 30 days) and restart each worker with cairn worker --pull --token <that token>.
  2. Tenant connections and secrets. Create, in each tenant account, every connection its runs use that only the deployment holds. Enter again the credential of any tenant connection created before account namespacing (new references are cairn://secrets#<account>/<conn>-<KEY>). Change operators that read credentials from os.environ to read ctx.secrets.
  3. Code outside a request or a run (auth on). Scripts and background jobs that resolve connections, secrets or datasets must enter a workspace first (with workspace_scope("<workspace>"): from cairn.core.workspace), or they get WorkspaceScopeRequired.
  4. Library callers of mcp_server_spec, resolve_corpus_source, index_workspace_corpus. Pass allow_stdio=True, allow_private_network=True or allow_local=True only for specs and sources the deployment itself owns. If corpus clones need a proxy or a private CA, set HTTPS_PROXY, SSL_CERT_FILE or GIT_SSL_CAINFO in the environment instead of http.proxy / http.sslCAInfo in the gitconfig.
  5. Re-index affected knowledge. For a workspace whose id is not a slug or is longer than 40 characters, run index_workspace_corpus for each of its corpora; the new prefix gives new catalog keys, so the incremental index embeds everything. For a pgvector collection whose name exceeds 63 bytes, a git-sourced workspace corpus re-embeds on its next index; a corpus read from a stable path (a file:// workspace corpus, a pack corpus, a directory indexed from the CLI) is skipped while its catalog says it is indexed, so first DELETE FROM rag_catalog WHERE corpus = '<key>' (<key> is <pack>/<corpus> for a pack corpus, or ws:<workspace>/<corpus> for a workspace corpus, preceded by the workspace’s collection prefix outside default), then run index_corpus / index_all (pack corpora) or index_workspace_corpus (workspace corpora). Index again any workspace corpus indexed from outside its workspace before this release (for example from the CLI). Old tables are left in place; drop them when no longer needed.
  6. Datasets (multi-workspace). Register each dataset in every workspace that uses it; refs and @latest no longer reach another workspace’s versions.
  7. Run-hook providers. Return early on events a provider does not handle, and on pipeline.launching raise only AdmissionRefused(reason) to refuse.
  8. Console sign-ins. Nothing to run: the refresh_tokens table is created on first use. Behind a TLS-terminating proxy, or one that rewrites Host, set CAIRN_PUBLIC_URL to the browser-facing https:// origin, so the cairn_refresh cookie is Secure and refresh and sign-out pass the same-origin check. CAIRN_REFRESH_TOKEN_DAYS (default 30) sets how long a remembered sign-in lasts. A rotated refresh token sent again within 10 seconds of its rotation renews (ADR-0144); if the token that replay displaced is presented 10 seconds or more later, the sign-in ends for both holders and the server logs the warning “superseded refresh token presented” (ADR-0145).

Added

  • A run hook can inspect and refuse a pipeline launch before it starts. The cairn.run_hooks entry-point group has a new event, pipeline.launching, fired by the launch door that every pipeline launch goes through (POST /start, POST /pipelines/launch, cairn pipeline run, schedules, watches, webhooks, event triggers, ctx.launch, and a template run wrapped in its one-leg pipeline) after the policy gates, the service doors and the admission decision, and before the pipeline record exists. Its payload carries pipeline_ref, workspace_id, account_id (empty when it cannot be resolved), environment, source, trigger, preset, inputs (the values the launch will run with) and supplied (what the caller and the preset supplied); trigger, inputs and supplied are read-only copies. A provider refuses by raising AdmissionRefused(reason); the caller gets the existing admission refusal (AdmissionRefusedError: 403 with the decision from both HTTP doors, exit code 3 from the CLI) and no record is created. Unlike every other run-hook event, pipeline.launching fails closed: a provider that raises anything else refuses the launch with a reason naming the provider. With no provider installed nothing is fired and launches are unchanged. Every other event keeps its behaviour, run.admitting included (a provider failure is logged and ignored). Upgrade: an installed provider that raises on an event it does not expect now refuses every pipeline launch; providers should return early on events they do not handle.
  • Console sign-ins renew and can be ended on the server (ADR-0142). POST /token, the Google/GitHub sign-in landing and POST /auth/signup still return the same access token in the same place, and now also set a cairn_refresh cookie (HttpOnly, SameSite=Strict, Path=/auth, Secure when the public URL is https) holding an opaque token whose SHA-256 is all the server keeps. POST /auth/refresh (with the header X-Cairn-Refresh: 1, from the server’s own origin) trades it for a new access token and a new cookie; a cookie that was already used revokes every token of that sign-in, unless it is sent again less than 10 seconds after it was used and the sign-in is still live: then it renews (a lost response, two tabs refreshing at once), the token issued for the first use stops working, and a replay inside those 10 seconds is not treated as theft at first (ADR-0144); if the token that replay displaced is sent 10 seconds or more later, the sign-in ends for both and the server logs a warning (ADR-0145). POST /auth/logout, with the same header from the same origin, ends the sign-in (204, idempotent, no access token needed). A sign-in’s lifetime is fixed when it starts; refreshing does not extend it. POST /token takes an optional remember form field: true (the default) keeps the sign-in for CAIRN_REFRESH_TOKEN_DAYS (new setting, default 30), false makes the cookie a session cookie and the server honours it for 12 hours. Changing a user’s password or disabling them ends all their sign-ins. Sign-ins are stored in a new refresh_tokens table (SQLite or Postgres, created on first use). With auth off nothing changes: no cookie, and both new routes answer 400 like /token. cairn remote login is unchanged. An access token already issued stays valid until it expires (30 minutes by default) after a sign-out.
  • cairn.core.dataflow.fidelity: the deterministic, recorded subsample a flow stage takes (Fidelity, plan, row_hash, digest_rows). The kept rows depend only on the corpus, the seed and the row count, never on row or key order, and the digest records which rows were kept, so two runs on the same subsample are provably comparable. Operator packs that sample (training, dataset checks) import it from here instead of carrying their own copy.

Security

  • Dataset references resolve within the run’s workspace. A dataset:<name>[@<version>|@latest] input of a pipeline leg (flow and task legs, in-process and under the Temporal owner) resolves only that workspace’s versions: another workspace’s name, pinned version or head is “not found”, the same as an unknown ref, and @latest is the workspace’s own newest version. With auth on, resolving outside any workspace scope is refused (WorkspaceScopeRequired). The registry’s by-name reads (get_dataset_version, list_dataset_versions, get_dataset_version_meta, list_datasets) and writes (set_dataset_version_meta, set_dataset_version_verdict) take an optional keyword workspace_id and otherwise answer in the current workspace (the request’s or the run’s); a write never changes another workspace’s version. The launch doors (holdout, intake, admission) and the dataset watch read the launching workspace’s versions. Any workspace may register under any name; its versions are visible only to it and do not move another workspace’s @latest. Re-registering identical bytes compares with, and updates only, the registering workspace’s own head. A leg’s export registers, and its intake verdict is stamped, in the run’s workspace; with auth on and no workspace in scope the registration is refused. Shared per name across workspaces: version numbers (one sequence per name, so a workspace’s versions of a name need not be consecutive), and the name-level metadata row (set_dataset_meta: description, labels, default role, schema and column mapping), whose description and labels list_datasets returns; a version registered without an explicit role, schema or column mapping inherits the name’s defaults whichever workspace registers it. Registrations of one name are serialised: on Postgres by a per-name transaction advisory lock, so concurrent registrations get consecutive numbers instead of a duplicate-key error; on SQLite a number another process took first is re-read and retried a bounded number of times. No schema change; versions written before this release keep their recorded workspace (default for rows without one). Single-node and auth-off deployments, where everything belongs to default, are unchanged. Behaviour change for multi-workspace deployments: the default workspace no longer resolves or lists other workspaces’ datasets.
  • Every route that writes a workspace’s records or starts work checks, at the route, that the caller may write in the workspace it acts in, and answers 403 (“not a member of workspace …”) when the caller’s account does not own it. POST /start, the workspace variable writes and POST /triggers/inbox/replay already checked this; the route-level check now also runs, alongside the workspace middleware, on POST /pipelines/launch, saving and deleting launch presets, advancing, approving and cancelling a pipeline, creating, changing and deleting schedules, POST /registry/sync-workflows|enable|disable, POST /packs/{pack}/{template}/run, resuming, cancelling, expiring and sending control to a run, POST /runs/{id}/events/ingest, POST /approvals/dismiss, POST /triggers/alert|pattern|manual and POST /triggers/approve/{workflow_id}. On POST /runs/{id}/events/ingest a per-run worker token is not checked against the workspace: the auth guard already limits it to its own run. The middleware still answers first (404 for a workspace the caller’s account does not own), so a caller it lets through is unchanged. The check runs before the request body is validated, so a caller who may not write there gets 403 even for a malformed body (on POST /start and the variable writes this was a 422). With auth off, a workspace that another account owns (one created while auth was on) now refuses these writes and inbox replay with 403, as POST /start already did; workspaces created with auth off belong to the default account and are unchanged. Not covered: account-level routes (/auth/*, /workspaces), signed webhook receivers, side-effect-free previews, and the pull-lane routes (/jobs/claim, /jobs/{id}/heartbeat), which act in no workspace; who may claim or heartbeat a job is tracked separately.
  • Connection and secret resolution is scoped to the run’s account (the owner of the run’s workspace). Looking a connection up by name (resolve_connection, an operator’s compute_target, a remote job’s compute in the control worker, the per-target concurrency cap, the model licence gate’s token check, preflight’s connection warnings, the templates contract) finds only rows of that account: a tenant’s run finds only its own connections, and the deployment’s run (default) only the deployment’s. resolve_connection takes an optional keyword account_id; omitted, it is the current run’s. An operator’s declared secrets for a tenant run come only from that account’s connections and reach the operator through ctx.secrets; they are no longer written to the process environment, and the deployment’s bound SecretStore is not read for a tenant run (build_scoped_secrets(..., account_id=, values=), declared_secret_values). Template runs, in-process resumes, pipeline legs (in-process and under the Temporal owner) and remote-job polls run in the workspace their record names; with auth on, a record that names no workspace, or a workspace no store holds, is refused instead of resolving as the deployment, and so is a lookup made with auth on outside any workspace scope (WorkspaceScopeRequired); a tenant’s flow legs run on targets in its own account. cairn connect test, cairn doctor and cairn compute status look up the deployment’s connections. Work an operator starts from inside a run (ctx.launch) starts in the run’s workspace, and with auth on and no workspace in scope it is refused. With auth on, a pipeline step whose record names no workspace ends failed (verdict workspace_unresolved) and fails its pipeline once. ADR-0143 records how declared secrets apply to a tenant run. Single-node and auth-off deployments, where everything belongs to default, are unchanged. Behaviour change for tenant runs: a connection name that only the deployment holds no longer resolves, and an operator that reads a credential from os.environ receives none; it must read ctx.secrets.
  • Connection secrets are scoped to the account that owns the connection. A connection of an account other than the deployment’s default resolves only secret references stored for that account: a bare environment-variable name or ${env:NAME}, the deployment’s own stored secrets, the bound SecretStore and another account’s references resolve to nothing, and its OAuth token is read under its own name. New references for an account are namespaced (mint_ref(..., account_id=...) gives cairn://secrets#<account>/<conn>-<KEY>). resolve_secret, put_secret and connection_from_provider take an optional account_id: with one, put_secret and connection_from_provider refuse a reference from outside the account, and connection_from_provider no longer applies the catalog defaults that name server environment variables. Without an account, or with default, nothing changes, and references stored before this release keep resolving for the deployment. A tenant connection that holds an older un-namespaced reference resolves it to nothing until its credential is entered again.
  • mcp_server_spec fails closed. It builds a stdio spec only when the caller passes allow_stdio=True, and an http/sse url must pass the connection probe’s address guard (no loopback, link-local, cloud metadata or, unless CAIRN_PROBE_ALLOW_PRIVATE is set, private address) unless the caller passes allow_private_network=True; otherwise it raises ValueError. A caller that serves the deployment’s admin passes both to keep today’s behaviour. Without allow_private_network the spec carries an httpx_client_factory (no_redirect_http_client) whose client does not follow redirects, so a checked URL cannot redirect the client elsewhere; such a spec holds a callable and is no longer JSON-serialisable. With it the spec is unchanged.
  • A knowledge corpus source (resolve_corpus_source, index_workspace_corpus) is cloned only from a public https:// git URL by default: the address must pass the connection probe’s guard, git is limited to https and does not follow redirects, and -- ends git’s options before the URL. file:// sources, local paths and ssh or file: git remotes need allow_local=True, which only a deployment caller should pass; an option-shaped source or a <transport>:: remote is always refused. Indexing a file:// source whose path ends in .git no longer deletes that directory afterwards. Without allow_local the clone also runs without the server’s system and global git config (credential helpers, extra headers, URL rewrites), with no credential helper, no askpass and no terminal prompt, in an allowlisted environment (PATH, LANG/LC_*, TMPDIR, the proxy variables and the CA-bundle variables) with HOME and XDG_CONFIG_HOME set to an empty temporary directory. Behaviour change: a tenant clone ignores the deployment’s gitconfig, including an http.proxy or http.sslCAInfo set only there; set HTTPS_PROXY / SSL_CERT_FILE (or GIT_SSL_CAINFO) in the environment instead, which tenant clones still use.
  • Breaking default for library callers: mcp_server_spec, resolve_corpus_source and index_workspace_corpus now default to the tenant-safe behaviour above. Code that calls them on the deployment’s own behalf and relied on stdio servers, internal MCP URLs or local / ssh corpus sources must now pass allow_stdio=True, allow_private_network=True or allow_local=True.
  • Known limits of the address guard used by the connection probe, MCP specs and corpus clones: the host is resolved once, before connecting, so a DNS answer that changes in between (DNS rebinding) is not caught, and a host that does not resolve at check time passes. CAIRN_PROBE_ALLOW_PRIVATE lifts the private-address rule for tenant MCP URLs and corpus clones as well as for the probe; loopback, link-local and cloud-metadata addresses stay refused.
  • Claiming pull-lane work needs a worker-pool credential or the deployment admin. With auth on, claiming (POST /jobs/claim) and heartbeating a job need the deployment’s admin (CAIRN_API_USER) token or a worker-pool token; a user’s token gets 403 whatever their account or role. A per-run worker token still heartbeats its own run’s job only. Auth off is unchanged. New: cairn remote worker-token --name <name> [--days N] prints a worker-pool token (claims scope=worker-pool, sub=worker-pool:<name>, default 30 days), signed with the deployment’s CAIRN_JWT_SECRET, so run it where that secret is set. The auth guard limits a worker-pool token to POST /jobs/claim and POST /jobs/{id}/heartbeat (403 elsewhere). Upgrade: a pull worker that ran cairn worker --pull --token with a signed-in user’s token must switch to a worker-pool token (or the deployment admin’s).
  • POST /registry/install and POST /registry/uninstall act on the whole deployment (a pack is process-wide), and with auth on need the deployment’s admin (CAIRN_API_USER); anyone else, an account owner or admin included, gets 403. Auth off is unchanged.
  • POST /triggers/approve/{workflow_id} checks that the saga belongs to the caller’s account, not only the workspace the caller acts in. The route asks the action handler for the saga’s workspace (workspace_of(workflow_id), sync or async) and answers 404 unless the caller’s account owns that workspace. A handler without workspace_of cannot say whose a saga is, so with auth on only the deployment’s admin (CAIRN_API_USER) decides its sagas; everyone else gets 404. The deployment’s admin still decides any saga, and auth off is unchanged. Upgrade: a deployment whose action handler pauses sagas for approval needs a handler that implements workspace_of for account members to keep deciding them.
  • Knowledge corpora and retrieval are scoped to the workspace. Role composition (list_roles, resolve_role, and through them ambient knowledge and compose_knowledge) lists the installed packs’ corpora plus the current workspace’s own corpora. list_roles takes an optional keyword workspace (default: the current workspace), and workspace_corpus_targets_sync() without an argument reads the current workspace’s corpora instead of every workspace’s. index_workspace_corpus indexes a corpus into its own workspace’s collection whichever context calls it, and a corpus target’s collection names that collection. A workspace whose id is not a lowercase slug ([a-z0-9] runs joined by single dashes) now gets the vector-collection prefix ws__<hash>__, so no two workspaces share a prefix; the default workspace and slug ids keep their collection names, so existing collections need no migration. Upgrade: a workspace with a non-slug id indexes its corpora again (its episodic memory starts empty under the new name; the old tables are left in place, not deleted). A workspace corpus indexed from outside its workspace before this release (for example from the CLI) should be indexed again so it lands in its workspace; the earlier index is not removed from the default workspace’s collection of that name automatically.
  • The process-wide RAG vector store and the episodic-memory store are used one collection operation at a time. A store keeps the collection it acts on as instance state, so each store call (a search, an upsert batch, a delete, a source check or listing) now selects its collection and runs while holding that store’s lock (cairn.services.rag.stores.on_collection, StoreLock). Only the store call holds it: parsing, embedding, catalog writes and answer synthesis run outside, and an index run takes it one document’s store call at a time. Waiters are served in arrival order; a caller that waits longer than 30 seconds gets VectorStoreBusy (“knowledge store busy, try again”). A caller with no running asyncio task gets RuntimeError. Each store creates (or checks) a collection once per process, not on every call. The rag/search and memory/search operators keep one store per collection and are unchanged.
  • New workspace ids are at most 40 characters (MAX_WORKSPACE_ID_LEN). POST /workspaces and an account’s first workspace cut a longer slug (an explicit id included) to 40 characters, and the -2, -3 dedupe stays within them. A workspace’s collection names begin with its id, and Postgres keeps only the first 63 bytes of a name: with the cap the workspace part always fits. An existing slug id longer than 40 characters now gets the ws__<hash>__ collection prefix, so a workspace with such an id indexes its corpora again (its episodic memory starts empty under the new name; old tables are left in place). Existing ids are not renamed. A knowledge corpus name is at most 48 characters (MAX_CORPUS_NAME_LEN): every corpus store’s add raises ValueError for a longer one, and corpus_name_problem(name) lets a caller check first.
  • In the default workspace, workspace_collection raises ValueError for a name that starts with ws_, the prefix every other workspace’s collections carry; the default workspace’s own names are bare and never start with it.
  • pgvector stores a collection whose name is longer than 63 bytes (Postgres keeps only the first 63 bytes of an identifier) in a table named by a readable 40-byte head plus a 16-hex SHA-256 of the whole name (pg_table_name), so long corpus names and different embedder fingerprints keep separate tables. Index names stay <table>_embedding_idx / <table>_source_idx cut to 63 bytes, as Postgres already named them; a table whose name is 62 or 63 bytes long, where those cut names coincide, now gets hashed index names, so both of its indexes are created. Names within 63 bytes are unchanged, and SQLite keeps names whole and is unchanged. Upgrade: a pgvector collection whose name was longer than 63 bytes starts as a new, empty table; the old table is left in place. A git-sourced workspace corpus is embedded again on its next index (each clone is read from a new path). A corpus read from a stable path (a file:// workspace corpus, a pack corpus, a directory indexed from the CLI) is skipped by the incremental index while its catalog entries say it is indexed, and there is no force-reindex flag: delete its rows from the rag_catalog table (DELETE FROM rag_catalog WHERE corpus = '<key>', where <key> is <pack>/<corpus> for a pack corpus or ws:<workspace>/<corpus> for a workspace corpus, preceded by the workspace’s collection prefix such as ws_<workspace>__ outside the default workspace), then index it again (index_corpus / index_all for pack corpora, index_workspace_corpus for a workspace corpus).

Changed

  • cairn run --mock returns a deterministic response for every LLM call and runs operators that declare supports_mock through .mock(); it needs no provider key or endpoint. It refuses before any node runs when a reachable operator does not declare mock support, naming those operators. Before, a prompt node’s model call was still made (#62, #164).
  • The example pack cairn-pack-hello is 0.2.1: the ask-the-docs pipeline comments and the pack README describe the --mock dev loop.

Fixed

  • Nested pipeline wires are validated at plan time. A $steps.<id>.<field> inside a with: map or list must name a known step that runs earlier, and a nested $input.<name> must name a declared input; a bare <id>.<field> inside a map or list is refused as ambiguous (write $steps.<id>.<field>). Top-level bare wires still work (#158).
  • The SQLite trigger store holds a thread lock around every use of its shared connection; concurrent use from two threads could crash the process (#163, #165).

[0.1.4] - 2026-10-21

Security

  • The auth guard decides on the request path the router serves (scope['path']), not on request.url.path, which is rebuilt from the Host header and cut at a decoded ? or #. A request to a protected route that names a public path that way now answers 401. The base dependencies require starlette>=1.0.1, the first release that ignores a malformed Host header when it builds request.url.
  • A webhook signature header with non-ASCII characters is refused with 401; it answered 500.
  • The pull-lane jobs router scopes a token exactly as the auth guard does: a token carrying scope=run-ingest is limited to its own run’s job whatever its subject, so heartbeating another run’s job answers 403 (it was treated as an operator credential there).
  • The durable trigger inbox is scoped to the caller’s workspace. GET /triggers/inbox listed every workspace’s queued deliveries, inputs included, to any signed-in user; it now lists only the caller’s workspace (a delivery with no workspace belongs to default). POST /triggers/inbox/replay re-enqueued every workspace’s deliveries for any signed-in user; it now needs an owner or admin (403 otherwise) and replays only the caller’s workspace. The deployment’s admin (CAIRN_API_USER) still replays every workspace’s.
  • With the durable trigger inbox on (CAIRN_TRIGGER_DURABLE), a queued webhook delivery starts through the same launch door as an inline one. The drain compiled and ran the named template in process, with no policy gates, admission, budget reservation or run record, and could not start a declared pipeline at all (pipeline: refs failed and were dead-lettered). Queued deliveries now create a pipeline record and a run per leg, reserve budget where the launch door does (template and flow legs), and a policy deny or a ref that names no pipeline refuses them.
  • With the durable trigger inbox on (CAIRN_TRIGGER_DURABLE), a queued webhook delivery keeps the workspace of the receiver that matched it, and its run starts there; it started in the default workspace. A replayed delivery keeps it too. Deliveries queued by an older server still start in the default workspace, and so does a delivery that a consumer on an older version takes from a shared NATS inbox (it ignores the new field).
  • A workspace can no longer take another workspace’s webhook. Enabling the same pipeline in a second workspace used to replace the first workspace’s trigger record and move it, because trigger ids and names are global. Now a declared webhook whose path, id or name another workspace already holds is not armed, and the server logs an error naming the path and both workspaces. The trigger store refuses such a write (TriggerOwnedByAnotherWorkspace) from any caller. If records from two workspaces still reach the server at one path, no receiver is mounted there. A workspace’s webhook still replaces a pack or overlay receiver at the same path.
  • Only the owning account manages a workspace. DELETE /workspaces/{id} and PATCH /workspaces/{id} archived or restored any workspace for any signed-in user; they now need an owner or admin (403 otherwise) of the account that owns the workspace, and another account’s workspace answers 404, the same as a missing one. POST /workspaces with an id that already exists replaced that workspace and stamped it with the caller’s account, default included, which handed the caller its runs, variables and starts and locked the owner out; an explicit id now answers 404 when another account holds it and 409 when the caller’s own account does; a create by name takes the name’s first free slug (ops-2). The check reads before it writes, so two concurrent creates of the same fresh id can still race (a create-only store write is a follow-up). The deployment’s admin (CAIRN_API_USER) still archives and restores any workspace; auth off is unchanged for archive and restore.
  • With auth on, a workspace id that no workspace store holds is refused with 404, the same answer as a workspace another account owns. Any signed-in user could name an id nobody had created and read or write records under it (runs, variables, pipeline starts), and whoever later created a workspace with that id inherited them. Create a workspace (POST /workspaces, sign-up, or the first OAuth sign-in) before naming it. Auth off is unchanged. With auth on, CAIRN_WORKSPACE must name an existing workspace (default always exists); a workspace named while auth was off but never created is unreachable until it is created with POST /workspaces.
  • With auth on, a request that names no workspace (no /workspaces/<id>/ path, no X-Cairn-Workspace header) is held to the workspace it acts in. It acted in the server’s default workspace (CAIRN_WORKSPACE, else default) for every signed-in user, so a member of any account could read that workspace’s runs, pipelines and other records. A caller whose account owns that workspace is unchanged; any other caller now acts in their account’s oldest active workspace, the one sign-in opens. An account with no active workspace gets 404 on every workspace-scoped route; it can still sign in, list, create and restore its workspaces (/auth/*, /workspaces, /workspaces/{id}) and list operator reports. A CAIRN_WORKSPACE with no workspace record is a misconfiguration with auth on (the server logs a warning at startup): it sends every header-less caller to their account’s oldest active workspace, which for the default account is normally default. A header-less POST /start from another account’s caller launches in that workspace; it answered 403. If an authenticated caller’s account cannot be resolved, the request answers 503 instead of proceeding, whether or not it names a workspace. Otherwise naming a workspace, auth off, public routes and signed webhooks are unchanged. The deployment’s admin (CAIRN_API_USER) and per-run worker tokens belong to the default account, so they are unchanged unless CAIRN_WORKSPACE names a workspace another account owns or one with no record: then a header-less request from them acts in the default account’s oldest active workspace instead, and a worker reporting a run in CAIRN_WORKSPACE without a header gets 404.

Changed

  • The installer (https://docs.cairndev.sh/install.sh) installs from PyPI by default; every package is published there from 0.1.3. CAIRN_RELEASE=<version> still takes cairn’s wheels from that GitHub Release, which is the way to install a version before 0.1.3.
  • The CI gate examples (examples/ci/) install cairndev; they named the bare cairn distribution, which on PyPI is an unrelated project.

Fixed

[0.1.3]

Security

  • The server’s access log no longer records a bearer token sent in the query string: on the run event stream, which accepts ?access_token=, the value is logged as ***.
  • Webhook receivers live under /triggers/. A receiver whose path collides with an app route is refused, a receiver is public only for its own method and only with a non-empty signing secret, and its runs land in the workspace that declared it (#141).

Fixed

  • With no model configured, cairn dev, cairn run --mock and cairn gate --mock sent agentic model calls to the vendor with a placeholder key and failed with a 401. No placeholder key leaves the process now: the call stops with “no model configured: set OPENAI_API_KEY, or OPENAI_BASE_URL …”. A keyless OpenAI-compatible endpoint (OPENAI_BASE_URL) still gets the call.
  • cairn remote pipelines shows each pipeline’s name and step progress (it printed 0/0 steps and no name).
  • The engine image starts with a bare docker run: without CAIRN_PROFILE it runs the packaged secure profile. The bind address still follows sign-in (0.0.0.0 with auth on, 127.0.0.1 with auth off), and the Dockerfile header and the install page show runs that answer. CI starts the built image on every pull request.
  • The Helm example values pin image tags that exist (the bare version), the released chart’s appVersion is that tag, and the docs, chart README and install notes no longer say the GHCR packages are private (#140).
  • cairn-admin, cairn remote console and cairn test no longer point at extras that do not exist: they name the packages they need and the command that adds them to cairn’s own environment.
  • cairn pack sync and cairn pack add render their colours instead of printing Rich markup.
  • cairn compute sweep without an AWS region says to pass --region or set AWS_DEFAULT_REGION, instead of a traceback.
  • cairn pipeline show no longer says flow legs cannot run yet.
  • cairn dev no longer promises a console at /console (the web console is not part of the public core), and cairn demo/cairn dev --seed say how to read the demo workspace.
  • cairn init operator scaffolds a smoke test per operator, so cairn test <pack> has something to run.
  • cairn remote approve/reject (POST /runs/{id}/resume) on a pipeline step gate answers 409 with the cairn remote advance command, not 502, on the in-process runtime; under DBOS and Temporal the step-gate resume is unchanged.
  • When a capability has no binding in the active profile, cairn validate names the active profile and the profiles the pack ships (hello-cairn validates under profiles/hello.toml).

Changed

  • CONTRIBUTING matches the public tree: the sync line includes runtime-dbos (the DBOS runtime tests need it), the console, npm, pre-commit and status-audit steps are gone, cairn dev --engine-only with a CLI login is the dev loop, and the CI gates and branch protection are described as they are.
  • The quickstart’s pip alternative installs from the GitHub Release (--find-links) until the packages are on PyPI.
  • Feature proof: the run hook (hooks) is proved on profile-and-publish, which every cell runs, and the public-e2e job installs the hello extra that declares it. secrets.infisical and worker.pull stay NOT PROVED, each with the reason.

[0.1.2]

Security

  • A bearer token in the URL (?access_token=) is accepted only on the run event stream; anywhere else it is refused (401).
  • A per-run worker token reaches only its own run’s reporting routes (events, control, heartbeat); anything else answers 403.
  • A webhook receiver answers without a cairn token only when its signature is required; an optional-signature receiver stays behind sign-in.
  • The OAuth callback is reachable without a token (the provider’s redirect carries none) and escapes everything it shows; the saga approval decides on POST /triggers/approve/{id} only.
  • The workspace check covers the credential the auth guard accepted, so a token for one workspace cannot read another workspace’s run stream.

Fixed

  • The quickstart’s cairn remote login failed on a plain install with “password hashing needs the ‘auth’ extra”: cairn dev turns on password sign-in, so pwdlib[argon2] is now a base dependency (the auth extra still works and installs nothing more).
  • cairn dev and cairn remote start the engine with python -P, so a cairn/ folder in the working directory (a checkout) is never imported in place of the installed engine.

[0.1.1]

Added

  • 0.1.1, the first complete public release: the engine cairndev, cairn-client, the optional Metaflow and SkyPilot dataflow engines (cairn-operator-dataflow-metaflow, cairn-operator-dataflow-skypilot) and the example pack cairn-pack-hello.

Changed

  • The builtin operator packs and the core contracts ship inside the cairndev wheel (ADR-0137): they are no longer distributions of their own, and their extras are cairndev extras (ssh, train, infisical, dataflow-engine, rerank-cross-encoder, rerank-cohere).