Repository navigation
Accept VARLOCK_* aliases for _VARLOCK_* config vars (AWS Lambda) - #1295
Conversation
AWS Lambda rejects env var names starting with an underscore, so _VARLOCK_ENV_KEY (needed at runtime for an encrypted frozen env) cannot be set there. Each _VARLOCK_* config var can now also be set without the leading underscore; the underscore form wins when both are set.
|
The changes in this PR will be included in the next version bump.
|
📦 Bundle size
dist/ only; native binaries are versioned separately and not counted here. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
varlock-website | 72ca471 | Commit Preview URL Branch Preview URL |
Nov 12 2026, 06:23 PM |
There was a problem hiding this comment.
Important
The aliases need the same reserved-key protection as their canonical names, and encrypted runtime initialization still fails with alias-only keys on read-only environments.
Reviewed changes: Reviewed underscore-free configuration aliases across CLI startup, runtime initialization, auto-load, and frozen deployments.
- Alias normalization: Adds an explicit configuration-variable list and copies aliases before existing readers and environment snapshots run.
- Frozen deployment coverage: Adds helper, decryption, edge-bundle, and smoke tests, and switches the Next standalone scenario to
VARLOCK_ENV_KEY. - Registry and documentation: Registers the plaintext frozen-build opt-out and documents aliases and precedence in deployment and configuration references.
gpt-6.1-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: Reviewed the reserved-alias and read-only environment fixes since the prior review, plus the Lambda deployment clarification.
- Reserved configuration aliases across serialization, override provenance, and generated types while preserving computed builtins; added ambient-key regression coverage.
- Added read-time key fallback so encrypted runtime initialization accepts
VARLOCK_ENV_KEYon immutable environments; verified the frozen-environment edge regression. - Clarified deployment constraints and documented that alias names are reserved schema keys.
The build succeeded and all 264 runtime and reserved-key tests passed.
gpt-6.1-sol | 𝕏
varlock
@varlock/astro-integration
@varlock/cloudflare-integration
@varlock/nextjs-integration
@varlock/nuxt-integration
@varlock/vite-integration
@varlock/native-helper-darwin
@varlock/native-helper-linux-arm64
@varlock/native-helper-linux-x64
@varlock/native-helper-win32-x64
@varlock/1password-plugin
@varlock/bitwarden-plugin
@varlock/keepass-plugin
@varlock/pass-plugin
@varlock/proton-pass-plugin
commit: |
* Fix release PR smoke and framework test failures Keep the literal '_VARLOCK_ENV_KEY is not set' in the runtime missing-key error (changed in #1295), which framework tests assert on (and guard against with shouldNotContain). Skip the two run-output-drain smoke tests on Windows, where they have failed on every run since #1296. * Add empty bump file



AWS Lambda rejects env var names that start with
_, so_VARLOCK_ENV_KEY(needed at runtime to decrypt an env frozen withfreezeIntoBundle) can't be set there. Reported on Discord; the workaround was copyingVARLOCK_ENV_KEYonto_VARLOCK_ENV_KEYat the top of the handler.Each user-settable
_VARLOCK_*config var can now also be set without the leading underscore (VARLOCK_ENV_KEY,VARLOCK_USE_FROZEN_ENV, ...). The underscore form wins when both are set.runtime/lib/config-env-aliases.tscopies aliases onto the_VARLOCK_*names when unset. Applied atvarlock/envmodule load (before the pre-injection snapshot),initVarlockRuntime,auto-load, and CLI startup, so existing readers are unchanged.reserved-vars.tsby a test), so builtins likeVARLOCK_ENVare never aliased. The alias names are reserved like_VARLOCK_*keys (isVarlockReservedKey), so a schema item namedVARLOCK_ENV_KEYis never serialized or typed.initVarlockRuntimereads the key with alias fallback directly, so decryption works whereprocess.envis read-only and the copy no-ops. Added the already-documented_VARLOCK_ALLOW_PLAINTEXT_FROZEN_ENVtoreserved-vars.ts.VARLOCK_ENV_KEY, edge-evaluable init-bundle case, smoke tests for frozen file /--out -payload boot with only underscore-free names. The Next standalonefreezeIntoBundleframework scenario now boots withVARLOCK_ENV_KEY.--out -env var payload does not fit Lambda (__VARLOCK_ENVname, 4 KB env limit).