You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd4e28f
Browse filesBrowse the repository at this point in the historyBrowse files
🍴 Continue one run's history under a changed definition
`xmd workflow fork <source> --at=<event> <definition>` creates a new
immutable run whose journal begins as somebody else's. It writes two
records for itself — its own `workflow_run`, and its own root import,
which is what makes it a run of the definition the caller named — and
inherits everything after them with their public event ids, filtered
results, authored positions, Workspace roots and source provenance.
Compatibility is proved before any storage the host would recognize as
the new run exists. The candidate replays the inherited prefix against a
staged copy of the fork, so a document resolves its paths through the
Workspace the fork will actually have, and a guard ends the replay on
the last inherited event — before the first effect after the checkpoint
is entered, and before anything is appended. A divergent candidate
leaves no fork.
`history --forkable` reports which checkpoints a fork may select, under
four stable blocker codes that name the earliest event introducing each
and nothing a retained description held.
Version 1 gains two tables in place: the fork's lineage, and the source
run and event behind each inherited row.
Copy file name to clipboardExpand all lines: architecture.md
+27-8Lines changed: 27 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -854,8 +854,7 @@ the journal and the document receive only the fingerprint.
854
854
855
855
The command selects the environment; the document describes the procedure.
856
856
`xmd run` uses the caller's current environment and makes no restoration
857
-
promise. The specified future `xmd workflow` command creates a workflow run with
858
-
one implicit root Workspace. The same declarative components use contextual
857
+
promise. `xmd workflow` creates a workflow run with one implicit root Workspace. The same declarative components use contextual
859
858
capabilities in both modes; the workflow host supplies the stronger durability
860
859
and authority boundary.
861
860
@@ -1079,10 +1078,29 @@ because a live operation that appended nothing would leave the next one to
1079
1078
append at its position.
1080
1079
1081
1080
Every committed journal event references the current logical Workspace root.
1082
-
Only committed event boundaries are checkpoints. A history fork cheaply retains
1083
-
or clones the selected root, replays the inherited prefix under a compatible
1084
-
modified definition and appends new history under a new run ID. It never rewinds
1085
-
external branches, pushes, pull requests or provider state.
1081
+
Only committed event boundaries are checkpoints. A history fork copies the
1082
+
selected root and the roots the inherited prefix names into the new run, replays
1083
+
the inherited prefix under a compatible modified definition and appends new
1084
+
history under a new run ID. It never rewinds external branches, pushes, pull
1085
+
requests or provider state.
1086
+
1087
+
A fork writes two records for itself and inherits the rest. Its own
1088
+
`workflow_run` record is what its journal is held to, and its own root import is
1089
+
what makes the run a run of the definition the caller named — that record holds
1090
+
the document's text, so inheriting the source's would run the source's document
1091
+
whatever was asked for. Everything after them travels unchanged, keeping its
1092
+
public event ID, its filtered result, its authored position and its Workspace
1093
+
root, and carrying the source run and source event it came from. Retention moves
1094
+
with the fork: once the fork commits, deleting the source leaves its prefix and
1095
+
its selected root exactly as readable as they were.
1096
+
1097
+
Compatibility is decided before any storage the host would recognize as the new
1098
+
run exists. The candidate replays the inherited prefix against a staged copy of
1099
+
the fork — the whole run, assembled where nothing discovers it — and the replay
1100
+
ends at the checkpoint, before the first live effect, rather than after it. A
1101
+
divergent candidate leaves no fork. After it succeeds, one transaction commits
1102
+
the run, its lineage, the inherited prefix, the copied roots, the selected
1103
+
current root and the first document execution together.
1086
1104
1087
1105
## Agent authority and generated XMD
1088
1106
@@ -1150,7 +1168,8 @@ after SQLite has restored the prior frontier.
1150
1168
1151
1169
Retained roots, manifests and blobs remain indefinitely. Cloudflare garbage
1152
1170
collection is not in the production closure and is never invoked. The provider
1153
-
exposes no public history selection or fork operation at this layer. Its
1171
+
exposes no public history selection at this layer; a fork's root copying is a
1172
+
lifecycle transaction above it. Its
1154
1173
coordinator combines one mutation, immutable-root publication and one filtered
1155
1174
journal result atomically, and the transaction-bound Files provider is what
1156
1175
routes a document's `<File>` and `<Glob>` to it. `xmd workflow start` and
@@ -2283,7 +2302,7 @@ Status is measured against main.
2283
2302
|`Git.Push`| publishes the selected checkout's exact current named branch and commit to the same branch on the retained Repository's canonical `origin`, reconciled through the shared Git-host state machine rather than through a Workspace transaction: no props and no component result, no force, no upstream mutation and no implicit staging or committing; the durable request and record carry the Repository's filtered identity without its checkout path, and the transport runs in a provider-owned isolated control repository reading the checkout's objects through an object-source attachment whose alternates chain and object tree are proven contained before the first remote observation, aimed at the exact private retained locator | built on the #370 stack, Deno provider only |
2284
2303
| workflow lifecycle inspection and control | reads status/list/history without advancing a run, enforces the executor lock, refuses live cancellation, cancels non-live runs under that lock and deletes retained state | built on the #367 stack |
2285
2304
| 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 |
2286
-
| history fork | creates a new run from one compatible checkpoint and retained Workspace root| defined in `specs/workflow-workspace-spec.md`, unbuilt (#368)|
2305
+
| history fork | creates a new run from one compatible checkpoint and retained Workspace root, under a new immutable definition and normalized props | built on the #368 stack, Deno provider only|
2287
2306
| 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 |
2288
2307
| Deno-local DOFS provider | owns one authoritative SQLite/DOFS connection per run path, captures arbitrary canonical retained roots, privately restores them, and atomically coordinates one Workspace mutation with its filtered Yield | built on the #365 stack; public document filesystem effects and the CLI lifecycle route to it on the #366 stack |
2289
2308
| scoped Worker Shell | executes `just-bash` through the Workspace adapter inside a Deno Worker | containment and effect-transaction POCs complete (#351, #357); production integration unbuilt |
0 commit comments