Skip to content

Commit 35c1432

Browse files
committed
📝 Say that leasing, cancellation and deletion shipped
The specification and the architecture inventory still described this slice's own work as designed and unbuilt. §3.9 listed a command surface without `cancel` or `delete` and then explained that both refuse because no lifecycle provider implements them — which stopped being true in this branch, and would have told a reader to expect a refusal from a command that answers. So the shipped surface is the shipped surface: seven commands, with the two control actions named alongside the reason they are safe to offer at all. They take the executor lease before they change anything, which is why a run somebody is running is refused rather than reached past, and each reports the one line it actually prints. The inventories follow. Executor leasing, cancellation and deletion are built by #367; start and resume no longer "define" a lease they now acquire; and the paragraph promising that #367 *would* replace the opportunistic orphan closure says that it did. Durable suspension stays unbuilt, and so do fork and typed input delivery. That line is the one thing in these passages that was still accurate, and moving it would have traded one drift for another. Documentation only. No implementation, no test and no behavior changed.
1 parent 7cd080e commit 35c1432

2 files changed

Lines changed: 27 additions & 18 deletions

File tree

‎architecture.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,9 @@ module imports no SQLite, no DOFS and no runtime detection: it asks a host
409409
adapter to open storage and to attach a run's Workspace, and the entrypoints
410410
decide which adapter exists.
411411

412-
The start/resume slice predates executor ownership. Issue #367 replaces its
413-
opportunistic orphan closure with the lifecycle authority below; no supported
414-
host may advance a retained run without that authority once the slice lands.
412+
The start/resume slice predated executor ownership. Issue #367 replaced its
413+
opportunistic orphan closure with the lifecycle authority below, and no
414+
supported host advances a retained run without that authority.
415415

416416
## Workflow lifecycle authority
417417

@@ -2044,10 +2044,10 @@ Status is measured against main.
20442044
| `service=<binding>` | publishes the attachment's endpoint into the live binding overlay for its invocation | built on main |
20452045
| `ephemeral eval` | reconstructs live middleware and bindings without a journal entry | built on main |
20462046
| `useWorkflowServiceDenial()` | provides a non-delegating workflow service denial provider, installed inside every start and resume execution scope | built on the #366 stack |
2047-
| `xmd workflow start` / `xmd workflow resume` | starts or resumes a workflow run from the CLI, under the Deno entrypoints only | built on the #366 stack; #367 defines the required executor lease, unbuilt |
2047+
| `xmd workflow start` / `xmd workflow resume` | starts or resumes a workflow run from the CLI, under the Deno entrypoints only | built on the #366 stack; both acquire #367's executor lease before any lifecycle transition |
20482048
| implicit workflow Workspace | retains provider-neutral filesystem, repository and attachment state by run ID | document filesystem built on the #366 stack; repository, process and attachment capabilities unbuilt (#218) |
20492049
| Repository / Worktree / transactional Git effects | compose named checkouts and publish local mutations with their journal result | defined in `specs/workflow-workspace-spec.md`, unbuilt |
2050-
| workflow lifecycle inspection and control | reads status/list/history without advancing a run, enforces one executor, refuses live cancellation, cancels non-live runs under lifecycle authority and deletes retained state | immutable inspection built on the #367 stack; executor lease, cancellation and deletion defined here and in `specs/workflow-workspace-spec.md`, unbuilt |
2050+
| workflow lifecycle inspection and control | reads status/list/history without advancing a run, enforces one executor, refuses live cancellation, cancels non-live runs under lifecycle authority and deletes retained state | built on the #367 stack |
20512051
| historical authored source | retains an authored durable operation's normalized `SourcePosition` beside its identity, and history parses it or refuses the entry | built on the #367 stack |
20522052
| history fork | creates a new run from one compatible checkpoint and retained Workspace root | defined in `specs/workflow-workspace-spec.md`, unbuilt (#368) |
20532053
| read-only workflow Agent / generated XMD | lets an Agent inspect a derived view and propose constrained executable changes | defined in `specs/workflow-workspace-spec.md`, unbuilt |

‎specs/workflow-workspace-spec.md‎

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -350,22 +350,29 @@ same run lifecycle remotely.
350350

351351
The lifecycle above is the whole design, including §3.7's rule that a status
352352
line is published only once its atomic lifecycle transition has persisted. What a
353-
caller can run today is `start`, `resume` and the three inspections:
353+
caller can run today is `start` and `resume`, the three inspections, and the two
354+
control actions:
354355

355356
```sh
356357
xmd workflow start [--id=<run-id>] [--props-*=…] <definition>
357358
xmd workflow resume <run-id>
358359
xmd workflow status <run-id> [--json]
359360
xmd workflow list [--status=<status>] [--json]
360361
xmd workflow history <run-id> [--json]
362+
xmd workflow cancel <run-id>
363+
xmd workflow delete <run-id>
361364
```
362365

363-
`cancel` and `delete` are actions of the same grammar and refuse rather than
364-
answer, because no lifecycle provider implements them yet.
366+
`cancel` and `delete` take the executor lease before they change anything, which
367+
is what makes them safe to offer at all: a run somebody is running has an owner
368+
holding that lease, and both refuse it rather than reaching past it (§3.6). Each
369+
reports one line on standard output — `workflow cancel: <run-id> (<status>)` and
370+
`workflow delete: <run-id> (<removed>)`.
365371

366-
Both stream the document's own output to standard output and report two stable
367-
lines on standard error — `workflow run: <run-id>` once the run has been created
368-
or found, and `workflow status: <status>` once the execution settles.
372+
`start` and `resume` stream the document's own output to standard output and
373+
report two stable lines on standard error — `workflow run: <run-id>` once the run
374+
has been created or found, and `workflow status: <status>` once the execution
375+
settles.
369376

370377
A status line is published only after the transaction that finishes the
371378
document-execution record and publishes the run state has committed. What a
@@ -409,10 +416,12 @@ Runs live beneath `~/.xmd/runs` unless `XMD_WORKFLOW_RUNS` names another
409416
absolute directory. Where a run's database is on a host is arrangement, not
410417
identity (§5.2).
411418

412-
Status, list and history are built (§4). Cancel, fork and delete are designed
413-
above and unbuilt. The executor lease, suspension and atomic lifecycle
414-
transitions are the #367 contract that replaces the shipped opportunistic
415-
orphan closure.
419+
Status, list and history are built (§4), and so are cancel and delete. The
420+
executor lease and the atomic lifecycle transitions built on it are #367's, and
421+
they replace the opportunistic orphan closure that preceded them: liveness is now
422+
an advisory lock the operating system releases when a host dies, rather than
423+
something inferred from a status column. Durable suspension is designed above and
424+
unbuilt, and so is fork.
416425

417426
## 4. Inspection commands
418427

@@ -1129,11 +1138,11 @@ delegated without changing the document language.
11291138
| retained run record and filtered journal | built by #291 |
11301139
| caller-owned storage transaction | built by #291; Workspace mutations join it in #365 |
11311140
| provider-backed retained Workspace | document filesystem built by #366; repository, process and attachment capabilities unbuilt (#218) |
1132-
| `xmd workflow start` / `resume` | built by #366, Deno entrypoints only; #367's executor lease is defined and unbuilt |
1141+
| `xmd workflow start` / `resume` | built by #366, Deno entrypoints only; both acquire #367's executor lease |
11331142
| Repository, Worktree and transactional Git components | defined here; unbuilt |
11341143
| lifecycle status/list/history | built by #367 |
1135-
| lifecycle cancel/delete and single-executor authority | defined for #367; unbuilt |
1136-
| durable suspension request and executor release | defined for #367; unbuilt; input delivery belongs to #300 |
1144+
| lifecycle cancel/delete and single-executor authority | built by #367 |
1145+
| durable suspension request and executor release | defined for #367; unbuilt; typed input delivery belongs to #300 |
11371146
| history fork | defined here; unbuilt (#368) |
11381147
| read-only Agent materialization | defined here; proof required |
11391148
| generated-XMD constrained evaluator | behavior defined; public name/schema open |

0 commit comments

Comments
 (0)