Skip to content

feat(learncard-issuer-adapter): port serverless-http Lambda packaging to main (#171) - #173

Merged
bjagg merged 1 commit into
mainfrom
feat/issuer-adapter-lambda-packaging
Aug 3, 2026
Merged

bjagg merged 1 commit into
mainfrom
feat/issuer-adapter-lambda-packaging

Conversation

@bjagg

@bjagg bjagg commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

What

Closes #171 — verbatim port of the issuer adapter's Lambda packaging from demo/e2e-aligned, where these exact bytes are already running live on AWS (image db6952e):

Verification

  • 21/21 adapter tests pass; tsc --noEmit clean.
  • Build/runtime proof is the live deployment: this identical content was built and deployed from the demo branch today and serves the running demo's issuance leg.

Verbatim port from demo/e2e-aligned (already running live on AWS): the
serverless-http entrypoint (which installs the #163-fixed crash guards
before exporting the handler), the multi-stage nodejs:20 Dockerfile.lambda,
and the dependency + lockfile entries. main previously had no Dockerfile
for this service at all.

@mgwozdz-unicon mgwozdz-unicon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. Claude diffed this against demo/e2e-aligned's commit 2bd107d73 and confirmed Dockerfile.lambda, src/lambda.ts, and the package.json/package-lock.json entries are byte-for-byte identical to what's already running live, so the "verbatim port" claim in the description checks out.

installCrashGuards() runs at module scope before the handler is exported, so it replaces Lambda's runtime unhandledRejection listener once at cold start rather than per-invocation, which is what #163 needed to actually take effect on the managed runtime. The Dockerfile path also matches what deploy.yml already expects for a service wired into the deploy matrix, though issuer-adapter isn't in that matrix yet, so this image won't build via CI until that's added — filed as #177.

Two small things I noticed, both pre-existing in the ported code and not blockers:

  • The build stage uses npm install rather than npm ci, which is what docker/Dockerfile.node (this service's existing compose image) uses against the same lockfile. npm ci would be more reproducible if this file gets touched again.
  • The final stage copies node_modules straight from the build stage, which includes devDependencies (typescript, vitest, tsx, supertest, etc.) in the runtime image. Not a functional issue at this size, just extra image weight that a --omit=dev step could trim later.

No new test for lambda.ts itself, but that's consistent with server.ts also being untested here, and the file is a thin composition of already-covered units (guards.test.ts, api.test.ts, config.test.ts).

@bjagg
bjagg merged commit 0060807 into main Aug 3, 2026
2 checks passed
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.

learncard-issuer-adapter: port serverless-http Lambda packaging from demo/e2e-aligned to main

2 participants