You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both forms require exactly one `[FromEvent] TInput` and exactly one exact AWS `IDurableContext`. Input is never inferred, and parameter order is unrestricted. Additional parameters may be `ILambdaContext`, `ILambdaInvocationContext`, ordinary DI, keyed DI, or optional DI. See [Dependency Injection](../guides/dependency-injection.md) for service lifetimes.
100
+
`[FromEvent] TInput` and AWS `IDurableContext` are optional; a handler may use either, both, or neither. Parameter order is unrestricted. Other parameters use the normal handler binding rules. See [Dependency Injection](../guides/dependency-injection.md) for service lifetimes.
101
101
102
102
Do not expose `DurableExecutionInvocationInput`, `DurableExecutionInvocationOutput`, streams, or AWS client in high-level handler. MinimalLambda directly deserializes and serializes hidden outer envelopes through its configured Lambda serializer; durable envelopes are not available through `IEventFeature` or `IResponseFeature`. It also owns raw-stream hosting, middleware, DI scope, and physical invocation context. AWS runtime owns workflow payloads, `IDurableContext`, checkpoints, replay, suspension, waits, and durable status/result mapping.
103
103
104
104
### Cancellation
105
105
106
-
Never add root `CancellationToken` to durable handler. Generator reports `LH0009` because near-timeout root cancellation could turn retryable physical invocation into terminal `FAILED` workflow. AWS operation callbacks already receive SDK-linked cancellation tokens, while `WrapAsync` exposes no lifecycle-token hook. Automatically linking MinimalLambda physical-invocation cancellation would couple replay to Lambda timeout. Use AWS-supplied token inside step, callback, child workflow, map, parallel, and other operation callbacks, as sample does.
106
+
AWS operation callbacks receive SDK-linked cancellation tokens. If a durable handler also reads `ILambdaInvocationContext.CancellationToken`, it owns the resulting physical-invocation failure and retry behavior.
107
107
108
108
Reading `ILambdaInvocationContext.CancellationToken` explicitly means accepting root failure/retry consequences.
109
109
@@ -132,12 +132,12 @@ One registered `ILambdaSerializer` handles MinimalLambda outer envelopes and AWS
132
132
-[ ] Register context with `AddLambdaSerializerWithContext<TContext>()`.
133
133
-[ ] Add `DurableExecutionInvocationInput` root.
134
134
-[ ] Add `DurableExecutionInvocationOutput` root.
135
-
-[ ] Add workflow `TInput` root.
136
-
-[ ] For `Task<TOutput>`, add `TOutput`root. `Task` handlers therefore need three signature roots; `Task<TOutput>` handlers need four.
135
+
-[ ] Add the event type if the handler declares one.
136
+
-[ ] For `Task<TOutput>`, add `TOutput`when required by the configured serializer.
137
137
-[ ] Add every operation payload, result, and state root used by steps, callbacks, invokes, child workflows, waits, maps, or parallel branches.
138
138
-[ ] Publish intended runtime and architecture with NativeAOT enabled; restore/build alone does not compile native code.
139
139
140
-
Generator cannot discover operation types hidden inside method bodies or referenced libraries. `LH0011` checks only explicit outer input/output and handler input/output declarations. It does not inspect member graphs or hidden operation types, and warning absence does not prove serializer completeness. `LH0011` does not suppress generation, so missing runtime metadata can still fail later.
140
+
The generator does not inspect serializer contexts. Ensure that the context registered for the Lambda serializer includes the outer envelopes and every payload, result, and state type your workflow uses.
141
141
142
142
Local source-based `net10.0` NativeAOT publish passes. This proves local publishing only. Managed cloud integration remains unverified, and Durable Execution NativeAOT support remains experimental. Successful local publish is not evidence of deployment, IAM, replay, or managed-service behavior. See [AWS NativeAOT guidance](https://docs.aws.amazon.com/lambda/latest/dg/dotnet-native-aot.html) and project [support matrix](https://github.com/LayeredCraft/minimal-lambda/blob/main/decisions/durable-dependency-support-matrix.md).
|`LH0007`| Declare exactly one `[FromEvent] TInput`; remove missing or duplicate event inputs. |
175
-
|`LH0008`| Declare exactly one exact `Amazon.Lambda.DurableExecution.IDurableContext`. |
176
-
|`LH0009`| Remove unsupported parameter. Common cases: root `CancellationToken`, stream/outer envelope, conflicting binding attribute, or `ref`/`in`/`out`. Use operation callback token or raw path where needed. |
177
-
|`LH0010`| Return exact `Task` or `Task<TOutput>`. Sync, `ValueTask`, custom awaitable, stream, and envelope outputs are unsupported. |
178
-
|`LH0011`| Add explicit `[JsonSerializable(typeof(...))]` signature root. Then audit hidden operation roots manually; warning checks only signature roots and does not block emission. |
174
+
|`LH0007`| Return `Task` or `Task<TOutput>`. |
179
175
| Runtime `InvalidOperationException` at `MapDurableHandler`| Compile-time interceptor did not replace fallback stub. Keep direct `MinimalLambda` reference and project interceptor/source-generator configuration. |
180
176
| AWS DE001-DE004 absent | Add direct `Amazon.Lambda.DurableExecution` reference; analyzer assets are not transitive. |
181
177
| Duplicate logs, metrics, or DI work | Replay caused another physical invocation. Use AWS replay-aware logger for workflow logs and make invocation observation replay-safe. |
"Durable serializer root is not explicitly declared",
88
-
"Source-generated serializer context '{0}' does not explicitly declare durable serialization root '{1}'. Add [JsonSerializable(typeof({1}))] to that context or a base context declaration.",
0 commit comments