Skip to content

fix(hosts): a store target gets the deployment's state, not its environment - #154

Merged
cnuss merged 1 commit into
mainfrom
fix/hosts-store-writes-state
Oct 24, 2026
Merged

cnuss merged 1 commit into
mainfrom
fix/hosts-store-writes-state

Conversation

@cnuss

@cnuss cnuss commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

#152 wrote the function's whole environment, secrets included, to each spec.hosts target. The intent was the deployment's state: LambdaFunction['State'].

  • writeStore now writes the values that are set in State: FunctionUrl, FunctionArn, AliasArn, FunctionVersion, Qualifier, ImageUri, RoleArn, RoleId, RoleName and, with a managed bucket, Bucket. It runs after the Function URL step, so FunctionUrl is set.
  • No environment variables or secrets go to the store anymore. These values are small, so the 1 KB limit no longer skips anything in practice.
  • Keys already in the store are left alone, as before. A CloudFront Function reads kvs.get('FunctionUrl'); the docs show a viewer-request example.
  • CdnStore.write(environment) is renamed to write(values). Docs and comments say "state".
  • New test: writeStore sends State and not a secret set with withSecrets.

Unit suite: 369 passed.

Keys from the previous release that are already in the store stay there. rowdy never deletes keys, so remove them by hand if they shouldn't be there.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…onment

The store gets the deploy's outputs (FunctionUrl, FunctionArn, AliasArn,
FunctionVersion, Qualifier, ImageUri, RoleArn, RoleId, RoleName, Bucket)
so an edge function can find the Function URL. No environment variable
or secret is written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cnuss
cnuss merged commit d5e4ba8 into main Oct 24, 2026
17 checks passed
@cnuss
cnuss deleted the fix/hosts-store-writes-state branch October 24, 2026 22:51
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