Repository navigation
fix(deploy): delete the pod side's copy of the secret-coordinate rule - #66
Conversation
opencharly/sdk#544 made `SecretKeyForDep` the ONE rule for a candy-declared secret's coordinate (explicit `key:` wins, everything before the LAST "/" is the service, otherwise the historical default). This repo carried the third copy of that rule — `secretKeyForDep` in `secret_migration.go`, with the same LAST-slash split and the same default. The copy is gone (R5): the three call sites now call `deploykit.SecretKeyForDep`, and the pin advances to the tag that exports it (`github.com/opencharly/sdk v0.2026309.1926 → v0.2026320.617`). Behaviour is identical — the two implementations agreed on every declaration the build-time validator accepts — so what changes is that a future coordinate change (opencharly/ pod-openwebui#19's per-deploy decision) has ONE place to move, not three. The doc comments that referenced `secretKeyForDep` by name now name the shared rule. Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: code/config (dependency pin bump + dead-code deletion). Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — deletion + 3 call-site substitutions + disclosed pin bump; no hidden behavior, secrets, or guardrail weakening (T3/T4 clean; new indirect modules are explicitly disclosed in the body). Comment disposition — comment 6909078943 (BLOCK) is stale-superseded: its block 1 ( Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Head
16ea2b93dde5baae338d2192195828bb3c6b074a, based onorigin/main0333ac9(0 behind, 1 ahead):4 files changed, 17 insertions(+), 30 deletions(-)— the deleted copy, its three call sites, and the pin.opencharly/sdk#544 made
SecretKeyForDepthe rule for a candy-declared secret's coordinate: an explicitkey:wins (everything before the LAST/is the service), otherwise the historical default(charly/secret, dep.Name). This repo carried the third copy of that rule —secretKeyForDepinsecret_migration.go, with the same LAST-slash split and the same default — used by the plaintext-envmigration and by the missing-secret report.
The copy is deleted (R5), all three call sites call
deploykit.SecretKeyForDep, and the pin advances to thetag that exports it:
Every
go.modline the bump moves, accounted for (go mod tidyafter the pin):So this is not "no new dependency": the sdk bump carries its contract-module bump, which brings four
indirect modules into the build graph. They are pinned to the versions the sdk/spec tags themselves resolve
(
go.sumrecords their hashes), and none of them adds a build script or a new direct import here.Behaviour is identical — the two implementations agreed on every declaration the build-time validator
accepts — so what changes is that the coordinate now has ONE implementation in the org. That is the
prerequisite for opencharly/pod-openwebui#19's per-deploy decision: one place to move instead of three.
The doc comments that named
secretKeyForDepnow name the shared rule.How tested
The repo's own build/test/validate gate (its
AGENTS.mdnames all three):The R10 witness — this repo's own bed for exactly this path, run to a fresh
charly updateon adisposable: truepod:Six phases, six PASS lines — the earlier paste showed four and claimed six, which was my transcription, not
the bed's.
What this bed does NOT prove: the two
secret_migration.gobranches. Its candy declaresWEBUI_SECRET_KEYas a REQUIRED secret, so the run exercises the resolution/diagnostic path; it never supplies a plaintext
-evalue for an accepted key, which is what
migratePlaintextEnvSecret(line 116) andscrubSecretCLIEnv(line 201) need. Those two call sites are therefore not executed by this evidence — the tier says so below.
That bed drives
charly configon a pod whose candy declares a required credential-backed secret — the exactcode path the migration and the missing-secret report serve — and then rebuilds it fresh with
charly update.Residue sweep (R5 — the deleted copy must leave no reference behind):
Not run: the repo's other two beds are not usable as evidence here —
pod-ensure-gate-absentis adeliberately-nonexistent-image fixture, and
pod-ensure-gate-presentpullsghcr.io/opencharly/check-firecracker-app, which anonymous pulls cannot fetch(#65).
Rulebook compliance
/charly-internals:plugin(this repo's placement/authoring reference) and/charly-internals:git-workflowbefore the first edit.removes the last code copy and cites the owner-gated decision rather than making it. The one anomaly of my
own: the first edit attempt aborted on a stale anchor and did nothing — re-read the file and re-applied, so
no partial state was ever committed.
git status --shortwas empty before the branch; freshorigin/mainin a session worktree; thetree left in
.worktrees/secrets-fix/; no force-push, no direct push, no bypass.on is pinned by the dependency's own tests (sdk#544's mutation-verified agreement test).
charly updateand passed.Change classification
Dependency pin bump + dead-code deletion (behaviour-preserving refactor). Two direct pins (sdk, and the
spec it carries), four indirect modules added to the graph, one deleted function, three call sites, two doc
comments. No schema, no plan step, no wire type, no new direct import. Gates: build/test/validate on the
committed tree plus the repo's own R10 bed to a fresh update, with the two unexecuted call sites named.
Breaking change + rollback: none — the pod's behaviour is unchanged (the deleted function and
deploykit.SecretKeyForDepagree on every declaration the validator accepts), and the pin moves to a tag theorg has already merged and tagged. Rollback is a revert of the squash, which restores the copy.
Filed issues
implementation of the coordinate rule (
deploykit.SecretKeyForDep), so choosing per-deploy vs global is aone-function change plus its migration, not a three-repo sweep.
unusable as evidence; recorded here because it shaped what could be run.
A3 — attribution evidence
The runtime's own system message reads, verbatim:
Harness
DeepSeek Harness, modeldeepseek-v4.1-flash— the pair the footer names. Tieranalysed on a live system: the repo's gates ran on the committed tree and its R10 bed ran live to a freshcharly update, but two of the three changed call sites (migratePlaintextEnvSecret,scrubSecretCLIEnv— the plaintext-migration and CLI-scrub branches) were NOT executed by it, as statedabove.
fully tested and validatedwould claim them; it does not.Agent: charly
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)