Commit d5e9c02
fix(engine): count cascaded asBlocked after a broker-failed elevated edge (#19)
When ``brokerSpawn`` returns ``ok = false`` for a ``requiresElevation``
edge, the engine calls ``blockClosure`` to mark every transitively
dependent edge as ``asBlocked``. The surrounding ``inc completed``
only counted THIS one failed root — the cascaded blocked descendants
stayed invisible to the loop's ``completed < total`` termination
check, so the next iteration found no pending / running / ready work
and raised the spec-mandated ``build graph made no progress; pending
actions: `` diagnostic with an EMPTY pending list (the surviving
actions were ``asBlocked``, not ``asPending``).
The error path's diagnostic gets projected by ``apply_build_actions``
onto every input action, so on the L3 production-profile apply this
surfaces as:
- build-action actionsRunnerZip: build engine raised BuildEngineError: \
build graph made no progress; pending actions:
- build-action actionsRunnerExtracted: build engine raised BuildEngineError: \
build graph made no progress; pending actions:
- build-action runnerRegistered: build engine raised BuildEngineError: \
build graph made no progress; pending actions:
with the empty trailing list and IDENTICAL message across all 3
edges — even though only ``actionsRunnerZip`` actually failed
(``actionsRunnerExtracted`` and ``runnerRegistered`` depend on it
and were correctly cascaded to ``asBlocked`` by ``blockClosure``).
Every OTHER ``blockClosure`` site in the engine already uses
``completed = terminalCount()`` for this exact reason; the broker-
returns-ok=false branch was the lone offender. Align it.
Add a regression test: a 3-action chain with the root broker call
returning ``ok = false`` must terminate with the root ``asFailed``
and the two deps ``asBlocked``, NOT raise ``BuildEngineError``.
--no-verify: pre-existing prek migration-mode failure
(no .pre-commit-config.yaml in repo).
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent de6608d commit d5e9c02
2 files changed
Lines changed: 84 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4076 | 4076 | | |
4077 | 4077 | | |
4078 | 4078 | | |
| 4079 | + | |
| 4080 | + | |
| 4081 | + | |
| 4082 | + | |
| 4083 | + | |
| 4084 | + | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
| 4090 | + | |
| 4091 | + | |
| 4092 | + | |
| 4093 | + | |
| 4094 | + | |
4079 | 4095 | | |
4080 | 4096 | | |
4081 | 4097 | | |
| |||
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 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 | + | |
249 | 317 | | |
250 | 318 | | |
251 | 319 | | |
| |||
0 commit comments