Skip to content

feat(aws-lambda): support plan protocol v2#2789

Open
jrusso1020 wants to merge 2 commits into
feat/plan-protocol-v2from
feat/plan-protocol-v2-aws
Open

feat(aws-lambda): support plan protocol v2#2789
jrusso1020 wants to merge 2 commits into
feat/plan-protocol-v2from
feat/plan-protocol-v2-aws

Conversation

@jrusso1020

@jrusso1020 jrusso1020 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add explicit PlanProtocol: "v1" | "v2" support to the AWS Lambda SDK, handler, SAM template, and CDK state machine; absence still defaults to v1
  • transport v2 as a small manifest plus immutable content-addressed S3 artifacts
  • materialize only chunk-targeted artifacts on render workers and assembler-targeted artifacts on assembly workers
  • add local parity/pressure harnesses and a live smoke mode that runs v1 and v2 against the same fixture
  • make smoke resources collision-resistant, fail closed on AWS verification errors, purge versioned buckets, discover retained resources after failed deploys, and verify cleanup

Live AWS validation

Profile engineering-767398024897, region us-east-2.

Visual fixture

  • identical 4 chunk hashes
  • identical 60 decoded frames
  • identical metadata and duration
  • byte-identical final MP4: 094e92736f986e9c4c5cad0803b982136c11d013a63179bcf3b0dc81728dd20a
  • both protocols exceeded the fixture PSNR gate

Visual + audio fixture

  • identical 4 chunk hashes
  • identical 300 decoded frames
  • identical metadata and 10.005333s duration
  • identical decoded PCM: 1,921,024 bytes, 99335b1a89d630b071ed5cc9cd5ff8a85e0774878ab5d4e9208c869999e2a577
  • byte-identical final MP4: b5c8e7350d23cf77e78642f0a2a8122426696748ce678416c2177e780dca920b

All test stacks, Lambda functions, state machines, log groups, render buckets, deploy buckets, object versions, and delete markers were removed and independently verified absent.

A final live rerun also exercised the atomic stack-name reservation and
ownership-gated teardown path: v1/v2 remained byte-identical, cleanup passed,
and independent API queries again confirmed every scoped resource absent.

Other validation

  • 121 AWS tests
  • 42 focused producer tests
  • shell isolation, S3 purge, and semantic-comparison tests
  • producer/AWS typechecks, lint, format, tracked-artifact, Fallow, and SAM validation gates
  • handler ZIP size gate: 122.0 MiB compressed / 236.4 MiB uncompressed
  • pressure case: v1 returns typed PLAN_TOO_LARGE at 189,170 bytes against a 32,768-byte test cap; v2 completes

Rollout

This remains explicit opt-in. Before broad production enablement we should remove full-v1 local staging, budget the v2 materialized working set, narrow compiled/** to reachable assets or packs, and benchmark S3 object count/cold-start behavior.

GCP Cloud Run remains on Plan v1 and needs its own manifest/CAS transport and materializer migration; it will not automatically consume a v2 root.

Stack

Base: feat/plan-protocol-v2 / #2788

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jrusso1020
jrusso1020 force-pushed the feat/plan-protocol-v2-aws branch from ae9fbad to 2ff3705 Compare July 25, 2026 22:34
@jrusso1020
jrusso1020 force-pushed the feat/plan-protocol-v2 branch from d7a86f3 to 25d95a8 Compare July 25, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant