Repository navigation
Commit f9cf099
authored
🏷️ Reconcile Git-host effects through one request-only surface (#480)
* 🔁 Reconcile every external forge effect through one shared operation (#297)
A forge owns state no local transaction can enclose, so push, pull request and
issue creation all face the same question after an interruption: did the
previous attempt already succeed? They answer it once now.
`reconcileForgeEffect()` derives external identity from the run and the
expansion, observes before it mutates, and then adopts a proven compatible
completion, performs a proven absence exactly once, or refuses conflict and
permanent ambiguity. Temporary unavailability is its own ordinary failure, so
document structure or explicit middleware — not this engine — decides on a
retry.
Provider selection is replaceable context and carries no completion authority.
Each phase mints a one-use route and a separate opaque credential and puts the
phase's evidence and its answer behind a capability that accepts only that
credential, so a short circuit, a forged return, a substituted selection and a
reused request complete nothing, and a throw after a real answer cannot take it
away. The durable operation is named by a fingerprint of the complete detached
request, so a changed kind, input or natural key diverges rather than consuming
a retained result.
* 🔒 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.
* 🏷️ Reconcile Git-host effects through one request-only surface (#297)
Two architecture corrections, made together because the second is only
describable in the first's vocabulary.
The product noun is Git host, not "forge": an external service that owns remote
Git repositories and associated collaboration objects, distinct from the local
Git capability and from the trusted workflow host. GitHub is one adapter of it.
The modules, the public API, the durable type and the specifications say so, and
nothing is left behind under the old name — no alias, no `forge_effect` reader,
no forwarding module. Push, pull-request creation and issue creation are the
three kinds; Prompt keeps its Agent-provider contract. A provider may support
only some of them and refuses the rest from observation, before any remote work.
The split provider-selection and invocation-capability surfaces are gone. They
were individually harmless and jointly fatal: middleware could read a credential
from the selection surface, take an invocation capability from the coordination
surface, and answer a phase itself, and the journal then retained a completion
no provider had produced. Reproduced against the reviewed head — zero provider
calls, one adopted Yield reading `middleware-forgery`.
There is now one request-only operation. Public middleware receives a frozen,
one-use routing request, may inspect, refuse, narrow or delegate it, and its
return is ignored; it gets no credential, no capability and no phase evidence,
so there is nothing to combine. Each phase owns a descriptor under that same
stable name, so the shared chain still applies while the default is that
invocation's own terminal, reachable only through the continuation the selected
provider's handler holds.
* 🧹 Restore the Git-host boundary's authoritative answer path (#297)
A mutation run proving GH10 discriminates a contextual return was captured by
the preceding commit. The boundary reads only the answer its private terminal
accepted; a middleware return value is evidence of nothing.
---------
Co-authored-by: Taras Mankovski <[email protected]>1 parent 4093071 commit f9cf099
10 files changed
Lines changed: 2891 additions & 20 deletions
File tree
- packages/workflow
- src/git-host
- tests
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
839 | | - | |
| 840 | + | |
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
| |||
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
947 | 1000 | | |
948 | 1001 | | |
949 | 1002 | | |
| |||
2117 | 2170 | | |
2118 | 2171 | | |
2119 | 2172 | | |
| 2173 | + | |
2120 | 2174 | | |
2121 | 2175 | | |
2122 | 2176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
27 | 50 | | |
28 | 51 | | |
29 | 52 | | |
| |||
97 | 120 | | |
98 | 121 | | |
99 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
100 | 164 | | |
101 | 165 | | |
102 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
0 commit comments