Commit 9a646a6
authored
Close all 7 findings from the end-to-end claims audit (round 2) (#11)
* fix(executor,cli): execute SQL via provider registry; refuse to fake SQL success
SQL tasks now route through ProviderRegistry built from conduit.yaml
connections in run/apply/backfill/serve. The subprocess fallback that
printed 'SQL execution completed' with rows_affected=0 is now a hard
error naming the unconfigured connection. (Claims-audit finding 1)
Also: cmd_run's final failure message now surfaces the actual task
error (e.g. the missing-connection message) to stderr instead of a
generic "see task output above", and the native SQL provider's
completion log line was reworded to "SQL execution finished via
provider" so it can't be confused with the deleted fake-stub message.
Signed-off-by: Jayveer Singh <[email protected]>
* fix(cli): apply exits non-zero when a task fails or errors
Both failure branches returned Ok(()) so CI gating on conduit apply
was impossible. (Claims-audit finding 2, CLI half)
Signed-off-by: Jayveer Singh <[email protected]>
* feat(planner,cli): reject stale plan files via base environment version
DeploymentPlan now records the environment revision it was generated
against; apply refuses a plan whose base version no longer matches the
live environment, and refuses plans targeting a different environment.
Docs updated to the real conflict output. (Claims-audit finding 3)
Signed-off-by: Jayveer Singh <[email protected]>
* feat(cli): validate data contracts during apply; block on Error severity
cmd_apply now evaluates each executed task's contracts against its
emitted evidence via ContractEvaluator. Error-severity failures abort
before the environment is updated, exit non-zero, and print the
DeploymentValidation summary. (Claims-audit finding 5, contracts half)
Signed-off-by: Jayveer Singh <[email protected]>
* test(cli): make passing-contracts apply test assert the new evaluation output
Signed-off-by: Jayveer Singh <[email protected]>
* feat(cli,executor): wire incremental engine + watermark persistence into run/apply
Tasks with incremental config now get a real IncrementalContext (env
vars via TaskContext.extra_env, SQL rewritten via rewrite_sql), emitted
watermarks advance a WatermarkStore persisted at .conduit/watermarks.json,
and --full-refresh actually forces a full refresh. (Claims-audit
finding 5, incremental half)
Also fixes a prerequisite gap found while wiring this up: the YAML
`incremental:` block was parsed into YamlIncrementalConfig but never
attached to the compiled Task (ParsedTask had no incremental field and
resolver.rs hardcoded `incremental: None`), so declaring `incremental:`
on a task was silently a no-op. yaml_parser.rs now resolves it via the
existing resolve_incremental_config and threads it through ParsedTask
into Task.incremental.
Signed-off-by: Jayveer Singh <[email protected]>
* fix(api,cli): thread the requested environment through scheduler config and task context
trigger_run now inserts environment/triggered_by into the scheduler run
config (the scheduler reads them from there); the serve executor and
conduit run use the run's environment instead of hardcoding production;
run gains --env. (Claims-audit finding 4, threading half)
Signed-off-by: Jayveer Singh <[email protected]>
* fix(api): reopen persistent state on serve startup instead of starting blank
AppState now opens the durable snapshots_db (shared path with the CLI),
loads environments.json (persisting after every env mutation), and
rehydrates the run cache from the durable event log. Restarting serve
no longer loses the operational view. (Claims-audit finding 4,
persistence half)
Signed-off-by: Jayveer Singh <[email protected]>
* feat(api): POST /apply executes the stored plan and updates the environment
Plans generated via POST /plan are cached by id; apply looks up the
reviewed plan, enforces target-environment and base-version (409 on
stale), executes tasks through the provider registry, validates
contracts, stores snapshots, and records the env update with history.
(Claims-audit finding 2, API half)
Signed-off-by: Jayveer Singh <[email protected]>
* feat(cli): honor run --max-tasks and backfill --max-concurrent
conduit run executes dispatched tasks on a semaphore-bounded pool
instead of serially awaiting each; backfill runs partitions through a
JoinSet bounded by --max-concurrent. (Claims-audit finding 7,
concurrency half)
Signed-off-by: Jayveer Singh <[email protected]>
* feat(cli,distributed): real worker/cluster-status/drain over gRPC
conduit worker now runs the real gRPC worker runtime; cluster status
calls the ClusterStatus RPC; cluster drain uses a new DrainWorker RPC
whose directive is delivered on the worker's next heartbeat. Worker-side
SQL stub now fails honestly instead of reporting success. (Claims-audit
finding 6, part A)
Signed-off-by: Jayveer Singh <[email protected]>
* test(distributed): cover the heartbeat drain-directive branch
Signed-off-by: Jayveer Singh <[email protected]>
* feat(cli,distributed): run --distributed starts a real coordinator and dispatches to workers
The banner-only path is gone: --distributed serves the coordinator gRPC
endpoint on --bind (durable assignment recovery under .conduit/), maps
scheduler dispatches onto the distributed protocol, and feeds worker
results back into the scheduler. Exit code reflects the run outcome.
(Claims-audit finding 6, part B)
Signed-off-by: Jayveer Singh <[email protected]>
* test(cli): reap the killed worker process in the distributed run test
kill() without wait() leaves a zombie until the test binary exits;
also silences the clippy zombie_processes warning.
Signed-off-by: Jayveer Singh <[email protected]>
* docs: align API reference, CLI reference, and concept docs with implemented behavior
API reference: remove unrouted endpoints (run cancel, SSE logs,
snapshots CRUD), fix path mismatches (dags/compile, dags/{id}/runs,
environments/promote, lineage/trace/*, /ws/events), document the real
plan/apply semantics (plan_id cache, 409 stale-plan, 422 apply_failed),
the real auth (--auth-enabled, Bearer keys), per-IP rate limiting, the
real error taxonomy, and real request/response shapes throughout.
CLI reference: rewritten from actual --help output. Removes fictional
commands (schedule, events, audit-log, snapshot *, health,
verify-snapshots, cleanup) and documents the real ones that were
missing (impact, backfill, worker, cluster, query, preview, env
set-policy/diff/history).
Concept docs: replace fictional snapshot/schedule/webhook/audit-log/
verify-snapshots/replay-with-modifications examples with the real
equivalents (env history/rollback/diff, replay --events-only, events
API, /ws/events), fix CONDUIT_ENV -> CONDUIT_ENVIRONMENT, and state
honestly what retention and event triggers do and don't support.
CLI help: run --distributed now says workers must connect.
Also commit the claims-audit fix plan. (Claims-audit finding 7, docs
half + residue from findings 2-6; closes the 2026-07-13 plan's Task 12)
Signed-off-by: Jayveer Singh <[email protected]>
---------
Signed-off-by: Jayveer Singh <[email protected]>1 parent 76a19be commit 9a646a6
40 files changed
Lines changed: 6321 additions & 1318 deletions
File tree
- conduit-api
- src
- handlers
- tests
- conduit-cli
- src
- tests
- conduit-compiler
- src
- tests
- conduit-distributed
- proto
- src
- generated
- tests
- conduit-executor
- src
- tests
- conduit-planner/src
- conduit-providers/src
- docs
- src
- concepts
- superpowers/plans
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| |||
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| 179 | + | |
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| |||
385 | 388 | | |
386 | 389 | | |
387 | 390 | | |
| 391 | + | |
388 | 392 | | |
389 | 393 | | |
390 | 394 | | |
| |||
413 | 417 | | |
414 | 418 | | |
415 | 419 | | |
| 420 | + | |
416 | 421 | | |
417 | 422 | | |
418 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
113 | 126 | | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
120 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
121 | 138 | | |
122 | | - | |
| 139 | + | |
123 | 140 | | |
124 | 141 | | |
125 | | - | |
126 | 142 | | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
130 | 146 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
137 | 181 | | |
138 | 182 | | |
139 | 183 | | |
| 184 | + | |
140 | 185 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 186 | + | |
| 187 | + | |
144 | 188 | | |
145 | 189 | | |
146 | 190 | | |
147 | | - | |
148 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
149 | 201 | | |
150 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
151 | 205 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
161 | 350 | | |
162 | 351 | | |
163 | 352 | | |
164 | 353 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
174 | 359 | | |
175 | 360 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
73 | 82 | | |
74 | 83 | | |
75 | 84 | | |
| |||
0 commit comments