Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b05ca90
docs: approve Lambda Web Functions design and implementation beads
ncipollina Oct 23, 2026
4cf2cb0
test: establish CDK synthesis baselines and upgrade to 2.274.0
ncipollina Oct 23, 2026
e184a7b
feat: add Lambda Web Function configuration models
ncipollina Oct 23, 2026
705c515
feat: add core Lambda Web Function construct
ncipollina Oct 23, 2026
12ae64b
feat: add Web Function endpoints and resource policies
ncipollina Oct 23, 2026
ceafce5
feat: add Web Function invoke grants and endpoint imports
ncipollina Oct 23, 2026
118521b
fix: harden Web Function IAM grants and endpoint validation
ncipollina Oct 23, 2026
578f74f
fix: harden Web Function S3 artifact bucket validation
ncipollina Oct 23, 2026
7f4b11b
feat: add CloudFront OAC origins for Lambda Web Functions
ncipollina Oct 23, 2026
1ecc61e
test: add Web Function testing helpers and consumer examples
ncipollina Oct 23, 2026
b3b660b
docs: document Lambda Web Function constructs and workloads
ncipollina Oct 23, 2026
8024874
docs: integrate Web Function support into package documentation
ncipollina Oct 23, 2026
6c44187
test: add Lambda Web Function sandbox workload samples
ncipollina Oct 24, 2026
0e9ecde
test: add guarded AWS Web Function sandbox validation
ncipollina Oct 24, 2026
80a61a1
test: align sandbox smoke checks with AWS CLI 2.38.x lambda-web APIs
ncipollina Oct 25, 2026
90675e4
fix: authorize sandbox via shared-account acknowledgement
ncipollina Oct 25, 2026
47fa84d
fix: parse live Lambda Web Function resource policies
ncipollina Oct 25, 2026
a3a284a
test: record successful AWS Web Function sandbox validation
ncipollina Oct 25, 2026
1bfe687
fix: name the Lambda service principal in the Web Function KMS diagno…
ncipollina Oct 25, 2026
fe68e32
chore: record T8 release acceptance and T4a spike decision
ncipollina Oct 25, 2026
00dc8f8
chore(beads): add Sharedale release gate and redact sandbox identifiers
ncipollina Oct 25, 2026
a2eb9ff
fix(web-function): defer multi-region home-Region check for unresolve…
ncipollina Oct 25, 2026
9413fe5
refactor(web-function): address automated code-quality review findings
ncipollina Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .beads/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Dolt database (managed by Dolt, not git)
dolt/
embeddeddolt/
proxieddb/

# Runtime files
bd.sock
bd.sock.startlock
sync-state.json
last-touched
.exclusive-lock

# Daemon runtime (lock, log, pid)
daemon.*

# Push state (runtime, per-machine)
push-state.json

# Prime safety-net pointer (generated by the beads-superpowers plugin, disposable)
PRIME.md

# Lock files (various runtime locks)
*.lock

# Credential key (encryption key for federation peer auth — never commit)
.beads-credential-key

# Local version tracking (prevents upgrade notification spam after git ops)
.local_version

proxied_server_client_info.json

# Worktree redirect file (contains relative path to main repo's .beads/)
# Must not be committed as paths would be wrong in other clones
redirect

# Sync state (local-only, per-machine)
# These files are machine-specific and should not be shared across clones
.sync.lock

# Workspace operation gate (internal/workspacegate): physical-root gate
# files live beside the guarded root inside .beads (e.g. dolt.gate.lock)
*.gate.lock*
export-state/
export-state.json
last_pull

# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
ephemeral.sqlite3
ephemeral.sqlite3-journal
ephemeral.sqlite3-wal
ephemeral.sqlite3-shm

# Dolt server management (auto-started by bd)
dolt-server.pid
dolt-server.log
dolt-server.lock
dolt-server.port
dolt-server.activity
dolt-server-config.yaml

# Debug-mode pprof artifacts (written when dolt.debug: true in config.yaml)
dolt-pprof/

# Corrupt backup directories (created by bd doctor --fix recovery)
*.corrupt.backup/

# Backup data (auto-exported JSONL, local-only)
backup/

# Per-project environment file (Dolt connection config, GH#2520)
.env

# Legacy files (from pre-Dolt versions)
*.db
*.db?*
*.db-journal
*.db-wal
*.db-shm
db.sqlite
bd.db
# NOTE: Do NOT add negation patterns here.
# They would override fork protection in .git/info/exclude.
# Config files (metadata.json, config.yaml) are tracked by git by default
# since no pattern above ignores them.
81 changes: 81 additions & 0 deletions .beads/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Beads - AI-Native Issue Tracking

Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.

## What is Beads?

Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.

**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)

## Quick Start

### Essential Commands

```bash
# Create new issues
bd create "Add user authentication"

# View all issues
bd list

# View issue details
bd show <issue-id>

# Update issue status
bd update <issue-id> --claim
bd update <issue-id> --status done

# Sync with Dolt remote
bd dolt push
```

### Working with Issues

Issues in Beads are:
- **Git-native**: Stored in Dolt database with version control and branching
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
- **Branch-aware**: Issues can follow your branch workflow
- **Sync-ready**: Uses Dolt remotes for backup and team sharing

## Why Beads?

✨ **AI-Native Design**
- Built specifically for AI-assisted development workflows
- CLI-first interface works seamlessly with AI coding agents
- No context switching to web UIs

🚀 **Developer Focused**
- Issues live in your repo, right next to your code
- Works offline, syncs when you push
- Fast, lightweight, and stays out of your way

🔧 **Git Integration**
- Dolt-native sync via bd dolt push / bd dolt pull
- Branch-aware issue tracking
- Dolt-native three-way merge resolution

## Get Started with Beads

Try Beads in your own projects:

```bash
# Install Beads
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash

# Initialize in your repo
bd init

# Create your first issue
bd create "Try out Beads"
```

## Learn More

- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
- **Quick Start Guide**: Run `bd quickstart`
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)

---

*Beads: Issue tracking that moves at the speed of thought* ⚡
81 changes: 81 additions & 0 deletions .beads/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Beads Configuration File
# This file configures default behavior for all bd commands in this repository
# All settings can also be set via environment variables (BD_* prefix)
# or overridden with command-line flags

# Issue prefix for this repository (used by bd init)
# If not set, bd init will auto-detect from directory name
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
issue-prefix: "cdkc"

# Use no-db mode: JSONL-only, no Dolt database
# When true, .beads/issues.jsonl is the only local store
# no-db: false

# Enable JSON output by default
# json: false

# Feedback title formatting for mutating commands (create/update/close/dep/edit)
# 0 = hide titles, N > 0 = truncate to N characters
# output:
# title-length: 255

# Default actor for audit trails (overridden by BEADS_ACTOR or --actor)
# actor: ""

# Optional JSONL sidecar for explicit agent/tool interaction audit records.
# Issue history is always recorded in the database and is visible with
# bd history <id> --events; this only controls .beads/interactions.jsonl.
# audit:
# enabled: false

# Export events (audit trail) to .beads/events.jsonl on each flush/sync
# When enabled, new events are appended incrementally using a high-water mark.
# Use 'bd export --events' to trigger manually regardless of this setting.
# events-export: false

# Multi-repo configuration (experimental - bd-307)
# Allows hydrating from multiple repositories and routing writes to the correct database
# repos:
# primary: "." # Primary repo (where this database lives)
# additional: # Additional repos to hydrate from (read-only)
# - ~/beads-planning # Personal planning repo
# - ~/work-planning # Work planning repo

# Dolt-native backup (periodic backup for off-machine recovery)
# This is full database backup only. Cross-machine sync uses Dolt remotes.
# backup:
# enabled: false # Disable auto-backup entirely
# interval: 15m # Minimum time between auto-backups
# git-push: false # Disable git push (backup locally only)
# git-repo: "" # Separate git repo for backups (default: project repo)

# Optional JSONL auto-export for viewers, interchange, and issue-level migration.
# Disabled by default; enable only when an integration needs fresh .beads/issues.jsonl.
# Use relative paths under .beads/ for JSONL import/export filenames.
# export:
# auto: false
# path: issues.jsonl
# interval: 60s
# git-add: false
# import:
# path: issues.jsonl

# Integration settings (access with 'bd config get/set')
# Non-secret keys (stored in the database):
# - jira.url, jira.project
# - linear.team_id
# - github.org, github.repo
#
# Secret keys (stored in this file but prefer env vars to avoid git exposure):
# - linear.api_key → use LINEAR_API_KEY env var instead
# - github.token → use GITHUB_TOKEN env var instead

sync:
remote: "git+ssh://git@github.com/LayeredCraft/cdk-constructs.git"
dolt:
auto-push: false
export:
auto: true
git-add: false
no-git-ops: true
18 changes: 18 additions & 0 deletions .beads/issues.jsonl

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions .beads/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"database": "dolt",
"backend": "dolt",
"dolt_mode": "embedded",
"dolt_database": "cdkc",
"project_id": "38acb13c-880a-4177-9877-f0773549aa4a"
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,10 @@ scripts/
.Trashes
ehthumbs.db
Thumbs.db

# Beads / Dolt files (added by bd init)
.dolt/
*.db
.beads-credential-key
.beads/proxieddb/
*.gate.lock*
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,37 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

> **This feature is not released yet.** It is documented here ahead of the version bump the maintainer applies at release time. No released package version is claimed by this entry.

### ✨ Added

**Lambda Web Functions** — deploy an ordinary HTTP server (Next.js, ASP.NET Core, Blazor Static SSR, and so on) from a zip in a versioned S3 bucket, behind a managed HTTPS endpoint:

- **`WebFunctionConstruct`**: owns one Web Function's function, revision, default endpoint, execution role (optional), log group (optional), and single resource-based policy. Supports `AddEndpoint` for additional endpoints.
- **`WebFunctionEndpointConstruct`** (`IWebFunctionEndpoint`): an individual endpoint, with `GrantInvoke` (identity- or resource-policy based), `GrantCloudFrontInvoke`, `AddToResourcePolicy`, and `FromEndpointAttributes` for imported endpoints.
- **`WebFunctionOrigin`**: returns a CloudFront `IOrigin` with origin access control (OAC) and the required resource-policy statement, for `IamAuth` endpoints.
- **Models**: `WebFunctionCode` / `WebFunctionCodeFromBucketOptions` / `WebFunctionCodeBucketPolicy`, `WebFunctionRuntime`, `WebFunctionLogs`, `WebFunctionEndpointOptions` (and `IWebFunctionEndpointOptions`), `WebFunctionEndpointAttributes`, `WebFunctionEndpointType`, `WebFunctionAuthType`, `WebFunctionCallerPolicy` / `WebFunctionInvokeGrantOptions`, `WebFunctionOriginProps` / `WebFunctionOriginWithOacProps` / `WebFunctionOriginPermissions`, and `WebFunctionConstructProps`.
- **Testing helpers**: `WebFunctionConstructAssertions` fluent `Template` assertions and `WebFunctionConstructPropsBuilder` via `CdkTestHelper.CreateWebFunctionPropsBuilder()` (plus `WebFunctionConstructAutoData`).

### 🔄 Changed

- **Minimum AWS CDK version**: `Amazon.CDK.Lib` minimum raised to **2.274.0**. Consumers below 2.274.0 receive an automatic NuGet resolution upgrade. This floor is required for the enum values the OAC signing configuration needs.

### 📖 Notes and Deferrals

- **No changes to existing constructs.** The Lambda Function, Static Site, DynamoDB Table, and Cognito User Pool constructs are unchanged; their golden templates show zero diff.
- **Artifacts** are read from an existing S3 object with `WebFunctionCode.FromBucket`. `WebFunctionCode.FromAsset` is **not available** in this release; the artifact must be uploaded to a versioned bucket before deployment.
- **Customer-managed revision encryption** (`KmsKeyArn`) is **deferred**. S3 artifact encryption (SSE-S3 / SSE-KMS on the code bucket) is supported.
- **Principal-behavior regression rule**: identity-policy write detection and principal classification rely partly on CDK/jsii behavior observed in `Amazon.CDK.Lib` 2.274.0. Every `Amazon.CDK.Lib` upgrade (including Dependabot bumps) must pass the focused real-CDK Web Function security tests — especially the `CdkUpgradeGuard_*` suite — and a failure blocks the upgrade until the signals are re-verified. The library fails closed when authorization cannot be established.
- **Compatibility**: Lambda Web Functions require a Region where the feature is available; CDK 2.274.0 emits `F3006` default-rule validation warnings for the new `AWS::Lambda::WebFunction*` resource types (warnings by default).
- **Service-created default log groups**: with `WebFunctionLogs.ServiceDefault()` the construct creates no `AWS::Logs::LogGroup`; the Lambda service creates `/aws/lambda/web/{name}` on first invocation. That group has no expiry and is **not** removed by CloudFormation on teardown, so it keeps your invocation history. CDK-managed `Create()` groups are stack-owned and follow their `RemovalPolicy`.

### 🐛 Fixed

- **KMS diagnostic wording**: the owned-artifact-bucket SSE-KMS and DSSE error messages now name the **Lambda service principal** (`lambda.amazonaws.com`) as the principal whose key policy must allow `kms:Decrypt`, instead of the function execution role. Authorization behavior is unchanged; only the message text and its tests changed.

## [2.0.0] - 2025-08-06

### ⚠️ BREAKING CHANGES
Expand Down
Loading
Loading