|
1 | | -# Node & Instance State Model |
| 1 | +occ# Node & Instance State Model |
2 | 2 |
|
3 | 3 | Status: **Design proposal** (consolidates issues [#240] and [#171]). |
4 | 4 |
|
@@ -93,10 +93,10 @@ Rationale: |
93 | 93 | | `skipped` | yes | Eligible work that was never started because the run already terminated, or a branch the run chose not to take. **(#240, new in 0.2.4)** | |
94 | 94 | | `cancelled` | yes | Work that had started (`running`) or was queued and was abandoned because its enclosing scope (a decided `RACE`) no longer needs it. **(#171, proposed)** | |
95 | 95 |
|
96 | | -> Current state of the code: `pending`, `running`, `completed`, `failed` exist; |
97 | | -> `skipped` is added by this PR (issue #240). `cancelled` for **nodes** is proposed |
98 | | -> here for #171 (the `df.instances` table already has a `cancelled` status, but |
99 | | -> `df.nodes` does not yet). |
| 96 | +> Current state of the code: `pending`, `running`, `completed`, `failed`, and |
| 97 | +> `skipped` exist; `skipped` was added in 0.2.4 for issue #240 (PR #249). |
| 98 | +> `cancelled` for **nodes** is proposed here for #171 (the `df.instances` table |
| 99 | +> already has a `cancelled` status, but `df.nodes` does not yet). |
100 | 100 |
|
101 | 101 | ### `status_reason` vocabulary (proposed) |
102 | 102 |
|
@@ -337,10 +337,10 @@ before committing to the reset mechanism. |
337 | 337 | ### #240 — downstream steps after a failure |
338 | 338 |
|
339 | 339 | When a run terminates with a node-level failure, remaining un-started nodes should |
340 | | -become `skipped` with reason `upstream_failed`. The current PR implements the |
341 | | -set-based sweep (`pending → skipped` guarded by "an instance node is `failed`"). |
342 | | -Under this model that sweep should additionally stamp `status_reason = |
343 | | -'upstream_failed'`. |
| 340 | +become `skipped` with reason `upstream_failed`. The `skipped` status (#240, shipped |
| 341 | +in PR #249) already implements the set-based sweep (`pending → skipped` guarded by |
| 342 | +"an instance node is `failed`"). Under this model that sweep should additionally |
| 343 | +stamp `status_reason = 'upstream_failed'`. |
344 | 344 |
|
345 | 345 | Open refinement: the coarse sweep also catches `IF`/`LOOP` branches that were |
346 | 346 | *deliberately* not taken. With the reason column those should ideally be classified |
@@ -370,9 +370,9 @@ Only the final iteration's loser marks survive as the observable result. |
370 | 370 |
|
371 | 371 | ## Schema & implementation implications |
372 | 372 |
|
373 | | -- **Status set:** add `skipped` (done, #240) and later `cancelled` to |
374 | | - `nodes_status_chk` in both the install DDL ([src/lib.rs](../src/lib.rs)) and a new |
375 | | - upgrade script, per the upgrade contract. |
| 373 | +- **Status set:** `skipped` is already added (done in PR #249 for #240); add |
| 374 | + `cancelled` to `nodes_status_chk` in both the install DDL |
| 375 | + ([src/lib.rs](../src/lib.rs)) and a new upgrade script, per the upgrade contract. |
376 | 376 | - **Reason column:** add `status_reason TEXT` to `df.nodes` (nullable, optionally a |
377 | 377 | `CHECK` against the reason vocabulary). New column ⇒ install DDL + upgrade DDL; |
378 | 378 | binary backward-compat is straightforward (new `.so` only writes it when the |
|
0 commit comments