feat(orchestrate): S6 — secrets saga phase (resolve + inject secret:// env) - #44
Merged
Conversation
…// env (spec 04 §6) Complete M4: the up saga now resolves every secret:// reference and injects the values into containers without any value touching disk. - New `secrets` phase (AlwaysRun, never cached, no global mutation): for each requested project it collects the env-key→ref map (generate.SecretRefs, whose keys match the valueless keys generate already emits), batches one Resolve per provider via the registry, and stashes the resolved KEY=VALUE env per project. - compose-up injects that env via docker.Compose.Env → Compose substitutes the valueless keys from the child process env; the values live only in memory + the child env (§7.5). Registry is built from workspace.secrets.providers + RegisterBuiltins (SOPS+age), or injected (tests). - generate.SecretRefs(model, project): the project's env-key→secret-ref map, keys identical to projectEnv's valueless keys (raw verbatim; prefixed as <SERVICE>_<k>). Tests: the resolved value reaches compose-up's process env (DB_PASSWORD=…) via a fake registry/provider, and ONLY there; the happy-path re-run treats `secrets` as AlwaysRun. Generate determinism unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chunk S6 — M4 capstone
The up saga now resolves every
secret://reference and injects the values into containers with no value on disk (spec 04 §6, §7.5).secretsphase (AlwaysRun, never cached, no global mutation): per requested project it collects the env-key→ref map (generate.SecretRefs— keys match the valueless keys generate emits), batches one Resolve per provider, and stashes the resolvedKEY=VALUEenv per project.docker.Compose.Env→ Compose substitutes the valueless keys from the child process env; values live only in memory + the child env. Registry built fromworkspace.secrets.providers+RegisterBuiltins(SOPS+age), or injected (tests).generate.SecretRefs(model, project)— the env-key→secret-ref map, keys identical toprojectEnv's valueless keys.Tests
The resolved value reaches compose-up's process env (
DB_PASSWORD=…) via a fake registry/provider, and only there; happy-path re-run treatssecretsas AlwaysRun. Generate determinism unchanged.Gate
make ci+make determinismgreen (race).🤖 Generated with Claude Code