|
39 | 39 | * publish verdict (`draftPublishVerdict`) judge. One judge, one spelling: a |
40 | 40 | * legacy D2 spelling the save door accepted and stored raw is accepted at |
41 | 41 | * publish too, and what goes live is still the stored bytes. |
| 42 | + * |
| 43 | + * [#29696] The two other judges of a flow at rest judge through it too: the |
| 44 | + * read's `_diagnostics` schema half (`computeMetadataDiagnostics`, every read |
| 45 | + * exit that decorates) and the restore doors' runtime rules |
| 46 | + * (`refuseRestoredBodyTheSaveDoorRefuses`, for `rollbackMetaItem` and |
| 47 | + * `revertCommit`). Each serves or restores the body as stored. |
42 | 48 | */ |
43 | 49 |
|
44 | 50 | import { ALL_CONVERSIONS, applyConversionsToFlow, type ConversionNotice } from '@objectstack/spec'; |
@@ -141,19 +147,32 @@ export function flowVerdictBody(body: unknown, options: { includeRetired: boolea |
141 | 147 | } |
142 | 148 |
|
143 | 149 | /** |
144 | | - * [#29557] The body a publish judges a STORED draft in: for a `flow`, the |
145 | | - * {@link flowVerdictBody} of the draft row with the retired entries included; |
146 | | - * every other type, the draft as stored. The two publish doors and the draft |
147 | | - * read's publish verdict judge through here and promote, store and serve the |
148 | | - * draft as stored. |
| 150 | + * [#29557] The body a STORED flow is judged in: for a `flow`, the |
| 151 | + * {@link flowVerdictBody} of the row with the retired entries included; every |
| 152 | + * other type, the row as stored. The two publish doors and the draft read's |
| 153 | + * publish verdict judge a stored draft through here, [#29696] the read's |
| 154 | + * `_diagnostics` schema half judges a served row and the restore doors' runtime |
| 155 | + * rules a history version; each promotes, serves or restores the row as stored. |
| 156 | + * |
| 157 | + * A stored row is data at rest, so the chain is the one the automation engine |
| 158 | + * replays when it registers the row: its stored-flow canonicalizer |
| 159 | + * (`canonicalizeFlow` in `service-automation/src/flow-definitions.ts`), which |
| 160 | + * every caller but the save door calls with no options, so retired entries |
| 161 | + * included, and which excludes `CONVERSIONS_NOT_REPLAYED_AT_REHYDRATION`. That |
| 162 | + * list and {@link FLOW_FALLBACK_VERDICT_NOT_REPLAYED} name the same one entry, |
| 163 | + * `flow-decision-mode-inclusive-explicit`, so this verdict replays exactly the |
| 164 | + * engine's chain. The entry is a DEFAULT FLIP, not a rescue: it writes |
| 165 | + * `mode: 'inclusive'` where a decision omits `mode`, and an omitted `mode` |
| 166 | + * parses (it means exclusive), so leaving it out never turns an accepted body |
| 167 | + * into a refused one; it only keeps the verdict from judging a meaning the row |
| 168 | + * does not have. By maintainer ruling (letter C on #15429) it is not replayed |
| 169 | + * over stored flows at all. No read path converts a flow either: |
| 170 | + * `convertStoredItem` skips `flow`, and `applyConversionsToStoredItem` is not |
| 171 | + * applied to it. |
149 | 172 | * |
150 | | - * A stored draft is a row at rest, so the chain is the full one: the one the |
151 | | - * automation engine replays when it registers the published row (its stored- |
152 | | - * flow canonicalizer, which every caller but the save door calls with no |
153 | | - * options) and the one `applyConversionsToStoredItem` replays on read. The |
154 | | - * retired-entry predicate of the save door ({@link flowSaveReplaysRetired}, |
| 173 | + * The retired-entry predicate of the save door ({@link flowSaveReplaysRetired}, |
155 | 174 | * #23903 ruling B') is not asked again: it judges authored input, and the |
156 | | - * draft's own save asked it, in draft mode as in publish mode. `type` is the |
| 175 | + * row's own save asked it, in draft mode as in publish mode. `type` is the |
157 | 176 | * singular type name. |
158 | 177 | */ |
159 | 178 | export function storedFlowVerdictBody(type: string, body: unknown): unknown { |
|
0 commit comments