From cd268abd8ce8d52c3efc470bd126f435ce12a93d Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Tue, 24 Nov 2026 07:24:47 -0500 Subject: [PATCH 1/4] feat(lambda)!: update LambdaFunctionConstruct defaults and options - default invocation permissions to alias only with per-permission targets - add configurable AliasName and public Alias/Version - scope the execution-role log policy to the construct's log group - accept S3 artifact Code as an alternative to AssetPath --- .../LambdaFunctionConstruct.cs | 125 ++++++--- .../Models/LambdaFunctionConstructProps.cs | 23 +- .../Models/LambdaPermission.cs | 5 + .../Models/LambdaPermissionTargets.cs | 22 ++ .../LambdaFunctionConstructAssertions.cs | 56 ++-- .../LambdaFunctionConstructPropsBuilder.cs | 45 +++- .../ExistingConstructsGoldenTemplateTests.cs | 83 ++++++ .../GoldenTemplates/lambda-alias-name.json | 121 +++++++++ .../GoldenTemplates/lambda-default.json | 15 +- .../GoldenTemplates/lambda-otel-amd64.json | 15 +- .../GoldenTemplates/lambda-otel-arm64.json | 15 +- .../lambda-otel-url-permissions.json | 40 +-- .../lambda-permissions-all-targets.json | 157 +++++++++++ .../GoldenTemplates/lambda-permissions.json | 40 +-- .../GoldenTemplates/lambda-s3-code.json | 121 +++++++++ .../GoldenTemplates/lambda-url.json | 15 +- .../LambdaFunctionConstructTests.cs | 255 +++++++++++++++--- .../Testing/TestingHelpersTests.cs | 76 +++++- 18 files changed, 1034 insertions(+), 195 deletions(-) create mode 100644 src/LayeredCraft.Cdk.Constructs/Models/LambdaPermissionTargets.cs create mode 100644 test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-alias-name.json create mode 100644 test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions-all-targets.json create mode 100644 test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-s3-code.json diff --git a/src/LayeredCraft.Cdk.Constructs/LambdaFunctionConstruct.cs b/src/LayeredCraft.Cdk.Constructs/LambdaFunctionConstruct.cs index c4ba003..051088a 100644 --- a/src/LayeredCraft.Cdk.Constructs/LambdaFunctionConstruct.cs +++ b/src/LayeredCraft.Cdk.Constructs/LambdaFunctionConstruct.cs @@ -20,41 +20,28 @@ public class LambdaFunctionConstruct : Construct /// The underlying Lambda function for advanced configuration. /// public readonly Function LambdaFunction; + + /// + /// The published Lambda version backing the alias. + /// + public readonly IVersion Version; + + /// + /// The Lambda alias pointed at the published version. + /// + public readonly IAlias Alias; + public LambdaFunctionConstruct(Construct scope, string id, ILambdaFunctionConstructProps props) : base(scope, id) { var region = Stack.Of(this).Region; - var account = Stack.Of(this).Account; + ValidatePermissionTargets(props.Permissions); + var code = ResolveCode(props); + var policy = new Policy(this, $"{id}-policy", new PolicyProps { - PolicyName = props.PolicyName, - Statements = - [ - new PolicyStatement(new PolicyStatementProps - { - Actions = - [ - "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" - ], - Resources = [$"arn:aws:logs:{region}:{account}:log-group:/aws/lambda/{props.FunctionName}-{props.FunctionSuffix}*:*"], - Effect = Effect.ALLOW - }), - new PolicyStatement(new PolicyStatementProps - { - Actions = - [ - "logs:PutLogEvents" - ], - Resources = - [$"arn:aws:logs:{region}:{account}:log-group:/aws/lambda/{props.FunctionName}-{props.FunctionSuffix}*:*:*"], - Effect = Effect.ALLOW - }) - ] + PolicyName = props.PolicyName }); - policy.AddStatements(props.PolicyStatements); - var role = new Role(this, $"{id}-role", new RoleProps { AssumedBy = new ServicePrincipal("lambda.amazonaws.com"), @@ -70,12 +57,25 @@ public LambdaFunctionConstruct(Construct scope, string id, ILambdaFunctionConstr RemovalPolicy = RemovalPolicy.DESTROY }); + policy.AddStatements(new PolicyStatement(new PolicyStatementProps + { + Actions = + [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + Resources = [logGroup.LogGroupArn], + Effect = Effect.ALLOW + })); + + policy.AddStatements(props.PolicyStatements); + LambdaFunction = new Function(this, $"{id}-function", new FunctionProps { FunctionName = $"{props.FunctionName}-{props.FunctionSuffix}", Runtime = Runtime.PROVIDED_AL2023, Handler = "bootstrap", - Code = Code.FromAsset(props.AssetPath), + Code = code, Role = role, MemorySize = props.MemorySize, Timeout = Duration.Seconds(props.TimeoutInSeconds), @@ -96,6 +96,7 @@ public LambdaFunctionConstruct(Construct scope, string id, ILambdaFunctionConstr // ✅ Create a new version on every deployment var currentVersion = LambdaFunction.CurrentVersion; + Version = currentVersion; if (props.EnableSnapStart) { @@ -113,15 +114,16 @@ public LambdaFunctionConstruct(Construct scope, string id, ILambdaFunctionConstr var alias = new Alias(this, $"{id}-alias", new AliasProps { - AliasName = "live", + AliasName = props.AliasName, Version = currentVersion, }); - + Alias = alias; + AddPermissionsToAllTargets( baseId: $"{id}-permission", function: LambdaFunction, - version: LambdaFunction.CurrentVersion, - alias: alias, + version: Version, + alias: Alias, permissions: props.Permissions ); @@ -158,9 +160,60 @@ private void AddPermissionsToAllTargets(string baseId, IFunction function, IVers SourceArn = perm.SourceArn }; - function.AddPermission($"{baseId}-fn-{index}", permission); - version.AddPermission($"{baseId}-ver-{index}", permission); - alias?.AddPermission($"{baseId}-alias-{index}", permission); + if (perm.Targets.HasFlag(LambdaPermissionTargets.Function)) + { + function.AddPermission($"{baseId}-fn-{index}", permission); + } + + if (perm.Targets.HasFlag(LambdaPermissionTargets.Version)) + { + version.AddPermission($"{baseId}-ver-{index}", permission); + } + + if (alias is not null && perm.Targets.HasFlag(LambdaPermissionTargets.Alias)) + { + alias.AddPermission($"{baseId}-alias-{index}", permission); + } + } + } + + private static Code ResolveCode(ILambdaFunctionConstructProps props) + { + var assetPath = props.AssetPath; + var code = props.Code; + + if (assetPath is not null && code is not null) + { + throw new ArgumentException( + "Exactly one of AssetPath or Code must be set; both were provided.", + nameof(props)); + } + + if (code is not null) + { + return code; + } + + if (!string.IsNullOrWhiteSpace(assetPath)) + { + return Code.FromAsset(assetPath); + } + + throw new ArgumentException( + "Exactly one of AssetPath or Code must be set; neither was provided.", + nameof(props)); + } + + private static void ValidatePermissionTargets(List permissions) + { + foreach (var (permission, index) in permissions.Select((p, i) => (p, i))) + { + if (permission.Targets == LambdaPermissionTargets.None) + { + throw new ArgumentException( + $"Permission at index {index} has no targets. Set LambdaPermission.Targets to one or more of Function, Version, or Alias.", + nameof(permissions)); + } } } diff --git a/src/LayeredCraft.Cdk.Constructs/Models/LambdaFunctionConstructProps.cs b/src/LayeredCraft.Cdk.Constructs/Models/LambdaFunctionConstructProps.cs index d787bfc..9749740 100644 --- a/src/LayeredCraft.Cdk.Constructs/Models/LambdaFunctionConstructProps.cs +++ b/src/LayeredCraft.Cdk.Constructs/Models/LambdaFunctionConstructProps.cs @@ -1,4 +1,5 @@ using Amazon.CDK.AWS.IAM; +using Amazon.CDK.AWS.Lambda; namespace LayeredCraft.Cdk.Constructs.Models; @@ -6,7 +7,16 @@ public interface ILambdaFunctionConstructProps { string FunctionName { get; set; } string FunctionSuffix { get; set; } - string AssetPath { get; set; } + + /// Path to a local Lambda deployment package. Exactly one of or must be set. + string? AssetPath { get; set; } + + /// Existing Lambda code source. Exactly one of or must be set. + Code? Code { get; set; } + + /// Name of the alias pointing at the published version (default: live). + string AliasName { get; set; } + string RoleName { get; set; } string PolicyName { get; set; } double MemorySize { get; set; } @@ -24,7 +34,16 @@ public sealed record LambdaFunctionConstructProps : ILambdaFunctionConstructProp { public required string FunctionName { get; set; } public required string FunctionSuffix { get; set; } - public required string AssetPath { get; set; } + + /// Path to a local Lambda deployment package. Exactly one of or must be set. + public string? AssetPath { get; set; } + + /// Existing Lambda code source. Exactly one of or must be set. + public Code? Code { get; set; } + + /// Name of the alias pointing at the published version (default: live). + public string AliasName { get; set; } = "live"; + public required string RoleName { get; set; } public required string PolicyName { get; set; } public double MemorySize { get; set; } = 1024; diff --git a/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermission.cs b/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermission.cs index 290d1bf..c4c8bd3 100644 --- a/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermission.cs +++ b/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermission.cs @@ -6,4 +6,9 @@ public sealed record LambdaPermission public required string Action { get; set; } public string? EventSourceToken { get; set; } public string? SourceArn { get; set; } + + /// + /// The targets this permission is applied to. Defaults to . + /// + public LambdaPermissionTargets Targets { get; set; } = LambdaPermissionTargets.Alias; } \ No newline at end of file diff --git a/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermissionTargets.cs b/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermissionTargets.cs new file mode 100644 index 0000000..3a50185 --- /dev/null +++ b/src/LayeredCraft.Cdk.Constructs/Models/LambdaPermissionTargets.cs @@ -0,0 +1,22 @@ +using System; + +namespace LayeredCraft.Cdk.Constructs.Models; + +/// +/// Specifies which Lambda resources a grants invocation on. +/// +[Flags] +public enum LambdaPermissionTargets +{ + /// No target. Not valid for a permission. + None = 0, + + /// The unqualified function. + Function = 1 << 0, + + /// The published version pinned by this construct. + Version = 1 << 1, + + /// The alias (the default, matching least-privilege deployments). + Alias = 1 << 2, +} \ No newline at end of file diff --git a/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructAssertions.cs b/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructAssertions.cs index 6895d89..1938636 100644 --- a/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructAssertions.cs +++ b/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructAssertions.cs @@ -1,4 +1,5 @@ using Amazon.CDK.Assertions; +using LayeredCraft.Cdk.Constructs.Models; namespace LayeredCraft.Cdk.Constructs.Testing; @@ -22,36 +23,44 @@ public static void ShouldHaveLambdaFunction(this Template template, string funct } /// - /// Asserts that the template contains CloudWatch Logs permissions for the specified function. + /// Asserts that the execution role's logging policy is scoped to the construct's own log group: + /// only logs:CreateLogStream and logs:PutLogEvents on the log group ARN. /// /// The CDK template to assert against - /// The function name to check permissions for - /// AWS region (default: us-east-1) - /// AWS account ID (default: 123456789012) - public static void ShouldHaveCloudWatchLogsPermissions(this Template template, string functionName, + /// The function name whose log group scopes the policy + /// Unused; retained for source compatibility + /// Unused; retained for source compatibility + public static void ShouldHaveCloudWatchLogsPermissions(this Template template, string functionName, string region = "us-east-1", string account = "123456789012") { + var logGroups = template.FindResources("AWS::Logs::LogGroup", new Dictionary + { + { "Properties", Match.ObjectLike(new Dictionary + { + { "LogGroupName", $"/aws/lambda/{functionName}" } + }) + } + }); + + var logGroupLogicalId = logGroups.Keys.Single(); + template.HasResourceProperties("AWS::IAM::Policy", Match.ObjectLike(new Dictionary { { "PolicyDocument", Match.ObjectLike(new Dictionary { { "Statement", Match.ArrayWith([ - // CloudWatch Logs permissions Match.ObjectLike(new Dictionary { { "Effect", "Allow" }, { "Action", Match.ArrayWith([ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ]) }, - { "Resource", $"arn:aws:logs:{region}:{account}:log-group:/aws/lambda/{functionName}*:*" } - }), - Match.ObjectLike(new Dictionary - { - { "Effect", "Allow" }, - { "Action", "logs:PutLogEvents" }, - { "Resource", $"arn:aws:logs:{region}:{account}:log-group:/aws/lambda/{functionName}*:*:*" } + { "Resource", new Dictionary + { + { "Fn::GetAtt", new object[] { logGroupLogicalId, "Arn" } } + } + } }) ]) } }) } @@ -107,14 +116,21 @@ public static void ShouldHaveEnvironmentVariables(this Template template, IDicti } /// - /// Asserts that the template contains Lambda permissions for the specified count (function + version + alias). + /// Asserts that the template contains the expected number of Lambda permission resources for the + /// given permission count and targets. /// /// The CDK template to assert against - /// Number of permission objects (will be multiplied by 3 for function, version, alias) - public static void ShouldHaveLambdaPermissions(this Template template, int permissionCount) + /// Number of permission objects + /// Targets applied to each permission (default: alias only) + public static void ShouldHaveLambdaPermissions(this Template template, int permissionCount, + LambdaPermissionTargets targets = LambdaPermissionTargets.Alias) { - var expectedPermissionCount = permissionCount * 3; // function + version + alias - template.ResourceCountIs("AWS::Lambda::Permission", expectedPermissionCount); + var targetCount = 0; + if (targets.HasFlag(LambdaPermissionTargets.Function)) targetCount++; + if (targets.HasFlag(LambdaPermissionTargets.Version)) targetCount++; + if (targets.HasFlag(LambdaPermissionTargets.Alias)) targetCount++; + + template.ResourceCountIs("AWS::Lambda::Permission", permissionCount * targetCount); } /// diff --git a/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructPropsBuilder.cs b/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructPropsBuilder.cs index c1b5cc0..ca20502 100644 --- a/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructPropsBuilder.cs +++ b/src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructPropsBuilder.cs @@ -1,4 +1,5 @@ using Amazon.CDK.AWS.IAM; +using Amazon.CDK.AWS.Lambda; using LayeredCraft.Cdk.Constructs.Models; namespace LayeredCraft.Cdk.Constructs.Testing; @@ -11,7 +12,9 @@ public class LambdaFunctionConstructPropsBuilder { private string _functionName = "test-function"; private string _functionSuffix = "test"; - private string _assetPath = "./test-lambda.zip"; + private string? _assetPath = "./test-lambda.zip"; + private Code? _code; + private string _aliasName = "live"; private string _roleName = "test-role"; private string _policyName = "test-policy"; private double _memorySize = 1024; @@ -55,6 +58,31 @@ public LambdaFunctionConstructPropsBuilder WithFunctionSuffix(string functionSuf public LambdaFunctionConstructPropsBuilder WithAssetPath(string assetPath) { _assetPath = assetPath; + _code = null; + return this; + } + + /// + /// Sets the Lambda artifact code from an existing source (for example an S3 bucket). + /// This replaces the asset path; provide exactly one of AssetPath or Code. + /// + /// The Lambda code source + /// The builder instance for method chaining + public LambdaFunctionConstructPropsBuilder WithCode(Code code) + { + _code = code; + _assetPath = null; + return this; + } + + /// + /// Sets the Lambda alias name applied to the deployed version. + /// + /// The alias name (default: live) + /// The builder instance for method chaining + public LambdaFunctionConstructPropsBuilder WithAliasName(string aliasName) + { + _aliasName = aliasName; return this; } @@ -157,16 +185,18 @@ public LambdaFunctionConstructPropsBuilder WithS3Access(string bucketName, /// /// The API Gateway execution ARN /// Optional event source token + /// Targets to apply the permission to (default: alias) /// The builder instance for method chaining public LambdaFunctionConstructPropsBuilder WithApiGatewayPermission(string apiArn, - string? eventSourceToken = null) + string? eventSourceToken = null, LambdaPermissionTargets targets = LambdaPermissionTargets.Alias) { _permissions.Add(new LambdaPermission { Principal = "apigateway.amazonaws.com", Action = "lambda:InvokeFunction", SourceArn = apiArn, - EventSourceToken = eventSourceToken + EventSourceToken = eventSourceToken, + Targets = targets }); return this; } @@ -175,14 +205,17 @@ public LambdaFunctionConstructPropsBuilder WithApiGatewayPermission(string apiAr /// Adds Alexa Skills Kit invoke permission. /// /// The Alexa skill ID + /// Targets to apply the permission to (default: alias) /// The builder instance for method chaining - public LambdaFunctionConstructPropsBuilder WithAlexaPermission(string skillId) + public LambdaFunctionConstructPropsBuilder WithAlexaPermission(string skillId, + LambdaPermissionTargets targets = LambdaPermissionTargets.Alias) { _permissions.Add(new LambdaPermission { Principal = "alexa-appkit.amazon.com", Action = "lambda:InvokeFunction", - EventSourceToken = skillId + EventSourceToken = skillId, + Targets = targets }); return this; } @@ -290,6 +323,8 @@ public LambdaFunctionConstructProps Build() FunctionName = _functionName, FunctionSuffix = _functionSuffix, AssetPath = _assetPath, + Code = _code, + AliasName = _aliasName, RoleName = _roleName, PolicyName = _policyName, MemorySize = _memorySize, diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/ExistingConstructsGoldenTemplateTests.cs b/test/LayeredCraft.Cdk.Constructs.Tests/ExistingConstructsGoldenTemplateTests.cs index 643a4a8..dbbf6c5 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/ExistingConstructsGoldenTemplateTests.cs +++ b/test/LayeredCraft.Cdk.Constructs.Tests/ExistingConstructsGoldenTemplateTests.cs @@ -2,7 +2,9 @@ using Amazon.CDK.AWS.CertificateManager; using Amazon.CDK.AWS.Cognito; using Amazon.CDK.AWS.DynamoDB; +using Amazon.CDK.AWS.Lambda; using Amazon.CDK.AWS.Route53; +using Amazon.CDK.AWS.S3; using LayeredCraft.Cdk.Constructs.Models; using LayeredCraft.Cdk.Constructs.Testing; using LayeredCraft.Cdk.Constructs.Tests.TestKit.Golden; @@ -65,6 +67,87 @@ public void LambdaFunctionConstruct_ShouldMatchGoldenTemplate( GoldenTemplate.AssertMatches(stack, goldenFileName); } + [Fact] + public void LambdaFunctionConstruct_AllPermissionTargets_ShouldMatchGoldenTemplate() + { + var (_, stack) = CdkTestHelper.CreateTestStack("golden-lambda"); + + var props = new LambdaFunctionConstructProps + { + FunctionName = "golden-function", + FunctionSuffix = "test", + AssetPath = CdkTestHelper.GetTestLambdaZipPath(), + RoleName = "golden-role", + PolicyName = "golden-policy", + MemorySize = 1024, + TimeoutInSeconds = 6, + EnvironmentVariables = new Dictionary { ["TABLE_NAME"] = "golden-table" }, + Permissions = + [ + new LambdaPermission + { + Principal = "apigateway.amazonaws.com", + Action = "lambda:InvokeFunction", + SourceArn = "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden", + Targets = LambdaPermissionTargets.Function + | LambdaPermissionTargets.Version + | LambdaPermissionTargets.Alias + } + ] + }; + + _ = new LambdaFunctionConstruct(stack, "golden-lambda", props); + + GoldenTemplate.AssertMatches(stack, "lambda-permissions-all-targets.json"); + } + + [Fact] + public void LambdaFunctionConstruct_S3Code_ShouldMatchGoldenTemplate() + { + var (_, stack) = CdkTestHelper.CreateTestStack("golden-lambda"); + + var bucket = Bucket.FromBucketName(stack, "artifact-bucket", "golden-artifacts"); + + var props = new LambdaFunctionConstructProps + { + FunctionName = "golden-function", + FunctionSuffix = "test", + Code = Code.FromBucketV2(bucket, "app.zip", new BucketOptions()), + RoleName = "golden-role", + PolicyName = "golden-policy", + MemorySize = 1024, + TimeoutInSeconds = 6, + EnvironmentVariables = new Dictionary { ["TABLE_NAME"] = "golden-table" } + }; + + _ = new LambdaFunctionConstruct(stack, "golden-lambda", props); + + GoldenTemplate.AssertMatches(stack, "lambda-s3-code.json"); + } + + [Fact] + public void LambdaFunctionConstruct_CustomAliasName_ShouldMatchGoldenTemplate() + { + var (_, stack) = CdkTestHelper.CreateTestStack("golden-lambda"); + + var props = new LambdaFunctionConstructProps + { + FunctionName = "golden-function", + FunctionSuffix = "test", + AssetPath = CdkTestHelper.GetTestLambdaZipPath(), + AliasName = "prod", + RoleName = "golden-role", + PolicyName = "golden-policy", + MemorySize = 1024, + TimeoutInSeconds = 6, + EnvironmentVariables = new Dictionary { ["TABLE_NAME"] = "golden-table" } + }; + + _ = new LambdaFunctionConstruct(stack, "golden-lambda", props); + + GoldenTemplate.AssertMatches(stack, "lambda-alias-name.json"); + } + [Theory] [InlineData("static-site-default.json", false, false)] [InlineData("static-site-api.json", true, false)] diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-alias-name.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-alias-name.json new file mode 100644 index 0000000..fc1d1b0 --- /dev/null +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-alias-name.json @@ -0,0 +1,121 @@ +{ + "Resources": { + "goldenlambdagoldenlambdapolicy4C9B84B1": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "golden-policy", + "Roles": [ + { + "Ref": "goldenlambdagoldenlambdarole9BB93118" + } + ] + } + }, + "goldenlambdagoldenlambdarole9BB93118": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "golden-role" + } + }, + "goldenlambdagoldenlambdaloggroup1F5BB451": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": "/aws/lambda/golden-function-test", + "RetentionInDays": 14 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "goldenlambdagoldenlambdafunctionFCFBEB49": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Architectures": [ + "x86_64" + ], + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456789012-us-east-1", + "S3Key": ".zip" + }, + "Environment": { + "Variables": { + "TABLE_NAME": "golden-table" + } + }, + "FunctionName": "golden-function-test", + "Handler": "bootstrap", + "LoggingConfig": { + "LogGroup": { + "Ref": "goldenlambdagoldenlambdaloggroup1F5BB451" + } + }, + "MemorySize": 1024, + "Role": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdarole9BB93118", + "Arn" + ] + }, + "Runtime": "provided.al2023", + "Timeout": 6 + }, + "DependsOn": [ + "goldenlambdagoldenlambdarole9BB93118" + ] + }, + "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B6e87bab96cf0cea4545a0a4ae59a2774": { + "Type": "AWS::Lambda::Version", + "Properties": { + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionFCFBEB49" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "goldenlambdagoldenlambdaaliasB00D58F9": { + "Type": "AWS::Lambda::Alias", + "Properties": { + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionFCFBEB49" + }, + "FunctionVersion": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B6e87bab96cf0cea4545a0a4ae59a2774", + "Version" + ] + }, + "Name": "prod" + } + } + } +} \ No newline at end of file diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-default.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-default.json index 403ce59..a12d2f7 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-default.json +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-default.json @@ -8,16 +8,15 @@ { "Action": [ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ], "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*" - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*:*" + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } } ], "Version": "2012-10-17" diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-amd64.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-amd64.json index 5561dbb..99b1252 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-amd64.json +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-amd64.json @@ -8,16 +8,15 @@ { "Action": [ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ], "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*" - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*:*" + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } } ], "Version": "2012-10-17" diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-arm64.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-arm64.json index 0c7d701..8e580e8 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-arm64.json +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-arm64.json @@ -8,16 +8,15 @@ { "Action": [ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ], "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*" - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*:*" + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } } ], "Version": "2012-10-17" diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-url-permissions.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-url-permissions.json index e1bceca..31d5e97 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-url-permissions.json +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-otel-url-permissions.json @@ -8,16 +8,15 @@ { "Action": [ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ], "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*" - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*:*" + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } } ], "Version": "2012-10-17" @@ -134,31 +133,6 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "goldenlambdagoldenlambdafunctionCurrentVersiongoldenlambdapermissionver05EF4D9BA": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9Be5d9ec424ac6ba1a553bc90e6cedba75" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" - } - }, - "goldenlambdagoldenlambdafunctiongoldenlambdapermissionfn08E91234F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "goldenlambdagoldenlambdafunctionFCFBEB49", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" - } - }, "goldenlambdagoldenlambdaaliasB00D58F9": { "Type": "AWS::Lambda::Alias", "Properties": { diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions-all-targets.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions-all-targets.json new file mode 100644 index 0000000..82d92ad --- /dev/null +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions-all-targets.json @@ -0,0 +1,157 @@ +{ + "Resources": { + "goldenlambdagoldenlambdapolicy4C9B84B1": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "golden-policy", + "Roles": [ + { + "Ref": "goldenlambdagoldenlambdarole9BB93118" + } + ] + } + }, + "goldenlambdagoldenlambdarole9BB93118": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "golden-role" + } + }, + "goldenlambdagoldenlambdaloggroup1F5BB451": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": "/aws/lambda/golden-function-test", + "RetentionInDays": 14 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "goldenlambdagoldenlambdafunctionFCFBEB49": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Architectures": [ + "x86_64" + ], + "Code": { + "S3Bucket": "cdk-hnb659fds-assets-123456789012-us-east-1", + "S3Key": ".zip" + }, + "Environment": { + "Variables": { + "TABLE_NAME": "golden-table" + } + }, + "FunctionName": "golden-function-test", + "Handler": "bootstrap", + "LoggingConfig": { + "LogGroup": { + "Ref": "goldenlambdagoldenlambdaloggroup1F5BB451" + } + }, + "MemorySize": 1024, + "Role": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdarole9BB93118", + "Arn" + ] + }, + "Runtime": "provided.al2023", + "Timeout": 6 + }, + "DependsOn": [ + "goldenlambdagoldenlambdarole9BB93118" + ] + }, + "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B6e87bab96cf0cea4545a0a4ae59a2774": { + "Type": "AWS::Lambda::Version", + "Properties": { + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionFCFBEB49" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "goldenlambdagoldenlambdafunctionCurrentVersiongoldenlambdapermissionver05EF4D9BA": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B6e87bab96cf0cea4545a0a4ae59a2774" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" + } + }, + "goldenlambdagoldenlambdafunctiongoldenlambdapermissionfn08E91234F": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdafunctionFCFBEB49", + "Arn" + ] + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" + } + }, + "goldenlambdagoldenlambdaaliasB00D58F9": { + "Type": "AWS::Lambda::Alias", + "Properties": { + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionFCFBEB49" + }, + "FunctionVersion": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B6e87bab96cf0cea4545a0a4ae59a2774", + "Version" + ] + }, + "Name": "live" + } + }, + "goldenlambdagoldenlambdaaliasgoldenlambdapermissionalias0A5CE46E8": { + "Type": "AWS::Lambda::Permission", + "Properties": { + "Action": "lambda:InvokeFunction", + "FunctionName": { + "Ref": "goldenlambdagoldenlambdaaliasB00D58F9" + }, + "Principal": "apigateway.amazonaws.com", + "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" + } + } + } +} \ No newline at end of file diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions.json index 6351604..461f925 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions.json +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-permissions.json @@ -8,16 +8,15 @@ { "Action": [ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ], "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*" - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*:*" + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } } ], "Version": "2012-10-17" @@ -103,31 +102,6 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "goldenlambdagoldenlambdafunctionCurrentVersiongoldenlambdapermissionver05EF4D9BA": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Ref": "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B6e87bab96cf0cea4545a0a4ae59a2774" - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" - } - }, - "goldenlambdagoldenlambdafunctiongoldenlambdapermissionfn08E91234F": { - "Type": "AWS::Lambda::Permission", - "Properties": { - "Action": "lambda:InvokeFunction", - "FunctionName": { - "Fn::GetAtt": [ - "goldenlambdagoldenlambdafunctionFCFBEB49", - "Arn" - ] - }, - "Principal": "apigateway.amazonaws.com", - "SourceArn": "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/golden" - } - }, "goldenlambdagoldenlambdaaliasB00D58F9": { "Type": "AWS::Lambda::Alias", "Properties": { diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-s3-code.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-s3-code.json new file mode 100644 index 0000000..5494480 --- /dev/null +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-s3-code.json @@ -0,0 +1,121 @@ +{ + "Resources": { + "goldenlambdagoldenlambdapolicy4C9B84B1": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "golden-policy", + "Roles": [ + { + "Ref": "goldenlambdagoldenlambdarole9BB93118" + } + ] + } + }, + "goldenlambdagoldenlambdarole9BB93118": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "golden-role" + } + }, + "goldenlambdagoldenlambdaloggroup1F5BB451": { + "Type": "AWS::Logs::LogGroup", + "Properties": { + "LogGroupName": "/aws/lambda/golden-function-test", + "RetentionInDays": 14 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "goldenlambdagoldenlambdafunctionFCFBEB49": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Architectures": [ + "x86_64" + ], + "Code": { + "S3Bucket": "golden-artifacts", + "S3Key": "app.zip" + }, + "Environment": { + "Variables": { + "TABLE_NAME": "golden-table" + } + }, + "FunctionName": "golden-function-test", + "Handler": "bootstrap", + "LoggingConfig": { + "LogGroup": { + "Ref": "goldenlambdagoldenlambdaloggroup1F5BB451" + } + }, + "MemorySize": 1024, + "Role": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdarole9BB93118", + "Arn" + ] + }, + "Runtime": "provided.al2023", + "Timeout": 6 + }, + "DependsOn": [ + "goldenlambdagoldenlambdarole9BB93118" + ] + }, + "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B8dfd84a5a7290a13ce5588d4d8188e3d": { + "Type": "AWS::Lambda::Version", + "Properties": { + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionFCFBEB49" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "goldenlambdagoldenlambdaaliasB00D58F9": { + "Type": "AWS::Lambda::Alias", + "Properties": { + "FunctionName": { + "Ref": "goldenlambdagoldenlambdafunctionFCFBEB49" + }, + "FunctionVersion": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdafunctionCurrentVersionCD044A9B8dfd84a5a7290a13ce5588d4d8188e3d", + "Version" + ] + }, + "Name": "live" + } + } + } +} \ No newline at end of file diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-url.json b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-url.json index d0c16fc..d97e3c7 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-url.json +++ b/test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/lambda-url.json @@ -8,16 +8,15 @@ { "Action": [ "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" + "logs:PutLogEvents" ], "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*" - }, - { - "Action": "logs:PutLogEvents", - "Effect": "Allow", - "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/golden-function-test*:*:*" + "Resource": { + "Fn::GetAtt": [ + "goldenlambdagoldenlambdaloggroup1F5BB451", + "Arn" + ] + } } ], "Version": "2012-10-17" diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/LambdaFunctionConstructTests.cs b/test/LayeredCraft.Cdk.Constructs.Tests/LambdaFunctionConstructTests.cs index 6f875b0..f43b175 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/LambdaFunctionConstructTests.cs +++ b/test/LayeredCraft.Cdk.Constructs.Tests/LambdaFunctionConstructTests.cs @@ -1,5 +1,8 @@ using System; +using System.Text.Json; using Amazon.CDK; +using Amazon.CDK.AWS.Lambda; +using Amazon.CDK.AWS.S3; using Amazon.CDK.Assertions; using AwesomeAssertions; using Compono.XunitV3; @@ -89,34 +92,13 @@ public void Construct_ShouldIncludeCloudWatchLogsPermissions(LambdaFunctionConst _ = new LambdaFunctionConstruct(stack, "test-construct", props); var template = Template.FromStack(stack); - // Verify the policy exists with correct name + // Verify the policy exists with correct name and is scoped to the construct's log group template.HasResourceProperties("AWS::IAM::Policy", Match.ObjectLike(new Dictionary { - { "PolicyName", props.PolicyName }, - { "PolicyDocument", Match.ObjectLike(new Dictionary - { - { "Statement", Match.ArrayWith([ - // First statement: logs:CreateLogStream, logs:CreateLogGroup, logs:TagResource - Match.ObjectLike(new Dictionary - { - { "Effect", "Allow" }, - { "Action", Match.ArrayWith([ - "logs:CreateLogStream", - "logs:CreateLogGroup", - "logs:TagResource" - ]) }, - { "Resource", $"arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/{props.FunctionName}-{props.FunctionSuffix}*:*" } - }), - // Second statement: logs:PutLogEvents - Match.ObjectLike(new Dictionary - { - { "Effect", "Allow" }, - { "Action", "logs:PutLogEvents" }, - { "Resource", $"arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/{props.FunctionName}-{props.FunctionSuffix}*:*:*" } - }) - ]) } - }) } + { "PolicyName", props.PolicyName } })); + + template.ShouldHaveCloudWatchLogsPermissions($"{props.FunctionName}-{props.FunctionSuffix}"); } [Theory] @@ -221,24 +203,231 @@ public void Construct_ShouldCreateVersionAndAlias(LambdaFunctionConstructProps p })); } + [Fact] + public void Construct_ShouldUseLiveAliasNameByDefault() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()).Build(); + + _ = new LambdaFunctionConstruct(stack, "test-construct", props); + var template = Template.FromStack(stack); + + template.ShouldHaveVersionAndAlias("live"); + } + + [Fact] + public void Construct_ShouldUseConfiguredAliasName() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithAliasName("prod") + .Build(); + + _ = new LambdaFunctionConstruct(stack, "test-construct", props); + var template = Template.FromStack(stack); + + template.ShouldHaveVersionAndAlias("prod"); + } + + [Fact] + public void Construct_ShouldScopeLoggingPolicyToItsLogGroup() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .Build(); + + _ = new LambdaFunctionConstruct(stack, "test-construct", props); + var template = Template.FromStack(stack); + + var logGroupName = $"/aws/lambda/{props.FunctionName}-{props.FunctionSuffix}"; + var logGroupLogicalId = template.FindResources("AWS::Logs::LogGroup").Keys.Single(); + + template.HasResourceProperties("AWS::IAM::Policy", Match.ObjectLike(new Dictionary + { + { "PolicyDocument", Match.ObjectLike(new Dictionary + { + { "Statement", Match.ArrayWith([ + Match.ObjectLike(new Dictionary + { + { "Effect", "Allow" }, + { "Action", Match.ArrayWith(["logs:CreateLogStream", "logs:PutLogEvents"]) }, + { "Resource", new Dictionary + { + { "Fn::GetAtt", new object[] { logGroupLogicalId, "Arn" } } + } + } + }) + ]) } + }) + } + })); + + var templateJson = JsonSerializer.Serialize(template.ToJSON()); + templateJson.Should().NotContain("logs:CreateLogGroup"); + templateJson.Should().NotContain("logs:TagResource"); + templateJson.Should().NotContain($"log-group:{logGroupName}*"); + } + + [Fact] + public void Construct_ShouldUseProvidedBucketCodeAndAddNoBucketGrants() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + var bucket = Bucket.FromBucketName(stack, "artifact-bucket", "my-lambda-artifacts"); + var code = Code.FromBucketV2(bucket, "lambda/app.zip", new BucketOptions()); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithFunctionName("s3-code") + .WithCode(code) + .Build(); + + _ = new LambdaFunctionConstruct(stack, "test-construct", props); + var template = Template.FromStack(stack); + + template.HasResourceProperties("AWS::Lambda::Function", Match.ObjectLike(new Dictionary + { + { "Code", Match.ObjectLike(new Dictionary + { + { "S3Bucket", "my-lambda-artifacts" }, + { "S3Key", "lambda/app.zip" } + }) + } + })); + + var templateJson = JsonSerializer.Serialize(template.ToJSON()); + templateJson.Should().NotContain("s3:"); + } + + [Fact] + public void Construct_ShouldRejectBothAssetPathAndCode() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + var bucket = Bucket.FromBucketName(stack, "artifact-bucket", "my-lambda-artifacts"); + + var props = new LambdaFunctionConstructProps + { + FunctionName = "both-sources", + FunctionSuffix = "test", + AssetPath = AssetPathExtensions.GetTestLambdaZipPath(), + Code = Code.FromBucketV2(bucket, "lambda/app.zip", new BucketOptions()), + RoleName = "both-sources-role", + PolicyName = "both-sources-policy" + }; + + Action act = () => _ = new LambdaFunctionConstruct(stack, "test-construct", props); + + act.Should().Throw().WithMessage("*exactly one*"); + } + + [Fact] + public void Construct_ShouldRejectNeitherAssetPathNorCode() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = new LambdaFunctionConstructProps + { + FunctionName = "no-source", + FunctionSuffix = "test", + RoleName = "no-source-role", + PolicyName = "no-source-policy" + }; + + Action act = () => _ = new LambdaFunctionConstruct(stack, "test-construct", props); + + act.Should().Throw().WithMessage("*exactly one*"); + } + + [Fact] + public void Construct_ShouldExposeAliasAndVersion() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithAliasName("prod") + .Build(); + + var construct = new LambdaFunctionConstruct(stack, "test-construct", props); + var template = Template.FromStack(stack); + + construct.Alias.Should().NotBeNull(); + construct.Version.Should().NotBeNull(); + construct.Version.Should().BeSameAs(construct.LambdaFunction.CurrentVersion); + construct.Alias.Should().BeOfType(); + construct.Alias?.AliasName.Should().Be("prod"); + + template.ResourceCountIs("AWS::Lambda::Version", 1); + template.ShouldHaveVersionAndAlias("prod"); + } + [Theory] [Compose(LambdaFunctionConstructPropsOptions.Permissions)] - public void Construct_ShouldAddPermissionsToAllTargets(LambdaFunctionConstructProps props) + public void Construct_ShouldApplyProfilePermissionsToAliasByDefault(LambdaFunctionConstructProps props) { - var app = new App(); - var stack = new Stack(app, "test-stack", new StackProps + var stack = CdkTestHelper.CreateTestStackMinimal(); + + _ = new LambdaFunctionConstruct(stack, "test-construct", props); + var template = Template.FromStack(stack); + + template.ResourceCountIs("AWS::Lambda::Permission", 1); + template.HasResourceProperties("AWS::Lambda::Permission", Match.ObjectLike(new Dictionary { - Env = new Amazon.CDK.Environment { Account = "123456789012", Region = "us-east-1" } - }); - + { "FunctionName", new Dictionary + { + { "Ref", Match.StringLikeRegexp(".*alias.*") } + } + } + })); + } + + [Theory] + [InlineData(LambdaPermissionTargets.Function, 1)] + [InlineData(LambdaPermissionTargets.Version, 1)] + [InlineData(LambdaPermissionTargets.Alias, 1)] + [InlineData(LambdaPermissionTargets.Function | LambdaPermissionTargets.Version, 2)] + [InlineData(LambdaPermissionTargets.Function | LambdaPermissionTargets.Alias, 2)] + [InlineData(LambdaPermissionTargets.Version | LambdaPermissionTargets.Alias, 2)] + [InlineData(LambdaPermissionTargets.Function | LambdaPermissionTargets.Version | LambdaPermissionTargets.Alias, 3)] + public void Construct_ShouldApplyPermissionsToOnlyTheSelectedTargets( + LambdaPermissionTargets targets, + int expectedPermissionCount) + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithFunctionName("permission-target") + .WithApiGatewayPermission( + "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/test", + targets: targets) + .Build(); + _ = new LambdaFunctionConstruct(stack, "test-construct", props); var template = Template.FromStack(stack); - if (props.Permissions.Count == 0) return; - var expectedPermissionCount = props.Permissions.Count * 3; // function + version + alias template.ResourceCountIs("AWS::Lambda::Permission", expectedPermissionCount); } + [Fact] + public void Construct_ShouldRejectPermissionWithNoTargets() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithCustomPermission(new LambdaPermission + { + Principal = "apigateway.amazonaws.com", + Action = "lambda:InvokeFunction", + SourceArn = "arn:aws:execute-api:us-east-1:123456789012:api-id/*/GET/test", + Targets = LambdaPermissionTargets.None + }) + .Build(); + + Action act = () => _ = new LambdaFunctionConstruct(stack, "test-construct", props); + + act.Should().Throw().WithMessage("*no targets*"); + } + [Theory] [Compose(LambdaFunctionConstructPropsOptions.None)] public void Construct_ShouldHandleEmptyPermissionsList(LambdaFunctionConstructProps props) diff --git a/test/LayeredCraft.Cdk.Constructs.Tests/Testing/TestingHelpersTests.cs b/test/LayeredCraft.Cdk.Constructs.Tests/Testing/TestingHelpersTests.cs index 6c0b2c1..7f83beb 100644 --- a/test/LayeredCraft.Cdk.Constructs.Tests/Testing/TestingHelpersTests.cs +++ b/test/LayeredCraft.Cdk.Constructs.Tests/Testing/TestingHelpersTests.cs @@ -1,4 +1,5 @@ using Amazon.CDK.Assertions; +using Amazon.CDK.AWS.Lambda; using AwesomeAssertions; using Compono.XunitV3; using LayeredCraft.Cdk.Constructs; @@ -117,10 +118,83 @@ public void AssertionHelpers_ShouldVerifyLambdaPermissions() // Create template AFTER adding constructs to the stack var template = Template.FromStack(stack); - // Should have 2 permissions * 3 targets (function + version + alias) = 6 total resources + // Each permission is applied to the alias by default template.ShouldHaveLambdaPermissions(2); } + [Fact] + public void AssertionHelpers_ShouldVerifyLambdaPermissionsForExplicitTargets() + { + var stack = CdkTestHelper.CreateTestStackMinimal(); + + var allTargets = LambdaPermissionTargets.Function + | LambdaPermissionTargets.Version + | LambdaPermissionTargets.Alias; + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithFunctionName("permission-targets-test") + .WithApiGatewayPermission( + "arn:aws:execute-api:us-east-1:123456789012:abcdef123/prod/GET/test", + targets: allTargets) + .WithAlexaPermission("amzn1.ask.skill.test-skill-id", allTargets) + .Build(); + + _ = new LambdaFunctionConstruct(stack, "TestConstruct", props); + + var template = Template.FromStack(stack); + + template.ShouldHaveLambdaPermissions(2, allTargets); + } + + [Fact] + public void PropsBuilder_ShouldConfigureAliasName() + { + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithAliasName("staging") + .Build(); + + props.AliasName.Should().Be("staging"); + } + + [Fact] + public void PropsBuilder_ShouldConfigureCodeInsteadOfAssetPath() + { + var code = Code.FromInline("exports.handler = async () => {};"); + + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithCode(code) + .Build(); + + props.Code.Should().BeSameAs(code); + props.AssetPath.Should().BeNull(); + } + + [Fact] + public void PropsBuilder_ShouldConfigurePermissionTargets() + { + var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithApiGatewayPermission( + "arn:aws:execute-api:us-east-1:123456789012:abcdef123/prod/GET/test", + targets: LambdaPermissionTargets.Function | LambdaPermissionTargets.Version) + .Build(); + + props.Permissions.Should().ContainSingle(); + props.Permissions[0].Targets.Should().Be( + LambdaPermissionTargets.Function | LambdaPermissionTargets.Version); + } + + [Fact] + public void LambdaPermission_ShouldDefaultToAliasTarget() + { + var permission = new LambdaPermission + { + Principal = "apigateway.amazonaws.com", + Action = "lambda:InvokeFunction" + }; + + permission.Targets.Should().Be(LambdaPermissionTargets.Alias); + } + [Fact] public void PropsBuilder_ShouldConfigureS3Access() { From 6fd1273dd884327bca843a2686d2f25c742ea422 Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Tue, 24 Nov 2026 07:24:50 -0500 Subject: [PATCH 2/4] docs(lambda): document alias, permission targets, scoped logging, and S3 code --- docs/constructs/lambda-function.md | 106 ++++++++++++++++++++++++++--- docs/testing/index.md | 38 ++++++++++- 2 files changed, 132 insertions(+), 12 deletions(-) diff --git a/docs/constructs/lambda-function.md b/docs/constructs/lambda-function.md index 8479258..681f7b8 100644 --- a/docs/constructs/lambda-function.md +++ b/docs/constructs/lambda-function.md @@ -5,12 +5,13 @@ The `LambdaFunctionConstruct` provides a comprehensive, production-ready Lambda ## :rocket: Features - **:chart_with_upwards_trend: OpenTelemetry Integration**: Configurable AWS OpenTelemetry collector layer with version and architecture support -- **:shield: IAM Management**: Automatic role and policy creation with CloudWatch Logs permissions +- **:shield: IAM Management**: Automatic role and policy creation with a CloudWatch Logs policy scoped to the construct's own log group - **:gear: Environment Configuration**: Easy environment variable management - **:link: Function URLs**: Optional HTTP endpoint generation - **:rocket: SnapStart Support**: Improved cold start performance for Java runtimes -- **:label: Versioning & Aliases**: Automatic version management with "live" alias -- **:key: Lambda Permissions**: Multi-target permission management (function, version, alias) +- **:label: Versioning & Aliases**: Automatic version management with a configurable alias name (default `"live"`) +- **:key: Lambda Permissions**: Permission targets per permission (function, version, alias) with an alias-only default +- **:package: Artifact Sources**: Deploy from a local asset (`AssetPath`) or existing Lambda code such as an S3 object (`Code`) ## Basic Usage @@ -44,14 +45,23 @@ public class MyStack : Stack |----------|------|-------------| | `FunctionName` | `string` | Base name of the Lambda function | | `FunctionSuffix` | `string` | Suffix appended to function name (e.g., "prod", "dev") | -| `AssetPath` | `string` | Path to Lambda deployment package | | `RoleName` | `string` | Name of the IAM role | | `PolicyName` | `string` | Name of the IAM policy | +### Artifact Code (exactly one required) + +Exactly one of `AssetPath` or `Code` must be set. Providing both or neither throws an `ArgumentException` at construction. + +| Property | Type | Description | +|----------|------|-------------| +| `AssetPath` | `string?` | Path to a local Lambda deployment package (asset) | +| `Code` | `Code?` | Existing Lambda code, for example `Code.FromBucketV2(bucket, key, options)` | + ### Optional Properties | Property | Type | Default | Description | |----------|------|---------|-------------| +| `AliasName` | `string` | `"live"` | Name of the alias pointing at the published version | | `MemorySize` | `double` | `1024` | Memory allocation in MB | | `TimeoutInSeconds` | `double` | `6` | Function timeout in seconds | | `PolicyStatements` | `PolicyStatement[]` | `[]` | Additional IAM policy statements | @@ -59,10 +69,17 @@ public class MyStack : Stack | `IncludeOtelLayer` | `bool` | `false` | Enable OpenTelemetry layer | | `OtelLayerVersion` | `string` | `"0-117-0"` | OpenTelemetry layer version | | `Architecture` | `string` | `"amd64"` | Lambda architecture applied to both the function and OTEL layer (amd64/arm64) | -| `Permissions` | `List` | `[]` | Lambda invocation permissions | +| `Permissions` | `List` | `[]` | Lambda invocation permissions, each with its own `Targets` | | `EnableSnapStart` | `bool` | `false` | Enable SnapStart (Java runtimes only; the default `PROVIDED_AL2023` runtime is not eligible) | | `GenerateUrl` | `bool` | `false` | Generate Function URL for HTTP access | +!!! warning "Breaking changes in 3.0.0" + - Lambda permissions now default to the **alias only**; the function and version permission + resources are no longer created unless `Targets` requests them. + - The execution-role logging policy is scoped to the construct's own log group ARN. It no longer + grants `logs:CreateLogGroup` or `logs:TagResource` and no longer uses a wildcard log-group resource. + - `AssetPath` is no longer required: provide exactly one of `AssetPath` or `Code`. + ## Advanced Examples ### Lambda with DynamoDB Access @@ -112,12 +129,16 @@ var functionUrl = lambda.LiveAliasFunctionUrlDomain; ### Lambda with API Gateway Permissions +By default a permission is granted on the **alias only**. Set `Targets` to grant it on the +function, the version, and/or the alias. + ```csharp var apiPermission = new LambdaPermission { Principal = "apigateway.amazonaws.com", Action = "lambda:InvokeFunction", SourceArn = "arn:aws:execute-api:us-east-1:123456789012:abcdef123/*" + // Targets defaults to LambdaPermissionTargets.Alias }; var lambda = new LambdaFunctionConstruct(this, "MyLambda", new LambdaFunctionConstructProps @@ -131,6 +152,52 @@ var lambda = new LambdaFunctionConstruct(this, "MyLambda", new LambdaFunctionCon }); ``` +To restore the 2.x behavior (function, version, and alias), opt in explicitly: + +```csharp +var apiPermission = new LambdaPermission +{ + Principal = "apigateway.amazonaws.com", + Action = "lambda:InvokeFunction", + SourceArn = "arn:aws:execute-api:us-east-1:123456789012:abcdef123/*", + Targets = LambdaPermissionTargets.Function + | LambdaPermissionTargets.Version + | LambdaPermissionTargets.Alias +}; +``` + +### Lambda with an S3 Artifact + +Provide existing code instead of a local asset. With `Code.FromBucketV2` the construct adds no +bucket grants to the execution role. + +```csharp +var bucket = Bucket.FromBucketName(this, "ArtifactBucket", "my-lambda-artifacts"); + +var lambda = new LambdaFunctionConstruct(this, "MyLambda", new LambdaFunctionConstructProps +{ + FunctionName = "my-api", + FunctionSuffix = "prod", + Code = Code.FromBucketV2(bucket, "my-api/app.zip", new BucketOptions()), + RoleName = "my-api-role", + PolicyName = "my-api-policy" +}); +``` + +### Lambda with a Custom Alias Name + +```csharp +var lambda = new LambdaFunctionConstruct(this, "MyLambda", new LambdaFunctionConstructProps +{ + FunctionName = "my-api", + FunctionSuffix = "prod", + AssetPath = "./lambda-deployment.zip", + AliasName = "prod", + RoleName = "my-api-role", + PolicyName = "my-api-policy" +}); +``` + ### Lambda with SnapStart ```csharp @@ -177,6 +244,22 @@ var underlyingFunction = lambda.LambdaFunction; underlyingFunction.AddEnvironment("CUSTOM_VAR", "value"); ``` +### Alias + +The deployed alias as an `IAlias`: + +```csharp +var alias = lambda.Alias; +``` + +### Version + +The published version backing the alias as an `IVersion`: + +```csharp +var version = lambda.Version; +``` + ### LiveAliasFunctionUrlDomain Get the domain of the Function URL (if enabled): @@ -206,20 +289,23 @@ The Lambda functions use the following runtime configuration: The construct automatically creates: -1. **CloudWatch Logs Permissions**: +1. **CloudWatch Logs Permissions** (scoped to the construct's own log group ARN): - `logs:CreateLogStream` - - `logs:CreateLogGroup` - - `logs:TagResource` - `logs:PutLogEvents` + The construct creates the log group itself, so it does not grant `logs:CreateLogGroup`, + `logs:TagResource`, or a wildcard log-group resource. + 2. **Custom Policy Statements**: Any additional policies you provide -3. **Lambda Permissions**: Applied to function, version, and alias +3. **Lambda Permissions**: Each `LambdaPermission` is applied to its `Targets` + (`Function`, `Version`, and/or `Alias`). The default is **alias only**. `LambdaPermissionTargets.None` + is invalid and throws an `ArgumentException` at construction. ## Versioning Strategy - Creates a new version on every deployment -- Maintains a "live" alias pointing to the latest version +- Maintains an alias pointing to the latest version; the alias name is configurable (`AliasName`, default `"live"`) - Versions have `RemovalPolicy.RETAIN` to prevent deletion ## Testing diff --git a/docs/testing/index.md b/docs/testing/index.md index f511594..858e32a 100644 --- a/docs/testing/index.md +++ b/docs/testing/index.md @@ -102,6 +102,7 @@ var (app, stack) = CdkTestHelper.CreateTestStack("stack-name" var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) .WithFunctionName("my-function") .WithFunctionSuffix("prod") + .WithAliasName("prod") .WithMemorySize(1024) .WithTimeoutInSeconds(30) .WithEnvironmentVariable("LOG_LEVEL", "info") @@ -117,6 +118,30 @@ var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZi // SnapStart is only supported for Java runtimes; avoid enabling it with the default runtime. ``` +To use existing code instead of a local asset, call `WithCode`; it clears the builder's asset path so +exactly one source is configured: + +```csharp +var props = CdkTestHelper.CreatePropsBuilder() + .WithCode(Code.FromBucketV2(bucket, "app.zip", new BucketOptions())) + .Build(); +``` + +`WithApiGatewayPermission` and `WithAlexaPermission` accept an optional `LambdaPermissionTargets` +argument (default `Alias`). For a custom permission, set `LambdaPermission.Targets` directly: + +```csharp +var props = CdkTestHelper.CreatePropsBuilder(AssetPathExtensions.GetTestLambdaZipPath()) + .WithApiGatewayPermission( + "arn:aws:execute-api:us-east-1:123456789012:abcdef123/*", + targets: LambdaPermissionTargets.Alias) + .Build(); + +var allTargets = LambdaPermissionTargets.Function + | LambdaPermissionTargets.Version + | LambdaPermissionTargets.Alias; +``` + ### OpenTelemetry Configuration (v2.0+) The props builder includes new methods for configuring OpenTelemetry settings: @@ -148,8 +173,11 @@ template.ShouldHaveFunctionUrl(); template.ShouldHaveFunctionUrlOutput("test-stack", "test-construct"); // IAM and permissions -template.ShouldHaveCloudWatchLogsPermissions("my-function-prod"); -template.ShouldHaveLambdaPermissions(1); // Count of permission objects +template.ShouldHaveCloudWatchLogsPermissions("my-function-prod"); // scoped to the construct's log group +template.ShouldHaveLambdaPermissions(1); // one permission applied to the alias only (default) +template.ShouldHaveLambdaPermissions( + 1, + LambdaPermissionTargets.Function | LambdaPermissionTargets.Version | LambdaPermissionTargets.Alias); // Environment and configuration template.ShouldHaveEnvironmentVariables(new Dictionary @@ -160,6 +188,12 @@ template.ShouldHaveVersionAndAlias("live"); template.ShouldHaveLogGroup("my-function-prod", 14); ``` +`ShouldHaveCloudWatchLogsPermissions` asserts the scoped policy: exactly `logs:CreateLogStream` and +`logs:PutLogEvents` on the construct's log-group ARN (`Fn::GetAtt`), with no `logs:CreateLogGroup`, +`logs:TagResource`, or wildcard log-group resource. `ShouldHaveLambdaPermissions` takes the +`LambdaPermissionTargets` (default `Alias`) and multiplies by the number of permission objects, so +the alias-only default expects one resource per permission. + SnapStart-specific assertions (`template.ShouldHaveSnapStart()`) apply only when you are using a Java runtime; the default `PROVIDED_AL2023` runtime does not support SnapStart. ## Static Site Testing From a0c818ef1472fafc64aa6154989037baad9a46b1 Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Tue, 24 Nov 2026 07:27:28 -0500 Subject: [PATCH 3/4] docs: 3.0 migration guide, design accepted (rev 2), Lambda docs and beads export - docs/migration/v3.md: .NET 8/9 removal, CDK 2.278.0 floor and type-name collisions, alias-only permission default (U2) and scoped log policy (U4) with before/after template excerpts, new options (U1, U3, U7) - design doc: Accepted rev 2 with the owner's 2026-11-24 decisions; Web Function investigation deferred to #114 - README, CLAUDE.md and mkdocs nav updated - .beads/issues.jsonl export (cdkc-2lh.3 chain, #114 bead) Refs #110 Co-Authored-By: Claude Opus 5.5 --- .beads/issues.jsonl | 23 ++++-- CLAUDE.md | 13 ++-- README.md | 1 + docs/designs/v3-modernization.md | 21 ++++-- docs/migration/v3.md | 125 +++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 6 files changed, 165 insertions(+), 19 deletions(-) create mode 100644 docs/migration/v3.md diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 6365b52..1a9dd33 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -15,19 +15,30 @@ {"_type":"issue","id":"cdkc-18e.2","title":"T1: Add Web Function public models, options, and value validation","description":"Purpose: introduce the public model/value types every later bead consumes, with value validation. Design §8.1, §8.2, §8.3 (props + WebFunctionLogs), §8.4 (options/attributes), §8.5 (origin props), §8.7, §10.2 (WebFunctionCallerPolicy, WebFunctionInvokeGrantOptions), §14.\n\nDeliverables (namespace LayeredCraft.Cdk.Constructs.Models unless noted; follow the newest Cognito style: get-only interfaces + init-only sealed records, XML docs):\n- Enums: WebFunctionAuthType {IamAuth, ApplicationManaged}; WebFunctionEndpointType {HomeRegion, MultiRegion, PerRegion};\n WebFunctionCodeBucketPolicy {Automatic, ExternallyManaged}; WebFunctionOriginPermissions {Automatic, ExternallyManaged};\n WebFunctionCallerPolicy {Automatic, ExternallyManaged}.\n- WebFunctionRuntime (sealed; NodeJs24X = \"nodejs24.x\"; Of(string)).\n- WebFunctionCode (abstract, private protected ctor, closed hierarchy) with static FromBucket(IBucket, string key, WebFunctionCodeFromBucketOptions?)\n and WebFunctionCodeFromBucketOptions {ObjectVersion, BucketPolicy = Automatic}. The internal Bind contract to the construct is\n declared but bucket-policy wiring is implemented in the core-construct bead; keep the binding surface internal so FromAsset can be added later.\n- WebFunctionLogs (abstract, closed): Create(RetentionDays? retention = null [→ TWO_WEEKS], RemovalPolicy? [→ DESTROY]), Use(ILogGroup), ServiceDefault().\n- IWebFunctionConstructProps / WebFunctionConstructProps exactly per §8.3 (FunctionName, Code, Endpoint required; Runtime, EntryPoint,\n EnvironmentVariables, Timeout=30s, MaxConcurrencyPerEnvironment, Description, Role, Logs=Create(), ApplicationLogLevel, SystemLogLevel\n reusing Amazon.CDK.AWS.Lambda enums). NO EncryptionKey property.\n- IWebFunctionEndpointOptions / WebFunctionEndpointOptions (EndpointName=\"default\", required AuthType, EndpointType=HomeRegion, Regions, MaxEnvironments, RateLimit, Description).\n- WebFunctionEndpointAttributes (EndpointArn, DomainName, AuthType required; EndpointType=HomeRegion).\n- WebFunctionInvokeGrantOptions {CallerPolicy = Automatic}.\n- WebFunctionOriginProps (explicit members only: OriginId, OriginPath, CustomHeaders, ConnectionAttempts, ConnectionTimeout, ReadTimeout,\n KeepaliveTimeout, ResponseCompletionTimeout, OriginShieldEnabled, OriginShieldRegion) and sealed WebFunctionOriginWithOacProps : WebFunctionOriginProps\n {OriginAccessControl, Permissions = Automatic}. Must NOT expose ProtocolPolicy or OriginAccessControlId.\n- Internal validation helpers (local to new types; do not refactor shared code or existing constructs) for §14 value rules: FunctionName\n regex 1–64; EndpointName 1–64 [A-Za-z0-9_-]; Timeout 3–900 whole seconds; MaxConcurrencyPerEnvironment 1–128; MaxEnvironments 2–10000;\n RateLimit grid {0} ∪ 100..1000 step 100 ∪ 2000..10000 step 1000; Regions rules; env var key regex; EntryPoint relative/no \"..\";\n reserved AWS_LAMBDA_HTTP_ENDPOINT; EntryPoint vs AWS_LAMBDA_NODEJS_ENTRYPOINT conflict. Unresolved tokens (Token.IsUnresolved) are skipped, never rejected.\n Exception types per §14 (ArgumentException / ArgumentOutOfRangeException / InvalidOperationException).\n\nExpected files: src/LayeredCraft.Cdk.Constructs/Models/WebFunction*.cs (one type per file or small cohesive groups); test/.../WebFunctionModelsTests.cs (+ validation tests).\nExclusions: no constructs, no CloudFormation resources, no IBucket policy mutation yet, no testing-namespace helpers, no docs.\nEdge cases: FunctionName must allow tokens; nullable reference types enabled; records must be init-only (no Action\u003c\u003e mutation APIs anywhere).\n","acceptance_criteria":"- All listed public types exist with the exact names, members, and defaults in design §8.1–§8.5, §8.7 (no EncryptionKey), §10.2.\n- WebFunctionConstructProps cannot be constructed without FunctionName, Code, and Endpoint; WebFunctionEndpointOptions cannot be constructed without AuthType (compile-time `required`).\n- Every §14 value rule has a positive and negative unit test; tokens bypass literal validation (tested).\n- WebFunctionLogs.Create() defaults are TWO_WEEKS and DESTROY (tested).\n- No existing source file outside new WebFunction* files changed; existing golden templates still pass.\n- Validation gates pass.","notes":"T1 IMPLEMENTED (public WebFunction model/value types + §14 value validation). Not committed per task restriction.\n\nDELIVERABLES (src/LayeredCraft.Cdk.Constructs/Models/):\n- Enums: WebFunctionAuthType (IamAuth, ApplicationManaged), WebFunctionEndpointType (HomeRegion, MultiRegion, PerRegion), WebFunctionCodeBucketPolicy (Automatic, ExternallyManaged), WebFunctionOriginPermissions (Automatic, ExternallyManaged), WebFunctionCallerPolicy (Automatic, ExternallyManaged).\n- WebFunctionRuntime: sealed; NodeJs24X='nodejs24.x'; Of(string) escape hatch.\n- WebFunctionCode: abstract closed hierarchy (private protected ctor); static FromBucket(IBucket,string,WebFunctionCodeFromBucketOptions?); internal sealed WebFunctionCodeFromBucket. Options: WebFunctionCodeFromBucketOptions { ObjectVersion; BucketPolicy=Automatic }.\n- WebFunctionLogs: abstract closed; Create(RetentionDays?=TWO_WEEKS, RemovalPolicy?=DESTROY) / Use(ILogGroup) / ServiceDefault(); internal concrete subtypes.\n- IWebFunctionConstructProps + WebFunctionConstructProps: FunctionName/Code/Endpoint required; Runtime=NodeJs24X; EntryPoint; EnvironmentVariables; Timeout=30s; MaxConcurrencyPerEnvironment; Description; Role; Logs=Create(); ApplicationLogLevel; SystemLogLevel. NO EncryptionKey (deferred KMS, §8.7).\n- IWebFunctionEndpointOptions + WebFunctionEndpointOptions: EndpointName='default'; required AuthType (explicit selection, no default); EndpointType=HomeRegion; Regions=[]; MaxEnvironments; RateLimit; Description.\n- WebFunctionEndpointAttributes: required EndpointArn/DomainName/AuthType; EndpointType=HomeRegion.\n- WebFunctionInvokeGrantOptions: CallerPolicy=Automatic (explicit ownership contract).\n- WebFunctionOriginProps + sealed WebFunctionOriginWithOacProps (no ProtocolPolicy/OriginAccessControlId).\n- WebFunctionValidation (internal static): §14 helpers (FunctionName, EndpointName, Timeout, MaxConcurrencyPerEnvironment, MaxEnvironments, RateLimit grid, Regions, env var keys, env var map, EntryPoint incl reserved AWS_LAMBDA_HTTP_ENDPOINT and AWS_LAMBDA_NODEJS_ENTRYPOINT conflict). Token-aware: unresolved tokens (Token.IsUnresolved / Fn.Ref) bypass literal validation. Exceptions per §14 (ArgumentException / ArgumentOutOfRangeException).\n- [assembly: InternalsVisibleTo(\"LayeredCraft.Cdk.Constructs.Tests\")] added (new file) so validation is unit-testable.\n\nTESTS (test/LayeredCraft.Cdk.Constructs.Tests/): WebFunctionModelsTests.cs (defaults, required values, immutability, factory arg validation, crypto/logs/endpoint/origin surface) + WebFunctionValidationTests.cs (positive+negative per §14 rule, boundary values, token bypass). +110 tests/TFM ([Collection(\"CDK Tests\")], xUnit v3, AwesomeAssertions).\n\nCOMMANDS/RESULTS (JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=1):\n- dotnet build LayeredCraft.Cdk.Constructs.slnx -c Release -\u003e 0 warnings, 0 errors.\n- dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release -\u003e 1184 passed / 0 failed / 0 skipped (296 x net8.0/net9.0/net10.0/net11.0). Baseline was 744 (186x4).\n- 17 golden templates UNCHANGED; ExistingConstructsGoldenTemplateTests passed (zero diff). Goldens NOT regenerated.\n\nSCOPE: no constructs, no CFN resources, no IBucket policy mutation, no Testing helpers, no docs. No existing (pre-T1) source file modified; only new WebFunction*.cs files added. No new dependencies.\n\nINTENTIONAL DEVIATION (must be reported): design §8.2 declares internal 'abstract WebFunctionCodeConfig Bind(WebFunctionConstruct function)'. WebFunctionConstruct is created in T2 (cdkc-18e.3), so this internal seam cannot be declared in T1 without the type. Deferred Bind to T2 (which already owns the construct + bucket-policy wiring). Public contract unchanged. Recommendation: T2 declares the abstract Bind on WebFunctionCode and overrides it in WebFunctionCodeFromBucket. No other deviation from the approved design.","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":1,"issue_type":"task","assignee":"Nick Cipollina","owner":"ncipollina@gmail.com","created_at":"2026-10-23T01:14:47Z","created_by":"Nick Cipollina","updated_at":"2026-10-23T01:53:01Z","started_at":"2026-10-23T01:38:29Z","closed_at":"2026-10-23T01:53:01Z","close_reason":"Implemented T1: public WebFunction model/value types (auth/endpoint-type/bucket-policy/origin-permissions/caller-policy enums, WebFunctionRuntime, closed WebFunctionCode+FromBucket, closed WebFunctionLogs with Create/Use/ServiceDefault, IWebFunctionConstructProps+record, IWebFunctionEndpointOptions+record, EndpointAttributes, InvokeGrantOptions, OriginProps+WithOacProps) and internal token-aware WebFunctionValidation for all §14 value rules. Added 2 test files (WebFunctionModelsTests, WebFunctionValidationTests) = +110 tests/TFM. Build 0 warnings/0 errors; full suite 1184/1184 passed across net8.0/9.0/10.0/11.0; all 17 existing golden templates unchanged (goldens not regenerated). No existing source modified, no constructs/CFN resources/IBucket mutation/Testing helpers/docs added. Internal Bind(WebFunctionConstruct) seam intentionally deferred to T2 (cdkc-18e.3) because the construct type does not exist in T1; public contract unaffected.","external_ref":"gh-98","labels":["lambda-web-functions","models","t1"],"dependencies":[{"issue_id":"cdkc-18e.2","depends_on_id":"cdkc-18e","type":"parent-child","created_at":"2026-10-23T01:14:47Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-18e.2","depends_on_id":"cdkc-18e.1","type":"blocks","created_at":"2026-10-23T01:15:09Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-18e.1","title":"T0: Upgrade Amazon.CDK.Lib to 2.274.0 and add golden-template baseline for existing constructs","description":"Purpose: separate review checkpoint that raises the CDK floor and proves existing constructs are unchanged. Design §5.5, §12.4 (Enforcement), §13, §19 T0.\n\nREQUIRED ORDER (do not reorder):\n a. Confirm Directory.Packages.props still pins Amazon.CDK.Lib 2.273.0 (`dotnet list test/LayeredCraft.Cdk.Constructs.Tests package --include-transitive | grep Amazon.CDK.Lib`). If it is already 2.274.0, STOP and record a blocker: the baseline can no longer be produced from the original version.\n b. Generate the golden baseline ON 2.273.0, run the tests once to prove the baseline passes on 2.273.0, and record the 2.273.0 SHA-256 of every golden file in the bead notes.\n c. Only then change Amazon.CDK.Lib to 2.274.0, restore, and run the golden tests in COMPARE mode (regeneration env var unset) against the unchanged 2.273.0 baseline.\n d. If any template differs: do NOT regenerate, accept, or edit golden files; do NOT adjust normalization to hide the diff. Record the full diff (construct, resource, property, old → new) on this bead with `bd update \u003cid\u003e --append-notes`, set the bead to blocked (`bd update \u003cid\u003e --status blocked`), and report to the maintainer. Leave 2.274.0 in place only together with the failing tests and the recorded diff.\n\nScope:\n1. BEFORE changing the CDK version, add a test-only golden-template harness and capture golden templates on the current\n Amazon.CDK.Lib 2.273.0 for the four existing constructs (LambdaFunctionConstruct, StaticSiteConstruct, DynamoDbTableConstruct,\n CognitoUserPoolConstruct) in default and representative configurations (e.g. Lambda: OTEL on/off, URL on/off, permissions;\n StaticSite: with/without ApiDomain and alternate domains; DynamoDB: GSI/stream/TTL; Cognito: domain prefix vs custom domain with\n explicit IHostedZone/ICertificate, groups, resource servers). Avoid configurations that require HostedZone.FromLookup unless the\n test supplies context; prefer deterministic inputs (no random AutoFixture values in golden stacks).\n2. Bump Amazon.CDK.Lib to 2.274.0 in Directory.Packages.props (the only dependency change).\n3. Re-run: golden templates must be identical (zero diff).\n\nHarness requirements (reused by later beads):\n- Lives in the test project (e.g. test/LayeredCraft.Cdk.Constructs.Tests/TestKit/Golden/GoldenTemplate.cs) with golden files under\n test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/*.json (copied to output).\n- Compares the COMPLETE synthesized template (Template.FromStack(...).ToJSON()), normalized only for asset hashes / asset\n S3 keys and CDK metadata (aws:cdk:path, CDKMetadata resource, BootstrapVersion parameter/rule). Document normalization in code.\n- Regeneration only when an env var (e.g. UPDATE_GOLDEN_TEMPLATES=1) is set; default mode fails on any diff with a readable diff message.\n- Stable across all target frameworks (net8.0–net11.0).\n\nExpected files: Directory.Packages.props; test/.../TestKit/Golden/*; test/.../GoldenTemplates/*.json; test/.../ExistingConstructsGoldenTemplateTests.cs; test csproj (copy golden files).\n\nExclusions: no changes to src/ production code; no new constructs; no other package bumps.\nEdge cases: CDK 2.274 may change synthesized output of existing constructs (e.g. new defaults/feature flags). If any golden diff\nappears after the bump, STOP and record the diff on this bead as a blocker for maintainer review; do not \"fix\" by editing goldens.\nAlso record whether CDK default-rule validation still warns \"Unknown resource type AWS::Lambda::WebFunction\" on 2.274 (design §5.5).\n","acceptance_criteria":"- Golden templates for all four existing constructs were generated on Amazon.CDK.Lib 2.273.0 BEFORE the upgrade, passed on 2.273.0, and their SHA-256 hashes are recorded in notes.\n- After upgrading to 2.274.0 the comparison ran against that ORIGINAL baseline; golden-file hashes are unchanged (no regeneration or acceptance of snapshots).\n- If the upgrade changed any synthesized template, the bead is blocked with the recorded diff instead of closed.\n- Directory.Packages.props uses Amazon.CDK.Lib 2.274.0; no other dependency changed.\n- After the bump all golden tests pass with zero diff on every target framework.\n- Harness supports regeneration via env var and fails readably on diff by default.\n- Full validation gates (restore/build/test) pass; coverage threshold not reduced.\n- Notes record commands run, the golden file list, and the 2.274 CloudFormation-Validate warning observation.","notes":"T0 (cdkc-18e.1) implementation evidence\n\nFILES CHANGED / ADDED\n- Directory.Packages.props: Amazon.CDK.Lib 2.273.0 -\u003e 2.274.0 (ONLY dependency change; diff is a single line).\n- test/LayeredCraft.Cdk.Constructs.Tests/LayeredCraft.Cdk.Constructs.Tests.csproj: added \u003cNone Update=\"GoldenTemplates\\**\\*.json\"\u003e\u003cCopyToOutputDirectory\u003ePreserveNewest\u003c/CopyToOutputDirectory\u003e.\n- test/LayeredCraft.Cdk.Constructs.Tests/TestKit/Golden/GoldenTemplate.cs (new): golden harness.\n- test/LayeredCraft.Cdk.Constructs.Tests/ExistingConstructsGoldenTemplateTests.cs (new): 17 golden cases across the 4 existing constructs.\n- test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/*.json (new): 17 baseline golden templates.\nNo changes to src/ production code.\n\nGOLDEN COVERAGE ADDED (17 templates)\n- LambdaFunctionConstruct: lambda-default, lambda-otel-amd64, lambda-otel-arm64, lambda-permissions, lambda-url, lambda-otel-url-permissions.\n- StaticSiteConstruct: static-site-default, static-site-api, static-site-alternates, static-site-full.\n- DynamoDbTableConstruct: dynamodb-default, dynamodb-sort-key, dynamodb-gsi, dynamodb-stream-ttl.\n- CognitoUserPoolConstruct: cognito-prefix-domain, cognito-custom-domain, cognito-no-domain.\n\nNORMALIZATION (documented in GoldenTemplate.cs)\nCompares the COMPLETE Template.FromStack(...).ToJSON(). Only: BootstrapVersion parameter + CheckBootstrapVersion rule removed; AWS::CDK::Metadata resource removed; per-resource Metadata removed (aws:cdk:path / aws:asset:path); 64-hex asset content hashes / S3 keys replaced with \u003cASSET-HASH\u003e. No other keys altered. Regeneration only when UPDATE_GOLDEN_TEMPLATES is truthy; default mode fails with a readable -/+ line diff and never overwrites the golden. Golden files resolve from the source tree (walk-up to project dir) with an output-dir fallback.\n\nCOMMANDS + RESULTS\n- Baseline restore on 2.273.0: `dotnet restore LayeredCraft.Cdk.Constructs.slnx` OK.\n- Baseline test on 2.273.0: `dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release` -\u003e PASSED, 186 x net8.0/net9.0/net10.0/net11.0 (744 total), 0 failed, 0 skipped.\n- Golden files SHA-256 recorded, then upgrade to 2.274.0: `dotnet restore` OK; `dotnet list ... package` shows Amazon.CDK.Lib 2.274.0.\n- Post-upgrade test on 2.274.0 (against the ORIGINAL unchanged baseline): `dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release` -\u003e PASSED, 186 x4 TFMs (744 total), 0 failed, 0 skipped, ZERO golden diff on every TFM.\n- `shasum -a 256` before vs after: HASHES IDENTICAL (git tracked files unmodified by the run).\n\nBASELINE SHA-256 (identical before and after upgrade)\n66398f765a746fbe76268e666d0b492ddb8aadec9f2c4c76d17a25b6981cc769 cognito-custom-domain.json\n3396b3ceeedbd15de26119076158e3f1d0c8bc638f1a2be556e8d87fa8dce30b cognito-no-domain.json\nd18cc32d82a07f45534584a59f5431540883baf24d4bf7311a8ebe14c0ac5447 cognito-prefix-domain.json\n0d5397ab86db3dd0194fd4a6463ebd9461005c65f7964be0b617dfab9ade384e dynamodb-default.json\n07a9509cad0feb734c4c48eec96b4271a9e7c80acb7bdcf39a4bfb6de300e80d dynamodb-gsi.json\n1517371079a842ed38ac411b64e1c4093c80e6b896a77b0ca766762ef9e8412b dynamodb-sort-key.json\n5a500b2d5d2073d0747b355aa19aae5092d8754ad8e529776bebb91997679ab8 dynamodb-stream-ttl.json\nd1038f5889457882b0a50736446376b8a05d9430db99429b39bec989bcd3073b lambda-default.json\n796c2acdaca4bb90df681ddfcd05c5867ed3d0e8e05b0ec417d4cac067fed881 lambda-otel-amd64.json\n26f601e11cb042ed163cc595fb9131bbb1fddbaa0d6993ff6d3a1dfcf094c543 lambda-otel-arm64.json\n8aadb2159cc9febd6a73a7aa888ce470b3ef81eabc8c857174615166efd3b1ff lambda-otel-url-permissions.json\n648cd4745abb61979544466c171b72f7cc70b1e239ca43ec4a58c0e50151a9f6 lambda-permissions.json\nf9b86ad9c94ad499e373df8b97536e0525b4d0565c34539a75df0bd720308362 lambda-url.json\nb1bc13271470ae7136b8f085de3f584e51409acb69788764957079df1c3dd639 static-site-alternates.json\nb5e4a36010f31a7666cc0b9fb0ce94754ed046bb1a6cf3a993bf57d7b0970973 static-site-api.json\n1eb6acb8bd3579c9157ee82fe94e24727c35dafa91828dd7f5d9cc3359cc8f38 static-site-default.json\n63bfa34136f47b16bd7829efa91c8b66b1d000bb2096beeccf961e8ff5a09a04 static-site-full.json\n\n2.274 CLOUDFORMATION DEFAULT-RULE VALIDATION OBSERVATION\nStill warn-only (feature flag @aws-cdk/core:validateAgainstDefaultRules remains OFF by default). A temporary probe that synthesized a raw CfnResource of type AWS::Lambda::WebFunction emitted:\n WARNING Unknown resource type 'AWS::Lambda::WebFunction' (CloudFormation Validate) [CloudFormation-Validate::F3006]\n Set feature flag \"@aws-cdk/core:validateAgainstDefaultRules\" to true to turn these into errors.\nSo the unknown AWS::Lambda::WebFunction type is still only a warning (not an error) on 2.274. Note: the 2.274 assembly does now ship CfnWebFunction / CfnWebFunctionEndpoint / CfnWebFunctionRevision L1 types. The temporary probe file was removed and is not part of the deliverable.\n\nCOVERAGE\nsrc/ production code is unchanged, so the CI 80% coverage gate is unaffected.\n\nRESTRICTIONS HONORED\nNo src/ changes, no new constructs, no other dependency bumps, goldens not regenerated/adjusted, normalization not weakened, no commit/push/PR/deploy/publish.","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":1,"issue_type":"task","assignee":"Nick Cipollina","owner":"ncipollina@gmail.com","created_at":"2026-10-23T01:14:46Z","created_by":"Nick Cipollina","updated_at":"2026-10-23T01:32:51Z","started_at":"2026-10-23T01:23:53Z","closed_at":"2026-10-23T01:32:51Z","close_reason":"T0 complete: golden baseline (17 templates, 4 constructs) captured and verified on 2.273.0; Amazon.CDK.Lib bumped to 2.274.0 (only dependency change); goldens re-verified against unchanged baseline with zero diff and identical SHA-256 on all 4 TFMs; 186x4 tests pass. 2.274 default-rule validation still warns (not errors) on unknown AWS::Lambda::WebFunction.","external_ref":"gh-98","labels":["baseline","lambda-web-functions","t0"],"dependencies":[{"issue_id":"cdkc-18e.1","depends_on_id":"cdkc-18e","type":"parent-child","created_at":"2026-10-23T01:14:46Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-18e","title":"AWS Lambda Web Functions support — LayeredCraft.Cdk.Constructs","description":"Implement AWS Lambda Web Functions support in LayeredCraft.Cdk.Constructs per the APPROVED design (revision 3):\ndocs/designs/lambda-web-functions-integration.md (authoritative; GitHub issue #98).\n\nScope: new additive constructs WebFunctionConstruct, WebFunctionEndpointConstruct/IWebFunctionEndpoint, WebFunctionOrigin,\nWebFunctionCode.FromBucket, WebFunctionLogs, supporting models, Testing helpers, docs, and a mandatory AWS sandbox release gate.\n\nNon-negotiable constraints (design §2, §6, §8, §10.2, §12.4):\n- Hybrid composition; L3 over CDK L1 (CfnWebFunction/Revision/Endpoint, CfnResourcePolicy); no upstream alpha/L2 dependency;\n upstream L2 types never appear in the public API.\n- Existing constructs (LambdaFunctionConstruct, StaticSiteConstruct, DynamoDbTableConstruct, CognitoUserPoolConstruct) are\n NOT modified; their synthesized templates must not change (golden templates from cdkc T0).\n- Explicit AuthType on every endpoint (no default). Single-owner resource policy per function. Same-stack automatic OAC\n permissions only. Limited endpoint imports (no whole-function import). Existing S3 artifacts only (no FromAsset).\n Default log retention TWO_WEEKS. No customer-managed revision KMS key. Workload-neutral (Next.js, ASP.NET Core shim,\n Blazor Static SSR) with no workload-specific constructs.\n- GrantInvoke follows the revision-3 algorithm in §10.2 (account establishment E1/E2, Automatic vs ExternallyManaged).\n Never use Grant.AddToPrincipalOrResource or trust Grant.Success/AssertSuccess.\n- Amazon.CDK.Lib floor 2.274.0.\n\nRules for every implementation agent:\n- Implement only the claimed bead's scope. If the design is ambiguous or seems wrong, stop and record a blocker note on\n the bead (bd update \u003cid\u003e --append-notes ...) instead of changing the design.\n- Do not commit, push, open PRs, publish NuGet packages, or close GitHub issue #98 unless separately authorized by the maintainer.\n- Do not deploy to AWS except in the sandbox bead, and only with maintainer-provided non-production credentials.\n- Do not modify the Sharedale repository.\n- Validation gates (run from repo root): `dotnet restore LayeredCraft.Cdk.Constructs.slnx`, `dotnet build LayeredCraft.Cdk.Constructs.slnx -c Release`,\n `dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release` (Microsoft.Testing.Platform, see global.json); CI requires\n 80% coverage across net8.0–net11.0. Docs: `uv run mkdocs build --clean`. If Node \u003e24 prints jsii warnings, set\n JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=1.\n- Test conventions: xUnit v3, AwesomeAssertions, AutoFixture TestKit customizations, `[Collection(\"CDK Tests\")]`, Template.FromStack\n after constructs are added (see CLAUDE.md \"Testing Patterns\").\n- Close a bead only when its acceptance criteria are met; record validation evidence (commands run + results) in notes.\n\nFeature completion is gated by the \"Verify release acceptance criteria\" bead, which depends on the sandbox deployment bead.\nOptional bead T4a never blocks completion.\n","acceptance_criteria":"All required child beads closed, including the AWS sandbox release gate and the release acceptance verification bead; optional spike may be open or closed.","notes":"Agent workflow: find work with 'bd ready --parent cdkc-18e --exclude-type epic'; read 'bd show \u003cid\u003e' (description, acceptance, deps); claim with 'bd update \u003cid\u003e --claim' (or --status in_progress); record evidence with 'bd update \u003cid\u003e --append-notes \"...\"'; close with 'bd close \u003cid\u003e --reason \"...\"' only when acceptance criteria are met; then re-run bd ready. Never claim or close this epic directly: when all children are closed, the maintainer runs 'bd epic close-eligible'. Optional spike cdkc-18e.7 never blocks required work; close it with outcome A or B before epic closure. The feature is complete only after cdkc-18e.14 (which depends on the mandatory AWS sandbox gate cdkc-18e.13).","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":1,"issue_type":"epic","owner":"ncipollina@gmail.com","created_at":"2026-10-23T01:14:45Z","created_by":"Nick Cipollina","updated_at":"2026-10-27T20:08:16Z","closed_at":"2026-10-27T20:08:16Z","close_reason":"All children completed","external_ref":"gh-98","labels":["lambda-web-functions"],"dependency_count":0,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.2.7","title":"#109 HUMAN GATE: owner merges PR for #109","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:29Z","created_by":"claude","updated_at":"2026-11-24T02:33:29Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:29Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2.6","type":"blocks","created_at":"2026-11-24T02:33:44Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.2.6","title":"#109 P: PR review (targeted Codex)","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:28Z","created_by":"claude","updated_at":"2026-11-24T02:33:28Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:28Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2.5","type":"blocks","created_at":"2026-11-24T02:33:42Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4.5","title":"#111 HUMAN GATE: owner merges PR for #111","description":"Only the owner merges.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:29Z","created_by":"claude","updated_at":"2026-11-24T12:11:29Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.5","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:29Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.5","depends_on_id":"cdkc-2lh.4.4","type":"blocks","created_at":"2026-11-24T12:11:33Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4.4","title":"#111 P: PR review (targeted Codex)","description":"Owner 2026-11-24 authorized opening PRs for review.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:28Z","created_by":"claude","updated_at":"2026-11-24T12:11:28Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.4","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:28Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.4","depends_on_id":"cdkc-2lh.4.3","type":"blocks","created_at":"2026-11-24T12:11:32Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4.3","title":"#111 R: local review and final validation","description":"All gates on final commit; existing goldens unchanged.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:26Z","created_by":"claude","updated_at":"2026-11-24T12:11:26Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.3","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:26Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.3","depends_on_id":"cdkc-2lh.4.1","type":"blocks","created_at":"2026-11-24T12:11:30Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.3","depends_on_id":"cdkc-2lh.4.2","type":"blocks","created_at":"2026-11-24T12:11:31Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4.2","title":"#111 T: nav, README, docs index, testing docs, migration guide entry (Claude)","description":"Claude-owned shared docs for #111: mkdocs.yml nav, README, docs/index.md, docs/testing/index.md section, CLAUDE.md, migration guide new-construct entry.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:25Z","created_by":"claude","updated_at":"2026-11-24T12:11:25Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.2","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:25Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4.1","title":"#111 T: PrivateStaticAssetsConstruct + helpers, goldens, construct doc (OpenCode W4)","description":"OWNERSHIP may change (new files only): src/.../PrivateStaticAssetsConstruct.cs; Models/PrivateStaticAssetsConstructProps.cs (+ any new option types in Models/ prefixed PrivateStaticAssets*); Testing/PrivateStaticAssetsConstructAssertions.cs, PrivateStaticAssetsConstructPropsBuilder.cs; test/PrivateStaticAssetsConstructTests.cs, test/PrivateStaticAssetsGoldenTemplateTests.cs, test/Testing/PrivateStaticAssetsConstructTestingHelpersTests.cs, TestKit/Profiles/PrivateStaticAssetsConstructPropsProfile.cs; GoldenTemplates/private-static-assets-*.json (new); docs/constructs/private-static-assets.md (new). MUST NOT: any existing file. Worktree ../worktrees/cdk-constructs-111-static-assets, branch feat/v3-private-static-assets, baseline 53607ea.","notes":"W4 launched 2026-11-24T12:14Z. Same model. Brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w4-111-static-assets.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w4.log; session ses_df2865601ffeHKGOB21gCdBx0i; wrapper_pid 93123 opencode_pid 93178; worktree ../worktrees/cdk-constructs-111-static-assets branch feat/v3-private-static-assets baseline 53607ea.","status":"in_progress","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:24Z","created_by":"claude","updated_at":"2026-11-24T12:13:38Z","started_at":"2026-11-24T12:13:38Z","lease_expires_at":"2026-11-24T12:18:38Z","heartbeat_at":"2026-11-24T12:13:38Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.1","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:24Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3.5","title":"#110 HUMAN GATE: owner merges PR for #110","description":"Only the owner merges.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:18Z","created_by":"claude","updated_at":"2026-11-24T12:11:18Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.5","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:18Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.5","depends_on_id":"cdkc-2lh.3.4","type":"blocks","created_at":"2026-11-24T12:11:22Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3.4","title":"#110 P: PR review (targeted Codex)","description":"Owner 2026-11-24 authorized opening PRs for review. Request targeted Codex review; no Copilot.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:17Z","created_by":"claude","updated_at":"2026-11-24T12:11:17Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.4","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:17Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.4","depends_on_id":"cdkc-2lh.3.3","type":"blocks","created_at":"2026-11-24T12:11:21Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3.3","title":"#110 R: local review and final validation","description":"All gates on final commit: build 0 warn, tests net10/net11, goldens diff limited to U2/U4, coverage \u003e=80, actionlint n/a.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:15Z","created_by":"claude","updated_at":"2026-11-24T12:11:15Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.3","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:15Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.3","depends_on_id":"cdkc-2lh.3.1","type":"blocks","created_at":"2026-11-24T12:11:19Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.3","depends_on_id":"cdkc-2lh.3.2","type":"blocks","created_at":"2026-11-24T12:11:20Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3.2","title":"#110 T: migration guide (U2/U4 before/after), README/CLAUDE.md, design status (Claude)","description":"Claude-owned shared docs for #110: docs/migration/v3.md (new), mkdocs nav, README, CLAUDE.md, design doc rev 2 Accepted, .beads/issues.jsonl export.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:14Z","created_by":"claude","updated_at":"2026-11-24T12:11:14Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.2","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:14Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3.1","title":"#110 T: LambdaFunctionConstruct U1-U4, U7 + helpers, goldens, construct doc (OpenCode W3)","description":"OWNERSHIP may change: src/.../LambdaFunctionConstruct.cs; Models/LambdaFunctionConstructProps.cs, LambdaPermission.cs, new Models/LambdaPermissionTargets.cs; Testing/LambdaFunctionConstructAssertions.cs, LambdaFunctionConstructPropsBuilder.cs; test/LambdaFunctionConstructTests.cs; test/ExistingConstructsGoldenTemplateTests.cs (Lambda cases only); TestKit/Profiles/LambdaFunctionConstructPropsProfile.cs; test/Testing/TestingHelpersTests.cs (Lambda parts); GoldenTemplates/lambda-*.json (regenerate/add Lambda only); docs/constructs/lambda-function.md; docs/testing/index.md (Lambda section). MUST NOT: any other file (Claude owns README, docs/index.md, mkdocs.yml, CLAUDE.md, docs/designs/**, docs/migration/**, .beads/**, Directory.*.props, global.json, .github). Worktree ../worktrees/cdk-constructs-110-lambda, branch feat/v3-lambda-function-options, baseline 53607ea.","notes":"W3 launched 2026-11-24T12:13Z. OpenCode 1.19.3 openrouter/deepseek/deepseek-v4.1-flash. Brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w3-110-lambda.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w3.log (+.status/.stderr); session ses_df2866f8dffeIo4kojOeAFj1aD; wrapper_pid 92993 opencode_pid 93043; worktree ../worktrees/cdk-constructs-110-lambda branch feat/v3-lambda-function-options baseline 53607ea.","status":"in_progress","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:12Z","created_by":"claude","updated_at":"2026-11-24T12:13:37Z","started_at":"2026-11-24T12:13:36Z","lease_expires_at":"2026-11-24T12:18:36Z","heartbeat_at":"2026-11-24T12:13:36Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.1","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:12Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-hr6","title":"#114 Deferred: WebFunctionConstruct composition over AWS CDK Web Function L2","description":"GitHub https://github.com/LayeredCraft/cdk-constructs/issues/114. Owner 2026-11-24: keep existing WebFunctionConstruct for 3.0.0; separately tracked deferred investigation; does not block 3.0.0; no refactor or Sharedale modification authorized. Design doc §9 option C.","status":"deferred","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:09:39Z","created_by":"claude","updated_at":"2026-11-24T12:09:47Z","external_ref":"gh-114","labels":["deferred"],"dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.2.7","title":"#109 HUMAN GATE: owner merges PR for #109","notes":"Owner 2026-11-24: 'PR #113 is approved for my merge once all required CI checks are successful. Do not merge it yourself.' Owner merged PR #113 at 2026-11-24T12:06:52Z; merge commit 53607eae5b52399a56276a555c12628ca450054b verified on origin/main by Claude.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:29Z","created_by":"claude","updated_at":"2026-11-24T12:09:12Z","closed_at":"2026-11-24T12:09:12Z","close_reason":"Owner merged PR #113; merge commit 53607ea verified on origin/main","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:29Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2.6","type":"blocks","created_at":"2026-11-24T02:33:44Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.2.6","title":"#109 P: PR review (targeted Codex)","notes":"PR #113 (d8e7608). Codex review requested (comment 7121307583, focused); result: 'Didn't find any major issues' on d8e7608. CI: build/dotnet SUCCESS, pr-title validate SUCCESS, autolabel SUCCESS (labels breaking-change + type: chore), CodeQL js SUCCESS, csharp in progress at time of note. No Copilot requested.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:28Z","created_by":"claude","updated_at":"2026-11-24T03:42:34Z","closed_at":"2026-11-24T03:42:34Z","close_reason":"Codex: no findings; CI green","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:28Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2.5","type":"blocks","created_at":"2026-11-24T02:33:42Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.5","title":"#109 R: local review and final validation","notes":"Integration 77ac802 (central AutoFixture/NSubstitute/VSTest removal, CLAUDE.md test sections). Final validation on 77ac802 parents (clean tree, git clean -fdx): build Release 0 warn/0 err; dotnet test --solution -- --coverage: net10.0 +595, net11.0 +595, 1190 passed 0 failed; line coverage 94.5%, branch 86.3%; goldens byte-identical; no AutoFixture/NSubstitute/net8/net9 refs in src/test/.github/props. actionlint exit 0 (W1 tree). Release Drafter check: since v2.6.0 only #106 (type: chore) merged; breaking-change label exists -\u003e major -\u003e 3.0.0.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:27Z","created_by":"claude","updated_at":"2026-11-24T03:39:12Z","closed_at":"2026-11-24T03:39:12Z","close_reason":"All local gates pass on final commit","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:27Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:35Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.2","type":"blocks","created_at":"2026-11-24T02:33:37Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.3","type":"blocks","created_at":"2026-11-24T02:33:39Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.4","type":"blocks","created_at":"2026-11-24T02:33:41Z","created_by":"claude","metadata":"{}"}],"dependency_count":4,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.4","title":"#109 T: 3.0.0 design doc incl. WebFunctionConstruct vs CDK L2 decision record (Claude)","notes":"Design doc committed 32cef89 (docs/designs/v3-modernization.md, rev 1 Proposed): policy, upgrade-induced changes, versioning, U1-U4/U7, U6, WebFunctionConstruct vs CDK L2 decision record with synthesis spike evidence; recommends A for 3.0.0, proposes separate gated spike issue for C (needs owner approval). Owner approval of the design is a #109 acceptance item (open).","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:26Z","created_by":"claude","updated_at":"2026-11-24T03:39:10Z","closed_at":"2026-11-24T03:39:10Z","close_reason":"Design drafted and committed 32cef89; owner approval tracked on #109","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.4","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:26Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.4","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:40Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.3","title":"#109 T: Compono test-stack migration replacing AutoFixture/NSubstitute (OpenCode W2)","notes":"OWNERSHIP: may change test/LayeredCraft.Cdk.Constructs.Tests/** except GoldenTemplates/**, TestAssets/**, TestKit/Golden/**. Must not: src/**, Directory.*.props (Claude), global.json, .github, docs, README, CLAUDE.md. Worktree ../worktrees/cdk-constructs-w2-compono branch test/v3-compono baseline ab2483b; brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w2-compono.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w2.log\nW2 session ses_df496565affeRbmllFcBWcbts3. Observed reads: all required (AGENTS, SKILL, implement, testing, cross-repository, compono SKILL + xunit-v3/registrations/composition-model/patterns/diagnostics, CLAUDE.md). Round 1: f6f6ce2..0ab6d0b (profiles, per-construct migration, package removal), 595/TFM. Claude finding C1 (incidental values no longer generated) -\u003e correction-1: d90be14, 3e12fcc (MemorySize/Timeout/log levels generated via CompositionContext.DeriveSeed within valid ranges; documented 'Compono does not provide this because' optional members). Worker: 3x full suite 595/TFM. Merged 2526588.","status":"closed","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:24Z","created_by":"claude","updated_at":"2026-11-24T03:39:08Z","started_at":"2026-11-24T02:36:37Z","closed_at":"2026-11-24T03:39:08Z","close_reason":"Reviewed; merged 2526588; 595/TFM","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.3","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:24Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.3","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:38Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.2","title":"#109 T: workflows (devops-templates v11.2, action pins) + docs/CLAUDE.md/README (OpenCode W1)","notes":"OWNERSHIP: may change .github/workflows/*, README.md, CLAUDE.md (excluding testing sections), docs/** except docs/designs/**. Must not: src, test, props, global.json, release-drafter.yml, dependabot.yml. Worktree ../worktrees/cdk-constructs-w1-workflows branch ci/v3-workflows-docs baseline ab2483b; brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w1-workflows.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w1.log\nW1 session ses_df49637d7ffeeHlCYvnfVE26JR; OpenCode 1.19.3 / openrouter/deepseek/deepseek-v4.1-flash. Round 1 commits dd63def ci v11.2, 8fd2dd0 docs. Observed reads: all required paths. Worker validation: YAML parse (ruby), actionlint exit 0, greps clean. Review findings -\u003e correction-1 (same session): C1 blocking false 'L1-only' claims (CDK 2.278 ships L2) + add consumer type-name collision note; C2 blocking unverified F3006@2.278 claim, restore 2.274 wording; C3 SDK pin is contributor not consumer requirement; C4 publish-release comment consistency.\nCorrection-1 commits bb7c44d, 4164270 address C1-C4; Claude re-ran actionlint (exit 0); sample check confirmed. Integration follow-up (Claude): add IWebFunctionEndpoint (root namespace) to the collision note. Merged into chore/v3-modernization.","status":"closed","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:23Z","created_by":"claude","updated_at":"2026-11-24T02:40:44Z","started_at":"2026-11-24T02:36:37Z","closed_at":"2026-11-24T02:40:44Z","close_reason":"W1 reviewed, no blocking findings after correction-1; merged","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.2","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:23Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.2","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:36Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.1","title":"#109 T: foundation — SDK pin, net10/net11, dependency bumps, CDK 2.278 compile/jsii fixes (Claude)","notes":"Claude foundation on chore/v3-modernization (worktree ../worktrees/cdk-constructs-v3-modernization): ab2a58b fix FunctionUrlOptions/AddBehaviorOptions (jsii 2.278 required-member validation); ab2483b build! net10/net11, SDK 11.0.100, CDK 2.278.0 (+ file-local aliases for CDK's new same-named Web Function types), SourceLink 11.0.100, xunit.v3.mtp-v2 4.0.3, MS.NET.Test.Sdk 18.12.0, runner.visualstudio 4.0.1, Compono 1.4.0 central, VersionPrefix 3.0.0. Validation: build 0 warn/0 err; dotnet test --solution 595 passed per TFM (net10.0, net11.0); goldens byte-identical; baseline before: 595x4 TFMs.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:22Z","created_by":"claude","updated_at":"2026-11-24T02:36:35Z","closed_at":"2026-11-24T02:36:35Z","close_reason":"Foundation committed ab2483b; green; goldens unchanged","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.1","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:22Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":4,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.7","title":"HUMAN GATE: owner authorizes #110/#111 implementation (after #109 design review)","description":"Owner 2026-11-24: #110-#112 may not start until the #109 design and implementation are reviewed and the next phase is authorized.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:18Z","created_by":"claude","updated_at":"2026-11-24T02:33:18Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T02:33:18Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T02:33:20Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":2,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.7","title":"HUMAN GATE: owner authorizes #110/#111 implementation (after #109 design review)","description":"Owner 2026-11-24: #110-#112 may not start until the #109 design and implementation are reviewed and the next phase is authorized.","notes":"Owner 2026-11-24: 'I approve the proposed 3.0.0 design, including: .NET 10/11 only; updated dependencies and tooling; Compono-first tests; U1-U4 and U7 for LambdaFunctionConstruct; U6 as PrivateStaticAssetsConstruct; U7 accepting Code as an alternative to AssetPath, while preserving existing asset-based usage.' and 'I authorize implementation of: cdk-constructs #110 ... #111 ... Open PRs for my review, but do not merge, publish a stable package, deploy infrastructure, or modify Sharedale.'","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:18Z","created_by":"claude","updated_at":"2026-11-24T12:09:38Z","closed_at":"2026-11-24T12:09:38Z","close_reason":"Owner authorized #110/#111 implementation and approved the 3.0.0 design (2026-11-24)","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T02:33:18Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T02:33:20Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":2,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.6","title":"HUMAN GATE: owner publishes the v3.0.0 stable release","description":"After #112 downstream validation evidence. Publishing the GitHub release triggers publish-release.yaml (NuGet push).","acceptance_criteria":"Owner publishes; release URL + NuGet version recorded.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:25Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:25Z","labels":["human-gate","release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.6","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:25Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.6","depends_on_id":"cdkc-2lh.5","type":"blocks","created_at":"2026-11-24T01:27:31Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.5","title":"#112 3.0.0: downstream validation (Jedi Duel, Sharedale) and stable release","description":"https://github.com/LayeredCraft/cdk-constructs/issues/112 (authoritative). Throwaway-branch validation against the same 3.0.0-preview in both consumers; nothing merged downstream here.","acceptance_criteria":"See #112.","status":"open","priority":2,"issue_type":"feature","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:24Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:24Z","external_ref":"gh-112","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.5","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:24Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.5","depends_on_id":"cdkc-2lh.3","type":"blocks","created_at":"2026-11-24T01:27:29Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.5","depends_on_id":"cdkc-2lh.4","type":"blocks","created_at":"2026-11-24T01:27:30Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4","title":"#111 3.0.0: private static-assets construct (BPA, OAC, optional DNS, immutable deployment)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/111 (authoritative).","acceptance_criteria":"See #111.","status":"open","priority":2,"issue_type":"feature","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:22Z","external_ref":"gh-111","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:28Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3","title":"#110 3.0.0: LambdaFunctionConstruct U1 alias name, U2 alias-only default, U3 public alias, U4 scoped log policy, U7 S3 artifacts","description":"https://github.com/LayeredCraft/cdk-constructs/issues/110 (authoritative).","acceptance_criteria":"See #110.","status":"open","priority":2,"issue_type":"feature","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:21Z","external_ref":"gh-110","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:27Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.2","title":"#109 3.0.0: drop net8/net9, update all dependencies, SDK and workflows, Compono-first tests (+ design doc)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/109 (authoritative). Golden templates byte-identical; breaking-change label; supersedes Dependabot #101; first merge publishes 3.0.0-preview.N.","acceptance_criteria":"See #109.","status":"in_progress","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T02:33:21Z","started_at":"2026-11-24T02:33:21Z","lease_expires_at":"2026-11-24T02:38:21Z","heartbeat_at":"2026-11-24T02:33:21Z","external_ref":"gh-109","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh.1","type":"blocks","created_at":"2026-11-24T01:27:26Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":3,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4","title":"#111 3.0.0: private static-assets construct (BPA, OAC, optional DNS, immutable deployment)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/111 (authoritative).","acceptance_criteria":"See #111.","status":"in_progress","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T12:11:35Z","started_at":"2026-11-24T12:11:35Z","lease_expires_at":"2026-11-24T12:16:35Z","heartbeat_at":"2026-11-24T12:11:35Z","external_ref":"gh-111","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:28Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3","title":"#110 3.0.0: LambdaFunctionConstruct U1 alias name, U2 alias-only default, U3 public alias, U4 scoped log policy, U7 S3 artifacts","description":"https://github.com/LayeredCraft/cdk-constructs/issues/110 (authoritative).","acceptance_criteria":"See #110.","status":"in_progress","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T12:11:34Z","started_at":"2026-11-24T12:11:34Z","lease_expires_at":"2026-11-24T12:16:34Z","heartbeat_at":"2026-11-24T12:11:34Z","external_ref":"gh-110","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:27Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.2","title":"#109 3.0.0: drop net8/net9, update all dependencies, SDK and workflows, Compono-first tests (+ design doc)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/109 (authoritative). Golden templates byte-identical; breaking-change label; supersedes Dependabot #101; first merge publishes 3.0.0-preview.N.","acceptance_criteria":"See #109.","notes":"RESUME POINT 2026-11-24: PR #113 ready for owner review/merge (HUMAN GATE cdkc-2lh.2.7). Worktrees: ../worktrees/cdk-constructs-v3-modernization (chore/v3-modernization, integration), -w1-workflows, -w2-compono (both merged; remove after owner merge). Worker sessions W1 ses_df49637d7ffeeHlCYvnfVE26JR, W2 ses_df496565affeRbmllFcBWcbts3 (both exited). After merge: verify merge commit, confirm publish-preview produced 3.0.0-preview.N, export beads via jsonl in a follow-up (NO bd dolt push in this repo), remove worktrees. Owner decisions pending: design approval (#109 AC), WebFunction L2 spike scope, __dolt_remote_info__ branch deletion, #101 closure.\nPost-merge reconciliation 2026-11-24: merge 53607ea on origin/main (PR #113). Publish Preview run 45390407295 success: LayeredCraft.Cdk.Constructs.3.0.0-preview.30.nupkg 'Your package was pushed'. AC evidence: goldens byte-identical; 595/595 net10.0+net11.0 local and CI build/dotnet SUCCESS, coverage 94.5% line; no AutoFixture/NSubstitute; no prerelease deps; PR labeled breaking-change, chore! title, description separates .NET 8/9 removal from upgrade-induced changes; design approved by owner 2026-11-24 (issue comment 7131032469). __dolt_remote_info__ branch verified as artifact (single commit 424822c, DOLT_REMOTE.md pointing at deleted refs/dolt/data) and deleted under owner authorization 2026-11-24. Deferred #114 created for WebFunction L2.","status":"closed","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T12:09:37Z","started_at":"2026-11-24T02:33:21Z","closed_at":"2026-11-24T12:09:37Z","close_reason":"#109 accepted: merged 53607ea, 3.0.0-preview.30 published, all AC evidenced, design approved","external_ref":"gh-109","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh.1","type":"blocks","created_at":"2026-11-24T01:27:26Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":3,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.1","title":"HUMAN GATE: owner authorizes 3.0.0 implementation","description":"Planning authorized 2026-11-24 (issues/Beads only). Implementation needs the owner's separate explicit authorization.","acceptance_criteria":"Owner authorization quoted in a note.","notes":"Owner statement 2026-11-24: 'Authorize upstream Phase 1a — #109. Proceed with the modernization of LayeredCraft.Cdk.Constructs ... Create the PR for my review. I retain merge and publication authority.' and 'Do not begin #110, #111 or #112 implementation until the #109 design and implementation have been reviewed and the next phase is authorized.' Gate covers #109 only.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:19Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T02:33:17Z","closed_at":"2026-11-24T02:33:17Z","close_reason":"Owner authorized Phase 1a (#109 only) 2026-11-24; #110-#112 need a new gate","labels":["human-gate","release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.1","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:19Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh","title":"LayeredCraft.Cdk.Constructs 3.0.0 — .NET 10/11 modernization, LambdaFunctionConstruct options, private static assets","description":"GitHub milestone v3.0.0 https://github.com/LayeredCraft/cdk-constructs/milestone/1 ; epic issue https://github.com/LayeredCraft/cdk-constructs/issues/108 (authoritative scope; Beads = execution state). Owner decisions 2026-11-24: dogfooding is an architectural requirement; fix gaps upstream; don't compromise APIs to avoid breaking changes; drop net8/net9; update all deps/SDK/workflows to current stable; Compono-first tests; U2 default alias-only; include U7 S3 artifacts. Preview strategy: first code PR (#109) labeled breaking-change so all previews are 3.0.0-preview.N; fold Dependabot #101 into #109; stable publish only on owner authorization. Downstream consumers: ncipollina/jedi-duel #292 (tracking bead jedi-duel-aub.16), sharedale/sharedale #266.","acceptance_criteria":"All child issues closed with evidence; net10/net11 green; golden diffs only intentional; migration guide; downstream validation; owner publishes v3.0.0.","status":"open","priority":2,"issue_type":"epic","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:17Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:17Z","external_ref":"gh-108","labels":["release:v3.0.0"],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"cdkc-18e.18.3","title":"#104 O: Document companion log groups, ownership, regional limits, and AlreadyExists remedies","description":"Objective: consumer documentation and operational guidance for LayeredCraft/cdk-constructs#104, written against design\nrevision 5 (cdkc-18e.18.1). May run in parallel with cdkc-18e.18.2 once revision 5 is approved; reconcile with the final\ncode before the PR. (Design doc itself: cdkc-18e.18.1. XML docs: cdkc-18e.18.2.)\n\nFiles: docs/constructs/web-function.md (\"Execution Role and Logging\" ~L132-139, props table ~L95, reserved IDs ~L151,\ntesting helpers ~L369, limitations ~L387-388); docs/testing/index.md (Web Function assertions, if listed);\nCHANGELOG.md [Unreleased]; CLAUDE.md (WebFunctionConstructAssertions list + WebFunctionLogs notes).\n\nMust cover:\n1. Why two groups exist (in-Region staging -\u003e home-Region centralization) and why events look duplicated (same\n timestamps/messages; centralized stream name adds -{account}-{region}); storage billed for both.\n2. Retention: centralized default TWO_WEEKS, companion default THREE_DAYS, why the companion is short; how to set\n both (Create(retention, removalPolicy, companionRetention)); companion inherits the removal policy.\n3. Which group to query: centralized for normal querying/alarms; `.local` in the serving Region for lowest-latency Live Tail.\n4. Ownership table for Create / Use(logGroup) / Use(logGroup, companion) / ServiceDefault: who creates, owns,\n deletes each group; ServiceDefault = both service-created, unlimited retention, outlive the stack.\n5. Execution-role permissions: the verified resource types (CreateLogGroup -\u003e log-group ARN; CreateLogStream/\n PutLogEvents -\u003e log-stream ARN), the per-role matrix, and the exact caller-provided permissions from design rev 5\n §8.3 (stream write on {c}:log-stream:* in the home Region and {c}.local:log-stream:* in {R}; CreateLogGroup on\n {c}.local only where Lambda creates it, and on {c} for ServiceDefault). Without .local write, logs from that Region\n are not delivered. Immutable roles are caller-managed.\n6. Ordering: managed groups precede the revision; supplied same-stack groups too; imported/cross-stack groups must\n exist before deployment.\n7. Regional limits: PerRegion/MultiRegion companions in other Regions are service-created with no expiry and not\n managed; set retention there separately; W2 id and how to acknowledge (Annotations acknowledgeWarning /\n `cdk synth --strict` impact). W1 id for Use without companion.\n8. AlreadyExists when adopting a managed companion where Lambda already created `{name}.local` (e.g. preview.27 stacks\n that served traffic, ServiceDefault -\u003e Create, redeploy after stack deletion): remedies = delete the\n service-created group(s) before deploying, or move to a new centralized group name; no adoption support.\n9. Teardown: DESTROY removes both managed groups after the revision; RETAIN keeps both; remote-Region companions\n always remain.\n10. CHANGELOG: Added (companion group, companionRetention, Use companion, LocalLogGroup, assertions, warnings);\n Fixed (missing .local write grant for Use custom groups; missing ordering for same-stack supplied groups);\n Notes (two groups per Create, AlreadyExists, binary break vs 2.6.0-preview.27 requiring recompilation). Reference #104;\n claim no released version.\n","acceptance_criteria":"- Topics 1–10 covered, with code examples for Create(custom retentions) and Use(logGroup, companion).\n- Ownership table and permissions matrix present in docs/constructs/web-function.md.\n- W1/W2 ids documented verbatim.\n- CHANGELOG [Unreleased] entry references #104 and claims no released version.\n- Docs match the final implemented API names/defaults (cross-checked with cdkc-18e.18.2 before the PR).\n- `uv run mkdocs build --clean` passes.","notes":"Documentation complete per design revision 5. Updated docs/constructs/web-function.md (two-group behavior, duplicate events/storage, query guidance, Create/Use/ServiceDefault, ownership+retention table, ordering/teardown, execution-role and caller-provided permissions incl. log-group vs log-stream ARNs and minimizePolicies, Multi-Region/W2, verbatim W1/W2 IDs and acknowledgement, AlreadyExists remedies, public API, testing helpers). Updated docs/testing/index.md (ShouldHaveWebFunctionLogGroup, ShouldHaveCompanionLogGroup, ShouldHaveRevisionDependingOnLogGroups), CLAUDE.md, and CHANGELOG [Unreleased] Added/Fixed/Notes for #104 with no released version claimed. Validation: uv run mkdocs build --strict --clean passed with no errors/warnings (built in 1.20s); AWS logging/permissions docs and GitHub #104 links return 200; internal anchors verified in built HTML; examples cross-checked against WebFunctionLogs.cs/WebFunctionConstruct.cs; W1/W2 IDs exact; design revision 5 unchanged; no src/test/GoldenTemplates changes; git diff --check clean.","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-10-26T15:32:53Z","created_by":"Nick Cipollina","updated_at":"2026-10-26T22:57:33Z","started_at":"2026-10-26T22:52:52Z","closed_at":"2026-10-26T22:57:33Z","close_reason":"Documentation for #104 completed against design revision 5: two-group logging behavior, all three modes, ownership/retention and execution-role permission matrices, Multi-Region limits, verbatim W1/W2 warnings with acknowledgement, AlreadyExists remedies, public API/testing helpers, and CHANGELOG [Unreleased] entries. uv run mkdocs build --strict --clean passes; links, anchors, API examples, and warning IDs verified; no src/test/golden changes.","external_ref":"gh-104","labels":["docs","gh-104","lambda-web-functions","logging"],"dependencies":[{"issue_id":"cdkc-18e.18.3","depends_on_id":"cdkc-18e.18","type":"parent-child","created_at":"2026-10-26T15:32:53Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-18e.18.3","depends_on_id":"cdkc-18e.18.1","type":"blocks","created_at":"2026-10-26T15:32:53Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} diff --git a/CLAUDE.md b/CLAUDE.md index 5352a9f..fe1e161 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,12 +45,13 @@ dotnet add test/LayeredCraft.Cdk.Constructs.Tests/ package PackageName **LambdaFunctionConstruct** (`src/LayeredCraft.Cdk.Constructs/LambdaFunctionConstruct.cs`) - Main CDK construct that creates Lambda functions with comprehensive configuration -- Automatically creates IAM roles and policies with CloudWatch Logs permissions +- Automatically creates an IAM role whose logging policy is scoped to the construct's own log group (`logs:CreateLogStream`, `logs:PutLogEvents` on the log group ARN) +- Code from a local asset (`AssetPath`) or any `Code` source such as an S3 artifact (`Code.FromBucketV2`); exactly one is required - Supports configurable OpenTelemetry layer integration via AWS managed layer (disabled by default) - Configurable OTEL layer version and architecture (amd64/arm64) - Supports AWS Lambda SnapStart for improved cold start performance -- Creates function versions and aliases for deployment management -- Handles Lambda permissions for multiple targets (function, version, alias) +- Creates a version on every deployment and an alias (`AliasName`, default `live`); both are public (`Version`, `Alias`) +- Applies each `LambdaPermission` to its `Targets` (`LambdaPermissionTargets` flags; default alias only) **WebFunctionConstruct** (`src/LayeredCraft.Cdk.Constructs/WebFunctionConstruct.cs`) - Creates an AWS Lambda Web Function from a versioned S3 artifact (`WebFunctionCode.FromBucket`), plus its immutable revision, default endpoint, execution role (optional), logging (optional), and the function's **single** resource-based policy @@ -80,7 +81,7 @@ dotnet add test/LayeredCraft.Cdk.Constructs.Tests/ package PackageName **Configuration Models** (`src/LayeredCraft.Cdk.Constructs/Models/`) - `LambdaFunctionConstructProps`: Main configuration interface and record for Lambda construct -- `LambdaPermission`: Record for defining Lambda invocation permissions +- `LambdaPermission`: Record for defining Lambda invocation permissions; `Targets` (`LambdaPermissionTargets`) selects function, version and/or alias (default alias) - `StaticSiteConstructProps`: Configuration interface and record for static site construct - `DynamoDbTableConstructProps`: Configuration interface and record for DynamoDB table construct - `WebFunctionConstructProps`, `WebFunctionCode`/`WebFunctionCodeFromBucketOptions`/`WebFunctionCodeBucketPolicy`, `WebFunctionEndpointOptions`/`IWebFunctionEndpointOptions`, `WebFunctionEndpointAttributes`, `WebFunctionLogs`, `WebFunctionRuntime`, `WebFunctionAuthType`, `WebFunctionEndpointType`, `WebFunctionCallerPolicy`/`WebFunctionInvokeGrantOptions`, `WebFunctionOriginProps`/`WebFunctionOriginWithOacProps`/`WebFunctionOriginPermissions`: Web Function configuration (see `docs/constructs/web-function.md`) @@ -93,9 +94,9 @@ dotnet add test/LayeredCraft.Cdk.Constructs.Tests/ package PackageName 1. **Construct Pattern**: Uses AWS CDK construct pattern for reusable infrastructure components 2. **Interface + Record Pattern**: Props classes use both interface and record for flexibility and immutability -3. **Multi-Target Permissions**: Automatically applies permissions to function, version, and alias +3. **Least-Privilege Permissions**: Invocation permissions go on the alias by default; function and version targets are opt-in 4. **OpenTelemetry Integration**: Configurable support for AWS OTEL collector layer with version and architecture options -5. **Versioning Strategy**: Creates new versions on every deployment with "live" alias +5. **Versioning Strategy**: Creates new versions on every deployment with a configurable alias (default "live") ### Target Frameworks - .NET 10 and .NET 11 diff --git a/README.md b/README.md index 077414c..b92f7f2 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,7 @@ public class MyStack : Stack - **[DynamoDB Table Construct](https://layeredcraft.github.io/cdk-constructs/constructs/dynamodb-table)** - Production-ready DynamoDB tables with streams and indexes - **[Cognito User Pool Construct](https://layeredcraft.github.io/cdk-constructs/constructs/cognito-user-pool)** - Full-featured Cognito user pool with custom domains, OAuth clients, and branding - **[Testing Guide](https://layeredcraft.github.io/cdk-constructs/testing)** - Comprehensive testing utilities and patterns +- **[Upgrading to 3.0](https://layeredcraft.github.io/cdk-constructs/migration/v3)** - Breaking changes and migration steps from 2.x - **[Examples](https://layeredcraft.github.io/cdk-constructs/examples)** - Real-world usage examples and patterns - **[Web Function Workloads](https://layeredcraft.github.io/cdk-constructs/examples/web-functions)** - Next.js, ASP.NET Core, and Blazor Static SSR recipes diff --git a/docs/designs/v3-modernization.md b/docs/designs/v3-modernization.md index 23767a5..f95914e 100644 --- a/docs/designs/v3-modernization.md +++ b/docs/designs/v3-modernization.md @@ -2,7 +2,7 @@ | | | |---|---| -| **Status** | **Proposed** (revision 1, 2026-11-24), awaiting owner review. Approval of this document is an acceptance criterion of [#109](https://github.com/LayeredCraft/cdk-constructs/issues/109); it does not authorize [#110](https://github.com/LayeredCraft/cdk-constructs/issues/110), [#111](https://github.com/LayeredCraft/cdk-constructs/issues/111) or [#112](https://github.com/LayeredCraft/cdk-constructs/issues/112). | +| **Status** | **Accepted** (revision 2, 2026-11-24). The owner approved the design on 2026-11-24 ([#109 comment](https://github.com/LayeredCraft/cdk-constructs/issues/109#issuecomment-7131032469)) and authorized [#110](https://github.com/LayeredCraft/cdk-constructs/issues/110) and [#111](https://github.com/LayeredCraft/cdk-constructs/issues/111). [#112](https://github.com/LayeredCraft/cdk-constructs/issues/112) and the stable release remain owner-gated. | | **Milestone** | [v3.0.0](https://github.com/LayeredCraft/cdk-constructs/milestone/1), epic [#108](https://github.com/LayeredCraft/cdk-constructs/issues/108) | | **Authority** | This document is the design record for 3.0.0. No standalone ADRs are written. | | **Target frameworks** | `net10.0`, `net11.0` | @@ -279,16 +279,23 @@ on this construct): `StaticSiteConstruct`. 7. **Consumer test projects** — no change required; the library's own tests moved to Compono. -## 11. Open questions for the owner +## 11. Owner decisions (2026-11-24) -1. Approve this design (an acceptance criterion of #109). -2. Approve or decline the proposed Web Function L2 spike issue ([§9.5](#95-recommendation)). -3. Confirm U7's shape: `Code` as an alternative to `AssetPath` (additive) rather than replacing - `AssetPath`. -4. Confirm the working name `PrivateStaticAssetsConstruct` for U6. +1. The design is approved: .NET 10/11 only, updated dependencies and tooling, Compono-first tests, + U1–U4 and U7, U6. +2. `WebFunctionConstruct` keeps its current implementation for 3.0.0 (option A). The composition + investigation ([§9.5](#95-recommendation)) is tracked separately and deferred in + [#114](https://github.com/LayeredCraft/cdk-constructs/issues/114); it does not block 3.0.0, and no + Web Function refactor is authorized. +3. U7: `Code` is an alternative to `AssetPath`; existing asset-based usage is preserved. +4. U6 is named `PrivateStaticAssetsConstruct`. + +The §7 open question (exposing Lambda logging configuration) was not taken up in #110: no consumer +needs it, and adding it would need its own owner decision. ## 12. Revision history | Revision | Date | Change | |---|---|---| | 1 | 2026-11-24 | Initial proposal for owner review | +| 2 | 2026-11-24 | Accepted; owner decisions recorded in §11; Web Function investigation deferred to #114 | diff --git a/docs/migration/v3.md b/docs/migration/v3.md new file mode 100644 index 0000000..75656f5 --- /dev/null +++ b/docs/migration/v3.md @@ -0,0 +1,125 @@ +# Upgrading to 3.0 + +3.0.0 is a major release. This page lists every change that can affect an existing consumer, with +what to do about it. Changes are marked **intentional** (a deliberate behavior or support change) or +**upgrade-induced** (a consequence of the newer AWS CDK). + +## 1. .NET 8 and .NET 9 are no longer supported (intentional) + +The package targets `net10.0` and `net11.0` only. Projects on .NET 8 or 9 should stay on 2.x or move +to .NET 10 or 11. + +## 2. `Amazon.CDK.Lib` 2.278.0 or later (upgrade-induced) + +The minimum AWS CDK version is now 2.278.0. That release adds AWS's own Web Function L2 types to +`Amazon.CDK.AWS.Lambda`, and eight of their names match this library's: + +- `IWebFunctionEndpoint` (namespace `LayeredCraft.Cdk.Constructs`); +- `WebFunctionCode`, `WebFunctionRuntime`, `WebFunctionAuthType`, `WebFunctionEndpointType`, + `WebFunctionEndpointOptions`, `IWebFunctionEndpointOptions` and `WebFunctionEndpointAttributes` + (namespace `LayeredCraft.Cdk.Constructs.Models`). + +A file that imports both `Amazon.CDK.AWS.Lambda` and these namespaces gets `CS0104` (ambiguous +reference). Add file-local aliases for the types the file uses: + +```csharp +using Amazon.CDK.AWS.Lambda; +using LayeredCraft.Cdk.Constructs.Models; +using WebFunctionCode = LayeredCraft.Cdk.Constructs.Models.WebFunctionCode; +using WebFunctionRuntime = LayeredCraft.Cdk.Constructs.Models.WebFunctionRuntime; +``` + +This is a source-only change: synthesized templates are unchanged. + +## 3. `LambdaFunctionConstruct`: invocation permissions default to the alias only (intentional) + +Each `LambdaPermission` now has `Targets` (`LambdaPermissionTargets` flags: `Function`, `Version`, +`Alias`). The default is `Alias`. In 2.x every permission was added to the function, the current +version and the alias. + +At the default, the function and version `AWS::Lambda::Permission` resources disappear from the +template; the alias permission is unchanged (same logical ID): + +```json +// 2.x: three resources per permission +"…permissionfn0…": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Fn::GetAtt": ["…function…", "Arn"] }, … } }, +"…permissionver0…": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Ref": "…CurrentVersion…" }, … } }, +"…permissionalias0…": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Ref": "…alias…" }, … } } + +// 3.0 default: the alias permission only +"…permissionalias0…": { "Type": "AWS::Lambda::Permission", "Properties": { "FunctionName": { "Ref": "…alias…" }, … } } +``` + +Callers that invoke the alias (for example an Alexa skill or API Gateway integration pointing at the +alias ARN) need no change. To keep the 2.x output exactly, opt into all three targets: + +```csharp +new LambdaPermission +{ + Principal = "apigateway.amazonaws.com", + Action = "lambda:InvokeFunction", + SourceArn = apiArn, + Targets = LambdaPermissionTargets.Function | LambdaPermissionTargets.Version | LambdaPermissionTargets.Alias, +} +``` + +A permission with no targets is rejected at synthesis. + +## 4. `LambdaFunctionConstruct`: logging policy scoped to the construct's log group (intentional) + +The execution role's logging policy now allows only `logs:CreateLogStream` and `logs:PutLogEvents` +on the construct's own log group. `logs:CreateLogGroup`, `logs:TagResource` and the wildcard +log-group ARN are removed; the construct creates the log group itself. + +```json +// 2.x +{ "Action": ["logs:CreateLogStream", "logs:CreateLogGroup", "logs:TagResource"], "Effect": "Allow", + "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/my-function-dev*:*" }, +{ "Action": "logs:PutLogEvents", "Effect": "Allow", + "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/my-function-dev*:*:*" } + +// 3.0 +{ "Action": ["logs:CreateLogStream", "logs:PutLogEvents"], "Effect": "Allow", + "Resource": { "Fn::GetAtt": ["…loggroup…", "Arn"] } } +``` + +Deploying this updates the inline policy in place. If the function writes to other log groups, +add statements through `PolicyStatements`. + +## 5. New `LambdaFunctionConstruct` options (additive) + +- **`AliasName`** (default `live`): the alias name. The alias keeps its logical ID, but CloudFormation + replaces an alias whose name changes, so callers using the old alias ARN must be updated. +- **`Alias`** and **`Version`**: the alias (`IAlias`) and current version (`IVersion`) are public + properties. +- **`Code`**: any `Amazon.CDK.AWS.Lambda.Code` source as an alternative to `AssetPath`, for example an + immutable artifact in an existing bucket. Exactly one of `AssetPath` and `Code` must be set. + `AssetPath` is no longer `required` (it is `string?`); existing `AssetPath` usage is unchanged. + + ```csharp + var artifacts = Bucket.FromBucketName(this, "Artifacts", "my-artifacts-bucket"); + new LambdaFunctionConstruct(this, "Worker", new LambdaFunctionConstructProps + { + FunctionName = "worker", + FunctionSuffix = "dev", + Code = Code.FromBucketV2(artifacts, "worker/1.2.3/worker.zip"), + RoleName = "worker-dev-role", + PolicyName = "worker-dev-policy", + }); + ``` + + The construct grants the function no access to the bucket and adds no bucket permissions. + +`ILambdaFunctionConstructProps` gained `Code` and `AliasName`, and `AssetPath` became nullable. +Custom implementations of the interface need those members. + +**Testing helpers:** `LambdaFunctionConstructPropsBuilder` gained `WithAliasName` and `WithCode`, and +`WithApiGatewayPermission`/`WithAlexaPermission` take an optional `targets`. +`LambdaFunctionConstructAssertions.ShouldHaveLambdaPermissions` counts per selected target (default +alias only), and `ShouldHaveCloudWatchLogsPermissions` asserts the scoped policy; its `region` and +`account` parameters are kept for source compatibility and are ignored. + +## 6. Consumer test projects + +No change is required. The library's own tests moved from AutoFixture/NSubstitute to Compono; that +does not affect the shipped `Testing` helpers' dependencies. diff --git a/mkdocs.yml b/mkdocs.yml index 8cd6117..8c606b0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -112,6 +112,7 @@ nav: - Cognito User Pool: constructs/cognito-user-pool.md - Web Function: constructs/web-function.md - Testing: testing/index.md + - Upgrading to 3.0: migration/v3.md - Examples: - Overview: examples/index.md - Web Function Workloads: examples/web-functions.md From ab5cfa20a81b1f1de6f7cf8169e428e444baea64 Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Tue, 24 Nov 2026 07:47:50 -0500 Subject: [PATCH 4/4] chore(beads): drop the issues.jsonl export from this PR Beads now synchronize through the Dolt remote (refs/dolt/data); the JSONL export is no longer committed (see the Beads migration PR). Restores the file to main's version so this PR does not touch it. Co-Authored-By: Claude Opus 5.5 --- .beads/issues.jsonl | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 1a9dd33..6365b52 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -15,30 +15,19 @@ {"_type":"issue","id":"cdkc-18e.2","title":"T1: Add Web Function public models, options, and value validation","description":"Purpose: introduce the public model/value types every later bead consumes, with value validation. Design §8.1, §8.2, §8.3 (props + WebFunctionLogs), §8.4 (options/attributes), §8.5 (origin props), §8.7, §10.2 (WebFunctionCallerPolicy, WebFunctionInvokeGrantOptions), §14.\n\nDeliverables (namespace LayeredCraft.Cdk.Constructs.Models unless noted; follow the newest Cognito style: get-only interfaces + init-only sealed records, XML docs):\n- Enums: WebFunctionAuthType {IamAuth, ApplicationManaged}; WebFunctionEndpointType {HomeRegion, MultiRegion, PerRegion};\n WebFunctionCodeBucketPolicy {Automatic, ExternallyManaged}; WebFunctionOriginPermissions {Automatic, ExternallyManaged};\n WebFunctionCallerPolicy {Automatic, ExternallyManaged}.\n- WebFunctionRuntime (sealed; NodeJs24X = \"nodejs24.x\"; Of(string)).\n- WebFunctionCode (abstract, private protected ctor, closed hierarchy) with static FromBucket(IBucket, string key, WebFunctionCodeFromBucketOptions?)\n and WebFunctionCodeFromBucketOptions {ObjectVersion, BucketPolicy = Automatic}. The internal Bind contract to the construct is\n declared but bucket-policy wiring is implemented in the core-construct bead; keep the binding surface internal so FromAsset can be added later.\n- WebFunctionLogs (abstract, closed): Create(RetentionDays? retention = null [→ TWO_WEEKS], RemovalPolicy? [→ DESTROY]), Use(ILogGroup), ServiceDefault().\n- IWebFunctionConstructProps / WebFunctionConstructProps exactly per §8.3 (FunctionName, Code, Endpoint required; Runtime, EntryPoint,\n EnvironmentVariables, Timeout=30s, MaxConcurrencyPerEnvironment, Description, Role, Logs=Create(), ApplicationLogLevel, SystemLogLevel\n reusing Amazon.CDK.AWS.Lambda enums). NO EncryptionKey property.\n- IWebFunctionEndpointOptions / WebFunctionEndpointOptions (EndpointName=\"default\", required AuthType, EndpointType=HomeRegion, Regions, MaxEnvironments, RateLimit, Description).\n- WebFunctionEndpointAttributes (EndpointArn, DomainName, AuthType required; EndpointType=HomeRegion).\n- WebFunctionInvokeGrantOptions {CallerPolicy = Automatic}.\n- WebFunctionOriginProps (explicit members only: OriginId, OriginPath, CustomHeaders, ConnectionAttempts, ConnectionTimeout, ReadTimeout,\n KeepaliveTimeout, ResponseCompletionTimeout, OriginShieldEnabled, OriginShieldRegion) and sealed WebFunctionOriginWithOacProps : WebFunctionOriginProps\n {OriginAccessControl, Permissions = Automatic}. Must NOT expose ProtocolPolicy or OriginAccessControlId.\n- Internal validation helpers (local to new types; do not refactor shared code or existing constructs) for §14 value rules: FunctionName\n regex 1–64; EndpointName 1–64 [A-Za-z0-9_-]; Timeout 3–900 whole seconds; MaxConcurrencyPerEnvironment 1–128; MaxEnvironments 2–10000;\n RateLimit grid {0} ∪ 100..1000 step 100 ∪ 2000..10000 step 1000; Regions rules; env var key regex; EntryPoint relative/no \"..\";\n reserved AWS_LAMBDA_HTTP_ENDPOINT; EntryPoint vs AWS_LAMBDA_NODEJS_ENTRYPOINT conflict. Unresolved tokens (Token.IsUnresolved) are skipped, never rejected.\n Exception types per §14 (ArgumentException / ArgumentOutOfRangeException / InvalidOperationException).\n\nExpected files: src/LayeredCraft.Cdk.Constructs/Models/WebFunction*.cs (one type per file or small cohesive groups); test/.../WebFunctionModelsTests.cs (+ validation tests).\nExclusions: no constructs, no CloudFormation resources, no IBucket policy mutation yet, no testing-namespace helpers, no docs.\nEdge cases: FunctionName must allow tokens; nullable reference types enabled; records must be init-only (no Action\u003c\u003e mutation APIs anywhere).\n","acceptance_criteria":"- All listed public types exist with the exact names, members, and defaults in design §8.1–§8.5, §8.7 (no EncryptionKey), §10.2.\n- WebFunctionConstructProps cannot be constructed without FunctionName, Code, and Endpoint; WebFunctionEndpointOptions cannot be constructed without AuthType (compile-time `required`).\n- Every §14 value rule has a positive and negative unit test; tokens bypass literal validation (tested).\n- WebFunctionLogs.Create() defaults are TWO_WEEKS and DESTROY (tested).\n- No existing source file outside new WebFunction* files changed; existing golden templates still pass.\n- Validation gates pass.","notes":"T1 IMPLEMENTED (public WebFunction model/value types + §14 value validation). Not committed per task restriction.\n\nDELIVERABLES (src/LayeredCraft.Cdk.Constructs/Models/):\n- Enums: WebFunctionAuthType (IamAuth, ApplicationManaged), WebFunctionEndpointType (HomeRegion, MultiRegion, PerRegion), WebFunctionCodeBucketPolicy (Automatic, ExternallyManaged), WebFunctionOriginPermissions (Automatic, ExternallyManaged), WebFunctionCallerPolicy (Automatic, ExternallyManaged).\n- WebFunctionRuntime: sealed; NodeJs24X='nodejs24.x'; Of(string) escape hatch.\n- WebFunctionCode: abstract closed hierarchy (private protected ctor); static FromBucket(IBucket,string,WebFunctionCodeFromBucketOptions?); internal sealed WebFunctionCodeFromBucket. Options: WebFunctionCodeFromBucketOptions { ObjectVersion; BucketPolicy=Automatic }.\n- WebFunctionLogs: abstract closed; Create(RetentionDays?=TWO_WEEKS, RemovalPolicy?=DESTROY) / Use(ILogGroup) / ServiceDefault(); internal concrete subtypes.\n- IWebFunctionConstructProps + WebFunctionConstructProps: FunctionName/Code/Endpoint required; Runtime=NodeJs24X; EntryPoint; EnvironmentVariables; Timeout=30s; MaxConcurrencyPerEnvironment; Description; Role; Logs=Create(); ApplicationLogLevel; SystemLogLevel. NO EncryptionKey (deferred KMS, §8.7).\n- IWebFunctionEndpointOptions + WebFunctionEndpointOptions: EndpointName='default'; required AuthType (explicit selection, no default); EndpointType=HomeRegion; Regions=[]; MaxEnvironments; RateLimit; Description.\n- WebFunctionEndpointAttributes: required EndpointArn/DomainName/AuthType; EndpointType=HomeRegion.\n- WebFunctionInvokeGrantOptions: CallerPolicy=Automatic (explicit ownership contract).\n- WebFunctionOriginProps + sealed WebFunctionOriginWithOacProps (no ProtocolPolicy/OriginAccessControlId).\n- WebFunctionValidation (internal static): §14 helpers (FunctionName, EndpointName, Timeout, MaxConcurrencyPerEnvironment, MaxEnvironments, RateLimit grid, Regions, env var keys, env var map, EntryPoint incl reserved AWS_LAMBDA_HTTP_ENDPOINT and AWS_LAMBDA_NODEJS_ENTRYPOINT conflict). Token-aware: unresolved tokens (Token.IsUnresolved / Fn.Ref) bypass literal validation. Exceptions per §14 (ArgumentException / ArgumentOutOfRangeException).\n- [assembly: InternalsVisibleTo(\"LayeredCraft.Cdk.Constructs.Tests\")] added (new file) so validation is unit-testable.\n\nTESTS (test/LayeredCraft.Cdk.Constructs.Tests/): WebFunctionModelsTests.cs (defaults, required values, immutability, factory arg validation, crypto/logs/endpoint/origin surface) + WebFunctionValidationTests.cs (positive+negative per §14 rule, boundary values, token bypass). +110 tests/TFM ([Collection(\"CDK Tests\")], xUnit v3, AwesomeAssertions).\n\nCOMMANDS/RESULTS (JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=1):\n- dotnet build LayeredCraft.Cdk.Constructs.slnx -c Release -\u003e 0 warnings, 0 errors.\n- dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release -\u003e 1184 passed / 0 failed / 0 skipped (296 x net8.0/net9.0/net10.0/net11.0). Baseline was 744 (186x4).\n- 17 golden templates UNCHANGED; ExistingConstructsGoldenTemplateTests passed (zero diff). Goldens NOT regenerated.\n\nSCOPE: no constructs, no CFN resources, no IBucket policy mutation, no Testing helpers, no docs. No existing (pre-T1) source file modified; only new WebFunction*.cs files added. No new dependencies.\n\nINTENTIONAL DEVIATION (must be reported): design §8.2 declares internal 'abstract WebFunctionCodeConfig Bind(WebFunctionConstruct function)'. WebFunctionConstruct is created in T2 (cdkc-18e.3), so this internal seam cannot be declared in T1 without the type. Deferred Bind to T2 (which already owns the construct + bucket-policy wiring). Public contract unchanged. Recommendation: T2 declares the abstract Bind on WebFunctionCode and overrides it in WebFunctionCodeFromBucket. No other deviation from the approved design.","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":1,"issue_type":"task","assignee":"Nick Cipollina","owner":"ncipollina@gmail.com","created_at":"2026-10-23T01:14:47Z","created_by":"Nick Cipollina","updated_at":"2026-10-23T01:53:01Z","started_at":"2026-10-23T01:38:29Z","closed_at":"2026-10-23T01:53:01Z","close_reason":"Implemented T1: public WebFunction model/value types (auth/endpoint-type/bucket-policy/origin-permissions/caller-policy enums, WebFunctionRuntime, closed WebFunctionCode+FromBucket, closed WebFunctionLogs with Create/Use/ServiceDefault, IWebFunctionConstructProps+record, IWebFunctionEndpointOptions+record, EndpointAttributes, InvokeGrantOptions, OriginProps+WithOacProps) and internal token-aware WebFunctionValidation for all §14 value rules. Added 2 test files (WebFunctionModelsTests, WebFunctionValidationTests) = +110 tests/TFM. Build 0 warnings/0 errors; full suite 1184/1184 passed across net8.0/9.0/10.0/11.0; all 17 existing golden templates unchanged (goldens not regenerated). No existing source modified, no constructs/CFN resources/IBucket mutation/Testing helpers/docs added. Internal Bind(WebFunctionConstruct) seam intentionally deferred to T2 (cdkc-18e.3) because the construct type does not exist in T1; public contract unaffected.","external_ref":"gh-98","labels":["lambda-web-functions","models","t1"],"dependencies":[{"issue_id":"cdkc-18e.2","depends_on_id":"cdkc-18e","type":"parent-child","created_at":"2026-10-23T01:14:47Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-18e.2","depends_on_id":"cdkc-18e.1","type":"blocks","created_at":"2026-10-23T01:15:09Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-18e.1","title":"T0: Upgrade Amazon.CDK.Lib to 2.274.0 and add golden-template baseline for existing constructs","description":"Purpose: separate review checkpoint that raises the CDK floor and proves existing constructs are unchanged. Design §5.5, §12.4 (Enforcement), §13, §19 T0.\n\nREQUIRED ORDER (do not reorder):\n a. Confirm Directory.Packages.props still pins Amazon.CDK.Lib 2.273.0 (`dotnet list test/LayeredCraft.Cdk.Constructs.Tests package --include-transitive | grep Amazon.CDK.Lib`). If it is already 2.274.0, STOP and record a blocker: the baseline can no longer be produced from the original version.\n b. Generate the golden baseline ON 2.273.0, run the tests once to prove the baseline passes on 2.273.0, and record the 2.273.0 SHA-256 of every golden file in the bead notes.\n c. Only then change Amazon.CDK.Lib to 2.274.0, restore, and run the golden tests in COMPARE mode (regeneration env var unset) against the unchanged 2.273.0 baseline.\n d. If any template differs: do NOT regenerate, accept, or edit golden files; do NOT adjust normalization to hide the diff. Record the full diff (construct, resource, property, old → new) on this bead with `bd update \u003cid\u003e --append-notes`, set the bead to blocked (`bd update \u003cid\u003e --status blocked`), and report to the maintainer. Leave 2.274.0 in place only together with the failing tests and the recorded diff.\n\nScope:\n1. BEFORE changing the CDK version, add a test-only golden-template harness and capture golden templates on the current\n Amazon.CDK.Lib 2.273.0 for the four existing constructs (LambdaFunctionConstruct, StaticSiteConstruct, DynamoDbTableConstruct,\n CognitoUserPoolConstruct) in default and representative configurations (e.g. Lambda: OTEL on/off, URL on/off, permissions;\n StaticSite: with/without ApiDomain and alternate domains; DynamoDB: GSI/stream/TTL; Cognito: domain prefix vs custom domain with\n explicit IHostedZone/ICertificate, groups, resource servers). Avoid configurations that require HostedZone.FromLookup unless the\n test supplies context; prefer deterministic inputs (no random AutoFixture values in golden stacks).\n2. Bump Amazon.CDK.Lib to 2.274.0 in Directory.Packages.props (the only dependency change).\n3. Re-run: golden templates must be identical (zero diff).\n\nHarness requirements (reused by later beads):\n- Lives in the test project (e.g. test/LayeredCraft.Cdk.Constructs.Tests/TestKit/Golden/GoldenTemplate.cs) with golden files under\n test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/*.json (copied to output).\n- Compares the COMPLETE synthesized template (Template.FromStack(...).ToJSON()), normalized only for asset hashes / asset\n S3 keys and CDK metadata (aws:cdk:path, CDKMetadata resource, BootstrapVersion parameter/rule). Document normalization in code.\n- Regeneration only when an env var (e.g. UPDATE_GOLDEN_TEMPLATES=1) is set; default mode fails on any diff with a readable diff message.\n- Stable across all target frameworks (net8.0–net11.0).\n\nExpected files: Directory.Packages.props; test/.../TestKit/Golden/*; test/.../GoldenTemplates/*.json; test/.../ExistingConstructsGoldenTemplateTests.cs; test csproj (copy golden files).\n\nExclusions: no changes to src/ production code; no new constructs; no other package bumps.\nEdge cases: CDK 2.274 may change synthesized output of existing constructs (e.g. new defaults/feature flags). If any golden diff\nappears after the bump, STOP and record the diff on this bead as a blocker for maintainer review; do not \"fix\" by editing goldens.\nAlso record whether CDK default-rule validation still warns \"Unknown resource type AWS::Lambda::WebFunction\" on 2.274 (design §5.5).\n","acceptance_criteria":"- Golden templates for all four existing constructs were generated on Amazon.CDK.Lib 2.273.0 BEFORE the upgrade, passed on 2.273.0, and their SHA-256 hashes are recorded in notes.\n- After upgrading to 2.274.0 the comparison ran against that ORIGINAL baseline; golden-file hashes are unchanged (no regeneration or acceptance of snapshots).\n- If the upgrade changed any synthesized template, the bead is blocked with the recorded diff instead of closed.\n- Directory.Packages.props uses Amazon.CDK.Lib 2.274.0; no other dependency changed.\n- After the bump all golden tests pass with zero diff on every target framework.\n- Harness supports regeneration via env var and fails readably on diff by default.\n- Full validation gates (restore/build/test) pass; coverage threshold not reduced.\n- Notes record commands run, the golden file list, and the 2.274 CloudFormation-Validate warning observation.","notes":"T0 (cdkc-18e.1) implementation evidence\n\nFILES CHANGED / ADDED\n- Directory.Packages.props: Amazon.CDK.Lib 2.273.0 -\u003e 2.274.0 (ONLY dependency change; diff is a single line).\n- test/LayeredCraft.Cdk.Constructs.Tests/LayeredCraft.Cdk.Constructs.Tests.csproj: added \u003cNone Update=\"GoldenTemplates\\**\\*.json\"\u003e\u003cCopyToOutputDirectory\u003ePreserveNewest\u003c/CopyToOutputDirectory\u003e.\n- test/LayeredCraft.Cdk.Constructs.Tests/TestKit/Golden/GoldenTemplate.cs (new): golden harness.\n- test/LayeredCraft.Cdk.Constructs.Tests/ExistingConstructsGoldenTemplateTests.cs (new): 17 golden cases across the 4 existing constructs.\n- test/LayeredCraft.Cdk.Constructs.Tests/GoldenTemplates/*.json (new): 17 baseline golden templates.\nNo changes to src/ production code.\n\nGOLDEN COVERAGE ADDED (17 templates)\n- LambdaFunctionConstruct: lambda-default, lambda-otel-amd64, lambda-otel-arm64, lambda-permissions, lambda-url, lambda-otel-url-permissions.\n- StaticSiteConstruct: static-site-default, static-site-api, static-site-alternates, static-site-full.\n- DynamoDbTableConstruct: dynamodb-default, dynamodb-sort-key, dynamodb-gsi, dynamodb-stream-ttl.\n- CognitoUserPoolConstruct: cognito-prefix-domain, cognito-custom-domain, cognito-no-domain.\n\nNORMALIZATION (documented in GoldenTemplate.cs)\nCompares the COMPLETE Template.FromStack(...).ToJSON(). Only: BootstrapVersion parameter + CheckBootstrapVersion rule removed; AWS::CDK::Metadata resource removed; per-resource Metadata removed (aws:cdk:path / aws:asset:path); 64-hex asset content hashes / S3 keys replaced with \u003cASSET-HASH\u003e. No other keys altered. Regeneration only when UPDATE_GOLDEN_TEMPLATES is truthy; default mode fails with a readable -/+ line diff and never overwrites the golden. Golden files resolve from the source tree (walk-up to project dir) with an output-dir fallback.\n\nCOMMANDS + RESULTS\n- Baseline restore on 2.273.0: `dotnet restore LayeredCraft.Cdk.Constructs.slnx` OK.\n- Baseline test on 2.273.0: `dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release` -\u003e PASSED, 186 x net8.0/net9.0/net10.0/net11.0 (744 total), 0 failed, 0 skipped.\n- Golden files SHA-256 recorded, then upgrade to 2.274.0: `dotnet restore` OK; `dotnet list ... package` shows Amazon.CDK.Lib 2.274.0.\n- Post-upgrade test on 2.274.0 (against the ORIGINAL unchanged baseline): `dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release` -\u003e PASSED, 186 x4 TFMs (744 total), 0 failed, 0 skipped, ZERO golden diff on every TFM.\n- `shasum -a 256` before vs after: HASHES IDENTICAL (git tracked files unmodified by the run).\n\nBASELINE SHA-256 (identical before and after upgrade)\n66398f765a746fbe76268e666d0b492ddb8aadec9f2c4c76d17a25b6981cc769 cognito-custom-domain.json\n3396b3ceeedbd15de26119076158e3f1d0c8bc638f1a2be556e8d87fa8dce30b cognito-no-domain.json\nd18cc32d82a07f45534584a59f5431540883baf24d4bf7311a8ebe14c0ac5447 cognito-prefix-domain.json\n0d5397ab86db3dd0194fd4a6463ebd9461005c65f7964be0b617dfab9ade384e dynamodb-default.json\n07a9509cad0feb734c4c48eec96b4271a9e7c80acb7bdcf39a4bfb6de300e80d dynamodb-gsi.json\n1517371079a842ed38ac411b64e1c4093c80e6b896a77b0ca766762ef9e8412b dynamodb-sort-key.json\n5a500b2d5d2073d0747b355aa19aae5092d8754ad8e529776bebb91997679ab8 dynamodb-stream-ttl.json\nd1038f5889457882b0a50736446376b8a05d9430db99429b39bec989bcd3073b lambda-default.json\n796c2acdaca4bb90df681ddfcd05c5867ed3d0e8e05b0ec417d4cac067fed881 lambda-otel-amd64.json\n26f601e11cb042ed163cc595fb9131bbb1fddbaa0d6993ff6d3a1dfcf094c543 lambda-otel-arm64.json\n8aadb2159cc9febd6a73a7aa888ce470b3ef81eabc8c857174615166efd3b1ff lambda-otel-url-permissions.json\n648cd4745abb61979544466c171b72f7cc70b1e239ca43ec4a58c0e50151a9f6 lambda-permissions.json\nf9b86ad9c94ad499e373df8b97536e0525b4d0565c34539a75df0bd720308362 lambda-url.json\nb1bc13271470ae7136b8f085de3f584e51409acb69788764957079df1c3dd639 static-site-alternates.json\nb5e4a36010f31a7666cc0b9fb0ce94754ed046bb1a6cf3a993bf57d7b0970973 static-site-api.json\n1eb6acb8bd3579c9157ee82fe94e24727c35dafa91828dd7f5d9cc3359cc8f38 static-site-default.json\n63bfa34136f47b16bd7829efa91c8b66b1d000bb2096beeccf961e8ff5a09a04 static-site-full.json\n\n2.274 CLOUDFORMATION DEFAULT-RULE VALIDATION OBSERVATION\nStill warn-only (feature flag @aws-cdk/core:validateAgainstDefaultRules remains OFF by default). A temporary probe that synthesized a raw CfnResource of type AWS::Lambda::WebFunction emitted:\n WARNING Unknown resource type 'AWS::Lambda::WebFunction' (CloudFormation Validate) [CloudFormation-Validate::F3006]\n Set feature flag \"@aws-cdk/core:validateAgainstDefaultRules\" to true to turn these into errors.\nSo the unknown AWS::Lambda::WebFunction type is still only a warning (not an error) on 2.274. Note: the 2.274 assembly does now ship CfnWebFunction / CfnWebFunctionEndpoint / CfnWebFunctionRevision L1 types. The temporary probe file was removed and is not part of the deliverable.\n\nCOVERAGE\nsrc/ production code is unchanged, so the CI 80% coverage gate is unaffected.\n\nRESTRICTIONS HONORED\nNo src/ changes, no new constructs, no other dependency bumps, goldens not regenerated/adjusted, normalization not weakened, no commit/push/PR/deploy/publish.","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":1,"issue_type":"task","assignee":"Nick Cipollina","owner":"ncipollina@gmail.com","created_at":"2026-10-23T01:14:46Z","created_by":"Nick Cipollina","updated_at":"2026-10-23T01:32:51Z","started_at":"2026-10-23T01:23:53Z","closed_at":"2026-10-23T01:32:51Z","close_reason":"T0 complete: golden baseline (17 templates, 4 constructs) captured and verified on 2.273.0; Amazon.CDK.Lib bumped to 2.274.0 (only dependency change); goldens re-verified against unchanged baseline with zero diff and identical SHA-256 on all 4 TFMs; 186x4 tests pass. 2.274 default-rule validation still warns (not errors) on unknown AWS::Lambda::WebFunction.","external_ref":"gh-98","labels":["baseline","lambda-web-functions","t0"],"dependencies":[{"issue_id":"cdkc-18e.1","depends_on_id":"cdkc-18e","type":"parent-child","created_at":"2026-10-23T01:14:46Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-18e","title":"AWS Lambda Web Functions support — LayeredCraft.Cdk.Constructs","description":"Implement AWS Lambda Web Functions support in LayeredCraft.Cdk.Constructs per the APPROVED design (revision 3):\ndocs/designs/lambda-web-functions-integration.md (authoritative; GitHub issue #98).\n\nScope: new additive constructs WebFunctionConstruct, WebFunctionEndpointConstruct/IWebFunctionEndpoint, WebFunctionOrigin,\nWebFunctionCode.FromBucket, WebFunctionLogs, supporting models, Testing helpers, docs, and a mandatory AWS sandbox release gate.\n\nNon-negotiable constraints (design §2, §6, §8, §10.2, §12.4):\n- Hybrid composition; L3 over CDK L1 (CfnWebFunction/Revision/Endpoint, CfnResourcePolicy); no upstream alpha/L2 dependency;\n upstream L2 types never appear in the public API.\n- Existing constructs (LambdaFunctionConstruct, StaticSiteConstruct, DynamoDbTableConstruct, CognitoUserPoolConstruct) are\n NOT modified; their synthesized templates must not change (golden templates from cdkc T0).\n- Explicit AuthType on every endpoint (no default). Single-owner resource policy per function. Same-stack automatic OAC\n permissions only. Limited endpoint imports (no whole-function import). Existing S3 artifacts only (no FromAsset).\n Default log retention TWO_WEEKS. No customer-managed revision KMS key. Workload-neutral (Next.js, ASP.NET Core shim,\n Blazor Static SSR) with no workload-specific constructs.\n- GrantInvoke follows the revision-3 algorithm in §10.2 (account establishment E1/E2, Automatic vs ExternallyManaged).\n Never use Grant.AddToPrincipalOrResource or trust Grant.Success/AssertSuccess.\n- Amazon.CDK.Lib floor 2.274.0.\n\nRules for every implementation agent:\n- Implement only the claimed bead's scope. If the design is ambiguous or seems wrong, stop and record a blocker note on\n the bead (bd update \u003cid\u003e --append-notes ...) instead of changing the design.\n- Do not commit, push, open PRs, publish NuGet packages, or close GitHub issue #98 unless separately authorized by the maintainer.\n- Do not deploy to AWS except in the sandbox bead, and only with maintainer-provided non-production credentials.\n- Do not modify the Sharedale repository.\n- Validation gates (run from repo root): `dotnet restore LayeredCraft.Cdk.Constructs.slnx`, `dotnet build LayeredCraft.Cdk.Constructs.slnx -c Release`,\n `dotnet test --solution LayeredCraft.Cdk.Constructs.slnx -c Release` (Microsoft.Testing.Platform, see global.json); CI requires\n 80% coverage across net8.0–net11.0. Docs: `uv run mkdocs build --clean`. If Node \u003e24 prints jsii warnings, set\n JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=1.\n- Test conventions: xUnit v3, AwesomeAssertions, AutoFixture TestKit customizations, `[Collection(\"CDK Tests\")]`, Template.FromStack\n after constructs are added (see CLAUDE.md \"Testing Patterns\").\n- Close a bead only when its acceptance criteria are met; record validation evidence (commands run + results) in notes.\n\nFeature completion is gated by the \"Verify release acceptance criteria\" bead, which depends on the sandbox deployment bead.\nOptional bead T4a never blocks completion.\n","acceptance_criteria":"All required child beads closed, including the AWS sandbox release gate and the release acceptance verification bead; optional spike may be open or closed.","notes":"Agent workflow: find work with 'bd ready --parent cdkc-18e --exclude-type epic'; read 'bd show \u003cid\u003e' (description, acceptance, deps); claim with 'bd update \u003cid\u003e --claim' (or --status in_progress); record evidence with 'bd update \u003cid\u003e --append-notes \"...\"'; close with 'bd close \u003cid\u003e --reason \"...\"' only when acceptance criteria are met; then re-run bd ready. Never claim or close this epic directly: when all children are closed, the maintainer runs 'bd epic close-eligible'. Optional spike cdkc-18e.7 never blocks required work; close it with outcome A or B before epic closure. The feature is complete only after cdkc-18e.14 (which depends on the mandatory AWS sandbox gate cdkc-18e.13).","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":1,"issue_type":"epic","owner":"ncipollina@gmail.com","created_at":"2026-10-23T01:14:45Z","created_by":"Nick Cipollina","updated_at":"2026-10-27T20:08:16Z","closed_at":"2026-10-27T20:08:16Z","close_reason":"All children completed","external_ref":"gh-98","labels":["lambda-web-functions"],"dependency_count":0,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4.5","title":"#111 HUMAN GATE: owner merges PR for #111","description":"Only the owner merges.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:29Z","created_by":"claude","updated_at":"2026-11-24T12:11:29Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.5","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:29Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.5","depends_on_id":"cdkc-2lh.4.4","type":"blocks","created_at":"2026-11-24T12:11:33Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4.4","title":"#111 P: PR review (targeted Codex)","description":"Owner 2026-11-24 authorized opening PRs for review.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:28Z","created_by":"claude","updated_at":"2026-11-24T12:11:28Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.4","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:28Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.4","depends_on_id":"cdkc-2lh.4.3","type":"blocks","created_at":"2026-11-24T12:11:32Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4.3","title":"#111 R: local review and final validation","description":"All gates on final commit; existing goldens unchanged.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:26Z","created_by":"claude","updated_at":"2026-11-24T12:11:26Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.3","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:26Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.3","depends_on_id":"cdkc-2lh.4.1","type":"blocks","created_at":"2026-11-24T12:11:30Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.4.3","depends_on_id":"cdkc-2lh.4.2","type":"blocks","created_at":"2026-11-24T12:11:31Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4.2","title":"#111 T: nav, README, docs index, testing docs, migration guide entry (Claude)","description":"Claude-owned shared docs for #111: mkdocs.yml nav, README, docs/index.md, docs/testing/index.md section, CLAUDE.md, migration guide new-construct entry.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:25Z","created_by":"claude","updated_at":"2026-11-24T12:11:25Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.2","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:25Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4.1","title":"#111 T: PrivateStaticAssetsConstruct + helpers, goldens, construct doc (OpenCode W4)","description":"OWNERSHIP may change (new files only): src/.../PrivateStaticAssetsConstruct.cs; Models/PrivateStaticAssetsConstructProps.cs (+ any new option types in Models/ prefixed PrivateStaticAssets*); Testing/PrivateStaticAssetsConstructAssertions.cs, PrivateStaticAssetsConstructPropsBuilder.cs; test/PrivateStaticAssetsConstructTests.cs, test/PrivateStaticAssetsGoldenTemplateTests.cs, test/Testing/PrivateStaticAssetsConstructTestingHelpersTests.cs, TestKit/Profiles/PrivateStaticAssetsConstructPropsProfile.cs; GoldenTemplates/private-static-assets-*.json (new); docs/constructs/private-static-assets.md (new). MUST NOT: any existing file. Worktree ../worktrees/cdk-constructs-111-static-assets, branch feat/v3-private-static-assets, baseline 53607ea.","notes":"W4 launched 2026-11-24T12:14Z. Same model. Brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w4-111-static-assets.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w4.log; session ses_df2865601ffeHKGOB21gCdBx0i; wrapper_pid 93123 opencode_pid 93178; worktree ../worktrees/cdk-constructs-111-static-assets branch feat/v3-private-static-assets baseline 53607ea.","status":"in_progress","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:24Z","created_by":"claude","updated_at":"2026-11-24T12:13:38Z","started_at":"2026-11-24T12:13:38Z","lease_expires_at":"2026-11-24T12:18:38Z","heartbeat_at":"2026-11-24T12:13:38Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4.1","depends_on_id":"cdkc-2lh.4","type":"parent-child","created_at":"2026-11-24T12:11:24Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3.5","title":"#110 HUMAN GATE: owner merges PR for #110","description":"Only the owner merges.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:18Z","created_by":"claude","updated_at":"2026-11-24T12:11:18Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.5","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:18Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.5","depends_on_id":"cdkc-2lh.3.4","type":"blocks","created_at":"2026-11-24T12:11:22Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3.4","title":"#110 P: PR review (targeted Codex)","description":"Owner 2026-11-24 authorized opening PRs for review. Request targeted Codex review; no Copilot.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:17Z","created_by":"claude","updated_at":"2026-11-24T12:11:17Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.4","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:17Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.4","depends_on_id":"cdkc-2lh.3.3","type":"blocks","created_at":"2026-11-24T12:11:21Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3.3","title":"#110 R: local review and final validation","description":"All gates on final commit: build 0 warn, tests net10/net11, goldens diff limited to U2/U4, coverage \u003e=80, actionlint n/a.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:15Z","created_by":"claude","updated_at":"2026-11-24T12:11:15Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.3","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:15Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.3","depends_on_id":"cdkc-2lh.3.1","type":"blocks","created_at":"2026-11-24T12:11:19Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.3.3","depends_on_id":"cdkc-2lh.3.2","type":"blocks","created_at":"2026-11-24T12:11:20Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3.2","title":"#110 T: migration guide (U2/U4 before/after), README/CLAUDE.md, design status (Claude)","description":"Claude-owned shared docs for #110: docs/migration/v3.md (new), mkdocs nav, README, CLAUDE.md, design doc rev 2 Accepted, .beads/issues.jsonl export.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:14Z","created_by":"claude","updated_at":"2026-11-24T12:11:14Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.2","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:14Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3.1","title":"#110 T: LambdaFunctionConstruct U1-U4, U7 + helpers, goldens, construct doc (OpenCode W3)","description":"OWNERSHIP may change: src/.../LambdaFunctionConstruct.cs; Models/LambdaFunctionConstructProps.cs, LambdaPermission.cs, new Models/LambdaPermissionTargets.cs; Testing/LambdaFunctionConstructAssertions.cs, LambdaFunctionConstructPropsBuilder.cs; test/LambdaFunctionConstructTests.cs; test/ExistingConstructsGoldenTemplateTests.cs (Lambda cases only); TestKit/Profiles/LambdaFunctionConstructPropsProfile.cs; test/Testing/TestingHelpersTests.cs (Lambda parts); GoldenTemplates/lambda-*.json (regenerate/add Lambda only); docs/constructs/lambda-function.md; docs/testing/index.md (Lambda section). MUST NOT: any other file (Claude owns README, docs/index.md, mkdocs.yml, CLAUDE.md, docs/designs/**, docs/migration/**, .beads/**, Directory.*.props, global.json, .github). Worktree ../worktrees/cdk-constructs-110-lambda, branch feat/v3-lambda-function-options, baseline 53607ea.","notes":"W3 launched 2026-11-24T12:13Z. OpenCode 1.19.3 openrouter/deepseek/deepseek-v4.1-flash. Brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w3-110-lambda.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w3.log (+.status/.stderr); session ses_df2866f8dffeIo4kojOeAFj1aD; wrapper_pid 92993 opencode_pid 93043; worktree ../worktrees/cdk-constructs-110-lambda branch feat/v3-lambda-function-options baseline 53607ea.","status":"in_progress","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:11:12Z","created_by":"claude","updated_at":"2026-11-24T12:13:37Z","started_at":"2026-11-24T12:13:36Z","lease_expires_at":"2026-11-24T12:18:36Z","heartbeat_at":"2026-11-24T12:13:36Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3.1","depends_on_id":"cdkc-2lh.3","type":"parent-child","created_at":"2026-11-24T12:11:12Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-hr6","title":"#114 Deferred: WebFunctionConstruct composition over AWS CDK Web Function L2","description":"GitHub https://github.com/LayeredCraft/cdk-constructs/issues/114. Owner 2026-11-24: keep existing WebFunctionConstruct for 3.0.0; separately tracked deferred investigation; does not block 3.0.0; no refactor or Sharedale modification authorized. Design doc §9 option C.","status":"deferred","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T12:09:39Z","created_by":"claude","updated_at":"2026-11-24T12:09:47Z","external_ref":"gh-114","labels":["deferred"],"dependency_count":0,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.2.7","title":"#109 HUMAN GATE: owner merges PR for #109","notes":"Owner 2026-11-24: 'PR #113 is approved for my merge once all required CI checks are successful. Do not merge it yourself.' Owner merged PR #113 at 2026-11-24T12:06:52Z; merge commit 53607eae5b52399a56276a555c12628ca450054b verified on origin/main by Claude.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:29Z","created_by":"claude","updated_at":"2026-11-24T12:09:12Z","closed_at":"2026-11-24T12:09:12Z","close_reason":"Owner merged PR #113; merge commit 53607ea verified on origin/main","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:29Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2.6","type":"blocks","created_at":"2026-11-24T02:33:44Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.2.6","title":"#109 P: PR review (targeted Codex)","notes":"PR #113 (d8e7608). Codex review requested (comment 7121307583, focused); result: 'Didn't find any major issues' on d8e7608. CI: build/dotnet SUCCESS, pr-title validate SUCCESS, autolabel SUCCESS (labels breaking-change + type: chore), CodeQL js SUCCESS, csharp in progress at time of note. No Copilot requested.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:28Z","created_by":"claude","updated_at":"2026-11-24T03:42:34Z","closed_at":"2026-11-24T03:42:34Z","close_reason":"Codex: no findings; CI green","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:28Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2.5","type":"blocks","created_at":"2026-11-24T02:33:42Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.2.7","title":"#109 HUMAN GATE: owner merges PR for #109","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:29Z","created_by":"claude","updated_at":"2026-11-24T02:33:29Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:29Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.7","depends_on_id":"cdkc-2lh.2.6","type":"blocks","created_at":"2026-11-24T02:33:44Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.2.6","title":"#109 P: PR review (targeted Codex)","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:28Z","created_by":"claude","updated_at":"2026-11-24T02:33:28Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:28Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.6","depends_on_id":"cdkc-2lh.2.5","type":"blocks","created_at":"2026-11-24T02:33:42Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.5","title":"#109 R: local review and final validation","notes":"Integration 77ac802 (central AutoFixture/NSubstitute/VSTest removal, CLAUDE.md test sections). Final validation on 77ac802 parents (clean tree, git clean -fdx): build Release 0 warn/0 err; dotnet test --solution -- --coverage: net10.0 +595, net11.0 +595, 1190 passed 0 failed; line coverage 94.5%, branch 86.3%; goldens byte-identical; no AutoFixture/NSubstitute/net8/net9 refs in src/test/.github/props. actionlint exit 0 (W1 tree). Release Drafter check: since v2.6.0 only #106 (type: chore) merged; breaking-change label exists -\u003e major -\u003e 3.0.0.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:27Z","created_by":"claude","updated_at":"2026-11-24T03:39:12Z","closed_at":"2026-11-24T03:39:12Z","close_reason":"All local gates pass on final commit","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:27Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:35Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.2","type":"blocks","created_at":"2026-11-24T02:33:37Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.3","type":"blocks","created_at":"2026-11-24T02:33:39Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.5","depends_on_id":"cdkc-2lh.2.4","type":"blocks","created_at":"2026-11-24T02:33:41Z","created_by":"claude","metadata":"{}"}],"dependency_count":4,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.4","title":"#109 T: 3.0.0 design doc incl. WebFunctionConstruct vs CDK L2 decision record (Claude)","notes":"Design doc committed 32cef89 (docs/designs/v3-modernization.md, rev 1 Proposed): policy, upgrade-induced changes, versioning, U1-U4/U7, U6, WebFunctionConstruct vs CDK L2 decision record with synthesis spike evidence; recommends A for 3.0.0, proposes separate gated spike issue for C (needs owner approval). Owner approval of the design is a #109 acceptance item (open).","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:26Z","created_by":"claude","updated_at":"2026-11-24T03:39:10Z","closed_at":"2026-11-24T03:39:10Z","close_reason":"Design drafted and committed 32cef89; owner approval tracked on #109","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.4","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:26Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.4","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:40Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.3","title":"#109 T: Compono test-stack migration replacing AutoFixture/NSubstitute (OpenCode W2)","notes":"OWNERSHIP: may change test/LayeredCraft.Cdk.Constructs.Tests/** except GoldenTemplates/**, TestAssets/**, TestKit/Golden/**. Must not: src/**, Directory.*.props (Claude), global.json, .github, docs, README, CLAUDE.md. Worktree ../worktrees/cdk-constructs-w2-compono branch test/v3-compono baseline ab2483b; brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w2-compono.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w2.log\nW2 session ses_df496565affeRbmllFcBWcbts3. Observed reads: all required (AGENTS, SKILL, implement, testing, cross-repository, compono SKILL + xunit-v3/registrations/composition-model/patterns/diagnostics, CLAUDE.md). Round 1: f6f6ce2..0ab6d0b (profiles, per-construct migration, package removal), 595/TFM. Claude finding C1 (incidental values no longer generated) -\u003e correction-1: d90be14, 3e12fcc (MemorySize/Timeout/log levels generated via CompositionContext.DeriveSeed within valid ranges; documented 'Compono does not provide this because' optional members). Worker: 3x full suite 595/TFM. Merged 2526588.","status":"closed","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:24Z","created_by":"claude","updated_at":"2026-11-24T03:39:08Z","started_at":"2026-11-24T02:36:37Z","closed_at":"2026-11-24T03:39:08Z","close_reason":"Reviewed; merged 2526588; 595/TFM","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.3","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:24Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.3","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:38Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.2","title":"#109 T: workflows (devops-templates v11.2, action pins) + docs/CLAUDE.md/README (OpenCode W1)","notes":"OWNERSHIP: may change .github/workflows/*, README.md, CLAUDE.md (excluding testing sections), docs/** except docs/designs/**. Must not: src, test, props, global.json, release-drafter.yml, dependabot.yml. Worktree ../worktrees/cdk-constructs-w1-workflows branch ci/v3-workflows-docs baseline ab2483b; brief /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/brief-w1-workflows.md; log /private/tmp/claude-501/-Users-ncipollina-source-repos-ncipollina-jedi-duel/ff5c8c05-e7c5-46dd-80db-44e46f5c7f53/scratchpad/v3/w1.log\nW1 session ses_df49637d7ffeeHlCYvnfVE26JR; OpenCode 1.19.3 / openrouter/deepseek/deepseek-v4.1-flash. Round 1 commits dd63def ci v11.2, 8fd2dd0 docs. Observed reads: all required paths. Worker validation: YAML parse (ruby), actionlint exit 0, greps clean. Review findings -\u003e correction-1 (same session): C1 blocking false 'L1-only' claims (CDK 2.278 ships L2) + add consumer type-name collision note; C2 blocking unverified F3006@2.278 claim, restore 2.274 wording; C3 SDK pin is contributor not consumer requirement; C4 publish-release comment consistency.\nCorrection-1 commits bb7c44d, 4164270 address C1-C4; Claude re-ran actionlint (exit 0); sample check confirmed. Integration follow-up (Claude): add IWebFunctionEndpoint (root namespace) to the collision note. Merged into chore/v3-modernization.","status":"closed","priority":2,"issue_type":"task","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:23Z","created_by":"claude","updated_at":"2026-11-24T02:40:44Z","started_at":"2026-11-24T02:36:37Z","closed_at":"2026-11-24T02:40:44Z","close_reason":"W1 reviewed, no blocking findings after correction-1; merged","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.2","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:23Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.2.2","depends_on_id":"cdkc-2lh.2.1","type":"blocks","created_at":"2026-11-24T02:33:36Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.2.1","title":"#109 T: foundation — SDK pin, net10/net11, dependency bumps, CDK 2.278 compile/jsii fixes (Claude)","notes":"Claude foundation on chore/v3-modernization (worktree ../worktrees/cdk-constructs-v3-modernization): ab2a58b fix FunctionUrlOptions/AddBehaviorOptions (jsii 2.278 required-member validation); ab2483b build! net10/net11, SDK 11.0.100, CDK 2.278.0 (+ file-local aliases for CDK's new same-named Web Function types), SourceLink 11.0.100, xunit.v3.mtp-v2 4.0.3, MS.NET.Test.Sdk 18.12.0, runner.visualstudio 4.0.1, Compono 1.4.0 central, VersionPrefix 3.0.0. Validation: build 0 warn/0 err; dotnet test --solution 595 passed per TFM (net10.0, net11.0); goldens byte-identical; baseline before: 595x4 TFMs.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:22Z","created_by":"claude","updated_at":"2026-11-24T02:36:35Z","closed_at":"2026-11-24T02:36:35Z","close_reason":"Foundation committed ab2483b; green; goldens unchanged","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2.1","depends_on_id":"cdkc-2lh.2","type":"parent-child","created_at":"2026-11-24T02:33:22Z","created_by":"claude","metadata":"{}"}],"dependency_count":0,"dependent_count":4,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.7","title":"HUMAN GATE: owner authorizes #110/#111 implementation (after #109 design review)","description":"Owner 2026-11-24: #110-#112 may not start until the #109 design and implementation are reviewed and the next phase is authorized.","notes":"Owner 2026-11-24: 'I approve the proposed 3.0.0 design, including: .NET 10/11 only; updated dependencies and tooling; Compono-first tests; U1-U4 and U7 for LambdaFunctionConstruct; U6 as PrivateStaticAssetsConstruct; U7 accepting Code as an alternative to AssetPath, while preserving existing asset-based usage.' and 'I authorize implementation of: cdk-constructs #110 ... #111 ... Open PRs for my review, but do not merge, publish a stable package, deploy infrastructure, or modify Sharedale.'","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:18Z","created_by":"claude","updated_at":"2026-11-24T12:09:38Z","closed_at":"2026-11-24T12:09:38Z","close_reason":"Owner authorized #110/#111 implementation and approved the 3.0.0 design (2026-11-24)","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T02:33:18Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T02:33:20Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":2,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.7","title":"HUMAN GATE: owner authorizes #110/#111 implementation (after #109 design review)","description":"Owner 2026-11-24: #110-#112 may not start until the #109 design and implementation are reviewed and the next phase is authorized.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T02:33:18Z","created_by":"claude","updated_at":"2026-11-24T02:33:18Z","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T02:33:18Z","created_by":"claude","metadata":"{}"},{"issue_id":"cdkc-2lh.7","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T02:33:20Z","created_by":"claude","metadata":"{}"}],"dependency_count":1,"dependent_count":2,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.6","title":"HUMAN GATE: owner publishes the v3.0.0 stable release","description":"After #112 downstream validation evidence. Publishing the GitHub release triggers publish-release.yaml (NuGet push).","acceptance_criteria":"Owner publishes; release URL + NuGet version recorded.","status":"open","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:25Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:25Z","labels":["human-gate","release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.6","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:25Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.6","depends_on_id":"cdkc-2lh.5","type":"blocks","created_at":"2026-11-24T01:27:31Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.5","title":"#112 3.0.0: downstream validation (Jedi Duel, Sharedale) and stable release","description":"https://github.com/LayeredCraft/cdk-constructs/issues/112 (authoritative). Throwaway-branch validation against the same 3.0.0-preview in both consumers; nothing merged downstream here.","acceptance_criteria":"See #112.","status":"open","priority":2,"issue_type":"feature","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:24Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:24Z","external_ref":"gh-112","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.5","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:24Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.5","depends_on_id":"cdkc-2lh.3","type":"blocks","created_at":"2026-11-24T01:27:29Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.5","depends_on_id":"cdkc-2lh.4","type":"blocks","created_at":"2026-11-24T01:27:30Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.4","title":"#111 3.0.0: private static-assets construct (BPA, OAC, optional DNS, immutable deployment)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/111 (authoritative).","acceptance_criteria":"See #111.","status":"in_progress","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T12:11:35Z","started_at":"2026-11-24T12:11:35Z","lease_expires_at":"2026-11-24T12:16:35Z","heartbeat_at":"2026-11-24T12:11:35Z","external_ref":"gh-111","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:28Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.3","title":"#110 3.0.0: LambdaFunctionConstruct U1 alias name, U2 alias-only default, U3 public alias, U4 scoped log policy, U7 S3 artifacts","description":"https://github.com/LayeredCraft/cdk-constructs/issues/110 (authoritative).","acceptance_criteria":"See #110.","status":"in_progress","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T12:11:34Z","started_at":"2026-11-24T12:11:34Z","lease_expires_at":"2026-11-24T12:16:34Z","heartbeat_at":"2026-11-24T12:11:34Z","external_ref":"gh-110","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:27Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} -{"_type":"issue","id":"cdkc-2lh.2","title":"#109 3.0.0: drop net8/net9, update all dependencies, SDK and workflows, Compono-first tests (+ design doc)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/109 (authoritative). Golden templates byte-identical; breaking-change label; supersedes Dependabot #101; first merge publishes 3.0.0-preview.N.","acceptance_criteria":"See #109.","notes":"RESUME POINT 2026-11-24: PR #113 ready for owner review/merge (HUMAN GATE cdkc-2lh.2.7). Worktrees: ../worktrees/cdk-constructs-v3-modernization (chore/v3-modernization, integration), -w1-workflows, -w2-compono (both merged; remove after owner merge). Worker sessions W1 ses_df49637d7ffeeHlCYvnfVE26JR, W2 ses_df496565affeRbmllFcBWcbts3 (both exited). After merge: verify merge commit, confirm publish-preview produced 3.0.0-preview.N, export beads via jsonl in a follow-up (NO bd dolt push in this repo), remove worktrees. Owner decisions pending: design approval (#109 AC), WebFunction L2 spike scope, __dolt_remote_info__ branch deletion, #101 closure.\nPost-merge reconciliation 2026-11-24: merge 53607ea on origin/main (PR #113). Publish Preview run 45390407295 success: LayeredCraft.Cdk.Constructs.3.0.0-preview.30.nupkg 'Your package was pushed'. AC evidence: goldens byte-identical; 595/595 net10.0+net11.0 local and CI build/dotnet SUCCESS, coverage 94.5% line; no AutoFixture/NSubstitute; no prerelease deps; PR labeled breaking-change, chore! title, description separates .NET 8/9 removal from upgrade-induced changes; design approved by owner 2026-11-24 (issue comment 7131032469). __dolt_remote_info__ branch verified as artifact (single commit 424822c, DOLT_REMOTE.md pointing at deleted refs/dolt/data) and deleted under owner authorization 2026-11-24. Deferred #114 created for WebFunction L2.","status":"closed","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T12:09:37Z","started_at":"2026-11-24T02:33:21Z","closed_at":"2026-11-24T12:09:37Z","close_reason":"#109 accepted: merged 53607ea, 3.0.0-preview.30 published, all AC evidenced, design approved","external_ref":"gh-109","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh.1","type":"blocks","created_at":"2026-11-24T01:27:26Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":3,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.4","title":"#111 3.0.0: private static-assets construct (BPA, OAC, optional DNS, immutable deployment)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/111 (authoritative).","acceptance_criteria":"See #111.","status":"open","priority":2,"issue_type":"feature","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:22Z","external_ref":"gh-111","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:22Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:28Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.4","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.3","title":"#110 3.0.0: LambdaFunctionConstruct U1 alias name, U2 alias-only default, U3 public alias, U4 scoped log policy, U7 S3 artifacts","description":"https://github.com/LayeredCraft/cdk-constructs/issues/110 (authoritative).","acceptance_criteria":"See #110.","status":"open","priority":2,"issue_type":"feature","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:21Z","external_ref":"gh-110","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:21Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.2","type":"blocks","created_at":"2026-11-24T01:27:27Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.3","depends_on_id":"cdkc-2lh.7","type":"blocks","created_at":"2026-11-24T02:33:19Z","created_by":"claude","metadata":"{}"}],"dependency_count":2,"dependent_count":1,"comment_count":0} +{"_type":"issue","id":"cdkc-2lh.2","title":"#109 3.0.0: drop net8/net9, update all dependencies, SDK and workflows, Compono-first tests (+ design doc)","description":"https://github.com/LayeredCraft/cdk-constructs/issues/109 (authoritative). Golden templates byte-identical; breaking-change label; supersedes Dependabot #101; first merge publishes 3.0.0-preview.N.","acceptance_criteria":"See #109.","status":"in_progress","priority":2,"issue_type":"feature","assignee":"claude","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T02:33:21Z","started_at":"2026-11-24T02:33:21Z","lease_expires_at":"2026-11-24T02:38:21Z","heartbeat_at":"2026-11-24T02:33:21Z","external_ref":"gh-109","labels":["release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:20Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-2lh.2","depends_on_id":"cdkc-2lh.1","type":"blocks","created_at":"2026-11-24T01:27:26Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":3,"comment_count":0} {"_type":"issue","id":"cdkc-2lh.1","title":"HUMAN GATE: owner authorizes 3.0.0 implementation","description":"Planning authorized 2026-11-24 (issues/Beads only). Implementation needs the owner's separate explicit authorization.","acceptance_criteria":"Owner authorization quoted in a note.","notes":"Owner statement 2026-11-24: 'Authorize upstream Phase 1a — #109. Proceed with the modernization of LayeredCraft.Cdk.Constructs ... Create the PR for my review. I retain merge and publication authority.' and 'Do not begin #110, #111 or #112 implementation until the #109 design and implementation have been reviewed and the next phase is authorized.' Gate covers #109 only.","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:19Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T02:33:17Z","closed_at":"2026-11-24T02:33:17Z","close_reason":"Owner authorized Phase 1a (#109 only) 2026-11-24; #110-#112 need a new gate","labels":["human-gate","release:v3.0.0"],"dependencies":[{"issue_id":"cdkc-2lh.1","depends_on_id":"cdkc-2lh","type":"parent-child","created_at":"2026-11-24T01:27:19Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"cdkc-2lh","title":"LayeredCraft.Cdk.Constructs 3.0.0 — .NET 10/11 modernization, LambdaFunctionConstruct options, private static assets","description":"GitHub milestone v3.0.0 https://github.com/LayeredCraft/cdk-constructs/milestone/1 ; epic issue https://github.com/LayeredCraft/cdk-constructs/issues/108 (authoritative scope; Beads = execution state). Owner decisions 2026-11-24: dogfooding is an architectural requirement; fix gaps upstream; don't compromise APIs to avoid breaking changes; drop net8/net9; update all deps/SDK/workflows to current stable; Compono-first tests; U2 default alias-only; include U7 S3 artifacts. Preview strategy: first code PR (#109) labeled breaking-change so all previews are 3.0.0-preview.N; fold Dependabot #101 into #109; stable publish only on owner authorization. Downstream consumers: ncipollina/jedi-duel #292 (tracking bead jedi-duel-aub.16), sharedale/sharedale #266.","acceptance_criteria":"All child issues closed with evidence; net10/net11 green; golden diffs only intentional; migration guide; downstream validation; owner publishes v3.0.0.","status":"open","priority":2,"issue_type":"epic","owner":"ncipollina@gmail.com","created_at":"2026-11-24T01:27:17Z","created_by":"Nick Cipollina","updated_at":"2026-11-24T01:27:17Z","external_ref":"gh-108","labels":["release:v3.0.0"],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"cdkc-18e.18.3","title":"#104 O: Document companion log groups, ownership, regional limits, and AlreadyExists remedies","description":"Objective: consumer documentation and operational guidance for LayeredCraft/cdk-constructs#104, written against design\nrevision 5 (cdkc-18e.18.1). May run in parallel with cdkc-18e.18.2 once revision 5 is approved; reconcile with the final\ncode before the PR. (Design doc itself: cdkc-18e.18.1. XML docs: cdkc-18e.18.2.)\n\nFiles: docs/constructs/web-function.md (\"Execution Role and Logging\" ~L132-139, props table ~L95, reserved IDs ~L151,\ntesting helpers ~L369, limitations ~L387-388); docs/testing/index.md (Web Function assertions, if listed);\nCHANGELOG.md [Unreleased]; CLAUDE.md (WebFunctionConstructAssertions list + WebFunctionLogs notes).\n\nMust cover:\n1. Why two groups exist (in-Region staging -\u003e home-Region centralization) and why events look duplicated (same\n timestamps/messages; centralized stream name adds -{account}-{region}); storage billed for both.\n2. Retention: centralized default TWO_WEEKS, companion default THREE_DAYS, why the companion is short; how to set\n both (Create(retention, removalPolicy, companionRetention)); companion inherits the removal policy.\n3. Which group to query: centralized for normal querying/alarms; `.local` in the serving Region for lowest-latency Live Tail.\n4. Ownership table for Create / Use(logGroup) / Use(logGroup, companion) / ServiceDefault: who creates, owns,\n deletes each group; ServiceDefault = both service-created, unlimited retention, outlive the stack.\n5. Execution-role permissions: the verified resource types (CreateLogGroup -\u003e log-group ARN; CreateLogStream/\n PutLogEvents -\u003e log-stream ARN), the per-role matrix, and the exact caller-provided permissions from design rev 5\n §8.3 (stream write on {c}:log-stream:* in the home Region and {c}.local:log-stream:* in {R}; CreateLogGroup on\n {c}.local only where Lambda creates it, and on {c} for ServiceDefault). Without .local write, logs from that Region\n are not delivered. Immutable roles are caller-managed.\n6. Ordering: managed groups precede the revision; supplied same-stack groups too; imported/cross-stack groups must\n exist before deployment.\n7. Regional limits: PerRegion/MultiRegion companions in other Regions are service-created with no expiry and not\n managed; set retention there separately; W2 id and how to acknowledge (Annotations acknowledgeWarning /\n `cdk synth --strict` impact). W1 id for Use without companion.\n8. AlreadyExists when adopting a managed companion where Lambda already created `{name}.local` (e.g. preview.27 stacks\n that served traffic, ServiceDefault -\u003e Create, redeploy after stack deletion): remedies = delete the\n service-created group(s) before deploying, or move to a new centralized group name; no adoption support.\n9. Teardown: DESTROY removes both managed groups after the revision; RETAIN keeps both; remote-Region companions\n always remain.\n10. CHANGELOG: Added (companion group, companionRetention, Use companion, LocalLogGroup, assertions, warnings);\n Fixed (missing .local write grant for Use custom groups; missing ordering for same-stack supplied groups);\n Notes (two groups per Create, AlreadyExists, binary break vs 2.6.0-preview.27 requiring recompilation). Reference #104;\n claim no released version.\n","acceptance_criteria":"- Topics 1–10 covered, with code examples for Create(custom retentions) and Use(logGroup, companion).\n- Ownership table and permissions matrix present in docs/constructs/web-function.md.\n- W1/W2 ids documented verbatim.\n- CHANGELOG [Unreleased] entry references #104 and claims no released version.\n- Docs match the final implemented API names/defaults (cross-checked with cdkc-18e.18.2 before the PR).\n- `uv run mkdocs build --clean` passes.","notes":"Documentation complete per design revision 5. Updated docs/constructs/web-function.md (two-group behavior, duplicate events/storage, query guidance, Create/Use/ServiceDefault, ownership+retention table, ordering/teardown, execution-role and caller-provided permissions incl. log-group vs log-stream ARNs and minimizePolicies, Multi-Region/W2, verbatim W1/W2 IDs and acknowledgement, AlreadyExists remedies, public API, testing helpers). Updated docs/testing/index.md (ShouldHaveWebFunctionLogGroup, ShouldHaveCompanionLogGroup, ShouldHaveRevisionDependingOnLogGroups), CLAUDE.md, and CHANGELOG [Unreleased] Added/Fixed/Notes for #104 with no released version claimed. Validation: uv run mkdocs build --strict --clean passed with no errors/warnings (built in 1.20s); AWS logging/permissions docs and GitHub #104 links return 200; internal anchors verified in built HTML; examples cross-checked against WebFunctionLogs.cs/WebFunctionConstruct.cs; W1/W2 IDs exact; design revision 5 unchanged; no src/test/GoldenTemplates changes; git diff --check clean.","spec_id":"docs/designs/lambda-web-functions-integration.md","status":"closed","priority":2,"issue_type":"task","owner":"ncipollina@gmail.com","created_at":"2026-10-26T15:32:53Z","created_by":"Nick Cipollina","updated_at":"2026-10-26T22:57:33Z","started_at":"2026-10-26T22:52:52Z","closed_at":"2026-10-26T22:57:33Z","close_reason":"Documentation for #104 completed against design revision 5: two-group logging behavior, all three modes, ownership/retention and execution-role permission matrices, Multi-Region limits, verbatim W1/W2 warnings with acknowledgement, AlreadyExists remedies, public API/testing helpers, and CHANGELOG [Unreleased] entries. uv run mkdocs build --strict --clean passes; links, anchors, API examples, and warning IDs verified; no src/test/golden changes.","external_ref":"gh-104","labels":["docs","gh-104","lambda-web-functions","logging"],"dependencies":[{"issue_id":"cdkc-18e.18.3","depends_on_id":"cdkc-18e.18","type":"parent-child","created_at":"2026-10-26T15:32:53Z","created_by":"Nick Cipollina","metadata":"{}"},{"issue_id":"cdkc-18e.18.3","depends_on_id":"cdkc-18e.18.1","type":"blocks","created_at":"2026-10-26T15:32:53Z","created_by":"Nick Cipollina","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0}