@enricai/barnacle 1.12.19 → 1.12.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,12 +16,14 @@ export declare function buildCapture(overrides: {
16
16
  requestPostData: string | null;
17
17
  responseBody: unknown;
18
18
  timestamp: string;
19
+ requestHeaders?: Record<string, string>;
19
20
  }): Capture;
20
21
  export declare function buildStep(varName: string, overrides: {
21
22
  url: string;
22
23
  requestPostData: string | null;
23
24
  responseBody: unknown;
24
25
  timestamp: string;
26
+ requestHeaders?: Record<string, string>;
25
27
  }): MulticallFixtureStep;
26
28
  /**
27
29
  * Reproduces a listings-fixture G1/G2 recon capture set: a
@@ -45,6 +47,21 @@ export declare function buildMulticallHeterogeneousActionSteps(): MulticallFixtu
45
47
  * fired after the user picks one building from the products list).
46
48
  */
47
49
  export declare function buildMulticallHeterogeneousActionStepsWithDrillDown(): MulticallFixtureStep[];
50
+ /**
51
+ * Reproduces a search-then-per-item-drill-down flow whose primary page
52
+ * carries multiple results, each followed by its own drill-down call — the
53
+ * shape {@link detectDrillDownFoldPlan} must resolve by join key rather than
54
+ * by position. `search`/`page 2` is re-queried (distinct body from `page 1`)
55
+ * so it satisfies {@link findRequeriedActions}'s relevance signal, and its
56
+ * response holds two items (`i-b` then `i-a`, deliberately not alphabetical)
57
+ * so a later merge can't assume primary-array order. The two drill-down
58
+ * calls are fired in the OPPOSITE order of the primary array (`i-a`'s
59
+ * drill-down first, `i-b`'s second) — a positional/index-based fold would
60
+ * pair the wrong item with the wrong drill-down response, while a join-key
61
+ * fold (matching each drill request's `itemId` back to the primary item that
62
+ * produced it) pairs them correctly regardless of call order.
63
+ */
64
+ export declare function buildMulticallDependentDrillDownActionSteps(): MulticallFixtureStep[];
48
65
  /**
49
66
  * Reproduces a wizard-style checkout submission on one host: a create-order
50
67
  * call followed by a per-section save POST for each wizard step
@@ -59,4 +76,492 @@ export declare function buildMulticallHeterogeneousActionStepsWithDrillDown(): M
59
76
  * capture set).
60
77
  */
61
78
  export declare function buildWizardCheckoutCaptures(): Capture[];
79
+ /**
80
+ * A search → per-item drill-down flow whose search endpoint fires exactly
81
+ * ONCE. {@link detectDrillDownFoldPlan} now scans every prior action as a
82
+ * fold-primary candidate, so a single-shot search is just as eligible as a
83
+ * re-queried one — but the primary response here also carries a decoy
84
+ * `facets[]` array ahead of the real `results[]`, so `findObjectArrayField`'s
85
+ * DFS first-match deliberately disagrees with the array a caller would fold
86
+ * onto. `resolveFoldPlan(steps)` on this fixture still returns `null`, but
87
+ * only because of that decoy, not because the search fires once. That
88
+ * decoy-vs-declared-path gap is the shape the flow-declared `foldReturn`
89
+ * (`FoldReturnSpec`/`resolveFoldPlan`) exists to reach.
90
+ *
91
+ * The decoy is load-bearing for a `resolveFoldPlan`/`foldReturn` test
92
+ * elsewhere; {@link buildMulticallSingleShotSearchDrillDownNoDecoyActionSteps}
93
+ * is the decoy-free sibling used to prove `detectDrillDownFoldPlan` alone
94
+ * detects a single-shot primary.
95
+ */
96
+ export declare function buildMulticallSingleShotSearchDrillDownActionSteps(): MulticallFixtureStep[];
97
+ /**
98
+ * A search → per-item drill-down flow whose search response is unambiguous
99
+ * (a single `results[]` array, no decoy), but whose DRILL step's response
100
+ * carries a decoy `errors[]` array ahead of the real per-item `details[]`
101
+ * array. `findObjectArrayField`'s DFS first-match lands on `errors[]`
102
+ * instead of `details[]` when resolving the drill side of the fold, so a
103
+ * `foldReturn` declaration that only names the primary's `resultsPath`
104
+ * (see {@link FoldReturnSpec}) cannot fix this — the gap is on the drill
105
+ * side, not the primary side. Proves a drill-side results-path declaration
106
+ * (as opposed to {@link buildMulticallSingleShotSearchDrillDownActionSteps}'s
107
+ * primary-side decoy) is what a `drillResultsPath`-style flow declaration
108
+ * exists to reach.
109
+ */
110
+ export declare function buildMulticallSingleShotSearchDrillDownDrillDecoyActionSteps(): MulticallFixtureStep[];
111
+ /**
112
+ * A decoy-free sibling of {@link buildMulticallSingleShotSearchDrillDownActionSteps}:
113
+ * the search endpoint still fires exactly once, but `results[]` is the sole
114
+ * object-array field in its response, so `findObjectArrayField`'s DFS
115
+ * first-match lands on the real results array with no declared `foldReturn`
116
+ * needed. Proves the single-shot primary is detected on structure alone.
117
+ */
118
+ export declare function buildMulticallSingleShotSearchDrillDownNoDecoyActionSteps(): MulticallFixtureStep[];
119
+ /**
120
+ * A nested-join-key sibling of {@link buildMulticallSingleShotSearchDrillDownNoDecoyActionSteps}
121
+ * with a SECOND primary item, so a per-item fold loop is actually exercised
122
+ * (not just a single-item detection check): each primary `results[]` item
123
+ * carries its join key under a nested `identifiers` object
124
+ * (`{ identifiers: { sku } }`) instead of as a top-level field, while the
125
+ * drill-down request is still keyed by the plain `sku` value pulled out of
126
+ * that nested field. Proves the fold loop threads a join key found by
127
+ * walking INTO an item's nested objects, not only its own top-level
128
+ * `Object.entries`, across every primary item.
129
+ */
130
+ export declare function buildMulticallSingleShotSearchDrillDownNestedJoinFieldMultiItemActionSteps(): MulticallFixtureStep[];
131
+ /**
132
+ * A search → per-item drill-down flow whose DRILL step's response carries
133
+ * BOTH a small real nested object-array field (`tags[]`, one primitive
134
+ * field per item, no join echo) AND richer flat top-level per-item fields
135
+ * (`name`/`price`/`brand`, none of them echoing the join either) — the
136
+ * shape {@link findAllObjectArrayFieldsOrWholeObject}'s old docstring
137
+ * ("a response that already has one [a real object-array field] is never
138
+ * second-guessed") resolved to the tiny `tags[]` array instead of the
139
+ * richer flat object. Neither candidate threads the join value in its
140
+ * response body (only the drill REQUEST carries `sku-a`), so selection must
141
+ * fall through to comparing per-item primitive-field richness, which the
142
+ * flat object wins 3 (`name`/`price`/`brand`) to 1 (`tags[0].id`).
143
+ */
144
+ export declare function buildMulticallSingleShotSearchDrillDownRicherFlatOutranksNestedArrayActionSteps(): MulticallFixtureStep[];
145
+ /**
146
+ * A decoy-free sibling of {@link buildMulticallSingleShotSearchDrillDownNoDecoyActionSteps}
147
+ * with a SECOND, independently-threaded per-item drill-down appended: the
148
+ * primary `results[]` items carry both a `sku` (joined to the pricing drill)
149
+ * and an `itemId` (joined to this inventory drill), and neither drill
150
+ * step's response overlaps the other's fields. Proves the fold loop merges
151
+ * fields from every independent target onto each item, not just the first.
152
+ */
153
+ export declare function buildMulticallSingleShotSearchTwoIndependentDrillDownsActionSteps(): MulticallFixtureStep[];
154
+ /**
155
+ * A sibling of {@link buildMulticallSingleShotSearchTwoIndependentDrillDownsActionSteps}
156
+ * where BOTH per-item drills are threaded off the SAME primary join field
157
+ * (`sku`), rather than disjoint fields (`sku`/`itemId`). Each drill's
158
+ * response echoes that shared `sku` value back alongside its own field —
159
+ * an echo of the primary's own join value, not evidence the second drill
160
+ * depends on the first drill's response. Proves the fold loop still emits
161
+ * and merges BOTH independent drills onto every primary item even when
162
+ * their echoed join values collide, rather than collapsing the second
163
+ * drill into a chain under the first.
164
+ */
165
+ export declare function buildMulticallSingleShotSearchTwoIndependentDrillDownsSharedJoinFieldActionSteps(): MulticallFixtureStep[];
166
+ /**
167
+ * TWO independent primary/drill-down pairs, fully disjoint in both endpoint
168
+ * and step range: a products search folded by a per-product reviews drill
169
+ * (r0/r1), and an UNRELATED vendors search folded by a per-vendor contracts
170
+ * drill (r2/r3). Neither primary's items reference the other pair's join key
171
+ * (`productId` vs `vendorId`), so this proves the fold emitter resolves and
172
+ * loops over every independent plan, not only the first one it finds.
173
+ */
174
+ export declare function buildMulticallTwoIndependentPrimariesActionSteps(): MulticallFixtureStep[];
175
+ /**
176
+ * Same disjoint two-pair shape as
177
+ * {@link buildMulticallTwoIndependentPrimariesActionSteps}, except the SECOND
178
+ * pair's join value threads only through a request HEADER
179
+ * (`collectRequestStringValues` never scans headers), so
180
+ * `detectDrillDownFoldPlan`'s structural heuristic resolves only the FIRST
181
+ * pair (r0/r1) on its own; the second pair (r2/r3) is only reachable via a
182
+ * flow-declared `foldReturn` spec naming `vendors` as its `resultsPath`.
183
+ * Since the second pair's primary/drill steps (2, 3) are entirely outside the
184
+ * first pair's own consumed indices ({@link buildMulticallTwoIndependentPrimariesActionSteps}'s
185
+ * r0/r1), a correctly-behaving `resolveFoldPlan` must APPEND the spec's plan
186
+ * as a second, independent entry rather than discarding it just because its
187
+ * primary differs from the one the heuristic already resolved.
188
+ */
189
+ export declare function buildMulticallTwoIndependentPrimariesSecondHeaderThreadedActionSteps(): MulticallFixtureStep[];
190
+ /** A single-shot search drilled by two INDEPENDENT later calls whose join
191
+ * values thread through different surfaces: the pricing step's `sku` lands
192
+ * in its JSON body (heuristically detectable by `collectRequestStringValues`),
193
+ * while the stock step's `itemId` is carried ONLY in a request header —
194
+ * `collectRequestStringValues` never scans headers, so that fold can only be
195
+ * resolved via a flow-declared `foldReturn` spec. Every downstream unit and
196
+ * runtime test that needs one mixed-source, two-target fold scenario should
197
+ * share this fixture rather than inventing its own. */
198
+ export declare function buildMulticallSingleShotSearchHeuristicAndSpecTwoTargetActionSteps(): MulticallFixtureStep[];
199
+ /**
200
+ * TWO occurrences of the SAME primary endpoint (same origin+pathname,
201
+ * differing only by query string), each independently drilling a
202
+ * DIFFERENT item into a DIFFERENT dependent call — unlike
203
+ * {@link buildMulticallSingleShotSearchDrillDownRequeriedPrimaryOverlapActionSteps}
204
+ * (whose two occurrences thread the SAME drill), these thread two distinct
205
+ * drills, so {@link detectDrillDownFoldPlan}'s freshest-wins collapse never
206
+ * applies and both occurrences resolve as their own independent
207
+ * {@link FoldPlan}. Both plans' primary responses share the SAME top-level
208
+ * array key (`results`) — the exact shape a plain `{ ...a, ...b }`
209
+ * object-spread silently collapses to the later plan's array alone, since
210
+ * the emitted return statement folds every resolved plan's own primary var
211
+ * together into the runtime response.
212
+ */
213
+ export declare function buildMulticallTwoOccurrencesSamePrimaryDistinctDrillsActionSteps(): MulticallFixtureStep[];
214
+ /**
215
+ * A grouped, nested-primary drill-down whose primary response carries TWO
216
+ * outer `sections[]` groups rather than the single group every other nested
217
+ * fixture in this file uses, with the drilled entry living in the SECOND
218
+ * group's `entries[]`, not the first. A fold that assumes the matched item
219
+ * always lives in group 0 (as a single-group fixture can never disprove)
220
+ * would resolve the fold onto `sections[0]` and silently attach the drill
221
+ * response's `description` to the wrong entry.
222
+ */
223
+ export declare function buildMulticallNestedGroupedDrillDownMultiGroupActionSteps(): MulticallFixtureStep[];
224
+ /**
225
+ * A single-shot search whose primary item join field (`accountId`) is a
226
+ * NUMBER rather than a string, threaded into the drill-down call via a URL
227
+ * query parameter (`?accountId=42`). `URLSearchParams` always stringifies its
228
+ * values, so the request-collection side already captures `"42"` as a
229
+ * string; the item side of the join is what must widen to accept a numeric
230
+ * leaf for {@link detectDrillDownFoldPlan} to resolve `accountId` as a join
231
+ * field at all.
232
+ */
233
+ export declare function buildMulticallSingleShotSearchDrillDownNumericJoinActionSteps(): MulticallFixtureStep[];
234
+ /**
235
+ * A single-shot search whose primary item join field (`accountId`) is
236
+ * threaded into the drill-down call ONLY as a URL path segment
237
+ * (`/accounts/42/transactions`) — never as a query param or a JSON body
238
+ * value. REST-style APIs commonly shape drill-down calls this way, but
239
+ * `collectRequestStringValues` only harvested query params and JSON body
240
+ * leaves, so this join field was invisible to `findThreadedJoinFields` and
241
+ * {@link detectDrillDownFoldPlan} returned null for this shape.
242
+ */
243
+ export declare function buildMulticallSingleShotSearchDrillDownPathThreadedJoinActionSteps(): MulticallFixtureStep[];
244
+ /**
245
+ * A single-shot search whose primary item join field (`sku`) sits inside a
246
+ * NESTED object (`{ identifiers: { sku } }`) rather than as a top-level
247
+ * property. `findThreadedJoinFields` must walk into nested plain objects to
248
+ * find it, and the resulting joinFields entry is the dot-separated path
249
+ * `"identifiers.sku"`, not the bare leaf name `"sku"`.
250
+ */
251
+ export declare function buildMulticallSingleShotSearchDrillDownNestedJoinFieldActionSteps(): MulticallFixtureStep[];
252
+ /**
253
+ * A single-shot search whose primary items carry a COMPOSITE join key mixing
254
+ * a string field (`region`) and a numeric field (`accountId`), both threaded
255
+ * into the drill-down request. `findThreadedJoinFields` filters candidate
256
+ * fields independently per entry, so a numeric field dropped alongside a
257
+ * present string field would silently degrade the fold to a partial
258
+ * (string-only) join key rather than failing outright — this fixture proves
259
+ * both survive together, in the item's own key order.
260
+ */
261
+ export declare function buildMulticallSingleShotSearchDrillDownCompositeNumericJoinActionSteps(): MulticallFixtureStep[];
262
+ /**
263
+ * A decoy-free single-shot search sibling of
264
+ * {@link buildMulticallSingleShotSearchDrillDownNoDecoyActionSteps} whose
265
+ * `results[]` has TWO items, but whose only captured drill-down call was
266
+ * made for the SECOND item (`sku-b`), not the first. A heuristic that always
267
+ * pairs the primary's `results[0]` with the sole drill step would thread
268
+ * `sku-a` into the fold even though the captured request body only ever
269
+ * mentions `sku-b` — proving the fold must select the drill call's item by
270
+ * matching the join field's actual value, not by array position.
271
+ */
272
+ export declare function buildMulticallSingleShotSearchDrillDownNonFirstItemSkuActionSteps(): MulticallFixtureStep[];
273
+ /**
274
+ * A composite-join sibling of
275
+ * {@link buildMulticallSingleShotSearchDrillDownCompositeNumericJoinActionSteps}
276
+ * whose `accounts[]` has TWO items, but whose only captured drill-down call
277
+ * threads the SECOND item's composite join key (`region: "eu"`,
278
+ * `accountId: 9`), never the first item's (`region: "us"`, `accountId: 7`).
279
+ * Proves the same non-first-item selection requirement holds when the join
280
+ * key is composite, not just when it's a single field.
281
+ */
282
+ export declare function buildMulticallSingleShotSearchDrillDownCompositeNumericJoinNonFirstItemActionSteps(): MulticallFixtureStep[];
283
+ /**
284
+ * A single-shot search whose primary item join field (`accountId`) is
285
+ * threaded into the drill-down call ONLY via a custom request header
286
+ * (`X-Account-Id`) — never a query param, JSON body value, or URL path
287
+ * segment. `collectRequestStringValues` deliberately never scans
288
+ * `requestHeaders` (recon-generate.ts:4787-4815), so this join is invisible
289
+ * to `findThreadedJoinFields` and {@link detectDrillDownFoldPlan} must return
290
+ * `null` here regardless of how many other threading channels it learns to
291
+ * scan — only a flow-declared `foldReturn` naming `accountId` can resolve
292
+ * this fold.
293
+ */
294
+ export declare function buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinActionSteps(): MulticallFixtureStep[];
295
+ /**
296
+ * A sibling of {@link buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinActionSteps}
297
+ * whose primary endpoint is hit TWICE (`r0`, `r1`), each occurrence's single
298
+ * `accounts[]` item independently satisfying the drill-down's `X-Account-Id`
299
+ * join on its own — mirroring
300
+ * {@link buildMulticallSingleShotSearchDrillDownRequeriedPrimaryOverlapActionSteps}'s
301
+ * requeried-primary-overlap shape, but with the join threaded ONLY through a
302
+ * request header rather than a URL query param, so `detectDrillDownFoldPlan`'s
303
+ * structural heuristic can never see it (same blind spot documented on
304
+ * {@link buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinActionSteps}).
305
+ * Only a flow-declared `foldReturn` naming `accountId` can resolve this fold,
306
+ * isolating `buildFoldPlanFromSpec`'s own freshest-wins primary lookahead:
307
+ * the resolved plan must anchor on `r1` (the LATER occurrence) and its
308
+ * differing `name` value ("Acme Corp"), not `r0`'s stale "Acme".
309
+ */
310
+ export declare function buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinRequeriedPrimaryOverlapActionSteps(): MulticallFixtureStep[];
311
+ /**
312
+ * Sibling of {@link buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinActionSteps}
313
+ * whose primary `accounts[]` array holds TWO items rather than one, so a
314
+ * runtime fold loop built from this capture must re-key the drill-down's
315
+ * request header per iteration rather than replaying the single captured
316
+ * header value.
317
+ *
318
+ * Threaded on `API-Token` rather than the sibling fixture's `X-Account-Id`:
319
+ * `emitMultiStepExecuteHttp`'s per-call header emission only ever renders a
320
+ * captured header back into the generated request when it recognizes the
321
+ * header name (`API-Token`/`Authorization`, or a base-URL-/tenant-derived
322
+ * header passed in separately — recon-generate.ts:4273-4279) — an arbitrary
323
+ * custom header like `X-Account-Id` is captured but never re-emitted, so a
324
+ * fold loop built from it would have nothing to re-key at runtime. `API-Token`
325
+ * is still a request header the join value reaches through NO OTHER channel
326
+ * (not the URL, which is identical on every call, and not the body, which is
327
+ * empty), so it still exercises the same header-threaded-join runtime path
328
+ * {@link buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinActionSteps}
329
+ * demonstrates is invisible to the structural heuristic.
330
+ *
331
+ * The captured drill call was made for `accountId: 43` (the SECOND item),
332
+ * pinning `primaryMatchedItemIndex` away from the index-0 default.
333
+ */
334
+ export declare function buildMulticallSingleShotSearchDrillDownHeaderThreadedJoinMultiItemActionSteps(): MulticallFixtureStep[];
335
+ /**
336
+ * A single-shot search whose primary results array is NOT drilled into at
337
+ * item 0 — only a single later drill call exists, and it threads the second
338
+ * item's (`itemId: "i-a"`) join value, never the first's (`itemId: "i-b"`).
339
+ * With no coincidental extra call re-drilling item 0 (unlike
340
+ * {@link buildMulticallDependentDrillDownActionSteps}, whose items are also
341
+ * out of order but which happens to pass a items[0]-only match because a
342
+ * third step re-drills item 0), this pins {@link detectDrillDownFoldPlan}'s
343
+ * item search to the actually-drilled item rather than an index-0 default —
344
+ * the search must find the match at `primaryMatchedItemIndex` 1.
345
+ * Named "OutOfOrder" (rather than "NonFirstItem") to avoid colliding with
346
+ * {@link buildMulticallSingleShotSearchDrillDownNonFirstItemSkuActionSteps}.
347
+ */
348
+ export declare function buildMulticallSingleShotSearchDrillDownOutOfOrderItemActionSteps(): MulticallFixtureStep[];
349
+ /**
350
+ * A single-shot search sibling of
351
+ * {@link buildMulticallSingleShotSearchDrillDownNonFirstItemSkuActionSteps}
352
+ * whose axis is on the DRILL side rather than the primary side: the primary
353
+ * `results[]` has a single item (`sku-a`), but the drill-down's own
354
+ * `prices[]` array comes back holding TWO entries — a decoy for an unrelated
355
+ * sku (`sku-z`, listed first) alongside the real match (`sku-a`, listed
356
+ * second). A fold that merges `foldMatches[0]`/`drillItems?.[0]` would
357
+ * silently splice the decoy's `amount` onto the primary item; only matching
358
+ * the drill array's own entries against the threaded join field (`sku`)
359
+ * picks the correct one, at a non-zero index within that array.
360
+ */
361
+ export declare function buildMulticallSingleShotSearchDrillDownMultiMatchActionSteps(): MulticallFixtureStep[];
362
+ /**
363
+ * A multi-match sibling of
364
+ * {@link buildMulticallSingleShotSearchDrillDownMultiMatchActionSteps} whose
365
+ * join field's type DIFFERS across the two sides: the primary item's
366
+ * `accountId` is a NUMBER, while every item in the drill-down response's
367
+ * array carries `accountId` as a STRING (as request-threaded values always
368
+ * are). A decoy entry is listed first with a string that never equals the
369
+ * primary's numeric value even after coercion; only the second entry's
370
+ * string stringifies to the primary's value. A fold that matches via strict
371
+ * equality (`m["accountId"] === item.accountId`, i.e. `"42" === 42`) fails
372
+ * for every candidate here, proving the fold must compare join values by
373
+ * their string representation, not by strict identity.
374
+ */
375
+ export declare function buildMulticallSingleShotSearchDrillDownTypeMismatchJoinActionSteps(): MulticallFixtureStep[];
376
+ /**
377
+ * Same shape as {@link buildMulticallSingleShotSearchDrillDownChainedDependentActionSteps},
378
+ * but the CHAIN's second step (the price-history call `r2`, not the drill
379
+ * step `r1` itself) is a multipart upload rather than a JSON POST.
380
+ * `emitMultiStepExecuteHttp`'s fold loop re-issues EVERY chain step's
381
+ * request per item by re-keying its rendered JSON body template — a
382
+ * multipart step anywhere in `chain`, not just at `drillStepIndex`, has no
383
+ * such template to re-key, so `resolveFoldPlan` must disqualify the whole
384
+ * plan here exactly as it already does when the drill step itself is
385
+ * multipart.
386
+ */
387
+ export declare function buildMulticallSingleShotSearchDrillDownChainedDependentMultipartChainStepActionSteps(): MulticallFixtureStep[];
388
+ /**
389
+ * A single-shot search → per-item drill-down flow whose drill step's OWN
390
+ * response is foldable on its own terms — it carries `prices[]`, the same
391
+ * per-item results shape {@link buildMulticallSingleShotSearchDrillDownNoDecoyActionSteps}
392
+ * would fold directly — but is ALSO depended on by a THIRD step: the drill
393
+ * response's `priceToken` threads into a price-history call whose response
394
+ * carries the real per-item array this flow means to fold. `computeFoldChain`
395
+ * must extend the plan's chain to `[drillStepIndex, historyStepIndex]`
396
+ * instead of stopping at the drill step's own array, so
397
+ * `emitMultiStepExecuteHttp`'s fold loop renders BOTH calls per item and
398
+ * shape inference ({@link foldResponseBodyForShapeInference}) folds the
399
+ * chain's TERMINAL (history) response, not the drill step's own `prices[]`.
400
+ */
401
+ export declare function buildMulticallSingleShotSearchDrillDownChainedDependentActionSteps(): MulticallFixtureStep[];
402
+ /**
403
+ * A nested-join-key sibling of {@link buildMulticallSingleShotSearchDrillDownChainedDependentActionSteps}:
404
+ * each primary `results[]` item carries its join key under a nested
405
+ * `identifiers` object (`{ identifiers: { sku } }`, matching
406
+ * {@link buildMulticallSingleShotSearchDrillDownNestedJoinFieldMultiItemActionSteps})
407
+ * rather than as a top-level field, AND (as in the chained-dependent fixture)
408
+ * the drill step's own response is foldable on its own terms but is ALSO
409
+ * depended on by a further step whose response carries the real per-item
410
+ * data. The primary item that threads the nested join is the SECOND item
411
+ * (`sku-b`), not the first, so `primaryMatchedItemIndex` must resolve by
412
+ * walking into each item's nested fields rather than assuming index 0, while
413
+ * `computeFoldChain` must still extend the chain past the drill step to its
414
+ * dependent follow-up rather than stopping at the drill step's own array.
415
+ */
416
+ export declare function buildMulticallSingleShotSearchDrillDownNestedJoinFieldChainedDependentActionSteps(): MulticallFixtureStep[];
417
+ /**
418
+ * A search endpoint re-queried with two distinct bodies (`page 1`/`page 2`,
419
+ * satisfying {@link findRequeriedActions}'s re-query signature) whose
420
+ * responses BOTH independently contain a `results[]` item sharing the same
421
+ * `sku` — but at a different `price` (10 vs 12) — followed by a pricing
422
+ * drill-down call threading that `sku` via its URL query param. Every prior
423
+ * action is a fold-primary candidate for {@link detectDrillDownFoldPlan}, so
424
+ * both step 0 and step 1 satisfy the drill's join; the primary-candidate
425
+ * scan currently commits to the FIRST match (step 0, `price: 10`) and
426
+ * globally consumes the drill step, so step 1 — the fresher, `price: 12`
427
+ * re-queried occurrence — is never considered. `amount` in the drill
428
+ * response is the object-array field distinct from `price` that a fold
429
+ * assertion reads to observe which occurrence was actually folded onto.
430
+ */
431
+ export declare function buildMulticallSingleShotSearchDrillDownRequeriedPrimaryOverlapActionSteps(): MulticallFixtureStep[];
432
+ /**
433
+ * A single primary search response carrying TWO genuinely independent
434
+ * object-array fields — `products[]` and `vendors[]` — each drilled by its
435
+ * own, unrelated later step (`sku` into a pricing lookup, `vendorId` into a
436
+ * vendor-detail lookup). `scanPrimaryCandidate`'s old candidatePool lock
437
+ * (recon-generate.ts:5411-5413) resolved only whichever array its FIRST
438
+ * qualifying drill-down threaded from (`products[]`, via r1) and then
439
+ * restricted every later candidate scan to that SAME array, so r2's
440
+ * `vendorId` thread into `vendors[]` was silently discarded — this fixture
441
+ * proves BOTH arrays fold independently, one FoldPlan per distinct
442
+ * `primaryArrayPath`.
443
+ */
444
+ export declare function buildMulticallSingleShotSearchTwoIndependentArraysActionSteps(): MulticallFixtureStep[];
445
+ /**
446
+ * A single primary search response carrying TWO independent object-array
447
+ * fields — `products[]`, whose `sku` join threads through the pricing call's
448
+ * own JSON body and so is structurally detectable, and `vendors[]`, whose
449
+ * `vendorId` join threads ONLY through the vendor-detail call's
450
+ * `X-Vendor-Id` request header, invisible to `collectRequestStringValues`
451
+ * and resolvable only via a flow-declared `foldReturn` spec naming `vendors`
452
+ * as its `resultsPath`. `mergeSpecPlanOntoSamePrimary` used to key its
453
+ * consumed-index check off `primaryStepIndex` alone, so the spec's plan —
454
+ * anchored on the SAME step 0 the structural heuristic had already resolved,
455
+ * but naming a DIFFERENT array — was wrongly treated as already consumed and
456
+ * silently dropped instead of appended.
457
+ */
458
+ export declare function buildMulticallStructuralPlusSpecOnlySameStepActionSteps(): MulticallFixtureStep[];
459
+ /**
460
+ * A 3-step chain where the drill step (`r1`) is a bare threading step — its
461
+ * response carries the join value (`statusToken`) but no object-array field
462
+ * at all, so it can't itself be the decoy. The decoy instead sits on the
463
+ * chain's terminal step (`r2`): a `warnings[]` array positioned BEFORE the
464
+ * real per-item `entries[]` array in key order, where `entries[]`'s items
465
+ * thread `r2`'s own `statusToken` request value and `warnings[]`'s items do
466
+ * not. {@link computeFoldChain}'s `selectDisambiguatedCandidate` call on
467
+ * this (non-immediate) chain hop must resolve `chainArrayPath` to `entries`
468
+ * on the threaded-join-fields match, not `warnings` for being found first.
469
+ */
470
+ export declare function buildMulticallSingleShotSearchDrillDownChainedDecoyOnChainTerminalActionSteps(): MulticallFixtureStep[];
471
+ /**
472
+ * A single-shot search → per-item drill-down flow where the drill step's
473
+ * OWN response (`r1`) is entirely OPAQUE — a bare array holding a single
474
+ * token, satisfying neither `isObjectArrayItem` nor
475
+ * `findAllObjectArrayFields`, so `selectDisambiguatedCandidate` finds no
476
+ * candidate there at all — and is depended on by a THIRD step (`r2`) whose
477
+ * response carries the real per-item array this flow means to fold. Unlike
478
+ * {@link buildMulticallSingleShotSearchDrillDownChainedDependentActionSteps},
479
+ * whose `r1` is ALSO independently foldable, this fixture isolates the case
480
+ * where `computeFoldChain` has nothing to fall back on at the immediate hop
481
+ * and must extend the chain past it to `r2` to find any candidate at all.
482
+ */
483
+ export declare function buildMulticallSingleShotSearchDrillDownOpaqueIntermediateChainedDependentActionSteps(): MulticallFixtureStep[];
484
+ /**
485
+ * A 4-step sibling of
486
+ * {@link buildMulticallSingleShotSearchDrillDownOpaqueIntermediateChainedDependentActionSteps}
487
+ * that inserts one more chain hop between the opaque token step and the real
488
+ * per-item terminal: a flat confirmation object (`r2`) that echoes back the
489
+ * token it was called with (excluded from its richness by
490
+ * `directPrimitiveChildCountExcludingEchoed`) alongside a boolean status flag
491
+ * AND a second, non-echoed token that threads onward into the real terminal
492
+ * step (`r3`). Both `r2` and `r3` land on the SAME richness — two non-echoed
493
+ * primitive fields apiece (`held`/`receiptToken` on `r2`, `event`/`ts` on
494
+ * `r3`) — so `computeFoldChain`'s strict `candidateRichness > chainTerminalRichness`
495
+ * comparison never lets `r3` displace `r2` as the chain terminal: a tie is
496
+ * exactly as "not richer" as a loss. This isolates the case where a
497
+ * side-effect confirmation hop that merely happens to match the real
498
+ * terminal's field count silently masks it, as opposed to
499
+ * {@link buildMulticallSingleShotSearchDrillDownOpaqueIntermediateChainedDependentActionSteps}'s
500
+ * opaque hop, which offers no candidate at all.
501
+ */
502
+ export declare function buildMulticallSingleShotSearchDrillDownRichnessTiedConfirmationHopChainedDependentActionSteps(): MulticallFixtureStep[];
503
+ /**
504
+ * An array-wrapped sibling of
505
+ * {@link buildMulticallSingleShotSearchDrillDownOpaqueIntermediateChainedDependentActionSteps}:
506
+ * the opaque intermediate hop (`r1`) is identical, but the chain's TERMINAL
507
+ * hop (`r2`) threads `r1`'s produced `statusToken` wrapped inside a
508
+ * single-element request-body ARRAY (`{"tokens":["status-token-order-a"]}`,
509
+ * a bulk/batch-lookup request shape) instead of as a flat top-level scalar
510
+ * field. `computeFoldChain`'s structural `dependsOnChain` detection (which
511
+ * walks every request-body leaf regardless of nesting) resolves the chain
512
+ * correctly either way, so this isolates a DIFFERENT failure: the
513
+ * request-body render must still be able to thread `statusToken` into that
514
+ * array slot instead of freezing the whole array as an opaque caller-payload
515
+ * blob (`applyStructuredValuePayloadSubstitutions`'s "swallow whole
516
+ * caller-supplied array/object" mechanism, which runs BEFORE state
517
+ * threading and has no concept of "this array actually wraps a threaded
518
+ * dependent-drill-down join value").
519
+ */
520
+ export declare function buildMulticallSingleShotSearchDrillDownArrayWrappedChainedDependentActionSteps(): MulticallFixtureStep[];
521
+ /**
522
+ * Same array-wrapped-chained shape as
523
+ * {@link buildMulticallSingleShotSearchDrillDownArrayWrappedChainedDependentActionSteps},
524
+ * but the chain-produced value threaded from `r1` into `r2` is a bare JSON
525
+ * NUMBER (`12345678`) rather than a string. Unlike the primary-item join
526
+ * field covered by
527
+ * {@link buildMulticallSingleShotSearchDrillDownArrayWrappedNumericImmediateJoinFieldActionSteps},
528
+ * a chain-produced value must first be indexed as a threadable STATE value by
529
+ * `indexStateValues` before any array-wrap rendering question can even arise
530
+ * — and `indexStateValues` walks response bodies via `walkStringLeaves`,
531
+ * which yields string leaves only. A bare-number response leaf is therefore
532
+ * never indexed and never appears in `compileActionSteps`' `produces[]` at
533
+ * all, so `r2`'s templated body has no accessor to substitute and renders
534
+ * `{"tokens":[undefined]}` — invalid JSON, thrown as a fetch failure. This is
535
+ * a distinct, more fundamental gap than the array-wrap fix
536
+ * (`applyStructuredValuePayloadSubstitutions`, bugfix-001) addresses: it sits
537
+ * upstream, in state INDEXING, not in payload-substitution SPARING, and
538
+ * reproduces identically whether or not the terminal body is array-wrapped.
539
+ */
540
+ export declare function buildMulticallSingleShotSearchDrillDownArrayWrappedNumericChainedJoinFieldActionSteps(): MulticallFixtureStep[];
541
+ /**
542
+ * A different sibling of the same array-wrapped-join-field failure family:
543
+ * here it's the IMMEDIATE drill step (`r1`), not a later chain hop, whose
544
+ * request body wraps the value it threads — but that value is the PRIMARY
545
+ * ITEM's own join field (`orderId`), not a prior step's produced response
546
+ * value. `applyStructuredValuePayloadSubstitutions`'s "spare a candidate
547
+ * already threaded" exception only recognized prior-step state values, so it
548
+ * still froze `r1`'s `{"orderIds":["order-a"]}` into an opaque
549
+ * `${JSON.stringify(payload.orderIds)}` blob, destroying the literal
550
+ * `"order-a"` text the fold-loop's own per-item `parameterize` pass (which
551
+ * runs even later, once rendering enters the loop) needs to find and swap
552
+ * for `${item.orderId}` — every iteration replayed the SAME captured order
553
+ * instead of each primary item's own.
554
+ */
555
+ export declare function buildMulticallSingleShotSearchDrillDownArrayWrappedImmediateJoinFieldActionSteps(): MulticallFixtureStep[];
556
+ /**
557
+ * Same array-wrapped-immediate-join-field shape as
558
+ * {@link buildMulticallSingleShotSearchDrillDownArrayWrappedImmediateJoinFieldActionSteps},
559
+ * but the primary item's join field is a bare JSON NUMBER (`orderId: 101`)
560
+ * rather than a string. `walkStringLeaves` (used by the spare check in
561
+ * `applyStructuredValuePayloadSubstitutions`) silently skips number leaves,
562
+ * so a numeric join value wrapped in `{"orderIds":[101]}` was frozen into an
563
+ * opaque `${JSON.stringify(payload.orderIds)}` blob instead of being spared
564
+ * for the fold-loop's later per-item `parameterize` pass.
565
+ */
566
+ export declare function buildMulticallSingleShotSearchDrillDownArrayWrappedNumericImmediateJoinFieldActionSteps(): MulticallFixtureStep[];
62
567
  //# sourceMappingURL=recon-generate-multicall-fixture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recon-generate-multicall-fixture.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-generate-multicall-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;qEAIqE;AACrE,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,EAAE,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAgBV;AAOD,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE;IACT,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,GACA,oBAAoB,CAQtB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sCAAsC,IAAI,oBAAoB,EAAE,CAmC/E;AAED;;;;;GAKG;AACH,wBAAgB,mDAAmD,IAAI,oBAAoB,EAAE,CAU5F;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,EAAE,CAkCvD"}
1
+ {"version":3,"file":"recon-generate-multicall-fixture.d.ts","sourceRoot":"","sources":["../../src/scripts/recon-generate-multicall-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE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