-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtlaiser.toml
More file actions
136 lines (110 loc) · 3.81 KB
/
tlaiser.toml
File metadata and controls
136 lines (110 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# SPDX-License-Identifier: MIT OR Apache-2.0
# tlaiser manifest for conflow
[project]
name = "conflow"
version = "0.1.0"
description = "State machines for the conflow configuration validation pipeline orchestrator"
# ── Pipeline stage execution ──────────────────────────────────────────────────
# Source: src/pipeline/executor.rs, src/pipeline/definition.rs
# Stages transition: Pending -> (CacheHit | Running) -> (Succeeded | Failed)
# Skipped is a terminal state when dry_run=true or condition not met.
[[state-machines]]
name = "StageExecution"
states = ["Pending", "CacheHit", "Running", "Succeeded", "Failed", "Skipped"]
initial-state = "Pending"
description = "Lifecycle of a single pipeline stage during execution. Includes cache lookup, execution, and allow_failure handling."
[[state-machines.variables]]
name = "allow_failure"
init = "FALSE"
type = "BOOLEAN"
[[state-machines.variables]]
name = "cache_enabled"
init = "TRUE"
type = "BOOLEAN"
[[state-machines.transitions]]
from = "Pending"
to = "Skipped"
label = "dry_run_or_condition_false"
[[state-machines.transitions]]
from = "Pending"
to = "CacheHit"
label = "cache_lookup_hit"
guard = "cache_enabled = TRUE"
[[state-machines.transitions]]
from = "Pending"
to = "Running"
label = "cache_miss_or_disabled"
[[state-machines.transitions]]
from = "CacheHit"
to = "Succeeded"
label = "cache_result_applied"
[[state-machines.transitions]]
from = "Running"
to = "Succeeded"
label = "executor_succeeds"
[[state-machines.transitions]]
from = "Running"
to = "Failed"
label = "executor_fails"
guard = "allow_failure = FALSE"
[[state-machines.transitions]]
from = "Running"
to = "Succeeded"
label = "executor_fails_but_allowed"
guard = "allow_failure = TRUE"
# ── Cache invalidation ────────────────────────────────────────────────────────
# Source: src/pipeline/definition.rs CacheInvalidation enum,
# src/cache/filesystem.rs
# Cache entry: Fresh -> Stale -> Absent (evicted)
[[state-machines]]
name = "CacheEntry"
states = ["Absent", "Fresh", "Stale"]
initial-state = "Absent"
description = "Cache entry lifecycle for a pipeline stage result. Entries are keyed by content hash or mtime."
[[state-machines.variables]]
name = "invalidation_policy"
init = "0"
type = "INTEGER"
[[state-machines.transitions]]
from = "Absent"
to = "Fresh"
label = "store_result"
[[state-machines.transitions]]
from = "Fresh"
to = "Stale"
label = "content_hash_changed"
guard = "invalidation_policy = 0"
[[state-machines.transitions]]
from = "Fresh"
to = "Stale"
label = "mtime_changed"
guard = "invalidation_policy = 1"
[[state-machines.transitions]]
from = "Stale"
to = "Fresh"
label = "store_new_result"
[[state-machines.transitions]]
from = "Fresh"
to = "Absent"
label = "cache_clear"
[[state-machines.transitions]]
from = "Stale"
to = "Absent"
label = "cache_clear"
# ── Safety properties ─────────────────────────────────────────────────────────
[[properties]]
name = "SucceededStageNeverReruns"
kind = "safety"
formula = "[][StageExecution = Succeeded => UNCHANGED StageExecution]_StageExecution"
[[properties]]
name = "FailedStagePropagates"
kind = "safety"
formula = "[](StageExecution = Failed => allow_failure = FALSE)"
[[properties]]
name = "PipelineEventuallyTerminates"
kind = "liveness"
formula = "<>(StageExecution = Succeeded \\/ StageExecution = Failed \\/ StageExecution = Skipped)"
[tlc]
workers = 4
max-states = 100000
symmetry = false