Runtime files and execution states¶
This page describes the runtime’s default file locations and the events used to track workflow runs and nodes. Configuration can change the storage paths and backends; see the runtime configuration reference.
Default file layout¶
If not defined otherwire, Tierkreis uses ~/.tierkreis as its default home directory.
If the user’s home directory cannot be determined, it falls back to /tmp/tierkreis.
The following is a logical layout: entries are created when needed,
project/
├── tierkreis.toml # created by tkr init project if absent
└── resource_profiles/ # optional profile directories
└── <profile>/
└── <context>.toml
~/.tierkreis/
├── tierkreis.toml # fallback configuration file
├── assets/ # default file-backed asset storage
├── tmp/ # temporary files, generated HPC executor batch scripts
├── tierkreis.log # default runtime log
├── state.sqlite # default persistent SQLite state using the default path
└── <profile>/ # optional fallback resource profile
└── <context>.toml
tkr init project creates tierkreis.toml in the current directory if it is absent.
Defaults¶
For configuration discovery, the runtime searches for tierkreis.toml
in the current directory and its ancestors, then the path in TKR_CONFIG,
then ~/.tierkreis/tierkreis.toml. An explicit --config selects a file
directly.
Warning
Default runtime state is in memory, so it is lost when the runtime stops even though asset files remain. To retain state across restarts, configure persistent SQLite and keep both the database and the referenced asset storage.
The default asset store writes serialized values as files named by asset key
under assets/.
For SQLite, runtime_state.url takes precedence over DATABASE_URL; if neither is set, the default is ~/.tierkreis/state.sqlite.
The database is not used by the default in-memory configuration.
The default log path is ~/.tierkreis/tierkreis.log; logging configuration can
change it or direct logs to stderr. Resource profiles are searched separately;
see execution contexts and profiles for the full
search order.
Workflow run events¶
A saved workflow is a definition with an UUID; execution creates a run identified by a UUID
and an attempt number, initially 0. Runtime events identify both the run and
attempt. The runtime records state derived from these events.
Event |
Meaning |
Terminal |
|---|---|---|
|
The run is waiting to execute. |
No |
|
Execution has started. New runs record a start time when created. |
No |
|
Execution has paused, typically at a breakpoint with no other runnable work. It can be resumed. |
No |
|
The run finished successfully. |
Yes |
|
The run stopped with an error. User intervention is required. A new attempt can be started by restarting nodes. |
Yes |
|
The run was cancelled. |
Yes |
|
A batch of updates to individual nodes in the run. |
No |
get_summary(run_id, attempt) exposes timestamps and paused or errored node locations.
A task restart creates a new attempt; it does not overwrite the earlier attempt. See logging, errors, and restarting.
Node events and states¶
Node events identify a location within the workflow. The orchestrator and executors emit updates as nodes progress, which can be investigated in the log if logging is enabled.
Node status |
Meaning |
Terminal |
|---|---|---|
|
The orchestrator has scheduled the task, with an optional execution context. |
No |
|
An executor has queued the task; an executor handle may be recorded. |
No |
|
The node is executing or coordinating nested work. |
No |
|
A breakpoint paused the node before execution. |
No |
|
The node finished and its output asset references are recorded. |
Yes |
|
The node failed, with an error message and optional detail. |
Yes |
|
The node was cancelled. |
Yes |
For executor-backed tasks the usual progression is Scheduled → Queued →
Running → Complete, but node kinds and executors can skip stages. Input,
output, constant, and higher-order nodes can be handled by the orchestrator
without following that task sequence. Running updates may also record
conditional-branch selection, Eval inputs, loop iteration, or Map progress.
debug_read_node_states(run_id, attempt, locations) returns a mapping of
locations to Python node-state objects.
For breakpoint inspection, use the run summary’s paused_locations.