Skip to content

feat: add durable execution support - #383

Open
j-d-ha wants to merge 61 commits into
mainfrom
feat/add-durable-function-support
Open

feat: add durable execution support#383
j-d-ha wants to merge 61 commits into
mainfrom
feat/add-durable-function-support

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

Adds optional AWS Lambda Durable Execution support to MinimalLambda through a dedicated MinimalLambda.DurableExecution package and the existing source generator. High-level durable handlers retain MinimalLambda hosting, DI, middleware, serializer, and generated binding behavior while AWS owns checkpoints, replay, suspension, and durable operations.

Support is documented as experimental until managed-service deployment evidence is completed.

🔧 Changes

  • Adds MapDurableHandler and IDurableContext.GetInvocationContext() public APIs.
  • Generates deterministic Task and Task<T> durable adapters using AWS DurableFunction.WrapAsync.
  • Adds durable signature and serializer diagnostics LH0007LH0011.
  • Enforces atomic terminal lifecycle and serializer identity through MinimalLambda runtime infrastructure.
  • Keeps AWS Durable Execution dependency isolated from core package.
  • Adds package-only consumer matrix, NativeAOT publish smoke, host integration tests, replay workflow tests, source-generator snapshots, and public API/package isolation tests.
  • Adds buildable example, feature guide, deployment recipes, ADRs, and agent skill guidance.
  • Adds independent durable-v<semver> trusted-publishing lane with exact artifact, symbol, dependency, version, and collision guards.
  • Defers dedicated durable project templates until cloud deployment and NativeAOT evidence gates pass.

✅ Checklist

  • My changes build cleanly
  • I’ve added/updated relevant tests
  • I’ve added/updated documentation or README
  • I’ve followed the coding style for this project
  • I’ve tested the changes locally

🧪 Validation

  • Release solution build: 0 warnings, 0 errors
  • task test:all: 3,838 tests passed
  • task build:aot-check
  • task build:package-compat
  • uv run zensical build --clean --strict
  • task local:release-dry-run
  • Amazon.Lambda.Tools 7 ZIP package validation
  • CloudFormation validate-template for durable SAM template
  • actionlint for changed publishing workflows
  • git diff --check

📦 Release Notes

Install MinimalLambda.DurableExecution alongside compatible MinimalLambda and Amazon.Lambda.DurableExecution versions. Durable handlers require exactly one [FromEvent] input, one exact IDurableContext, and Task or Task<T> return.

💬 Notes for Reviewers

Suggested review order:

  1. ADRs and decisions/durable-dependency-support-matrix.md
  2. Public package APIs and package isolation
  3. source-generator discovery, diagnostics, and adapter emission
  4. runtime terminal lifecycle
  5. tests and package compatibility matrix
  6. docs, deployment recipes, and release workflows

AWS resource deployment was intentionally not run. Managed-service create/invoke, PENDING suspension, replay, denied-role behavior, callbacks, cloud NativeAOT, and live middleware evidence remain unverified and are explicitly excluded from production-ready claims. New durable publishing workflow also requires matching NuGet trusted-publisher policy before first release.

j-d-ha added 30 commits July 30, 2026 12:10

@j-d-ha j-d-ha left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First-pass review.

Comment thread .github/workflows/publish-durable-release.yaml Outdated
Comment thread .github/workflows/publish-preview.yaml
Comment thread .github/workflows/publish-release.yaml
Comment thread .github/AGENTS.md
Comment thread decisions/ADR-005-durable-project-template-scope.md
Comment thread docs/features/durable-execution.md
Comment thread docs/features/durable-execution.md Outdated
Comment thread docs/guides/durable-execution-deployment.md Outdated
Comment thread examples/MinimalLambda.Example.DurableExecution/aws-lambda-tools-defaults.json Outdated
Comment thread examples/MinimalLambda.Example.DurableExecution/Program.cs Outdated
j-d-ha added 14 commits August 1, 2026 21:23
- Added a suppression for NU1608 in test projects due to NSubstitute version compatibility notes.
- Added missing spaces before closing slashes in all `<PackageVersion>` elements.
- Ensured consistent XML formatting for improved readability in `Directory.Packages.props`.
- Updated `GetService` calls in unit tests to include null-forgiving operator (`null!`).
- Ensured consistent suppression of nullable reference warnings in test setups.
…durable execution references

- Updated tests to support multi-targeting for .NET 8.0, 9.0, 10.0, and 11.0 frameworks.
- Added conditional compilation for `DurableExecution` references targeting .NET 10.0 and newer.
- Adjusted project file to define `TargetFrameworks` and conditionally include durable references.
- Expanded GitHub Actions workflow to test against all targeted frameworks.
- Fixed inconsistent spacing in lambda middleware setup in `MiddlewareOpenTelemetryExtensionsTest`.
- Ensured consistent formatting for improved code readability.
Remove durable lifecycle and envelope feature plumbing. Generated handlers now serialize AWS envelopes directly around DurableFunction.WrapAsync.
Replace durable workflow smoke code with an empty executable and explicit trimmer roots.

@j-d-ha j-d-ha left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall feedback is that we need to go back to using our DevOps templates not writing custom workflows If something isn't supported we need to figure out why it's not supported with those Workflows without writing custom workflows for it.

Comment thread .github/workflows/pr-build.yaml
Comment thread .github/workflows/pr-build.yaml
Comment thread .github/workflows/pr-quality.yaml
Comment thread .github/workflows/pr-quality.yaml
Comment thread .github/workflows/publish-durable-release.yaml Outdated
Comment thread .github/workflows/publish-preview.yaml

@ncipollina ncipollina left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you downgrade all those version?

Comment thread .github/workflows/publish-preview.yaml
Comment thread .github/workflows/publish-preview.yaml
@ncipollina

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: a228cb8435

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

j-d-ha added 2 commits August 4, 2026 16:31
- Introduced scripts for caveman compression: CLI, main entrypoint, and benchmark tools.
- Added validation and token counting utilities to streamline compression.
- Implemented prompts and retry logic to handle LLM-guided compression.
- Set up detection for compressible files based on heuristics and file type.
- Preserved YAML frontmatter and ensured atomic writes for backups.
- Included safeguard mechanisms to prevent handling sensitive data or massive files.
@ncipollina

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: add3b43373

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +121 to +122
if h1 != h2:
result.add_warning("Heading text/order changed")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat changed headings as validation errors

When Claude rewrites or reorders headings without changing the heading count, this path only records a warning, so result.is_valid remains true and compress_file() accepts the output and overwrites the source. This violates the skill's stated exact-heading preservation guarantee; make heading text/order changes an error or have the compressor fail on warnings that represent preservation rules.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants