Skip to content

Commit 93454d6

Browse files
committed
πŸ”’ Let only an accepted forge answer author a durable outcome (#297)
Routing middleware could raise a ForgeConflictError before any provider was asked, and the coordinator β€” which classified authority by error name β€” wrote it into the journal as the effect's outcome, stack included. A handler could therefore retire an external effect as conflicted forever without a forge ever being contacted. An outcome now comes from exactly one place: an answer accepted through the execution-owned capability. The attempt records the failure it authored itself and reads it back by object identity, so no name and no class received from replaceable code can imitate one. A conflict, an ambiguity or an unavailability so accepted still publishes as the effect's failed result. Everything else that can raise on the way β€” selection, middleware, the provider's own body β€” publishes nothing, activates the existing fail-stop fence, and is reported as one fixed cause-free failure that repeats none of what was raised. The documentation also claimed Prompt as a consumer of this reconciler. It is not: #297 covers forge mutations, and Prompt keeps its own Agent-provider contract.
1 parent 3a465b9 commit 93454d6

5 files changed

Lines changed: 291 additions & 103 deletions

File tree

β€Žarchitecture.mdβ€Ž

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -913,17 +913,21 @@ authority ends. The transaction-bound Files provider selects that operation for
913913
every document filesystem read, write and search, and the workflow lifecycle
914914
commands install that provider.
915915

916-
An external provider cannot join that transaction. Prompt, Git push, pull
917-
request and issue effects derive a stable identity from the run and expansion,
918-
ask the provider to observe that identity, then append one local result
919-
transaction. One shared provider-neutral reconciliation owns that boundary for
920-
all of them, so a new external effect kind supplies a request and a provider
921-
rather than a replay policy of its own. A live attempt observes before it
922-
mutates: it adopts proven compatible completion, performs a proven absence
923-
exactly once, and refuses conflicting or permanently ambiguous state. Temporary
924-
provider unavailability is its own ordinary failure; explicit middleware may
925-
retry or suspend it, and it never authorizes a duplicate effect while completion
926-
is unknown.
916+
An external provider cannot join that transaction. Prompt, Git push and pull
917+
request effects derive a stable identity from the run and expansion, ask the
918+
provider to perform or reconcile that identity, then append one local result
919+
transaction. Replay adopts proven compatible completion, performs a proven
920+
absence and refuses conflicting or permanently ambiguous state. Temporary
921+
provider unavailability may be retried or suspended by explicit middleware; it
922+
never authorizes a duplicate effect while completion is unknown.
923+
924+
Forge mutations β€” Git push, pull-request creation and issue creation β€” share one
925+
provider-neutral reconciliation of that boundary, so a new forge effect kind
926+
supplies a request and a provider rather than a replay policy of its own. Prompt
927+
is not one of them: it keeps its own Agent-provider contract. A live forge
928+
attempt observes before it mutates, adopts a proven compatible completion,
929+
performs a proven absence exactly once, and refuses conflict and permanent
930+
ambiguity.
927931

928932
That reconciliation reuses the capability-backed Workspace coordination shape
929933
without its transaction. A replaceable contextual API selects a provider and
@@ -935,13 +939,21 @@ the complete detached request, so a changed kind, input or natural key diverges
935939
rather than consuming the result retained at the same position, and the
936940
provider's answer is parsed at that boundary before the durable executor
937941
returns, so a raw payload becomes a fixed protocol failure rather than journal
938-
content. Conflict, permanent ambiguity and temporary unavailability publish the
939-
effect's failed result and replay as the same fixed local failure, reconstructed
940-
from its closed name rather than recognized by identity across loaded copies. A
941-
missing, foreign, substituted or reused selection and an unreadable answer
942-
publish nothing and activate fail-stop instead, because no provider outcome
943-
exists to record and a live operation that appended nothing would leave the next
944-
one to append at its position.
942+
content.
943+
944+
Only an answer accepted through that capability decides the effect. A conflict,
945+
a permanent ambiguity and a temporary unavailability so accepted publish the
946+
effect's failed result and replay as the same fixed local failure, rebuilt from
947+
its closed name rather than recognized by identity across loaded copies.
948+
Everything else that can raise before an answer is accepted β€” provider
949+
selection, routing middleware, the provider's own body β€” publishes nothing and
950+
activates fail-stop under one fixed cause-free failure that repeats none of what
951+
was raised. The attempt decides which of the two it has by the identity of the
952+
failure it authored itself, never by a name or a class received from replaceable
953+
code: otherwise a handler could retire an effect as conflicted without a
954+
provider ever being asked. Fail-stop rather than a bare refusal, because a live
955+
operation that appended nothing would leave the next one to append at its
956+
position.
945957

946958
Every committed journal event references the current logical Workspace root.
947959
Only committed event boundaries are checkpoints. A history fork cheaply retains
@@ -2116,7 +2128,7 @@ Status is measured against main.
21162128
| caller-owned storage transaction | publishes several changes, including journal events, in one transaction nothing else enlists in | built on main |
21172129
| live durable-operation coordinator | explicitly coordinates structured live execution with existing Yield publication while leaving replay and callback effects unchanged | built on the #365 stack |
21182130
| Workspace coordination API | fails closed by default; replaceable context routes only a one-use provider selection, while the selected provider directly invokes an execution-owned credentialed capability for execution, publication and failure activation | built on the #365 stack; the Deno provider installs an adapter-private atomic handler |
2119-
| shared forge reconciliation | reconciles every external forge effect through one provider-neutral state machine: run and expansion identity derived by the engine, observation before mutation, adoption of a proven compatible completion, one performance of a proven absence, refusal of conflict and permanent ambiguity, and temporary unavailability as its own ordinary failure; provider selection is replaceable context and completion is an execution-owned capability | built on the #297 stack; `Git.Push`, pull request and issue components are its consumers, unbuilt (#370, #295, #296) |
2131+
| shared forge reconciliation | reconciles Git push, pull-request creation and issue creation through one provider-neutral state machine β€” Prompt is not a consumer and keeps its own Agent-provider contract: run and expansion identity derived by the engine, observation before mutation, adoption of a proven compatible completion, one performance of a proven absence, refusal of conflict and permanent ambiguity, and temporary unavailability as its own ordinary failure; provider selection is replaceable context, completion is an execution-owned capability, and only an accepted answer can author a journaled outcome | built on the #297 stack; `Git.Push`, pull request and issue components are its consumers, unbuilt (#370, #295, #296) |
21202132
| explicit WorkflowRun journal route | binds one already-filtered publication to one exact active transaction and otherwise uses ordinary serialized journal storage | built on the #365 stack |
21212133
| `API.Service` / `startService()` | creates an authenticated, supervised loopback service attachment through a provider-neutral operation | built on main |
21222134
| foreground command routing and retention | forwards a child's channels live, captures stdout for a `<Capture as>` region, and retains output only when the host asked for a record | built on the #441 stack |

0 commit comments

Comments
Β (0)