diff --git a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md index b01b85d79678..38ac9729bddb 100644 --- a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.md @@ -77,11 +77,11 @@ Generated by [AVA](https://avajs.dev). }, }, vows: { - AdminRetriableFlow_kindHandle: 'Alleged: kind', - AdminRetriableFlow_singleton: 'Alleged: AdminRetriableFlow', + AdminRetryableFlow_kindHandle: 'Alleged: kind', + AdminRetryableFlow_singleton: 'Alleged: AdminRetryableFlow', PromiseWatcher_kindHandle: 'Alleged: kind', VowInternalsKit_kindHandle: 'Alleged: kind', WatchUtils_kindHandle: 'Alleged: kind', - retriableFlowForOutcomeVow: {}, + retryableFlowForOutcomeVow: {}, }, } diff --git a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap index 0149838132a3..897c3c4e64b0 100644 Binary files a/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap and b/packages/orchestration/test/examples/snapshots/send-anywhere.test.ts.snap differ diff --git a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md index 55579d3b9f2d..8d65dc66fcb6 100644 --- a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.md @@ -211,11 +211,11 @@ Generated by [AVA](https://avajs.dev). }, }, vows: { - AdminRetriableFlow_kindHandle: 'Alleged: kind', - AdminRetriableFlow_singleton: 'Alleged: AdminRetriableFlow', + AdminRetryableFlow_kindHandle: 'Alleged: kind', + AdminRetryableFlow_singleton: 'Alleged: AdminRetryableFlow', PromiseWatcher_kindHandle: 'Alleged: kind', VowInternalsKit_kindHandle: 'Alleged: kind', WatchUtils_kindHandle: 'Alleged: kind', - retriableFlowForOutcomeVow: {}, + retryableFlowForOutcomeVow: {}, }, } diff --git a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.snap b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.snap index 8135c2bb2f8f..45b56186c154 100644 Binary files a/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.snap and b/packages/orchestration/test/examples/snapshots/staking-combinations.test.ts.snap differ diff --git a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md index fa137969219a..59ebbc6aebbf 100644 --- a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md +++ b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.md @@ -159,11 +159,11 @@ Generated by [AVA](https://avajs.dev). }, }, vows: { - AdminRetriableFlow_kindHandle: 'Alleged: kind', - AdminRetriableFlow_singleton: 'Alleged: AdminRetriableFlow', + AdminRetryableFlow_kindHandle: 'Alleged: kind', + AdminRetryableFlow_singleton: 'Alleged: AdminRetryableFlow', PromiseWatcher_kindHandle: 'Alleged: kind', VowInternalsKit_kindHandle: 'Alleged: kind', WatchUtils_kindHandle: 'Alleged: kind', - retriableFlowForOutcomeVow: {}, + retryableFlowForOutcomeVow: {}, }, } diff --git a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.snap b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.snap index 4edb9b3096e6..c768cf53a181 100644 Binary files a/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.snap and b/packages/orchestration/test/examples/snapshots/unbond.contract.test.ts.snap differ diff --git a/packages/vow/README.md b/packages/vow/README.md index 08d32ef3d138..bd8478a8b1b5 100644 --- a/packages/vow/README.md +++ b/packages/vow/README.md @@ -150,8 +150,8 @@ Here is an (oversimplified) algorithm that `watch` and `when` use to obtain a final result: ```js -// Directly await the non-retriable original specimen. -// This is non-retriable because we don't know how our caller obtained +// Directly await the non-retryable original specimen. +// This is non-retryable because we don't know how our caller obtained // it in the first place, since it is an application-specific detail // that may not be side-effect free. let result = await specimenP; diff --git a/packages/vow/src/retriable.js b/packages/vow/src/retryable.js similarity index 66% rename from packages/vow/src/retriable.js rename to packages/vow/src/retryable.js index 1e899c5aef5a..98e5416bcb73 100644 --- a/packages/vow/src/retriable.js +++ b/packages/vow/src/retryable.js @@ -17,12 +17,12 @@ import { makeAsVow, toPassableCap, VowShape } from './vow-utils.js'; */ /** - * @typedef {(...args: Passable[]) => Promise} RetriableFunc + * @typedef {(...args: Passable[]) => Promise} RetryableFunc */ const { defineProperties } = Object; -const RetriableFlowIKit = harden({ +const RetryableFlowIKit = harden({ flow: M.interface('Flow', { restart: M.call().returns(), getOutcome: M.call().returns(VowShape), @@ -30,7 +30,7 @@ const RetriableFlowIKit = harden({ resultWatcher: PromiseWatcherI, }); -const AdminRetriableFlowI = M.interface('RetriableFlowAdmin', { +const AdminRetryableFlowI = M.interface('RetryableFlowAdmin', { getFlowForOutcomeVow: M.call(VowShape).returns(M.opt(M.remotable('flow'))), }); @@ -38,7 +38,7 @@ const AdminRetriableFlowI = M.interface('RetriableFlowAdmin', { * @param {Zone} outerZone * @param {PreparationOptions} outerOptions */ -export const prepareRetriableTools = (outerZone, outerOptions) => { +export const prepareRetryableTools = (outerZone, outerOptions) => { const { makeVowKit, isRetryableReason } = outerOptions; const asVow = makeAsVow(makeVowKit); @@ -48,8 +48,8 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { * for their activations later. */ const flowForOutcomeVowKey = - /** @type {MapStore} */ ( - outerZone.mapStore('retriableFlowForOutcomeVow', { + /** @type {MapStore} */ ( + outerZone.mapStore('retryableFlowForOutcomeVow', { keyShape: M.remotable('toPassableCap'), valueShape: M.remotable('flow'), // isDone === false }) @@ -58,20 +58,20 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { /** * @param {Zone} zone * @param {string} tag - * @param {RetriableFunc} retriableFunc + * @param {RetryableFunc} retryableFunc */ - const prepareRetriableFlowKit = (zone, tag, retriableFunc) => { - typeof retriableFunc === 'function' || - Fail`retriableFunc must be a callable function ${retriableFunc}`; + const prepareRetryableFlowKit = (zone, tag, retryableFunc) => { + typeof retryableFunc === 'function' || + Fail`retryableFunc must be a callable function ${retryableFunc}`; - const internalMakeRetriableFlowKit = zone.exoClassKit( + const internalMakeRetryableFlowKit = zone.exoClassKit( tag, - RetriableFlowIKit, + RetryableFlowIKit, activationArgs => { harden(activationArgs); return { - activationArgs, // restarting the retriable function uses the original args + activationArgs, // restarting the retryable function uses the original args outcomeKit: makeVowKit(), // outcome of activation as vow lastRetryReason: undefined, runs: 0n, @@ -81,8 +81,8 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { { flow: { /** - * Calls the retriable function, either for the initial run or when - * the result of the previous run fails with a retriable reason. + * Calls the retryable function, either for the initial run or when + * the result of the previous run fails with a retryable reason. */ restart() { const { state, facets } = this; @@ -91,14 +91,14 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { !isDone || // separate line so I can set a breakpoint - Fail`Cannot restart a done retriable flow ${flow}`; + Fail`Cannot restart a done retryable flow ${flow}`; const runId = state.runs + 1n; state.runs = runId; let resultP; try { - resultP = Promise.resolve(retriableFunc(...activationArgs)); + resultP = Promise.resolve(retryableFunc(...activationArgs)); } catch (err) { resultP = Promise.reject(err); } @@ -117,7 +117,7 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { const { runs, outcomeKit } = state; if (runId !== runs) return; !state.isDone || - Fail`Cannot resolve a done retriable flow ${this.facets.flow}`; + Fail`Cannot resolve a done retryable flow ${this.facets.flow}`; outcomeKit.resolver.resolve(value); flowForOutcomeVowKey.delete(toPassableCap(outcomeKit.vow)); state.isDone = true; @@ -127,7 +127,7 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { const { runs, outcomeKit } = state; if (runId !== runs) return; !state.isDone || - Fail`Cannot reject a done retriable flow ${this.facets.flow}`; + Fail`Cannot reject a done retryable flow ${this.facets.flow}`; const retryReason = isRetryableReason( reason, state.lastRetryReason, @@ -144,24 +144,24 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { }, }, ); - const makeRetriableFlowKit = activationArgs => { - const retriableKit = internalMakeRetriableFlowKit(activationArgs); - const { flow } = retriableKit; + const makeRetryableFlowKit = activationArgs => { + const retryableKit = internalMakeRetryableFlowKit(activationArgs); + const { flow } = retryableKit; const vow = flow.getOutcome(); flowForOutcomeVowKey.init(toPassableCap(vow), flow); flow.restart(); - return retriableKit; + return retryableKit; }; - return harden(makeRetriableFlowKit); + return harden(makeRetryableFlowKit); }; /** - * @type {VowTools['retriable']} + * @type {VowTools['retryable']} */ - const retriable = (zone, tag, retriableFunc) => { - const makeRetriableKit = prepareRetriableFlowKit(zone, tag, retriableFunc); - const wrapperFuncName = `${tag}_retriable`; + const retryable = (zone, tag, retryableFunc) => { + const makeRetryableKit = prepareRetryableFlowKit(zone, tag, retryableFunc); + const wrapperFuncName = `${tag}_retryable`; const wrapperFunc = { /** @param {any[]} args */ @@ -169,22 +169,22 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { // Make sure any error results in a rejected vow return asVow(() => { zone.isStorable(harden(args)) || - Fail`retriable arguments must be storable ${args}`; - const { flow } = makeRetriableKit(args); + Fail`retryable arguments must be storable ${args}`; + const { flow } = makeRetryableKit(args); return flow.getOutcome(); }); }, }[wrapperFuncName]; defineProperties(wrapperFunc, { - length: { value: retriableFunc.length }, + length: { value: retryableFunc.length }, }); // @ts-expect-error inferred generic func return harden(wrapperFunc); }; - const adminRetriableFlow = outerZone.exo( - 'AdminRetriableFlow', - AdminRetriableFlowI, + const adminRetryableFlow = outerZone.exo( + 'AdminRetryableFlow', + AdminRetryableFlowI, { /** * @param {Vow} outcomeVow @@ -196,29 +196,29 @@ export const prepareRetriableTools = (outerZone, outerOptions) => { ); return harden({ - prepareRetriableFlowKit, - adminRetriableFlow, - retriable, + prepareRetryableFlowKit, + adminRetryableFlow, + retryable, }); }; -harden(prepareRetriableTools); +harden(prepareRetryableTools); /** - * @typedef {ReturnType} RetriableTools + * @typedef {ReturnType} RetryableTools */ /** - * @typedef {RetriableTools['adminRetriableFlow']} AdminRetriableFlow + * @typedef {RetryableTools['adminRetryableFlow']} AdminRetryableFlow */ /** - * @typedef {ReturnType} MakeRetriableFlowKit + * @typedef {ReturnType} MakeRetryableFlowKit */ /** - * @typedef {ReturnType} RetriableFlowKit + * @typedef {ReturnType} RetryableFlowKit */ /** - * @typedef {RetriableFlowKit['flow']} RetriableFlow + * @typedef {RetryableFlowKit['flow']} RetryableFlow */ diff --git a/packages/vow/src/tools.js b/packages/vow/src/tools.js index 496076f13014..35511de09c92 100644 --- a/packages/vow/src/tools.js +++ b/packages/vow/src/tools.js @@ -3,7 +3,7 @@ import { makeAsVow } from './vow-utils.js'; import { prepareVowKit } from './vow.js'; import { prepareWatchUtils } from './watch-utils.js'; import { prepareWatch } from './watch.js'; -import { prepareRetriableTools } from './retriable.js'; +import { prepareRetryableTools } from './retryable.js'; import { makeWhen } from './when.js'; /** @@ -36,7 +36,7 @@ export const prepareBasicVowTools = (zone, powers = {}) => { const watchUtils = makeWatchUtils(); const asVow = makeAsVow(makeVowKit); - const { retriable } = prepareRetriableTools(zone, { + const { retryable } = prepareRetryableTools(zone, { makeVowKit, isRetryableReason, }); @@ -81,7 +81,8 @@ export const prepareBasicVowTools = (zone, powers = {}) => { allSettled, asVow, asPromise, - retriable, + retryable, + retriable: retryable, // For temporary backwards compat with alpha implementation }); }; harden(prepareBasicVowTools); diff --git a/packages/vow/src/types.ts b/packages/vow/src/types.ts index 46c7cb293ba4..7c7e8418b205 100644 --- a/packages/vow/src/types.ts +++ b/packages/vow/src/types.ts @@ -100,6 +100,27 @@ export type AsPromiseFunction< watcherArgs?: C | undefined, ) => Promise; +export interface RetryableTool { + /** + * Create a function that retries the given function if the underlying + * async function rejects due to an upgrade disconnection. The return value + * of the created function is a vow that settles to the final retry result. + * + * The retried function should be idempotent. + * + * @param fnZone the zone for the named function + * @param name base name to use in the zone + * @param fn the retried function + */ + Promise>( + fnZone: Zone, + name: string, + fn: F, + ): F extends (...args: infer Args) => Promise + ? (...args: Args) => Vow + : never; +} + export type VowTools = { /** * Vow-tolerant implementation of Promise.all that takes an iterable of vows @@ -142,22 +163,11 @@ export type VowTools = { fn: (...args: any[]) => Vow> | Awaited | PromiseVow, ) => Vow>; makeVowKit: () => VowKit; + retryable: RetryableTool; /** - * Create a function that retries the given function if the underlying - * async function rejects due to an upgrade disconnection. The return value - * of the created function is a vow that settles to the final retry result. - * - * @param fnZone the zone for the named function - * @param name base name to use in the zone - * @param fn the retried function + * @deprecated use `retryable` */ - retriable: Promise>( - fnZone: Zone, - name: string, - fn: F, - ) => F extends (...args: infer Args) => Promise - ? (...args: Args) => Vow - : never; + retriable: RetryableTool; watch: ( specimenP: EVow, watcher?: Watcher | undefined, diff --git a/packages/vow/src/vow-utils.js b/packages/vow/src/vow-utils.js index e18465ce3676..d0a40de16942 100644 --- a/packages/vow/src/vow-utils.js +++ b/packages/vow/src/vow-utils.js @@ -29,7 +29,7 @@ harden(isVow); /** * A vow is a passable tagged as 'Vow'. Its payload is a record with * API-versioned remotables. payload.vowV0 is the API for the `watch` and - * `when` operators to use for retriable shortening of the vow chain. + * `when` operators to use for retryable shortening of the vow chain. * * If the specimen is a Vow, return its payload, otherwise undefined. * diff --git a/packages/vow/test/retriable-restart.test.js b/packages/vow/test/retryable-restart.test.js similarity index 83% rename from packages/vow/test/retriable-restart.test.js rename to packages/vow/test/retryable-restart.test.js index f4f3d183d95b..39ca98ac3a6a 100644 --- a/packages/vow/test/retriable-restart.test.js +++ b/packages/vow/test/retryable-restart.test.js @@ -19,8 +19,8 @@ test.serial('retries on disconnection', async t => { await startLife( async baggage => { const zone = makeDurableZone(baggage, 'durableRoot'); - const { retriable, watch } = prepareVowTools(zone); - const retry = retriable(zone, 'retry', async () => { + const { retryable, watch } = prepareVowTools(zone); + const retry = retryable(zone, 'retry', async () => { // Never resolves, simulates external call await new Promise(() => {}); }); @@ -51,10 +51,10 @@ test.serial('retries on disconnection', async t => { await startLife( baggage => { const zone = makeDurableZone(baggage, 'durableRoot'); - const { retriable, when } = prepareVowTools(zone); + const { retryable, when } = prepareVowTools(zone); - // Reconnect retriable definition - retriable(zone, 'retry', async () => { + // Reconnect retryable definition + retryable(zone, 'retry', async () => { // Simulate call that settles await nextCrank(); return 42; @@ -86,9 +86,9 @@ test.serial('errors on non durably storable arguments', async t => { const baggage = getBaggage(); const zone = makeDurableZone(baggage, 'durableRoot'); - const { retriable, when } = prepareVowTools(zone); + const { retryable, when } = prepareVowTools(zone); - const passthrough = retriable(zone, 'passthrough', async arg => arg); + const passthrough = retryable(zone, 'passthrough', async arg => arg); const nonStorableArg = { promise: new Promise(() => {}), @@ -99,12 +99,12 @@ test.serial('errors on non durably storable arguments', async t => { let resultV; t.notThrows(() => { resultV = passthrough(nonStorableArg); - }, 'retriable does not synchronously error'); + }, 'retryable does not synchronously error'); const resultP = when(resultV); await t.throwsAsync( resultP, - { message: /^retriable arguments must be storable/ }, + { message: /^retryable arguments must be storable/ }, 'expected rejection', ); }); diff --git a/packages/vow/test/retriable.test.js b/packages/vow/test/retryable.test.js similarity index 71% rename from packages/vow/test/retriable.test.js rename to packages/vow/test/retryable.test.js index 25cf3d1d65e9..5c9e98089b2a 100644 --- a/packages/vow/test/retriable.test.js +++ b/packages/vow/test/retryable.test.js @@ -8,7 +8,7 @@ import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js'; import { prepareVowKit } from '../src/vow.js'; import { isVow } from '../src/vow-utils.js'; -import { prepareRetriableTools } from '../src/retriable.js'; +import { prepareRetryableTools } from '../src/retryable.js'; import { makeWhen } from '../src/when.js'; /** @@ -24,18 +24,18 @@ const makeTestTools = ({ isRetryableReason = () => false } = {}) => { const makeVowKit = prepareVowKit(zone); const when = makeWhen(isRetryableReason); - const { retriable, adminRetriableFlow } = prepareRetriableTools(zone, { + const { retryable, adminRetryableFlow } = prepareRetryableTools(zone, { makeVowKit, isRetryableReason, }); - return { zone, when, makeVowKit, retriable, adminRetriableFlow }; + return { zone, when, makeVowKit, retryable, adminRetryableFlow }; }; test('successful flow', async t => { - const { zone, when, retriable } = makeTestTools(); + const { zone, when, retryable } = makeTestTools(); - const succeed = retriable(zone, 'succeed', async () => 42); + const succeed = retryable(zone, 'succeed', async () => 42); const resultV = succeed(); const result = await when(resultV); @@ -43,9 +43,9 @@ test('successful flow', async t => { }); test('rejected flow', async t => { - const { zone, when, retriable } = makeTestTools(); + const { zone, when, retryable } = makeTestTools(); - const reject = retriable(zone, 'reject', async () => Fail`some error`); + const reject = retryable(zone, 'reject', async () => Fail`some error`); const resultV = reject(); const resultP = when(resultV); @@ -53,9 +53,9 @@ test('rejected flow', async t => { }); test('throwing flow', async t => { - const { zone, when, retriable } = makeTestTools(); + const { zone, when, retryable } = makeTestTools(); - const error = retriable(zone, 'error', () => Fail`some error`); + const error = retryable(zone, 'error', () => Fail`some error`); const resultV = error(); const resultP = when(resultV); @@ -63,7 +63,7 @@ test('throwing flow', async t => { }); test('passable arguments', async t => { - const { zone, when, makeVowKit, retriable } = makeTestTools(); + const { zone, when, makeVowKit, retryable } = makeTestTools(); const argValue = { remotable: Far('test'), @@ -71,7 +71,7 @@ test('passable arguments', async t => { vowKit: makeVowKit(), }; - const passthrough = retriable(zone, 'passthrough', async arg => arg); + const passthrough = retryable(zone, 'passthrough', async arg => arg); const resultV = passthrough(argValue); const result = await when(resultV); @@ -79,9 +79,9 @@ test('passable arguments', async t => { }); test('non-passable arguments', async t => { - const { zone, when, retriable } = makeTestTools(); + const { zone, when, retryable } = makeTestTools(); - const passthrough = retriable(zone, 'passthrough', async arg => arg); + const passthrough = retryable(zone, 'passthrough', async arg => arg); const nonPassableArg = harden({ foo() { @@ -94,26 +94,26 @@ test('non-passable arguments', async t => { let resultV; t.notThrows(() => { resultV = passthrough(nonPassableArg); - }, 'retriable does not synchronously error'); + }, 'retryable does not synchronously error'); const resultP = when(resultV); await t.throwsAsync( resultP, - { message: /^retriable arguments must be storable/ }, + { message: /^retryable arguments must be storable/ }, 'expected rejection', ); }); test('outcome vow', async t => { - const { zone, when, retriable, adminRetriableFlow } = makeTestTools(); + const { zone, when, retryable, adminRetryableFlow } = makeTestTools(); - const succeed = retriable(zone, 'succeed', async () => 42); + const succeed = retryable(zone, 'succeed', async () => 42); const resultV = succeed(); - t.true(isVow(resultV), 'retriable result is vow'); + t.true(isVow(resultV), 'retryable result is vow'); - const flow = adminRetriableFlow.getFlowForOutcomeVow(resultV); + const flow = adminRetryableFlow.getFlowForOutcomeVow(resultV); t.truthy(flow, 'flow from outcome vow'); t.is(flow.getOutcome(), resultV, 'outcome vow match'); @@ -122,14 +122,14 @@ test('outcome vow', async t => { t.is(result, 42, 'expected result'); t.throws( - () => adminRetriableFlow.getFlowForOutcomeVow(resultV), + () => adminRetryableFlow.getFlowForOutcomeVow(resultV), undefined, 'outcome vow not found', ); }); test('retry', async t => { - const { zone, when, retriable } = makeTestTools({ + const { zone, when, retryable } = makeTestTools({ isRetryableReason: (reason, priorReason) => reason !== priorReason && reason.startsWith('retry') && reason, }); @@ -147,7 +147,7 @@ test('retry', async t => { }, }); - const resultFromProvider = retriable( + const resultFromProvider = retryable( zone, 'resultFromProvider', async provider => provider.getResult(), @@ -164,10 +164,10 @@ test('retry', async t => { }); test('restart', async t => { - const { zone, when, retriable, adminRetriableFlow } = makeTestTools(); + const { zone, when, retryable, adminRetryableFlow } = makeTestTools(); let runNum = 0; - const restarted = retriable(zone, 'testRestartedRetriable', async () => { + const restarted = retryable(zone, 'testRestartedRetryable', async () => { // Non idempotent function to simplify the test runNum += 1; const currentRun = runNum; @@ -184,13 +184,13 @@ test('restart', async t => { }); const resultV = restarted(); - const flow = adminRetriableFlow.getFlowForOutcomeVow(resultV); + const flow = adminRetryableFlow.getFlowForOutcomeVow(resultV); t.truthy(flow, 'flow from outcome vow'); const result = await when(resultV); t.is(result, 3, 'flow result from restart'); t.throws(() => flow.restart(), { - message: /^Cannot restart a done retriable flow/, + message: /^Cannot restart a done retryable flow/, }); }); diff --git a/packages/vow/test/types.test-d.ts b/packages/vow/test/types.test-d.ts index 0993fe14e0b1..d609bdac4b92 100644 --- a/packages/vow/test/types.test-d.ts +++ b/packages/vow/test/types.test-d.ts @@ -8,11 +8,11 @@ const vt: VowTools = null as any; const zone: Zone = null as any; // @ts-expect-error function param must return promise -vt.retriable(zone, 'foo', () => null); -vt.retriable(zone, 'foo', () => Promise.resolve(null)); +vt.retryable(zone, 'foo', () => null); +vt.retryable(zone, 'foo', () => Promise.resolve(null)); expectType<(p1: number, p2: string) => Vow<{ someValue: 'bar' }>>( - vt.retriable(zone, 'foo', (p1: number, p2: string) => + vt.retryable(zone, 'foo', (p1: number, p2: string) => Promise.resolve({ someValue: 'bar' } as const), ), ); diff --git a/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.md b/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.md index 40361190c32d..feb090d21fe1 100644 --- a/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.md +++ b/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.md @@ -9,14 +9,14 @@ Generated by [AVA](https://avajs.dev). > contract baggage after start { - AdminRetriableFlow_kindHandle: 'Alleged: kind', - AdminRetriableFlow_singleton: 'Alleged: AdminRetriableFlow', + AdminRetryableFlow_kindHandle: 'Alleged: kind', + AdminRetryableFlow_singleton: 'Alleged: AdminRetryableFlow', PromiseWatcher_kindHandle: 'Alleged: kind', VowInternalsKit_kindHandle: 'Alleged: kind', WatchUtils_kindHandle: 'Alleged: kind', publicFacet_kindHandle: 'Alleged: kind', publicFacet_singleton: 'Alleged: publicFacet', - retriableFlowForOutcomeVow: {}, + retryableFlowForOutcomeVow: {}, vowResolver: { resolver: Object @Alleged: VowInternalsKit resolver {}, vow: Object @Vow { diff --git a/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.snap b/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.snap index 171dc6777c11..2631812d4c3a 100644 Binary files a/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.snap and b/packages/zoe/test/unitTests/contracts/snapshots/valueVow.test.js.snap differ