@reventlessdev/reventless-aws 3.0.0-alpha.214 → 3.0.0-alpha.216

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 CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 3.0.0-alpha.216 (2026-07-17)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **plugin:** scale heartbeat disconnect grace and enforce single-source interval ([7ba8fb7](https://github.com/ReventlessDev/reventless-core/commit/7ba8fb7bfbe023aba7b538329d2489f939b7fcea))
11
+
12
+
13
+ # 3.0.0-alpha.215 (2026-07-17)
14
+
15
+ ### Features
16
+
17
+ * **runtime:** platform-supplied EP/task pod runtime floors ([37544d0](https://github.com/ReventlessDev/reventless-core/commit/37544d029d278bbcae6eeb0f583da07d6ce70f04))
18
+
19
+
6
20
  # 3.0.0-alpha.214 (2026-07-16)
7
21
 
8
22
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-aws",
3
- "version": "3.0.0-alpha.214",
3
+ "version": "3.0.0-alpha.216",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -8,17 +8,17 @@
8
8
  "@aws-sdk/client-cloudfront": "3.970.0",
9
9
  "sury": "11.0.0-alpha.4",
10
10
  "uuid": "^13.0.0",
11
- "@reventlessdev/rescript-effect": "0.1.0-alpha.28",
12
- "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.22",
13
- "@reventlessdev/rescript-jest": "1.0.0-alpha.8",
14
- "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.16",
15
- "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.54",
16
- "@reventlessdev/rescript-uuid": "1.1.0-alpha.16",
17
- "@reventlessdev/reventless-core": "3.0.0-alpha.170",
18
- "@reventlessdev/reventless-infra": "3.0.0-alpha.101",
19
- "@reventlessdev/reventless-interop": "3.0.0-alpha.27",
20
- "@reventlessdev/reventless-postgres": "3.0.0-alpha.34",
21
- "@reventlessdev/reventless-spec": "3.0.0-alpha.78"
11
+ "@reventlessdev/rescript-aws-sdk": "2.2.0-alpha.23",
12
+ "@reventlessdev/rescript-jest": "1.0.0-alpha.9",
13
+ "@reventlessdev/rescript-effect": "0.1.0-alpha.29",
14
+ "@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.55",
15
+ "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.17",
16
+ "@reventlessdev/rescript-uuid": "1.1.0-alpha.17",
17
+ "@reventlessdev/reventless-core": "3.0.0-alpha.172",
18
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.102",
19
+ "@reventlessdev/reventless-postgres": "3.0.0-alpha.36",
20
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.79",
21
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.28"
22
22
  },
23
23
  "devDependencies": {
24
24
  "rescript": "12.3.0",
@@ -56,7 +56,7 @@
56
56
  "repository": {
57
57
  "type": "git",
58
58
  "url": "git+https://github.com/ReventlessDev/reventless-core.git",
59
- "directory": "reventless/reventless-aws"
59
+ "directory": "reventless/aws"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "rescript build",
@@ -5,7 +5,7 @@
5
5
  set -euo pipefail
6
6
 
7
7
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
8
- COMPOSE="$ROOT/reventless/reventless-aws/docker-compose.dynamodb-local.yml"
8
+ COMPOSE="$ROOT/reventless/aws/docker-compose.dynamodb-local.yml"
9
9
  ENDPOINT="${AWS_ENDPOINT_URL_DYNAMODB:-http://localhost:8000}"
10
10
 
11
11
  if ! command -v docker >/dev/null 2>&1; then
@@ -9,7 +9,7 @@
9
9
  set -euo pipefail
10
10
 
11
11
  ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
12
- COMPOSE="$ROOT/reventless/reventless-aws/docker-compose.postgres.yml"
12
+ COMPOSE="$ROOT/reventless/aws/docker-compose.postgres.yml"
13
13
 
14
14
  run_jest() {
15
15
  cd "$ROOT"
package/src/Platform.res CHANGED
@@ -700,12 +700,13 @@ module MakeWithConfig = (
700
700
  // Heartbeat EP channel hook — extracts SQS queue URL for heartbeat Lambda handler
701
701
  // and records the calling plugin's id so the Lambda runtime can emit Connect commands
702
702
  // with a non-empty SQS MessageGroupId (FIFO requirement).
703
- onHeartbeatEpChannelAvailable: (remoteChannelUnknown, ~pluginId) => {
703
+ onHeartbeatEpChannelAvailable: (remoteChannelUnknown, ~pluginId, ~heartbeatInterval) => {
704
704
  let remoteChannel = remoteChannelUnknown->asRemoteChannel
705
705
  switch remoteChannel.resources->Array.get(0) {
706
706
  | Some(resource) =>
707
707
  PluginRuntime_Builder.registerHeartbeatConfig(
708
708
  ~pluginId,
709
+ ~heartbeatTimeout=heartbeatInterval,
709
710
  ~epQueueUrl=resource.id->Pulumi.Output.make,
710
711
  (),
711
712
  )
@@ -495,10 +495,10 @@ function MakeWithConfig(Config) {
495
495
  StateViewSliceRuntime_Builder_Single$ReventlessAws.finishWithDcbEventLog(dcbEventLogUnknown);
496
496
  AutomationSliceRuntime_Builder_Single$ReventlessAws.finish();
497
497
  };
498
- let hooks_onHeartbeatEpChannelAvailable = (remoteChannelUnknown, pluginId) => {
498
+ let hooks_onHeartbeatEpChannelAvailable = (remoteChannelUnknown, pluginId, heartbeatInterval) => {
499
499
  let resource = remoteChannelUnknown.resources[0];
500
500
  if (resource !== undefined) {
501
- return PluginRuntime_Builder$ReventlessAws.registerHeartbeatConfig(pluginId, undefined, Pulumi.output(resource.id), undefined);
501
+ return PluginRuntime_Builder$ReventlessAws.registerHeartbeatConfig(pluginId, heartbeatInterval, Pulumi.output(resource.id), undefined);
502
502
  } else {
503
503
  return log.warn("Platform", undefined, "heartbeat EP channel has no resources");
504
504
  }
@@ -1467,10 +1467,10 @@ function Make($star) {
1467
1467
  StateViewSliceRuntime_Builder_Single$ReventlessAws.finishWithDcbEventLog(dcbEventLogUnknown);
1468
1468
  AutomationSliceRuntime_Builder_Single$ReventlessAws.finish();
1469
1469
  };
1470
- let hooks_onHeartbeatEpChannelAvailable = (remoteChannelUnknown, pluginId) => {
1470
+ let hooks_onHeartbeatEpChannelAvailable = (remoteChannelUnknown, pluginId, heartbeatInterval) => {
1471
1471
  let resource = remoteChannelUnknown.resources[0];
1472
1472
  if (resource !== undefined) {
1473
- return PluginRuntime_Builder$ReventlessAws.registerHeartbeatConfig(pluginId, undefined, Pulumi.output(resource.id), undefined);
1473
+ return PluginRuntime_Builder$ReventlessAws.registerHeartbeatConfig(pluginId, heartbeatInterval, Pulumi.output(resource.id), undefined);
1474
1474
  } else {
1475
1475
  return log.warn("Platform", undefined, "heartbeat EP channel has no resources");
1476
1476
  }
@@ -56,7 +56,7 @@ external asLambdaRuntime: ReventlessCore.Runtime.environment<unknown> => Reventl
56
56
  // onDcbEventLogCreated?: unknown => unit
57
57
  // onDcbCommandTopicCreated?: unknown => unit
58
58
  // onDcbSlicesCreated?: unknown => unit
59
- // onHeartbeatEpChannelAvailable?: (unknown, ~pluginId: string) => unit
59
+ // onHeartbeatEpChannelAvailable?: (unknown, ~pluginId: string, ~heartbeatInterval: int) => unit
60
60
  //
61
61
  // are typed `unknown => unit` for the same dependency-inversion reason as above:
62
62
  // `reventless-core` cannot import `DcbEventLog.component`, `CommandTopic.component`,
@@ -2,6 +2,13 @@ module CommandTopicChannel = CommandTopicChannel.SQS_Sync
2
2
  module RuntimeEnvironment = RuntimeEnvironment.Lambda
3
3
  module ExtensionPointRuntimeBuilder = ExtensionPointRuntime_Builder_PerExtensionPoint
4
4
 
5
+ // Per-extension-point Lambda floor for AWS; a plugin.json `runtime` override
6
+ // raises it via `RuntimeHints.resolveMemory`/`resolveTimeout`.
7
+ module Defaults: ReventlessInfra.RuntimeDefaults.T = {
8
+ let memorySize = 1024
9
+ let timeout = 30
10
+ }
11
+
5
12
  module Make = (
6
13
  Spec: ReventlessInfra.ExtensionPointMapping.Spec,
7
14
  Mappings: ReventlessInfra.ExtensionPoint.Mappings with module Spec := Spec,
@@ -13,4 +20,5 @@ module Make = (
13
20
  CommandTopicChannel,
14
21
  EventTopicPublisher.SNS,
15
22
  ExtensionPointRuntimeBuilder,
23
+ Defaults,
16
24
  )
@@ -6,6 +6,11 @@ import * as RuntimeEnvironment_Lambda$ReventlessAws from "../adapter/Runtime/Run
6
6
  import * as CommandTopicChannel_SQS_Sync$ReventlessAws from "../adapter/CommandTopic/CommandTopicChannel_SQS_Sync.res.mjs";
7
7
  import * as ExtensionPointRuntime_Builder_PerExtensionPoint$ReventlessAws from "../adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res.mjs";
8
8
 
9
+ let Defaults = {
10
+ memorySize: 1024,
11
+ timeout: 30
12
+ };
13
+
9
14
  function Make(Spec) {
10
15
  return Mappings => ExtensionPoint_Builder$ReventlessCore.Make(Spec)(Mappings)({
11
16
  make: RuntimeEnvironment_Lambda$ReventlessAws.make,
@@ -19,7 +24,7 @@ function Make(Spec) {
19
24
  make: EventTopicPublisher_SNS$ReventlessAws.make
20
25
  })({
21
26
  forCommandTopic: ExtensionPointRuntime_Builder_PerExtensionPoint$ReventlessAws.forCommandTopic
22
- });
27
+ })(Defaults);
23
28
  }
24
29
 
25
30
  let CommandTopicChannel;
@@ -32,6 +37,7 @@ export {
32
37
  CommandTopicChannel,
33
38
  RuntimeEnvironment,
34
39
  ExtensionPointRuntimeBuilder,
40
+ Defaults,
35
41
  Make,
36
42
  }
37
43
  /* EventTopicPublisher_SNS-ReventlessAws Not a pure module */
@@ -14,6 +14,8 @@ let TaskRuntimeBuilder = Task_Builder_PerBucket$ReventlessAws.TaskRuntimeBuilder
14
14
 
15
15
  let SideEffectHandler = Task_Builder_PerBucket$ReventlessAws.SideEffectHandler;
16
16
 
17
+ let Defaults = Task_Builder_PerBucket$ReventlessAws.Defaults;
18
+
17
19
  let Make = Task_Builder_PerBucket$ReventlessAws.Make;
18
20
 
19
21
  export {
@@ -23,6 +25,7 @@ export {
23
25
  TaskBucket,
24
26
  TaskRuntimeBuilder,
25
27
  SideEffectHandler,
28
+ Defaults,
26
29
  Make,
27
30
  }
28
31
  /* Task_Builder_PerBucket-ReventlessAws Not a pure module */
@@ -8,6 +8,13 @@ module TaskBucket = TaskBucket.S3
8
8
  module TaskRuntimeBuilder = TaskRuntime_Builder_PerBucket
9
9
  module SideEffectHandler = SideEffectHandler_PerSideEffectHandler
10
10
 
11
+ // Per-bucket task Lambda floor for AWS (large envelope for bulk import/export);
12
+ // a plugin.json `runtime` override raises it via `RuntimeHints`.
13
+ module Defaults: ReventlessInfra.RuntimeDefaults.T = {
14
+ let memorySize = 4096
15
+ let timeout = 600
16
+ }
17
+
11
18
  module Make = (Spec: ReventlessCore.Task.Spec): (
12
19
  ReventlessCore.Task.T with module Spec = Spec
13
20
  ) =>
@@ -19,4 +26,5 @@ module Make = (Spec: ReventlessCore.Task.Spec): (
19
26
  TaskRuntimeBuilder,
20
27
  TaskBucket,
21
28
  SideEffectHandler,
29
+ Defaults,
22
30
  )
@@ -19,6 +19,11 @@ let EventCollectorRuntimeBuilder = EventCollectorRuntime_Builder_PerEventCollect
19
19
  connect: EventCollectorChannel_DynamoDbStream$ReventlessAws.connect
20
20
  });
21
21
 
22
+ let Defaults = {
23
+ memorySize: 4096,
24
+ timeout: 600
25
+ };
26
+
22
27
  function Make(Spec) {
23
28
  return Task_Builder$ReventlessCore.Make(Spec)({
24
29
  make: RuntimeEnvironment_Lambda$ReventlessAws.make,
@@ -38,7 +43,7 @@ function Make(Spec) {
38
43
  make: TaskBucket_S3$ReventlessAws.make
39
44
  })({
40
45
  make: SideEffectHandler_PerSideEffectHandler$ReventlessAws.make
41
- });
46
+ })(Defaults);
42
47
  }
43
48
 
44
49
  let EventCollectorChannel;
@@ -58,6 +63,7 @@ export {
58
63
  TaskBucket,
59
64
  TaskRuntimeBuilder,
60
65
  SideEffectHandler,
66
+ Defaults,
61
67
  Make,
62
68
  }
63
69
  /* EventCollectorRuntimeBuilder Not a pure module */
@@ -74,7 +74,12 @@ let heartbeatConfigRef: ref<heartbeatConfig> = ref({
74
74
  epQueueUrl: None,
75
75
  })
76
76
 
77
- let registerHeartbeatConfig = (~pluginId, ~heartbeatTimeout=10, ~epQueueUrl=?, ()) =>
77
+ // heartbeatTimeout is mandatory: it drives the HEARTBEAT_TIMEOUT env var (and thus
78
+ // the Heartbeat(interval) command the bundled Lambda emits), which must match the
79
+ // EventBridge schedule rate derived from the same heartbeatInterval. A default here
80
+ // silently decoupled the two (schedule every 60min, Heartbeat(10) → 12min grace →
81
+ // flapping); make callers supply it so the values can't diverge.
82
+ let registerHeartbeatConfig = (~pluginId, ~heartbeatTimeout, ~epQueueUrl=?, ()) =>
78
83
  heartbeatConfigRef := {pluginId, heartbeatTimeout, epQueueUrl}
79
84
 
80
85
  // Per-flavor commandHandlerConfig override for the two DCB command-handler Lambdas
@@ -76,8 +76,7 @@ let heartbeatConfigRef = {
76
76
  }
77
77
  };
78
78
 
79
- function registerHeartbeatConfig(pluginId, heartbeatTimeoutOpt, epQueueUrl, param) {
80
- let heartbeatTimeout = heartbeatTimeoutOpt !== undefined ? heartbeatTimeoutOpt : 10;
79
+ function registerHeartbeatConfig(pluginId, heartbeatTimeout, epQueueUrl, param) {
81
80
  heartbeatConfigRef.contents = {
82
81
  pluginId: pluginId,
83
82
  heartbeatTimeout: heartbeatTimeout,
@@ -20,6 +20,7 @@ module MakeWithConfig = (
20
20
  CommandTopicChannel,
21
21
  EventTopicPublisher.SNS,
22
22
  ExtensionPointRuntimeBuilder,
23
+ ExtensionPoint_Builder.Defaults,
23
24
  )
24
25
 
25
26
  module Make: ReventlessCore.ExtensionPoint.T = MakeWithConfig({
@@ -1,6 +1,7 @@
1
1
  // Generated by ReScript, PLEASE EDIT WITH CARE
2
2
 
3
3
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
4
+ import * as ExtensionPoint_Builder$ReventlessAws from "../../components/ExtensionPoint_Builder.res.mjs";
4
5
  import * as EventTopicPublisher_SNS$ReventlessAws from "../../adapter/EventTopic/EventTopicPublisher_SNS.res.mjs";
5
6
  import * as PluginRuntimeOperations$ReventlessAws from "../runtime/PluginRuntimeOperations.res.mjs";
6
7
  import * as RuntimeEnvironment_Lambda$ReventlessAws from "../../adapter/Runtime/RuntimeEnvironment_Lambda.res.mjs";
@@ -27,7 +28,7 @@ function MakeWithConfig(Config) {
27
28
  make: EventTopicPublisher_SNS$ReventlessAws.make
28
29
  })({
29
30
  forCommandTopic: PluginExtensionPointRuntime_Builder$ReventlessAws.forCommandTopic
30
- });
31
+ })(ExtensionPoint_Builder$ReventlessAws.Defaults);
31
32
  }
32
33
 
33
34
  let environment = Stdlib_Option.getOr(process.env.Environment, "unknown");
@@ -49,7 +50,7 @@ let Make = PluginExtensionPoint_Builder$ReventlessCore.Make({
49
50
  make: EventTopicPublisher_SNS$ReventlessAws.make
50
51
  })({
51
52
  forCommandTopic: PluginExtensionPointRuntime_Builder$ReventlessAws.forCommandTopic
52
- });
53
+ })(ExtensionPoint_Builder$ReventlessAws.Defaults);
53
54
 
54
55
  let CommandTopicChannel;
55
56
 
@@ -0,0 +1,26 @@
1
+ open JestGlobals
2
+
3
+ // The per-kind EP/task pod floor is now supplied by each platform's `Defaults`
4
+ // module (RuntimeDefaults.T) and fed into RuntimeHints.resolveMemory/resolveTimeout
5
+ // by the core builders, replacing core's old hardcoded literals. These guard that
6
+ // the AWS binding stays behavior-preserving: EP pods still floor at 1024 MiB / 30 s
7
+ // and task pods at 4096 MiB / 600 s. A plugin.json `runtime` override still raises
8
+ // memory (Math.Int.max) and replaces timeout on top of these — see RuntimeHintsTest.
9
+
10
+ describe("AWS extension-point runtime defaults", () => {
11
+ testSync("memory floor is 1024 MiB", () => {
12
+ expect(ExtensionPoint_Builder.Defaults.memorySize)->toBe(1024)
13
+ })
14
+ testSync("timeout floor is 30 s", () => {
15
+ expect(ExtensionPoint_Builder.Defaults.timeout)->toBe(30)
16
+ })
17
+ })
18
+
19
+ describe("AWS task runtime defaults", () => {
20
+ testSync("memory floor is 4096 MiB", () => {
21
+ expect(Task_Builder_PerBucket.Defaults.memorySize)->toBe(4096)
22
+ })
23
+ testSync("timeout floor is 600 s", () => {
24
+ expect(Task_Builder_PerBucket.Defaults.timeout)->toBe(600)
25
+ })
26
+ })
@@ -0,0 +1,24 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as ExtensionPoint_Builder$ReventlessAws from "../src/components/ExtensionPoint_Builder.res.mjs";
4
+ import * as Task_Builder_PerBucket$ReventlessAws from "../src/components/Task_Builder_PerBucket.res.mjs";
5
+
6
+ globalThis.describe("AWS extension-point runtime defaults", () => {
7
+ globalThis.test("memory floor is 1024 MiB", () => {
8
+ globalThis.expect(ExtensionPoint_Builder$ReventlessAws.Defaults.memorySize).toBe(1024);
9
+ });
10
+ globalThis.test("timeout floor is 30 s", () => {
11
+ globalThis.expect(ExtensionPoint_Builder$ReventlessAws.Defaults.timeout).toBe(30);
12
+ });
13
+ });
14
+
15
+ globalThis.describe("AWS task runtime defaults", () => {
16
+ globalThis.test("memory floor is 4096 MiB", () => {
17
+ globalThis.expect(Task_Builder_PerBucket$ReventlessAws.Defaults.memorySize).toBe(4096);
18
+ });
19
+ globalThis.test("timeout floor is 600 s", () => {
20
+ globalThis.expect(Task_Builder_PerBucket$ReventlessAws.Defaults.timeout).toBe(600);
21
+ });
22
+ });
23
+
24
+ /* Not a pure module */