Repository navigation
Commit 83b0d9d
committed
🔎 Keep the evidence off the route the request travels
Revises the pull-request evidence read. The three-component product surface is
unchanged; what changes is what crosses which boundary, and what a record has to
prove before it becomes evidence.
The request now crosses a public contextual route,
`executablemd.workflow.pull-request-evidence`, and the evidence crosses nothing
public at all. Middleware may see exactly what is about to be read, refuse it,
narrow which reads a run performs, or delegate — and the route answers with a
*request*, so there is nothing there it could answer with instead. Behind it is
an exact-invocation terminal: the request is minted for one invocation and
branded with a private class field, so a copy carrying the same members, a
request another invocation issued, one rebuilt from the retained journal, and
one a handler kept from an earlier read are each refused before anything is
sent. Structural equality would not do — two elements reading the same number
produce identical requests.
Durable and live are now separate. The journal holds `GitPushRepositoryIdentity`
— the Repository identity without its Workspace checkout path — plus the number
and the collection, and the effect's fingerprint covers those same members. The
full Repository record and the working directory stay live provider-private
attachment data. Every parser is closed on exact membership rather than on
presence, so a payload one member wider than the contract is refused instead of
reaching a binding.
Normalization corrections: `reviewId` is nullable, because an inline comment can
belong to no review; a check run's link is `html_url` and a commit status's is
`target_url`; an identifier that cannot be held exactly is refused rather than
rounded into one naming a different object; the status, conclusion and state
vocabularies are closed TypeScript unions; and *unavailable* is told apart from
*protocol-invalid* — a host that did not answer versus one that answered about
the wrong subject. Every field an answer is authenticated by is now required:
reviews and comments must name their pull request, checks and statuses must name
the commit, and the pull request must name its own number and repository.
Each component declares the exact array it binds, which is what makes `as`
mandatory and refuses an invocation that forgot it before a credential is read.
The engine-owned self-closing form dispatch is unchanged.
Evidence is PRR1–PRR24 in `pull-request-read.test.ts`, including the five
terminal attacks, the exact URL and field mappings, a null review id, session
teardown, a failed read retaining no array, and a changed question being a
different effect. Three of the new cases were wrong before they were right: a
failed durable read *is* journaled (with a refusal and no `value`), a changed
request at a replayed position is a divergence rather than a fresh read, and a
plain `Error` from middleware escapes differently than a domain refusal.
Two repository rules caught real mistakes: the first terminal was a
module-scoped `WeakMap` — a process-lifetime registry shared by every run — and
the adapter returned `{ok}` unions instead of Effection `Result<T>`.
Architecture, both specifications, both inventories and the #300 scheduling
boundary are updated; scheduling is #300's rather than blocked on #301.
Refs #5761 parent e408dca commit 83b0d9d
12 files changed
Lines changed: 1821 additions & 693 deletions
File tree
- packages/workflow
- src
- composition
- components
- deno/composition
- tests
- scripts
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
909 | | - | |
910 | | - | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
911 | 913 | | |
912 | 914 | | |
913 | 915 | | |
| |||
1270 | 1272 | | |
1271 | 1273 | | |
1272 | 1274 | | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1273 | 1294 | | |
1274 | 1295 | | |
1275 | 1296 | | |
| |||
3092 | 3113 | | |
3093 | 3114 | | |
3094 | 3115 | | |
3095 | | - | |
| 3116 | + | |
| 3117 | + | |
3096 | 3118 | | |
3097 | 3119 | | |
3098 | 3120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
| |||
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
70 | 97 | | |
71 | | - | |
| 98 | + | |
72 | 99 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
77 | 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 | + | |
| 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 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
78 | 194 | | |
79 | 195 | | |
80 | 196 | | |
| |||
100 | 216 | | |
101 | 217 | | |
102 | 218 | | |
103 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
104 | 223 | | |
105 | 224 | | |
106 | 225 | | |
107 | 226 | | |
108 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
109 | 237 | | |
110 | 238 | | |
111 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| 107 | + | |
103 | 108 | | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| |||
| 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 | + | |
0 commit comments