Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.premain.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.4.1-rc.1"
".": "1.5.0-rc"
}
21 changes: 16 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Changelog

## [1.4.2](https://github.com/theory-cloud/TableTheory/compare/v1.4.1...v1.4.2) (2026-03-05)
## Unreleased

### Features

* add TTL-aware schema provisioning across Go, TypeScript, and Python helpers
* add CDK archival construct for DynamoDB TTL expirations to S3 Glacier lifecycle storage

## [1.5.0-rc](https://github.com/theory-cloud/TableTheory/compare/v1.4.2...v1.5.0-rc) (2026-03-23)


### Features

* add TTL archival lifecycle support ([0f1b88d](https://github.com/theory-cloud/TableTheory/commit/0f1b88d7012ea3436964328a73978ff680137f94))
* add TTL archival lifecycle support ([22ffedc](https://github.com/theory-cloud/TableTheory/commit/22ffedcfccff7f4732eaad50473a89bcffd7815e))


### Bug Fixes

* add encrypted compat mode for legacy plaintext ([d42d1f5](https://github.com/theory-cloud/TableTheory/commit/d42d1f533e7966ee041829d9bc736d31a419c376))
* **ci:** allow stable version alignment on premain promotion ([56984bd](https://github.com/theory-cloud/TableTheory/commit/56984bd4cec3490246b7aeed0b7e17de3268105f))
* **ci:** allow stable version alignment on premain promotion ([4f679a8](https://github.com/theory-cloud/TableTheory/commit/4f679a87f30e9bdb99539a0eeb65d396b2614fc9))
* remediate rubric dependency scan failures ([0c6b9ee](https://github.com/theory-cloud/TableTheory/commit/0c6b9eec7d38719af075bb09a7908d0a97556ee8))

## [1.4.1-rc.1](https://github.com/theory-cloud/TableTheory/compare/v1.4.1-rc...v1.4.1-rc.1) (2026-03-05)
## [1.4.2](https://github.com/theory-cloud/TableTheory/compare/v1.4.1...v1.4.2) (2026-03-05)


### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
GOMOD := github.com/theory-cloud/tabletheory
TOOLCHAIN := $(shell awk '/^toolchain / {print $$2}' go.mod | head -n 1)
export GOTOOLCHAIN ?= $(TOOLCHAIN)
UNIT_PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /examples/ | grep -v /tests/stress | grep -v /tests/integration)
ALL_PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /examples/ | grep -v /tests/stress)
UNIT_PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /node_modules/ | grep -v /examples/ | grep -v /tests/stress | grep -v /tests/integration)
ALL_PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /node_modules/ | grep -v /examples/ | grep -v /tests/stress)
INTEGRATION_PACKAGES := $(shell go list ./tests/integration/...)
DYNAMODB_LOCAL_IMAGE ?= amazon/dynamodb-local:3.1.0

Expand Down
2 changes: 1 addition & 1 deletion contract-tests/runners/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/theory-cloud/tabletheory-contract-tests/runners/go

go 1.26

toolchain go1.26.0
toolchain go1.26.1

require (
github.com/aws/aws-sdk-go-v2 v1.41.3
Expand Down
43 changes: 31 additions & 12 deletions contract-tests/runners/ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions contract-tests/runners/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.1002.0"
},
"overrides": {
"fast-xml-parser": "^5.5.7"
},
"devDependencies": {
"tsx": "^4.21.0",
"yaml": "^2.8.2"
Expand Down
30 changes: 29 additions & 1 deletion docs/cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,34 @@ idempotencyTable.addGlobalSecondaryIndex({
4. **Billing Mode**: TableTheory works with both PAY_PER_REQUEST and PROVISIONED
5. **Streams**: Enable if you need change data capture or event processing

### TTL and Archival Lifecycle

- TableTheory schema helpers now enable DynamoDB TTL automatically when the model declares a `ttl` field or role.
- Keep the same attribute name in your CDK table definition and your model tags so DMS-driven schemas stay aligned.
- For retention workflows that archive TTL deletes, enable `NEW_AND_OLD_IMAGES` streams and wire the archival path to S3.
- The deployable reference lives in `examples/cdk-multilang/lib/tabletheory-ttl-archive.ts` and uses:
- DynamoDB Streams `REMOVE` records created by TTL expiration
- a Lambda archiver at `examples/cdk-multilang/lambdas/archive/handler.ts`
- S3 lifecycle rules for Glacier transition and eventual expiration

```typescript
const evidenceTable = new dynamodb.Table(this, 'EvidenceArchiveTable', {
partitionKey: { name: 'PK', type: dynamodb.AttributeType.STRING },
sortKey: { name: 'SK', type: dynamodb.AttributeType.STRING },
billingMode: dynamodb.BillingMode.PAY_PER_REQUEST,
stream: dynamodb.StreamViewType.NEW_AND_OLD_IMAGES,
timeToLiveAttribute: 'expires_at',
});

new TableTheoryTtlArchive(this, 'EvidenceArchive', {
table: evidenceTable,
ttlAttributeName: 'expires_at',
archivePrefix: 'evidence-snapshots',
glacierTransitionAfter: Duration.days(30),
expireAfter: Duration.days(730),
});
```

## 3. Runtime Integration

### Environment Variables
Expand Down Expand Up @@ -808,4 +836,4 @@ This guide provides the foundation for integrating TableTheory with Lift CDK con
4. **Integration**: Implement Limited library backend using TableTheory
5. **Best Practices**: Follow TableTheory patterns for performance and reliability

For further questions or specific implementation details, refer to the TableTheory examples in `/examples/` directory or the comprehensive test suite in the repository.
For further questions or specific implementation details, refer to the TableTheory examples in `/examples/` directory or the comprehensive test suite in the repository.
2 changes: 1 addition & 1 deletion examples/basic/contacts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/theory-cloud/tabletheory/examples/basic/contacts

go 1.26

toolchain go1.26.0
toolchain go1.26.1

require (
github.com/aws/aws-sdk-go-v2/config v1.32.11
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/notes/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/theory-cloud/tabletheory/examples/basic/notes

go 1.26

toolchain go1.26.0
toolchain go1.26.1

require (
github.com/aws/aws-sdk-go-v2/config v1.32.11
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/todo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/theory-cloud/tabletheory/examples/basic/todo

go 1.26

toolchain go1.26.0
toolchain go1.26.1

require (
github.com/aws/aws-sdk-go-v2/config v1.32.11
Expand Down
13 changes: 11 additions & 2 deletions examples/cdk-multilang/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# TableTheory CDK Multi-language Demo

Deploys **one DynamoDB table** and **three Lambdas** (Go, Node.js 24, Python 3.14) that read/write the same item
shape. This is the deployable “proof” that the multi-language TableTheory stack can share a single table without drift.
Deploys **two DynamoDB tables** and **four Lambdas**:

- one shared application table exercised by Go, Node.js 24, and Python 3.14
- one TTL-driven evidence table with a DynamoDB Streams to S3 archival Lambda

This is the deployable “proof” that the multi-language TableTheory stack can share a single table without drift while
also supporting TTL-based retention pipelines.

This demo also exercises:

- **Encryption** (KMS envelope, cross-language decrypt)
- **Batching** (BatchWrite + BatchGet)
- **TTL + archival** (DynamoDB TTL, Streams, S3 lifecycle to Glacier)
- **Transactions** (TransactWrite)

## Commands
Expand All @@ -14,6 +21,7 @@ From the repo root:

- Install deps: `npm --prefix examples/cdk-multilang ci`
- Synthesize: `npm --prefix examples/cdk-multilang run synth`
- Test: `npm --prefix examples/cdk-multilang run test`
- Deploy (writes `cdk.outputs.json`): `AWS_PROFILE=... npm --prefix examples/cdk-multilang run deploy -- --profile $AWS_PROFILE --outputs-file cdk.outputs.json`

After deploy, the stack outputs three Function URLs. Use them to `GET`/`PUT` items:
Expand All @@ -22,6 +30,7 @@ After deploy, the stack outputs three Function URLs. Use them to `GET`/`PUT` ite
- `PUT` with JSON body: `{"pk":"...","sk":"...","value":"...","secret":"..."}`

Additional endpoints:

- `PUT /enc` (encryption demo; same payload as `PUT /`)
- `POST /batch` (batch write + batch get): `{"pk":"...","skPrefix":"...","count":3,"value":"...","secret":"..."}`
- `POST /tx` (transaction write): `{"pk":"...","skPrefix":"...","value":"...","secret":"..."}`
Expand Down
Loading
Loading