Skip to content

fix(cli): stop lambda deploy from pointing at a nonexistent --sam-template flag - #3879

Merged
miguel-heygen merged 2 commits into
mainfrom
fix/lambda-sam-template-error-hint
Oct 2, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
fix/lambda-sam-template-error-hint

Conversation

@miga-heygen

@miga-heygen miga-heygen commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • When the SAM template is missing, hyperframes lambda deploy told users to "point --sam-template at your local copy" of the template. No --sam-template flag exists in any lambda command, and examples/aws-lambda/template.yaml is not shipped in any published package, so the advice was a dead end.
  • The error now states the real requirement, matching repoRoot()'s own message: run hyperframes lambda deploy from a HyperFrames repo checkout, or set HYPERFRAMES_REPO_ROOT to point at one.
  • The doc comment no longer claims an installed-package fallback. The template's CodeUri (../../packages/aws-lambda/dist/handler.zip) is relative to the repo, so a copied-out template cannot work without the checkout around it.
  • Only deploy calls locateSamTemplate(); destroy is unaffected.

Making deploy work from a plain npm install is a separate, larger feature: the handler ZIP build aliases @hyperframes/{producer,engine,core} to repo source and pins versions from the root lockfile.

Size

Small on purpose: one error message, one doc comment, and a regression test. The install-path feature above is out of scope.

Test plan

  • packages/cli/src/commands/lambda/sam.test.ts: locateSamTemplate() resolves an existing template, and its missing-template error mentions HYPERFRAMES_REPO_ROOT and not --sam-template. 2/2 pass; restoring the old --sam-template wording makes the second test fail.
  • bunx oxfmt --check on both changed files: clean.

miga-heygen and others added 2 commits October 2, 2026 06:09
…-sam-template flag

locateSamTemplate()'s error message and doc comment both promised a
--sam-template CLI flag as an installed-package fallback, but no such
flag was ever wired up anywhere in lambda.ts/deploy.ts/destroy.ts, and
examples/aws-lambda/template.yaml isn't shipped in any published
package either -- a dead-end escape hatch that just wasted users' time.
Replace it with the honest requirement (matches repoRoot()'s own
message): these commands need a HyperFrames monorepo checkout, or
HYPERFRAMES_REPO_ROOT pointed at one.
@miguel-heygen
miguel-heygen force-pushed the fix/lambda-sam-template-error-hint branch from 25c0dd5 to 553d14e Compare October 2, 2026 13:11
@miguel-heygen miguel-heygen changed the title fix(cli): stop lambda deploy/destroy from pointing at a nonexistent --sam-template flag fix(cli): stop lambda deploy from pointing at a nonexistent --sam-template flag Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Edit accuracy: accurate 1216 (base branch 1216), smooth 1048 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (1)

@miguel-heygen
miguel-heygen merged commit a7e95c0 into main Oct 2, 2026
146 checks passed
@miguel-heygen
miguel-heygen deleted the fix/lambda-sam-template-error-hint branch October 2, 2026 14:27
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.

2 participants