@reventlessdev/reventless-aws 3.0.0-alpha.387 → 3.0.0-alpha.388
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.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/package.json +12 -12
- package/scripts/ProvisionIdentity.res +1 -1
- package/src/Platform.res +13 -13
- package/src/Platform.res.mjs +28 -28
- package/src/Platform_Stack.res +3 -3
- package/src/adapter/AWS_Tags.res +1 -1
- package/src/adapter/Auth/Auth_ActiveRolePoolAttachment.res +1 -1
- package/src/adapter/Auth/Auth_ActiveRoleStore_Ops.res +2 -2
- package/src/adapter/Auth/Auth_ActiveRoleStore_Schema.res +1 -1
- package/src/adapter/Auth/Auth_Cognito.res +1 -1
- package/src/adapter/Auth/Auth_LoginIdentifier.res +1 -1
- package/src/adapter/Auth/Auth_SignUpMode.res +1 -1
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res +2 -2
- package/src/adapter/EventLog/EventLogBackend.res +1 -1
- package/src/adapter/QueryDb/PgQueryResolver_Lambda.res +2 -2
- package/src/adapter/Runtime/AggregateEntryPoint.mjs +6 -6
- package/src/adapter/Runtime/AggregateEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +8 -8
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res.mjs +7 -7
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res +8 -8
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res.mjs +7 -7
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res +7 -7
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res.mjs +6 -6
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res +7 -7
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res.mjs +6 -6
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res +7 -7
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res.mjs +6 -6
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res +7 -7
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res.mjs +6 -6
- package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res +2 -2
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs +7 -7
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res +7 -7
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res.mjs +2 -2
- package/src/adapter/Runtime/EventCollectorEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +2 -2
- package/src/adapter/Runtime/RuntimeExtensionEntryPoint_Ops.res +2 -2
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res +10 -10
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res.mjs +3 -3
- package/src/adapter/StateTopic/StateTopic_AppSync.res +1 -1
- package/src/capability/Capability_Messaging.res +2 -2
- package/src/components/Aggregate_Builder_Micro.res +3 -3
- package/src/components/Aggregate_Builder_Micro.res.mjs +3 -3
- package/src/components/Aggregate_Builder_NoResolver.res +3 -3
- package/src/components/Aggregate_Builder_NoResolver.res.mjs +3 -3
- package/src/components/Aggregate_Builder_PerAggregate.res +3 -3
- package/src/components/Aggregate_Builder_PerAggregate.res.mjs +3 -3
- package/src/components/Aggregate_Builder_Single.res +3 -3
- package/src/components/Aggregate_Builder_Single.res.mjs +3 -3
- package/src/components/Aggregate_Builder_Single_Async.res +3 -3
- package/src/components/Aggregate_Builder_Single_Async.res.mjs +3 -3
- package/src/components/Api/AppSync_Adapter.res +3 -3
- package/src/components/Api/AppSync_SdlDecorate.res +3 -3
- package/src/components/SideEffectHandler_PerSideEffectHandler.res +1 -1
- package/src/components/StateChangeSlice_Builder.res +4 -4
- package/src/components/StateChangeSlice_Builder.res.mjs +4 -4
- package/src/plugin/runtime/PluginRuntime_Builder.res +4 -4
- package/src/plugin/runtime/PluginRuntime_Builder.res.mjs +3 -3
- package/src/plugin/stack/Plugin_Stack.res +1 -1
- package/src/util/Util_Bundle.res +1 -1
- package/tests/AppSync_AdapterTest.res +1 -1
- package/tests/AppSync_RetirementNarrowingTest.res +1 -1
- package/tests/AppSync_SdlDecorateTest.res +1 -1
- package/tests/Auth_LoginIdentifierTest.res +1 -1
- package/tests/Auth_SignUpModeTest.res +1 -1
- package/tests/BakeConvergenceTest.res +11 -11
- package/tests/BakeConvergenceTest.res.mjs +13 -13
- package/tests/QueryDbResolvers_AppSyncTest.res +1 -1
- package/tests/Upload_ClaimTest.res +1 -1
- package/tests/Util_AwsErrorTest.res +1 -1
- package/tests/Util_StoreLayoutTest.res +1 -1
- package/tests/dcbColdStartPartition.mjs +3 -3
- package/tests/integration/{AggTestAggregateBehavior.res → AggTestAggregateDecision.res} +2 -2
- package/tests/integration/{AggTestAggregateBehavior.res.mjs → AggTestAggregateDecision.res.mjs} +1 -1
- package/tests/integration/AggregateEntryPoint_IntegrationTest.res +3 -3
- package/tests/integration/AggregateEntryPoint_IntegrationTest.res.mjs +2 -2
- package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res +5 -5
- package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res.mjs +4 -4
- package/tests/integration/DcbEventLogStorage_DynamoDb_IntegrationTest.res +1 -1
- package/tests/integration/{EpCompositeSliceBehavior.res → EpCompositeSliceDecision.res} +2 -2
- package/tests/integration/{EpCompositeSliceBehavior.res.mjs → EpCompositeSliceDecision.res.mjs} +1 -1
- package/tests/integration/{EpTestSliceBehavior.res → EpTestSliceDecision.res} +2 -2
- package/tests/integration/{EpTestSliceBehavior.res.mjs → EpTestSliceDecision.res.mjs} +1 -1
|
@@ -94,10 +94,10 @@ let row = (def: Reventless.Plugin.pluginDefinition, ~at: string): dict<JSON.t> =
|
|
|
94
94
|
->JSON.Decode.object
|
|
95
95
|
->Option.getOr(Dict.make())
|
|
96
96
|
|
|
97
|
-
let apply = (state, events) => events->Array.reduce(state, ReventlessCore.
|
|
97
|
+
let apply = (state, events) => events->Array.reduce(state, ReventlessCore.PluginDecision.evolve)
|
|
98
98
|
|
|
99
99
|
let connect = (state, def) =>
|
|
100
|
-
switch ReventlessCore.
|
|
100
|
+
switch ReventlessCore.PluginDecision.decide(state, ReventlessCore.PluginSpec.Connect(def)) {
|
|
101
101
|
| Ok(events) => events
|
|
102
102
|
| Error(_) => []
|
|
103
103
|
}
|
|
@@ -153,16 +153,16 @@ describe("the bake converges when a plugin's structure changes", () => {
|
|
|
153
153
|
// unchanged one, so this is the step a broken chain silently skips.
|
|
154
154
|
testSync("a redeploy with a changed structure re-emits VersionConnected", () => {
|
|
155
155
|
let connected =
|
|
156
|
-
ReventlessCore.
|
|
157
|
-
connect(ReventlessCore.
|
|
156
|
+
ReventlessCore.PluginDecision.initialState->apply(
|
|
157
|
+
connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
|
|
158
158
|
)
|
|
159
159
|
expect(connect(connected, shipped(defB))->Array.length)->toBe(1)
|
|
160
160
|
})
|
|
161
161
|
|
|
162
162
|
testSync("once it lands, the plugin reads as registered by this deploy", () => {
|
|
163
163
|
let connected =
|
|
164
|
-
ReventlessCore.
|
|
165
|
-
connect(ReventlessCore.
|
|
164
|
+
ReventlessCore.PluginDecision.initialState->apply(
|
|
165
|
+
connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
|
|
166
166
|
)
|
|
167
167
|
let redeployed = connected->apply(connect(connected, shipped(defB)))
|
|
168
168
|
let def = switch redeployed.known->Dict.get("1.0.0") {
|
|
@@ -180,8 +180,8 @@ describe("the bake converges when a plugin's structure changes", () => {
|
|
|
180
180
|
// counts it apart from a plugin that did register.
|
|
181
181
|
testSync("an unchanged structure passes without re-registering", () => {
|
|
182
182
|
let connected =
|
|
183
|
-
ReventlessCore.
|
|
184
|
-
connect(ReventlessCore.
|
|
183
|
+
ReventlessCore.PluginDecision.initialState->apply(
|
|
184
|
+
connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
|
|
185
185
|
)
|
|
186
186
|
expect(connect(connected, shipped(defA)))->toEqual([])
|
|
187
187
|
expect(
|
|
@@ -198,11 +198,11 @@ describe("the bake converges when a plugin's structure changes", () => {
|
|
|
198
198
|
// and the changed structure never reaches the read model.
|
|
199
199
|
testSync("a redeploy re-detects an already-connected version", () => {
|
|
200
200
|
let connected =
|
|
201
|
-
ReventlessCore.
|
|
202
|
-
connect(ReventlessCore.
|
|
201
|
+
ReventlessCore.PluginDecision.initialState->apply(
|
|
202
|
+
connect(ReventlessCore.PluginDecision.initialState, shipped(defA)),
|
|
203
203
|
)
|
|
204
204
|
expect(
|
|
205
|
-
ReventlessCore.
|
|
205
|
+
ReventlessCore.PluginDecision.decide(connected, ReventlessCore.PluginSpec.Redetect("1.0.0")),
|
|
206
206
|
)->toEqual(Ok([ReventlessCore.PluginSpec.VersionDetected("1.0.0")]))
|
|
207
207
|
})
|
|
208
208
|
})
|
|
@@ -6,7 +6,7 @@ import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
|
6
6
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
7
7
|
import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
|
|
8
8
|
import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
|
|
9
|
-
import * as
|
|
9
|
+
import * as PluginDecision$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginDecision.res.mjs";
|
|
10
10
|
import * as Plugin_Helpers$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/component/Plugin_Helpers.res.mjs";
|
|
11
11
|
import * as PluginsProjection$ReventlessCore from "@reventlessdev/reventless-core/src/plugin/lifecycle/PluginsProjection.res.mjs";
|
|
12
12
|
import * as Platform_ComponentDefinitions_Lambda_Ops$ReventlessAws from "../src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res.mjs";
|
|
@@ -97,11 +97,11 @@ function row(def, at) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
function apply(state, events) {
|
|
100
|
-
return Stdlib_Array.reduce(events, state,
|
|
100
|
+
return Stdlib_Array.reduce(events, state, PluginDecision$ReventlessCore.evolve);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
function connect(state, def) {
|
|
104
|
-
let events =
|
|
104
|
+
let events = PluginDecision$ReventlessCore.decide(state, {
|
|
105
105
|
TAG: "Connect",
|
|
106
106
|
_0: def
|
|
107
107
|
});
|
|
@@ -156,15 +156,15 @@ globalThis.describe("the bake converges when a plugin's structure changes", () =
|
|
|
156
156
|
]], deployedAt)).toEqual("behind");
|
|
157
157
|
});
|
|
158
158
|
globalThis.test("a redeploy with a changed structure re-emits VersionConnected", () => {
|
|
159
|
-
let events = connect(
|
|
160
|
-
let connected = Stdlib_Array.reduce(events,
|
|
159
|
+
let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
|
|
160
|
+
let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
|
|
161
161
|
globalThis.expect(connect(connected, shipped(defB)).length).toBe(1);
|
|
162
162
|
});
|
|
163
163
|
globalThis.test("once it lands, the plugin reads as registered by this deploy", () => {
|
|
164
|
-
let events = connect(
|
|
165
|
-
let connected = Stdlib_Array.reduce(events,
|
|
164
|
+
let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
|
|
165
|
+
let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
|
|
166
166
|
let events$1 = connect(connected, shipped(defB));
|
|
167
|
-
let redeployed = Stdlib_Array.reduce(events$1, connected,
|
|
167
|
+
let redeployed = Stdlib_Array.reduce(events$1, connected, PluginDecision$ReventlessCore.evolve);
|
|
168
168
|
let match = redeployed.known["1.0.0"];
|
|
169
169
|
let def = match !== undefined ? match.definition : shipped(defA);
|
|
170
170
|
globalThis.expect(stateOf([row(def, afterDeploy)], [[
|
|
@@ -173,8 +173,8 @@ globalThis.describe("the bake converges when a plugin's structure changes", () =
|
|
|
173
173
|
]], deployedAt)).toEqual("registered");
|
|
174
174
|
});
|
|
175
175
|
globalThis.test("an unchanged structure passes without re-registering", () => {
|
|
176
|
-
let events = connect(
|
|
177
|
-
let connected = Stdlib_Array.reduce(events,
|
|
176
|
+
let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
|
|
177
|
+
let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
|
|
178
178
|
globalThis.expect(connect(connected, shipped(defA))).toEqual([]);
|
|
179
179
|
globalThis.expect(stateOf([row(shipped(defA), beforeDeploy)], [[
|
|
180
180
|
"Ordering",
|
|
@@ -182,9 +182,9 @@ globalThis.describe("the bake converges when a plugin's structure changes", () =
|
|
|
182
182
|
]], deployedAt)).toEqual("unchanged");
|
|
183
183
|
});
|
|
184
184
|
globalThis.test("a redeploy re-detects an already-connected version", () => {
|
|
185
|
-
let events = connect(
|
|
186
|
-
let connected = Stdlib_Array.reduce(events,
|
|
187
|
-
globalThis.expect(
|
|
185
|
+
let events = connect(PluginDecision$ReventlessCore.initialState, shipped(defA));
|
|
186
|
+
let connected = Stdlib_Array.reduce(events, PluginDecision$ReventlessCore.initialState, PluginDecision$ReventlessCore.evolve);
|
|
187
|
+
globalThis.expect(PluginDecision$ReventlessCore.decide(connected, {
|
|
188
188
|
TAG: "Redetect",
|
|
189
189
|
_0: "1.0.0"
|
|
190
190
|
})).toEqual({
|
|
@@ -43,7 +43,7 @@ describe("AppSync_Resolver_Retrying.Functions.listAllItemsConnection", () => {
|
|
|
43
43
|
)
|
|
44
44
|
})
|
|
45
45
|
|
|
46
|
-
// Tripwires for the Scan connection's paging. The
|
|
46
|
+
// Tripwires for the Scan connection's paging. The behavior itself is exercised
|
|
47
47
|
// against the evaluated resolver in `rescript/pulumi-aws`; these guard the wiring
|
|
48
48
|
// this package is responsible for emitting.
|
|
49
49
|
describe("listAllItemsConnection — paging", () => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// decided by three functions in `Upload_Claim_S3_Ops`: which table a record came
|
|
5
5
|
// from, which refs a declared field holds, and whether a ref resolves to an
|
|
6
6
|
// object this claimer may touch. The untag itself has no branching left in it,
|
|
7
|
-
// so pinning these pins the
|
|
7
|
+
// so pinning these pins the behavior that matters.
|
|
8
8
|
//
|
|
9
9
|
// The direction under test throughout is refusal. An untag this component
|
|
10
10
|
// wrongly *skips* costs a delayed cleanup; one it wrongly *performs* removes the
|
|
@@ -18,7 +18,7 @@ external throwAwsError: (string, string) => unit = "throwAwsError"
|
|
|
18
18
|
|
|
19
19
|
🚨 **Thrown and caught, not constructed.** ReScript's `exn` for a JS error is
|
|
20
20
|
the wrapper its own `catch` builds — a bare `Error` value is a different thing
|
|
21
|
-
and `JsExn.fromException` does not
|
|
21
|
+
and `JsExn.fromException` does not recognize it. A fixture that returned one
|
|
22
22
|
would make every predicate here look broken while the code was fine, which is
|
|
23
23
|
exactly the wrong way round for a regression test. */
|
|
24
24
|
let awsError = (~name: string, ~message: string): exn =>
|
|
@@ -28,7 +28,7 @@ describe("Util_StoreLayout.layoutFor", () => {
|
|
|
28
28
|
)
|
|
29
29
|
|
|
30
30
|
// The accepted fail-open: a production stack whose name is not on the list
|
|
31
|
-
// gets the weaker layout silently. Asserted so the
|
|
31
|
+
// gets the weaker layout silently. Asserted so the behavior is a decision on
|
|
32
32
|
// record rather than a surprise, and so the config override is the documented
|
|
33
33
|
// fix rather than a code change.
|
|
34
34
|
testSync("an unlisted production name falls open to the shared layout", () =>
|
|
@@ -23,7 +23,7 @@ export async function invokeAfterFailedStartup() {
|
|
|
23
23
|
process.on("unhandledRejection", onUnhandled);
|
|
24
24
|
process.env.HANDLER_CONFIG = JSON.stringify({
|
|
25
25
|
...baseConfig,
|
|
26
|
-
stateChangeSliceModules: [{ spec: "cold-start-test/missing-spec.mjs",
|
|
26
|
+
stateChangeSliceModules: [{ spec: "cold-start-test/missing-spec.mjs", decision: "cold-start-test/missing-decision.mjs" }],
|
|
27
27
|
});
|
|
28
28
|
try {
|
|
29
29
|
const { handler } = await import(ENTRY);
|
|
@@ -51,12 +51,12 @@ export async function startWithUnresolvedSlice() {
|
|
|
51
51
|
const { buildHandlersForConfig } = await import(ENTRY);
|
|
52
52
|
const loadModule = async (specifier) => {
|
|
53
53
|
if (specifier === "cold-start-test://spec") return await import("./DcbUnresolvedPartitionSlice.res.mjs");
|
|
54
|
-
if (specifier === "cold-start-test://
|
|
54
|
+
if (specifier === "cold-start-test://decision") return {};
|
|
55
55
|
throw new Error("unknown test specifier: " + specifier);
|
|
56
56
|
};
|
|
57
57
|
try {
|
|
58
58
|
await buildHandlersForConfig(
|
|
59
|
-
{ ...baseConfig, stateChangeSliceModules: [{ spec: "cold-start-test://spec",
|
|
59
|
+
{ ...baseConfig, stateChangeSliceModules: [{ spec: "cold-start-test://spec", decision: "cold-start-test://decision" }] },
|
|
60
60
|
{ loadModule },
|
|
61
61
|
);
|
|
62
62
|
return "started";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Decision pair for `AggTestAggregate`. Create-once / reject-on-seen.
|
|
2
2
|
|
|
3
3
|
type state = NotCreated | Active
|
|
4
4
|
|
|
@@ -15,4 +15,4 @@ let decide = (state, command: AggTestAggregate.command): result<
|
|
|
15
15
|
| (NotCreated, Add({name})) => Ok([Added({name: name})])
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
let moduleUrl = "agg-test://
|
|
18
|
+
let moduleUrl = "agg-test://AggTestAggregateDecision"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Integration regression guard for the Aggregate Lambda entry point.
|
|
2
2
|
//
|
|
3
3
|
// Drives the real `AggregateEntryPoint.mjs` against a DynamoDB Local EventLog
|
|
4
|
-
// table, with a test loader supplying a tiny `AggTestAggregate` spec/
|
|
4
|
+
// table, with a test loader supplying a tiny `AggTestAggregate` spec/decision
|
|
5
5
|
// pair in place of the production Lambda's `/var/task/node_modules` dynamic
|
|
6
6
|
// import. Covers the same regression class as the DCB entry-point test: the
|
|
7
7
|
// shell wires the compiled EventLog/Aggregate/CommandTopic functors and the
|
|
@@ -38,14 +38,14 @@ let runOneAppSyncEvent: (string, JSON.t) => promise<JSON.t> = %raw(`
|
|
|
38
38
|
|
|
39
39
|
const loadModule = async (specifier) => {
|
|
40
40
|
if (specifier === "agg-test://spec") return await import("./AggTestAggregate.res.mjs");
|
|
41
|
-
if (specifier === "agg-test://
|
|
41
|
+
if (specifier === "agg-test://decision") return await import("./AggTestAggregateDecision.res.mjs");
|
|
42
42
|
throw new Error("unknown test specifier: " + specifier);
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const config = {
|
|
46
46
|
handlers: [{
|
|
47
47
|
specModule: "agg-test://spec",
|
|
48
|
-
|
|
48
|
+
decisionModule: "agg-test://decision",
|
|
49
49
|
eventLogTable: tableName,
|
|
50
50
|
queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/agg-test-queue",
|
|
51
51
|
queueArn: "arn:aws:sqs:eu-west-1:000000000000:agg-test-queue",
|
|
@@ -17,14 +17,14 @@ let runOneAppSyncEvent = (async (tableName, event) => {
|
|
|
17
17
|
|
|
18
18
|
const loadModule = async (specifier) => {
|
|
19
19
|
if (specifier === "agg-test://spec") return await import("./AggTestAggregate.res.mjs");
|
|
20
|
-
if (specifier === "agg-test://
|
|
20
|
+
if (specifier === "agg-test://decision") return await import("./AggTestAggregateDecision.res.mjs");
|
|
21
21
|
throw new Error("unknown test specifier: " + specifier);
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const config = {
|
|
25
25
|
handlers: [{
|
|
26
26
|
specModule: "agg-test://spec",
|
|
27
|
-
|
|
27
|
+
decisionModule: "agg-test://decision",
|
|
28
28
|
eventLogTable: tableName,
|
|
29
29
|
queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/agg-test-queue",
|
|
30
30
|
queueArn: "arn:aws:sqs:eu-west-1:000000000000:agg-test-queue",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Integration regression guard for the DCB CommandTopic Lambda entry point.
|
|
2
2
|
//
|
|
3
3
|
// Drives the real `DcbCommandTopicEntryPoint.mjs` against a DynamoDB Local
|
|
4
|
-
// table, with a test loader supplying a tiny `EpTestSlice` spec/
|
|
4
|
+
// table, with a test loader supplying a tiny `EpTestSlice` spec/decision pair
|
|
5
5
|
// in place of the production Lambda's `/var/task/node_modules` dynamic import.
|
|
6
6
|
// Covers the regression class behind the 2026-06-21 incident: the entry point
|
|
7
7
|
// was passing the wrong number of positional args to ReScript-compiled
|
|
@@ -39,14 +39,14 @@ let runOneAppSyncEvent: (string, JSON.t) => promise<JSON.t> = %raw(`
|
|
|
39
39
|
|
|
40
40
|
const loadModule = async (specifier) => {
|
|
41
41
|
if (specifier === "ep-test://spec") return await import("./EpTestSlice.res.mjs");
|
|
42
|
-
if (specifier === "ep-test://
|
|
42
|
+
if (specifier === "ep-test://decision") return await import("./EpTestSliceDecision.res.mjs");
|
|
43
43
|
throw new Error("unknown test specifier: " + specifier);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
const config = {
|
|
47
47
|
pluginName: "EpTestPlugin",
|
|
48
48
|
dcbEventLogTableName: tableName,
|
|
49
|
-
stateChangeSliceModules: [{ spec: "ep-test://spec",
|
|
49
|
+
stateChangeSliceModules: [{ spec: "ep-test://spec", decision: "ep-test://decision" }],
|
|
50
50
|
queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/ep-test-queue",
|
|
51
51
|
};
|
|
52
52
|
|
|
@@ -78,14 +78,14 @@ let runOneCompositeEvent: (string, JSON.t) => promise<JSON.t> = %raw(`
|
|
|
78
78
|
|
|
79
79
|
const loadModule = async (specifier) => {
|
|
80
80
|
if (specifier === "ep-composite://spec") return await import("./EpCompositeSlice.res.mjs");
|
|
81
|
-
if (specifier === "ep-composite://
|
|
81
|
+
if (specifier === "ep-composite://decision") return await import("./EpCompositeSliceDecision.res.mjs");
|
|
82
82
|
throw new Error("unknown test specifier: " + specifier);
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
const config = {
|
|
86
86
|
pluginName: "EpCompositePlugin",
|
|
87
87
|
dcbEventLogTableName: tableName,
|
|
88
|
-
stateChangeSliceModules: [{ spec: "ep-composite://spec",
|
|
88
|
+
stateChangeSliceModules: [{ spec: "ep-composite://spec", decision: "ep-composite://decision" }],
|
|
89
89
|
queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/ep-composite-queue",
|
|
90
90
|
};
|
|
91
91
|
|
|
@@ -19,14 +19,14 @@ let runOneAppSyncEvent = (async (tableName, event) => {
|
|
|
19
19
|
|
|
20
20
|
const loadModule = async (specifier) => {
|
|
21
21
|
if (specifier === "ep-test://spec") return await import("./EpTestSlice.res.mjs");
|
|
22
|
-
if (specifier === "ep-test://
|
|
22
|
+
if (specifier === "ep-test://decision") return await import("./EpTestSliceDecision.res.mjs");
|
|
23
23
|
throw new Error("unknown test specifier: " + specifier);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const config = {
|
|
27
27
|
pluginName: "EpTestPlugin",
|
|
28
28
|
dcbEventLogTableName: tableName,
|
|
29
|
-
stateChangeSliceModules: [{ spec: "ep-test://spec",
|
|
29
|
+
stateChangeSliceModules: [{ spec: "ep-test://spec", decision: "ep-test://decision" }],
|
|
30
30
|
queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/ep-test-queue",
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -52,14 +52,14 @@ let runOneCompositeEvent = (async (tableName, event) => {
|
|
|
52
52
|
|
|
53
53
|
const loadModule = async (specifier) => {
|
|
54
54
|
if (specifier === "ep-composite://spec") return await import("./EpCompositeSlice.res.mjs");
|
|
55
|
-
if (specifier === "ep-composite://
|
|
55
|
+
if (specifier === "ep-composite://decision") return await import("./EpCompositeSliceDecision.res.mjs");
|
|
56
56
|
throw new Error("unknown test specifier: " + specifier);
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
const config = {
|
|
60
60
|
pluginName: "EpCompositePlugin",
|
|
61
61
|
dcbEventLogTableName: tableName,
|
|
62
|
-
stateChangeSliceModules: [{ spec: "ep-composite://spec",
|
|
62
|
+
stateChangeSliceModules: [{ spec: "ep-composite://spec", decision: "ep-composite://decision" }],
|
|
63
63
|
queueUrl: "https://sqs.eu-west-1.amazonaws.com/000000000000/ep-composite-queue",
|
|
64
64
|
};
|
|
65
65
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
//
|
|
13
13
|
// The unit suite (`DcbEventLogStorage_DynamoDb_RuntimeTest.res`) asserts the
|
|
14
14
|
// *shape* of the built `TransactWriteItems`. This suite asserts DynamoDB's
|
|
15
|
-
// *
|
|
15
|
+
// *behavior* — that the `ConditionExpression`s interpret as we expect — which
|
|
16
16
|
// is the only thing that proves the fence-scope model (Issue 1 fix) and the
|
|
17
17
|
// optimistic-concurrency guarantees end-to-end. See
|
|
18
18
|
// `docs/analysis/dcb-consistency-check-issues.md` and
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Decision pair for `EpCompositeSlice`. Append-on-empty / reject-on-seen, per
|
|
2
2
|
// composite entity: the decision read is scoped to one `{environment,
|
|
3
3
|
// resourceName}` composite, so a fresh resource sees `Absent` and appends, while
|
|
4
4
|
// a duplicate of the same composite key sees `Added` and is rejected.
|
|
@@ -32,4 +32,4 @@ let decide = (state, command: EpCompositeSlice.command): result<
|
|
|
32
32
|
| (Absent, TouchResource(_)) => Error(NotFound)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
let moduleUrl = "ep-test://
|
|
35
|
+
let moduleUrl = "ep-test://EpCompositeSliceDecision"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Decision pair for `EpTestSlice`. Append-on-empty / reject-on-seen.
|
|
2
2
|
|
|
3
3
|
type state = bool
|
|
4
4
|
|
|
@@ -15,4 +15,4 @@ let decide = (state, command: EpTestSlice.command): result<
|
|
|
15
15
|
| (false, AddWidget({widgetId})) => Ok([WidgetAdded({widgetId: widgetId})])
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
let moduleUrl = "ep-test://
|
|
18
|
+
let moduleUrl = "ep-test://EpTestSliceDecision"
|