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-localtrains on one CUDA GPU when one is available:train/lora,train/eval-lossand thetrain.lorastage takedeviceandprecision(bothautoby 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 unlessdevice: mpsis asked for. A named device that is unavailable, orfp16/bf16off CUDA, is refused. The stage’s stats reportdevice,precisionandpeak_gpu_mem_gb.cairn-contracts-train1.1.0 adds revision 1.1.0 oftrain.finetuneandtrain.eval_lossbeside 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. Thehello-cairntiny-finetunepipeline takesdeviceandprecisioninputs. In a checkout, reinstallcairndevafter 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.
cairndevnow carries onlytrain/lora,train/eval-loss,dataflow/run,ml/runandartifact/promote, with thetrain,dataflowandartifactcontracts. - 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 theremote,rag,memory,mcp,monitor,storage,audit,data,redactandsecretscontracts. - The
metaflow,skypilot,infisical,rerank-cross-encoderandrerank-cohereextras. - The example pack’s
ask-the-docsandnightly-opspipelines, and theprod-infisicalandsecureprofiles.
Changed
- The example pipeline
profile-and-publishis nowcheck-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-finetuneno longer profiles its data or writes a model card. Itsloss-okgate reads the training leg’s eval loss directly.- The
builtindataflow engine runs on the engine’s own machine only and refuses a target. An environment that setdataflow_targetorml_targetunderbuiltinmust change. A leg on an engine namedsshis 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,pipelineandremoterun 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 --helpand 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>andcairn 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 higherbudget.max_cost_usd. It always existed, but LangChain swallowed it. SetMAX_COST_USDto the most a run may spend, or to0to turn it off. A template’s own cap still applies. - A leg over its cost cap now ends
failedand stops its pipeline, where it could enddoneand the next leg ran. A skill run endsfailedtoo. Anything that reads a capped run’s status sees the change, and a capped run firesrun.failedrather thanrun.finished. Thebudget_exceededoutput is still there. - A malformed
eval_cutoffis 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-hellois 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
samplepreset, so the Quickstart runs on its own rows with--preset sample, from an installed wheel, without downloading a file.cairn-pack-helloneeds the release that carries it. (#317) - The example pack’s
tiny-finetunetakes anoutput_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. Thenoopstage takesregister_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 pinnedcairndev, runscairn run --checkand fails the job with the check’s own exit code, 2 included. Inputscheck,set,fail-on,working-directory,cairndev-version,python-version; outputsverdict,exit-code,report. (#350) - A
pipeline.finishedrun-hook event. An installedcairn.run_hooksprovider learns when a pipeline reachesdone,failedorcancelled, including a pipeline that ends on a gate, a cancel or a deferred failure. The payload ispipeline_id,pipeline_ref,statusandworkspace_id. The in-process pipeline bridge fires it once per pipeline per process, after the record is stored with its final status and, ondone, its resolvedoutputs. 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 asdurable_uri, the way a file was already copied. The artifact then readsdurableincairn doctorand the registry health check after the producing machine is gone. TheCAIRN_ARTIFACT_RELAY_MAX_BYTEScap counts the whole tree. A tree that holds a symlink is not copied. File relay is unchanged (#286). benchmark/budget_overshoot.pypublishes how far past a cost cap a template’s spend gets, on the in-process and DBOS runtimes. (#325)- The example pack’s
over-budgetpipeline shows a budget refusing a run before its engine starts, with no key and no spend, andcairn runnow prints why a leg failed (#368). - The failing and warning rows of
cairn setup --checknow end with— fix:and the command or setting that resolves it, on the same line, so the failurescairn setupprints carry it too. Rows that readunset (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 budgeteither way. - The example pack’s
tiny-finetunepipeline now gatesloss-okon 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 separateevalleg is gone (#252). cairn setup --seedfrom a checkout no longer fails its checks: with no profile set, the example pack runs under its ownprofiles/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 saidmax_cost_usdis not enforced; it is) and the engine’s test lists. The fine-tune guide says what thefinetune-sshprofile’s audit log records. (#255) examples/cigates on a check that ships. It named a pack that isn’t in the public install, so every run exited 2; it now usesexamples/ci/templates/dataset-check.md, which needs onlypip 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 --valuesno longer fails a Helm values file withingress.enabled: falseand no host for a missingCADDY_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 unreadabledated_atno longer voids the check either: the row stays in the comparison, with a warning that also reaches the run’s record. budget.max_cost_usdnow stops a template’s model calls. LangChain was swallowingBudgetExceeded, so spending passed the cap, including the deployment-widemax_cost_usd, and the run endeddone. This includes the deployment’sMAX_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 (0turns 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 parallelmap. A capped leg now endsfailed, where it could enddonewith abudget_exceededoutput, and its pipeline stops. The audit log gets aleg.budget_exceededrow, 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
failedand writes arun.budget_exceededaudit row, where it endeddone. 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’scostnow carries its model spend, where it read $0. - A dry run now reads a top-level
eval_cutoffthe 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 --checkorcairn doctoroutput from 0.3.2 through 0.4.0 withSLACK_WEBHOOK_URLset, rotate the webhook. Its token was printed in full. cairn gateandcairn run --checknow 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-headoncairn admin lineageneeds 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-hellois 0.2.8.
Fixed
cairn setup --checkandcairn doctorno longer print the path of a secret URL. They showhttps://hooks.slack.com/***; a database URL keeps its name. (#402)cairn gateandcairn run --checkdon’t pass a check that didn’t finish. (#394)--expect-headrefuses a value that can’t mean anything, and a match exits 0 in both the plain and--jsonforms when the log has no lineage records. (#380)cairn status --replayreads a run from the local engine. (#382)- A named endpoint is never replaced by local data in
cairn status --replay. (#388) cairn admin lineagesays 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 enginecairn runstarts when nothing is running, now listen on127.0.0.1. To reach one from a container, a VM or another machine, setCAIRN_TRIGGER_HOST. A deployed engine (cairn-server, the image, the chart) is unchanged.cairn pipeline runnow exits 2 at a human gate instead of polling forever, with the record kept.cairn runasks at the gate instead.cairn run <pipeline>starts it, where it used to refuse and point atcairn pipeline run.cairn run <flow>is still refused: a flow runs as a leg of a declared pipeline.cairn runexits 0, 1, 2 or 77. A refused launch is 1, wherecairn pipeline rungives 3; the old names keep their own codes.-i K=Vparses the value as JSON everywhere, so-i ticket=123sends a number, whereremote launch,remote submitandgate --setsent a string.- A
cairn.cliprovider from acairn-pack-*,cairn-operator-*orcairn-contracts-*distribution is now refused, logged and listed bycairn setup --check(ADR-0165 D8). An app’s provider still mounts. - No storage migration, no route changed. The example pack
cairn-pack-hellois 0.2.7.
Added
cairn --helpleads with the main commands, then the headings installed providers name, thencairn admin.cairn packgainsnew,test,lock,ls(--flows,--pipelines),show(--plan,--split,--graph) andexport(--to pipeline|metaflow), andcairn pack checktakes paths and doescairn validate’s work.cairn adminholdsconnect,trigger,preset,audit,lineage,compute,config,deploy,worker,worker-token,hash-password,console,demo,backfillandrespell-packs. The old names (cairn init,ls,validate,test,lock,export,visualize,flow,pipeline lsandshow,connect,audit,lineage,compute,config,deploy,worker,demo, and the rest ofcairn 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.cliprovider names its--helpheading with Typer’srich_help_panel; without one, the heading comes from its entry-point name. A provider from acairn-pack-*,cairn-operator-*orcairn-contracts-*distribution is refused before its code is imported, logged, and shown by the doctor check. (#360) - The example’s
hello.tomlbindsaudit.sink, and the Quickstart runs under it, so a first run’saudit.jsonlshows each step and each decision a person made, with the signed-in user. Thelocal-devdefault is unchanged (#367). cairn setupstarts 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.--stopstops the engine.--server,--checkand--foregroundtake the place ofcairn remote login,cairn doctorandcairn dev, which still work for one more minor version, hidden, and say the new name on stderr. Part of #362 (ADR-0165). (#359)install.shtakesCAIRN_PACKS:CAIRN_PACKS="finetune[laptop] dataset-prep"installs those packs in the tool’s own environment. It also prints thePATHline to paste whencairnisn’t onPATHyet. (#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 runis 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 thecairn decidecommand and exits 2.--dry-run,--checkand--skilltake the place ofcairn pipeline explainandcairn preflight,cairn gate, andcairn remote submit.cairn pipeline run,cairn remote launchand 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]andcairn decide <id> approve|reject|cancel: one door to look and one to decide, for a pipeline or a run (ADR-0165).cairn status --followstays with a pipeline and asks at each gate.cairn replay, andcairn remote pipelines,pipeline,ps,status,watch,findings,logs,advance,approve,reject,cancelandcancel-pipeline, still work for one minor version and print the new spelling on stderr; they leave--helpnow. What the CLI suggests next uses the new names. (#357)- A pipeline gate’s evidence is on its step:
step_state.<gate>.gate_contextholds theshow:fields, the approvers, the spend against the budget cap, the cost estimate and the admission decision, soGET /pipelines/{id}andcairn remote pipeline <id>carry it, andcairn remote launch --watchandcairn remote advanceprint 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 devand the temporary enginecairn runstarts now listen on127.0.0.1, ascairn setupdoes. They run with the fixeddev/devlogin and used to listen on every interface. To reach one from outside this machine, a container or a VM, setCAIRN_TRIGGER_HOST. (#359)cairn pipeline runno 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
runningtask:leg was left to finish; now the bridge that runs it cancels it, waits up to 60 s, and settles itcancelledbefore anyfinalizer: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 triggerslists them). An event trigger applies to the next event; a webhook trigger at the next server start. - The example pack
cairn-pack-hellois 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/storedandPATCH /triggers/stored/{id},cairn remote triggers,enable-trigger <id>anddisable-trigger <id>, andCairnClient.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 endsdone(the<step>.<field>shorthand, or an expression in thepredicate:grammar) and stored on its record (outputs, withoutputs_errorsfor any that did not resolve). A pipeline-levelemits: <topic>publishes them once, when it endsdone, so another pipeline can start on them with akind: eventtrigger. 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: eventtrigger records who published the event: itstriggercarries the bus message’spublisherandcorrelation_id, so a pipeline started by another pipeline’semits: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 itcancelled(stepskipped/cancelled, runcancelled, remote jobs and budget holds closed) before anyfinalizer:runs. Before, a cancel left a running task leg alone and ran the finalizers at once, so acompute/acquirestill starting the box could start it aftercompute/releasehad found it stopped, and the box billed until its lease ran out.compute/acquirenow finishes a start that was in flight when it was cancelled and stops the box itself, andcompute/releasewaits (at most 180 s) for a box that is stillpending, 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 examplecompute/release, riskexternal_write) can be approved or rejected while the pipeline finalizes. Before,advance_stepandreject_steprefused every step once the terminal intent was set, so the gated finalizer waited forever, the pipeline stayedrunning, and the machine it releases kept billing until its lease ran out. Approving runs the finalizer and the pipeline settles; rejecting settles itfailed. 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 throughbuild_chat_modelare recorded on the leg’s run (cost, andllm_cost_usdin its result) and count in gate cost lines and in later legs’ budget checks; the globalmax_cost_usdbackstop now applies to it. Under a cappedgovernance.seriesthe 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/lorafine-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/loranow declaressupports_cancel. (#124) cairn pipeline explainreports the run store as the store chooses it: an unrecognisedCAIRN_STORAGEis “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_DBalone issqlite (CAIRN_RUN_DB), not in-memory.cairn doctor’srun_dbrow names the scheme through the same helper as the other diagnostics. (#274)[profile.approval]works: aprofile.tomlmay now carrymode("off"or"enforce") anddefault_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 unknownmode, or an unknown risk class fails at load.extendsreplaces per key. (#256)cairn connect test(and the probecairn connect addruns) reaches an SSH connection’s host and a Postgres/pgvector DSN’s host. Before, every such connection with a host failedblocked: no host in URL, because the host went through the URL guard as//hostand 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 asblocked: cloud instance-metadata endpoint. The metadata check compares addresses, not strings: all of169.254.0.0/16(IMDS and ECS task metadata) andfd00: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 unrecognisedCAIRN_STORAGEnames at most its scheme instead of echoing the value. Incairn doctor, theset:rows show a URL as<scheme>://host:port/path(no user, password or query) and a value with an@but no scheme as***; this coversCAIRN_BUS,CAIRN_TRIGGER_INBOXandCAIRN_JOB_CHANNEL, which printed a valid DSN in full, andCAIRN_STORAGE, whose mask kept the first 8 characters. Theconfig[<key>]rows show a backend kind: a value with no scheme that is not a plain kind word isunrecognized, never the value, andCAIRN_BUSresolves to its kind (postgres) asCAIRN_STORAGEdoes. Anyone who sharedcairn doctoroutput 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_legswithrequire_hitl) is no longer satisfied by approving the leg it guards or another gate; approve the injected gate itself. Itsapproval_roleis 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 onlyapplies_to.pipeline_legsno longer also matches each leg’s run. POST /approvals/dismissand 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_usdin[profile.budget], a flow leg the builtin engine runs on its own machine is priced and must declare atimeout; a pipeline that launched before can be refused for a missingtimeoutor an estimate that does not fit its cap. Without the setting nothing changes. - The example pack
cairn-pack-hellois 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, socairn audit verifyshows a complete trail. Through the oneaudit_emitchokepoint, with ids, refs, states, amounts and actors only:pipeline.admittedandpipeline.refused(the launch door, with the reasons),pipeline.gate_approved/pipeline.step_advanced/pipeline.gate_rejected(the actor is the token’s identity),pipeline.cancelledandleg.cancelled/run.cancelled(POST /pipelines/{id}/cancelandPOST /runs/{id}/cancelnow record who cancelled),approval.expired/approval.dismissed,leg.submittedandleg.finishedfor 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, andpipeline.finishedwith 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_runandexpire_stale_approvalstake an optionalactor. (#233) - A pipeline run is one OpenTelemetry trace. A short
cairn.pipelineroot span at launch stores its W3C context on thePipelineRecord(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(withcairn.flow_stagechildren),cairn.gate(pause to decision, withdecisionandactor) andcairn.pipeline.settle; task legs’cairn.operatorand each leg’scairn.runjoin the same trace andRun.trace_idrecords it.span()takes an additiveparent=(andstart_time=); remote jobs getTRACEPARENTbesideCAIRN_PARENT_RUN. With no exporter, or without thetelemetryextra, nothing is created or stored. Seedocs/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 lastts, 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, incairn.core.obs.audit(GENESIS_HASH,canonical,chain_hash,verify_chain, also re-exported bycairn.core.operator), andaudit/store,cairn lineageand 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(reasonrequired; the gate’sapprovers:are enforced as for approve; under sign-in the decider is the token’s identity). The step endsskippedwith the verdictrejected, the pipeline endsfailed(finalizers run), the review is decidedrejected, andpipeline.rejectedis published. The Temporal owner takes a newreject_stepsignal.cairn remote reject <pipeline> <step> --reason TEXT [--approver NAME]andCairnClient.reject_step/AsyncCairnClient.reject_stepcall 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 nogovernance.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) andlocal_hourly_usd(the rate of the engine’s own machine). The launch door records the effective cap and its source onPipelineRecord.admission.budget, and the reservations, the Temporal activity, the gate’s cost line andcairn pipeline explainread 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 × timeoutwhen the profile sets a rate, checked at the launch door and settled on every outcome like a leg on a pricedcompute.sshbox. (ADR-0155, #251) cairn pipeline explainandcairn pipeline show --plantake--preset <name>, resolved by the launch door’s own preset step (expand_preset, now shared withlaunch_pipeline_def): the same lookup, the same refusal of a preset key the pipeline no longer declares, and-ikeys layered over the preset. Each input shows the layer it came from (← preset 'name'). (#231)- A
cairn remotesession the server refuses ends in one line,session expired at HH:MM — run cairn remote login(orsession refused by the server (401)), and exit code 77, in every verb:launch --watch(with how to re-attach; the pipeline keeps running),logs --followandapprove --watchincluded. 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) /healthzreportsstore_fingerprint, a short hash naming the connection store the engine reads (CAIRN_STORAGE, elseCAIRN_CONNECTIONS_DB, else the shared SQLite file; never its path or DSN). (#229)
Changed
cairn pipeline explainshows the budget the launch door enforces (the pipeline’s figure, or the deployment’s default or ceiling) and no longer lists a workspace’scost_cap_usdvariable 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 addandcairn connect rmcheck, before writing, that the engine at the endpointcairn remoteuses reads the store this CLI writes. On a mismatch nothing is written and the command exits 3, naming this CLI’s store without credentials;--forcewrites anyway (onadd,--forcealready meant overwrite).cairn doctorreports the same comparison asengine_store. When no engine answers, the write goes ahead and names the store. (#229)~/.cairn/config.tomlis created with mode 0600 and replaced whole, instead of written and then restricted. (#230)
Fixed
- A policy-injected gate (
applies_to.pipeline_legswithrequire_hitl) is satisfied only by its own decision: an upstream gate stands in for it only when it always asks (nowhen:) and, if the rule setsapproval_role, is staffed by that role. Before, any upstream gate counted, including one awhen:could skip. A loop’s later iterations still run on the first iteration’s decision; that is unchanged and open for a decision. approval_roleon arequire_hitlrule is enforced for a policy-injected gate: it becomes the gate’sapprovers, 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_legsis matched when a pipeline is planned and no longer applies to individual operator calls at dispatch. (#34) audit/storekeeps 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, atask: audit/storeleg and a second process (the server and a CLI run under oneCAIRN_AUDIT_LOG) now extend the same chain, andcairn lineageverifies 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/dismissrecords the token’s identity as the actor when auth is on, as gate decisions do; a differentactorin 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 nolineage.recordrow matches, as--jsonalready did; an intact chain with no match still exits 1. (#247)- Setting
OTEL_EXPORTER_OTLP_ENDPOINTwithoutcairndev[telemetry]no longer stops the server at startup:init_tracinglogs one warning naming the extra and runs with tracing off, as metrics already did (whose warning now namescairndev[telemetry], notcairn[telemetry]). (#248) cairn doctor’srun_dbrow reads the run store the way the store chooses it:CAIRN_STORAGEfirst (a Postgres DSN is reported aspostgres host:port/db, asqlite://URL by its file), thenCAIRN_RUN_DB, else in-memory. It no longer warns “in-memory” whenCAIRN_STORAGEpersists runs, names the file it checked, and fails on aCAIRN_STORAGEthat 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.sshconnection that setshourly_usdmust give that leg atimeout, 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 withouthourly_usdis “not priced” and launches as before. (ADR-0151, ADR-0152) cancelledis a job state.remote/execand the builtin SSH engine report a cancelled job ascancelled(terminal, never retried) instead of a retriable death. A third-party consumer ofJobStatusthat treats any state other thansucceeded/failedas running should treatcancelledas terminal. (ADR-0151 D9)- Another pack that registers
compute/acquireorcompute/releasemust drop them in the same upgrade, or whichever loads last wins with a warning (see Added). - The example pack
cairn-pack-hellois 0.2.4 in this release (unchanged apart from the version).
Added
compute/acquireandcompute/releaseship in the builtin remote pack (cairn-operator-remote), so a public pipeline can start the EC2 instance acompute.sshconnection 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 (acquirepaid_compute, rated high and passing the approval chokepoint;releaseexternal_write, never approval-gated), capabilities and reports of the platform’scairn-operator-compute0.1.0, with no contract URI yet (D7).releaseis idempotent: an instance already stopped is a success, so afinalizer: truerelease can run again after a restart.acquirewrites thecairn:managedlease tag (andcairn:release-afterwhenmax_hours > 0, andcairn: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 thatcairn compute sweepcannot see (D8). The operator contractcairn.core.operatorre-exports thecompute_lifecyclefunctions 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’scairn-operator-computemust 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 withDuplicateOperatorError; 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
connectionof afinalizer:step providingcompute.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 acancelledmarker in the job’s workdir before it kills the job, and its poll reads that marker first: a killed job reportscancelled(not retriable) instead of “remote process exited without an exit code” (retriable), so the leg is not relaunched and its run settlescancelled. The builtin SSH engine passescancelledthrough. A job that dies without the marker is still a recoverable death.cancelledis now a documentedJobStatusstate (terminal, never retriable): the remote-job control loop closes such a recordcancelledand resumes its run with{"status": "cancelled"}(it no longer counts it as running or hands it to the learning gate),run_job_lifecycleends with the newJobCancelled(aJobFailed), a resumed durable node raises it instead of pausing again, anddataflow/runandml/runpass an engine’scancelledthrough. A cancel that reaches a job before its process has started (no pid yet) marks itcancelled, kills nothing and logs it; the pull lane (/jobsheartbeat) does not carrycancelled. (#209) - A flow leg whose compute target is a
compute.sshconnection withhourly_usdis 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 athourly_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 notimeout(“declare a timeout to price this leg”), and records each leg’s estimate, rate, hours and connection underadmission.cost_estimate. The leg reserves that recorded figure, even if the connection’s rate changes later. The approval gate before the first priced leg showsestimate_usdandestimate_basisin its evidence. Every attempt settleshourly_usd ×its wall-clock on success, failure, timeout or cancel (instead of releasing a failed attempt), and the leg’sRun.cost.gpu_usdis the sum of its attempts; engine-reported cost stays inllm_usd. The estimate is the bounded worst case: a priced leg inside a loop countsmax_iterationstimes, and a leg that may retry counts each attempt (a declaredretry: {max_attempts}, else 1 formland 2 fordatalegs); each attempt still reserves one attempt’s figure. Agovernance.budget.usdwith noseriesis 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 malformedhourly_usd) refuses the launch with the reason; only a target with nohourly_usd, another connection kind or aworker: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_pipelinekeeps 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.sshboxes. Deployments that ran flow legs on acompute.sshbox before this release should rotateMLFLOW_TRACKING_PASSWORDand 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.sshconnection’simage,remote_imageorCAIRN_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 withoutpullWorker.tokenorpullWorker.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.extrakeys the worker’s jobs rely on move topullWorker.extraEnv(credentials to the worker’s Secret). See Breaking (Helm chart). CAIRN_RUNTIME=temporalrefuses at launch a pipeline with atask:leg or afinalizer:step, before any record exists (HTTP 403, exit 3). Run such pipelines underinprocessordbos.- New:
remote_env(control-plane variables forwarded to an SSH job by name), comma-separated values fortype: listinputs, andcairn ls <pack>listing the pack’s deployment profiles.
Breaking (Helm chart)
- A chart with
pullWorker.enabled=trueand neitherpullWorker.tokennorpullWorker.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 theCAIRN_ENGINE_URL/OBS_ENGINE_URLfallback),CAIRN_RUNTIME,CAIRN_REQUIRE_AUTH,CAIRN_TEMPORAL_ADDRESSandCAIRN_CHECKPOINTER. Upgrade:env.extrakeys a worker’s jobs relied on move topullWorker.extraEnv(or the worker’s Secret, for credentials). The worker’s ServiceAccount is now<release>-pull-worker(orpullWorker.serviceAccount.namewithcreate: 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 topullWorker.serviceAccount.annotations. A ConfigMap, ServiceAccount or Secret already named<release>-pull-workercollides. (#194)
Migration
- Artifact registry (ADR-0147, ADR-0148). The first start on an existing database migrates it in place, once: SQLite rebuilds
artifact_tagsonto the key(workspace_id, name)and Postgres swaps its primary key, with every existing tag indefault; the newartifact_ownerstable is backfilled so thatdefaultowns 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_parentsis 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 indefault; promote it again in its workspace. A library or route that calls the registry outside any workspace scope passesworkspace_id=. (#192)
Added
- A pipeline input declared
type: listtakes a comma-separated string as well as JSON:-i report_to=mlflow,wandbgives["mlflow", "wandb"](items trimmed, empty items dropped). The launch door types it, so the CLI, the console and schedules agree, andcairn pipeline explain -ishows 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/*.tomlbeside itspack.toml), each with itsvisibilityand its absolute installed path, soCAIRN_PROFILEcan be set without looking in site-packages.--jsoncarries the same underprofiles(name,path,absolute_path,visibility). (#196) (#208)remote_env([profile.backends], orCAIRN_REMOTE_ENV): names of control-plane environment variables the builtin SSH engine forwards to the job on the box, each when set (for exampleCAIRN_CHECKPOINT_BUCKET,CAIRN_CHECKPOINT_PREFIX,AWS_DEFAULT_REGION). A name containingKEY,SECRET,TOKENorPASSWORD, 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’sdataset: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 adomain_packwith itspipelines, 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 staytemplate_pack, unchanged. A livedomain_packcarries noinstallname, 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 atask:leg or afinalizer:step before any record exists, naming each such step and pointing toinprocessordbos: HTTP 403 from/pipelines/launchand/start, exit 3 fromcairn pipeline run, and a reported problem incairn 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).inprocessanddbosare 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.sshconnection’simageor byremote_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 ownmode = imageit names the connection’simageandmode. A connection’smodeandimagestill override the environment per box.auto, the default, runs the box’s virtualenv when no image is named, as before.cairn doctorreports each compute target’s execution unit from the connection and the environment’sremote_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_IMAGEis 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,adminwhen 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 aworker:<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;resolvereads andpromotemoves only the tag of the workspace named (workspace_id=) or in scope, andpromoterefuses 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,resolveandlineageanswer 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 doctorchecks the registry of the process’s workspace (CAIRN_WORKSPACE, elsedefault). (#192) - With auth on, an artifact registry call (
register,get,find_by_uri,list_artifacts,lineage,resolve,promote) with noworkspace_id=and no workspace in scope raisesWorkspaceScopeRequiredbefore anything is read or written. (#192) - A
dataset:ref read by a flow leg on acompute.sshbox 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.sshbox (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/execcreates the job’srunner.shexclusively 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, includingMLFLOW_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 acompute.sshbox 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-hellois 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, orpullWorker.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_ENDPOINTand theCAIRN_ARTIFACT_S3_*endpoint, bucket and region, plus the newpullWorker.extraEnv), so it receives no database settings, no OTEL headers and noenv.extra, and it runs under a ServiceAccount of its own with no API token mounted (pullWorker.serviceAccount.annotationsfor its cloud identity). The token is trimmed. ApullWorker.extraEnvname 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/.namelet a deployment name a pre-provisioned ServiceAccount, never the control plane’s. Rendering refuses a token equal tosecrets.obsJwtSecret,existingSecretset to the control plane’s Secret, both values at once, and a non-string token;cairn deploy doctor --valuesreports the same cases (it warns where the release name is unknown). Notes:deploy/helm/cairn/README.md. (#194)
Fixed
cairn pipeline show(including--plan) andexplainresolve a bare ref shared with a flow to the declared pipeline, aspipeline rundoes. Therunargument 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_steprecords 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.sshbox (remote/exec, the builtin SSH engine) and pulling its checkpoints back authenticate with the connection’sPRIVATE_KEY, the credential submit used, instead ofSSH_PRIVATE_KEYfrom 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, elseSSH_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_jobreturnsFalse; 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 flatoutputs.<name>.output,.content_hash,.kind,.rows,.bytes,.register_asand.register_rolestats. Each name becomes an artifact descriptor in the newDataflowResult.named_outputs, with the stage’s parents;output_artifactsstill 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_outputsis 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 nooutputsis unchanged. - Dataset-version registration from a flow takes the role a stage gives (
register_role), which may betraining,validationortest; any other role,goldenincluded, 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 astest. - A pipeline input may declare the role of the dataset version it takes (ADR-0146):
role: training | validation | test | goldenandverdict: required. The launch door then refuses a value that is not a registereddataset: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 underadmission.expectations. An unknown role or anotherverdict:value fails when the pipeline loads. A pipeline that declares neither is decided as before.
Changed
- The example pack
cairn-pack-hellois 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 (verdictworkspace_unresolved) and fails its pipeline once.ctx.launchwith 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 fromos.environin a tenant run receives none. mcp_server_spec,resolve_corpus_sourceandindex_workspace_corpusrefuse by default. A stdio MCP server needsallow_stdio=True; an http/sse URL that fails the address guard (loopback, link-local, cloud metadata, or a private address unlessCAIRN_PROBE_ALLOW_PRIVATEis set) needsallow_private_network=True; afile://source, a local path, or an ssh orfile:git remote needsallow_local=True. Withoutallow_private_networkthe 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, anddefault(whose names are bare), keep their collections. Any other id (not a slug, or a slug longer than 40 characters) now usesws__<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 (addraisesValueErrorfor a longer one). - Dataset references resolve within the workspace.
dataset:<name>, a pinned@Nand@latestsee only the run’s workspace’s versions; another workspace’s version reads as not found, and@latestis the workspace’s own newest version. Thedefaultworkspace no longer resolves or lists other workspaces’ datasets. pipeline.launchingfails closed. When acairn.run_hooksprovider is installed, the new event fires on every pipeline launch, and a provider that raises anything other thanAdmissionRefusedon 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 bycairn doctor. Every other event,run.admittingincluded, still fails open.- Claiming pull-lane work needs a worker credential. With auth on,
POST /jobs/claimand job heartbeats take a worker-pool token or the deployment admin’s (CAIRN_API_USER) token; a signed-in user’s token gets403.POST /registry/install|uninstallneed the deployment admin. Deciding a paused saga throughPOST /triggers/approve/{workflow_id}needs an action handler that implementsworkspace_offor anyone but the deployment admin.
Migration
- Pull workers (auth on). Where
CAIRN_JWT_SECRETis set, mint a token per pool withcairn remote worker-token --name <name> [--days N](default 30 days) and restart each worker withcairn worker --pull --token <that token>. - 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 fromos.environto readctx.secrets. - 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>"):fromcairn.core.workspace), or they getWorkspaceScopeRequired. - Library callers of
mcp_server_spec,resolve_corpus_source,index_workspace_corpus. Passallow_stdio=True,allow_private_network=Trueorallow_local=Trueonly for specs and sources the deployment itself owns. If corpus clones need a proxy or a private CA, setHTTPS_PROXY,SSL_CERT_FILEorGIT_SSL_CAINFOin the environment instead ofhttp.proxy/http.sslCAInfoin the gitconfig. - Re-index affected knowledge. For a workspace whose id is not a slug or is longer than 40 characters, run
index_workspace_corpusfor 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 (afile://workspace corpus, a pack corpus, a directory indexed from the CLI) is skipped while its catalog says it is indexed, so firstDELETE FROM rag_catalog WHERE corpus = '<key>'(<key>is<pack>/<corpus>for a pack corpus, orws:<workspace>/<corpus>for a workspace corpus, preceded by the workspace’s collection prefix outsidedefault), then runindex_corpus/index_all(pack corpora) orindex_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. - Datasets (multi-workspace). Register each dataset in every workspace that uses it; refs and
@latestno longer reach another workspace’s versions. - Run-hook providers. Return early on events a provider does not handle, and on
pipeline.launchingraise onlyAdmissionRefused(reason)to refuse. - Console sign-ins. Nothing to run: the
refresh_tokenstable is created on first use. Behind a TLS-terminating proxy, or one that rewritesHost, setCAIRN_PUBLIC_URLto the browser-facinghttps://origin, so thecairn_refreshcookie isSecureand 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_hooksentry-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 carriespipeline_ref,workspace_id,account_id(empty when it cannot be resolved),environment,source,trigger,preset,inputs(the values the launch will run with) andsupplied(what the caller and the preset supplied);trigger,inputsandsuppliedare read-only copies. A provider refuses by raisingAdmissionRefused(reason); the caller gets the existing admission refusal (AdmissionRefusedError:403with the decision from both HTTP doors, exit code3from the CLI) and no record is created. Unlike every other run-hook event,pipeline.launchingfails 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.admittingincluded (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 andPOST /auth/signupstill return the same access token in the same place, and now also set acairn_refreshcookie (HttpOnly,SameSite=Strict,Path=/auth,Securewhen the public URL is https) holding an opaque token whose SHA-256 is all the server keeps.POST /auth/refresh(with the headerX-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 /tokentakes an optionalrememberform field: true (the default) keeps the sign-in forCAIRN_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 newrefresh_tokenstable (SQLite or Postgres, created on first use). With auth off nothing changes: no cookie, and both new routes answer400like/token.cairn remote loginis 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@latestis 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 keywordworkspace_idand 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 labelslist_datasetsreturns; 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 (defaultfor rows without one). Single-node and auth-off deployments, where everything belongs todefault, are unchanged. Behaviour change for multi-workspace deployments: thedefaultworkspace 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 andPOST /triggers/inbox/replayalready checked this; the route-level check now also runs, alongside the workspace middleware, onPOST /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|manualandPOST /triggers/approve/{workflow_id}. OnPOST /runs/{id}/events/ingesta 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 (404for 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 gets403even for a malformed body (onPOST /startand the variable writes this was a422). With auth off, a workspace that another account owns (one created while auth was on) now refuses these writes and inbox replay with403, asPOST /startalready 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’scompute_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_connectiontakes an optional keywordaccount_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 throughctx.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 doctorandcairn compute statuslook 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 (verdictworkspace_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 todefault, 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 fromos.environreceives none; it must readctx.secrets. - Connection secrets are scoped to the account that owns the connection. A connection of an account other than the deployment’s
defaultresolves 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=...)givescairn://secrets#<account>/<conn>-<KEY>).resolve_secret,put_secretandconnection_from_providertake an optionalaccount_id: with one,put_secretandconnection_from_providerrefuse a reference from outside the account, andconnection_from_providerno longer applies the catalog defaults that name server environment variables. Without an account, or withdefault, 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_specfails closed. It builds astdiospec only when the caller passesallow_stdio=True, and an http/sseurlmust pass the connection probe’s address guard (no loopback, link-local, cloud metadata or, unlessCAIRN_PROBE_ALLOW_PRIVATEis set, private address) unless the caller passesallow_private_network=True; otherwise it raisesValueError. A caller that serves the deployment’s admin passes both to keep today’s behaviour. Withoutallow_private_networkthe spec carries anhttpx_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 publichttps://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 orfile:git remotes needallow_local=True, which only a deployment caller should pass; an option-shaped source or a<transport>::remote is always refused. Indexing afile://source whose path ends in.gitno longer deletes that directory afterwards. Withoutallow_localthe 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) withHOMEandXDG_CONFIG_HOMEset to an empty temporary directory. Behaviour change: a tenant clone ignores the deployment’s gitconfig, including anhttp.proxyorhttp.sslCAInfoset only there; setHTTPS_PROXY/SSL_CERT_FILE(orGIT_SSL_CAINFO) in the environment instead, which tenant clones still use. - Breaking default for library callers:
mcp_server_spec,resolve_corpus_sourceandindex_workspace_corpusnow 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 passallow_stdio=True,allow_private_network=Trueorallow_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_PRIVATElifts 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 gets403whatever 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 (claimsscope=worker-pool,sub=worker-pool:<name>, default 30 days), signed with the deployment’sCAIRN_JWT_SECRET, so run it where that secret is set. The auth guard limits a worker-pool token toPOST /jobs/claimandPOST /jobs/{id}/heartbeat(403elsewhere). Upgrade: a pull worker that rancairn worker --pull --tokenwith a signed-in user’s token must switch to a worker-pool token (or the deployment admin’s). POST /registry/installandPOST /registry/uninstallact 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, gets403. 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 answers404unless the caller’s account owns that workspace. A handler withoutworkspace_ofcannot say whose a saga is, so with auth on only the deployment’s admin (CAIRN_API_USER) decides its sagas; everyone else gets404. 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 implementsworkspace_offor 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 andcompose_knowledge) lists the installed packs’ corpora plus the current workspace’s own corpora.list_rolestakes an optional keywordworkspace(default: the current workspace), andworkspace_corpus_targets_sync()without an argument reads the current workspace’s corpora instead of every workspace’s.index_workspace_corpusindexes a corpus into its own workspace’s collection whichever context calls it, and a corpus target’scollectionnames that collection. A workspace whose id is not a lowercase slug ([a-z0-9]runs joined by single dashes) now gets the vector-collection prefixws__<hash>__, so no two workspaces share a prefix; thedefaultworkspace 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 thedefaultworkspace’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 getsVectorStoreBusy(“knowledge store busy, try again”). A caller with no running asyncio task getsRuntimeError. Each store creates (or checks) a collection once per process, not on every call. Therag/searchandmemory/searchoperators keep one store per collection and are unchanged. - New workspace ids are at most 40 characters (
MAX_WORKSPACE_ID_LEN).POST /workspacesand an account’s first workspace cut a longer slug (an explicitidincluded) to 40 characters, and the-2,-3dedupe 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 thews__<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’saddraisesValueErrorfor a longer one, andcorpus_name_problem(name)lets a caller check first. - In the
defaultworkspace,workspace_collectionraisesValueErrorfor a name that starts withws_, the prefix every other workspace’s collections carry; thedefaultworkspace’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_idxcut 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 (afile://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 therag_catalogtable (DELETE FROM rag_catalog WHERE corpus = '<key>', where<key>is<pack>/<corpus>for a pack corpus orws:<workspace>/<corpus>for a workspace corpus, preceded by the workspace’s collection prefix such asws_<workspace>__outside thedefaultworkspace), then index it again (index_corpus/index_allfor pack corpora,index_workspace_corpusfor a workspace corpus).
Changed
cairn run --mockreturns a deterministic response for every LLM call and runs operators that declaresupports_mockthrough.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-hellois 0.2.1: theask-the-docspipeline comments and the pack README describe the--mockdev loop.
Fixed
- Nested pipeline wires are validated at plan time. A
$steps.<id>.<field>inside awith: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 onrequest.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 requirestarlette>=1.0.1, the first release that ignores a malformed Host header when it buildsrequest.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-ingestis 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/inboxlisted 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 todefault).POST /triggers/inbox/replayre-enqueued every workspace’s deliveries for any signed-in user; it now needs an owner or admin (403otherwise) 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 policydenyor 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}andPATCH /workspaces/{id}archived or restored any workspace for any signed-in user; they now need an owner or admin (403otherwise) of the account that owns the workspace, and another account’s workspace answers404, the same as a missing one.POST /workspaceswith an id that already exists replaced that workspace and stamped it with the caller’s account,defaultincluded, which handed the caller its runs, variables and starts and locked the owner out; an explicitidnow answers404when another account holds it and409when 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_WORKSPACEmust name an existing workspace (defaultalways exists); a workspace named while auth was off but never created is unreachable until it is created withPOST /workspaces. - With auth on, a request that names no workspace (no
/workspaces/<id>/path, noX-Cairn-Workspaceheader) is held to the workspace it acts in. It acted in the server’s default workspace (CAIRN_WORKSPACE, elsedefault) 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 gets404on every workspace-scoped route; it can still sign in, list, create and restore its workspaces (/auth/*,/workspaces,/workspaces/{id}) and list operator reports. ACAIRN_WORKSPACEwith 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 normallydefault. A header-lessPOST /startfrom another account’s caller launches in that workspace; it answered403. If an authenticated caller’s account cannot be resolved, the request answers503instead 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 unlessCAIRN_WORKSPACEnames 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 inCAIRN_WORKSPACEwithout a header gets404.
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/) installcairndev; they named the barecairndistribution, 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 --mockandcairn gate --mocksent 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 pipelinesshows each pipeline’s name and step progress (it printed0/0 stepsand no name).- The engine image starts with a bare
docker run: withoutCAIRN_PROFILEit runs the packagedsecureprofile. 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
appVersionis that tag, and the docs, chart README and install notes no longer say the GHCR packages are private (#140). cairn-admin,cairn remote consoleandcairn testno 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 syncandcairn pack addrender their colours instead of printing Rich markup.cairn compute sweepwithout an AWS region says to pass--regionor setAWS_DEFAULT_REGION, instead of a traceback.cairn pipeline showno longer says flow legs cannot run yet.cairn devno longer promises a console at/console(the web console is not part of the public core), andcairn demo/cairn dev --seedsay how to read thedemoworkspace.cairn init operatorscaffolds a smoke test per operator, socairn test <pack>has something to run.cairn remote approve/reject(POST /runs/{id}/resume) on a pipeline step gate answers 409 with thecairn remote advancecommand, 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 validatenames the active profile and the profiles the pack ships (hello-cairn validates underprofiles/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-onlywith a CLI login is the dev loop, and the CI gates and branch protection are described as they are. - The quickstart’s
pipalternative installs from the GitHub Release (--find-links) until the packages are on PyPI. - Feature proof: the run hook (
hooks) is proved onprofile-and-publish, which every cell runs, and thepublic-e2ejob installs thehelloextra that declares it.secrets.infisicalandworker.pullstay 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 loginfailed on a plain install with “password hashing needs the ‘auth’ extra”:cairn devturns on password sign-in, sopwdlib[argon2]is now a base dependency (theauthextra still works and installs nothing more). cairn devandcairn remotestart the engine withpython -P, so acairn/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 packcairn-pack-hello.
Changed
- The builtin operator packs and the core contracts ship inside the
cairndevwheel (ADR-0137): they are no longer distributions of their own, and their extras arecairndevextras (ssh,train,infisical,dataflow-engine,rerank-cross-encoder,rerank-cohere).