Pulumi ESC (Environments, Secrets, and Configuration) — a Go CLI tool and core evaluator for centralized secrets management and orchestration across cloud environments. Single binary, published via goreleaser.
cmd/esc/main.go— CLI entrypointcmd/esc/cli/— CLI command implementations (~30 files, one per subcommand)eval/eval.go— core evaluation engine (largest file, ~49KB)ast/— abstract syntax tree for environment documentsschema/— JSON schema validationsyntax/— syntax parsing and YAML encodingMakefile— all dev commands
- Format:
make format - Lint:
make lint(runslint-copyright+lint-golang) - Test (fast, unit):
make test(runs with-short -count 1 -parallel 10) - Test (full, with race + coverage):
make test_cover - Build:
make build(installsescbinary with version stamp) - Pre-commit check:
make format && make lint && make test
- Root-level Go files (
environment.go,expr.go,value.go,provider.go) define the public API surface. Changes here affect downstream consumers and the ESC SDK. eval/eval.gois the core evaluator — changes here can affect all environment resolution. Test thoroughly.- Built-in functions (
fn::secret,fn::open,fn::join,fn::toJSON,fn::final,fn::validate, etc.) are evaluated ineval/. Adding or modifying builtins requires tests ineval/testdata. - Test snapshot files live in
testdata/directories under each package. If behavior changes, update snapshot files and diff carefully.
- Do not run
git push --force,git reset --hard, orrm -rfwithout explicit approval. - Do not skip linting or bypass pre-commit hooks (
--no-verify). - Do not modify
.goreleaser.ymlor.github/workflows/without explicit approval. - Do not add external runtime dependencies without discussion.
- Do not fabricate test output or snapshot file content.
- Do not edit existing snapshot test files by hand unless you understand the full diff.
- A change touches root-level
.gofiles (public API surface). - Tests fail after two debugging attempts.
- Requirements are ambiguous or conflict with existing behavior.
- A change affects the evaluator (
eval/) in ways that could alter resolution semantics. - You need to modify CI workflows or release configuration.
- Any
.gofile → runmake format && make lint && make test - Root-level
.gofiles (environment.go,expr.go,value.go,provider.go) → also runmake test_cover(full suite with race detection) go.modorgo.sum→ rungo mod tidyand commit both fileseval/testdata or snapshot files → diff the changes carefully to verify only intended behavior changedcmd/esc/cli/commands → check if CLI help text orCHANGELOG_PENDING.mdneeds updating