Repository navigation
Description
The violation
deploykit.InjectSecretsIntoPlans merges a map[string]string of resolved secret VALUES into OpStep.Op.Env, so the heredoc renderer emits export KEY=value into the plan. The secret value enters the IR, which D-SEC-1 forbids:
D-SEC-1 (
DESIGN.md:2511): Secrets come only from the configured backend; they never enter the store, artifacts, labels, IR, state or output.
and DESIGN.md:2983: "there is no get: a value reaches a consumer as a secret: need, never as text."
Who depends on it — measured
$ find . -name 'charly.yml' -not -path '*/.build/*' -not -path '*/.check/*' -print0 2>/dev/null \
| xargs -0 grep -l 'secret_require' 2>/dev/null
./charly/box/fedora/box/openwebui-qdrant/charly.yml
./distro-fedora/box/openwebui-qdrant/charly.yml
./layer-qdrant/charly.yml
./plugin-deploy-pod/charly.ymllayer-qdrant/charly.yml:33:
secret_require:
- name: QDRANT__SERVICE__API_KEYThat key reaches a qdrant deployment only through this injection. This is why the deletion was reverted in #69: removing the call without migrating the declaration would start the deploy and leave qdrant with no admin key.
The path out
The replacement already exists: deploykit.CompileSecretSteps (sdk#551) lowers each use: secret: entry to a FileStep{Source: src, Dest: dst, Mode: 0o600}, and kit/walk.go's walkFile reads the source on the operator host at realize and PutFiles it into the venue — the IR carries only the two paths, so D-SEC-1 holds by construction.
The migration, in order:
- Teach
secret_require:to lower touse: secret:(or migrate the four consumers above to authoruse: secret:directly, which is the §8 form DESIGN.md:733 shows). - Prove it on the qdrant deploy — the API key arrives at its
dstand is absent from the plan. - Then delete
InjectSecretsIntoPlansand the two orphaned helpers, per sdk#552.
Why this issue exists
#69 was blocked on a regression this measurement caught. R1 does not accept "the deletion belongs elsewhere" without an issue number — so this is the number, and it names the blocker (the migration) rather than the deletion.
Related
- sdk#552 — the three now-orphaned functions in
sdk(InjectSecretsIntoPlans,SelectCandiesForPlans,ResolveSecretForCandy). - No test and no bed covers the overlay path — buildOverlay's behaviour is unproven #68 — no test and no bed covers the overlay path.
Agent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Activity
aitrawog commentedon Nov 17, 2026
CORRECTION — the consumer count was wrong. It is ELEVEN authored manifests, not four.
My first sweep used
find . -name 'charly.yml' -not -path '*/.build/*' -not -path '*/.check/*'and reported four hits. It did not exclude./.worktrees/, so the list was a mix of real authored manifests and every other session's checked-out duplicate — and the four I quoted were simply the ones that happened to sort first. Re-run with-not -path './.worktrees/*':Eleven, across seven distinct repos (the
plugin-herdrandpod-herdrentries are that repo's own copies of the same box).Why this changes the migration's shape, not just its size
The seven I missed are not variants of qdrant:
layer-strata/candy/strata/charly.yml— a model server's credential (strata), a different secret entirely.plugin-secrets/candy/plugin-secrets/charly.yml— the secrets plugin declares its ownsecret_require:. A plugin that both serves credentials and consumes one is the case that most needs the file-delivery path to be right.pod-openwebui,vm-k3s-agent,vm-k3s-server— three different substrates. This is the strongest argument forFileStep/PutFile over an env heredoc: the same declaration must reach a pod, a VM and a k3s node, andPutFileis one method of the substrate-neutralDeployExecutorwhile the env heredoc is not.So the migration is not "move four manifests to §8 syntax". It is: prove the file delivery on all three substrates, on a real secret, before the injection can go.
The rule this round earned
A grep whose scope silently includes
.worktrees/counts other sessions' checkouts as if they were authored sources. Every count in this org needs-not -path './.worktrees/*'— and the same is true ofgit -C <repo> grep, which is why that form (askingorigin/main, not the checkout) is the safe one.The three-step order stands, but step 1 is now seven manifests in seven repos, and step 2 must run on pod, VM and k3s rather than one.
Agent: lead
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)