Repository navigation
Conversation
…ntirely
Loading an encrypted volume's secret from anything other than the keyring has
been unsupported for a long time. The code still carried the machinery for it,
and I compounded that by treating the surviving branch as live behaviour to
document -- arguing with the operator twice on the strength of a vestige, then
surfacing "should this change?" as a decision rather than deleting it. R5 and the
clean-architecture mandate both answer that without asking: legacy goes, with
every reference, in the same change.
REMOVED, END TO END:
sdk/deploykit/quadlet.go the KeyringBackend field; the [Install] branch
that emitted a comment instead of WantedBy; the
TimeoutStartSec 0-vs-900 fork
sdk/deploykit/quadlet_pod.go the same [Install] branch (a second site the
first sweep missed)
sdk/deploykit/quadlet_test.go TestQuadletWithEncryptedBindMountsNonKeyring,
which asserted the removed behaviour, and the
KeyringBackend setter
plugin-deploy-pod/secrets_resolve.go
secretBackendIsKeyring() and the isKeyring
return value that existed only to feed the flag
plugin-deploy-pod/config_setup.go, config_setup_helpers.go
both call sites and both QuadletConfig literals
Every quadlet now carries `[Install] WantedBy=default.target` unconditionally, and
an encrypted deploy gets `ExecStartPre=charly config mount` with
`TimeoutStartSec=0` -- it starts at boot and waits for the keyring, with no
deadline and no second path. That is what the operator has been describing from
the start, and the code now says it.
R5 SELF-TEST, per submodule because git grep does not cross boundaries:
KeyringBackend and secretBackendIsKeyring return ZERO hits outside CHANGELOG/ in
superproject, sdk, spec, plugins, docs and box/fedora.
GATES: charly, sdk, spec build; sdk/deploykit tests pass; every candy module
builds under GOWORK=off -- the sweep that has been vacuous before, because
./charly/... never compiles the candies.
Docs and skills describing the removed path were already corrected in the
preceding commits; nothing in this tree mentions it.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Placeholder CalVer — the merging validator renames this to the merge-time version. Note the Go-module tag scheme applies here: v0.<YYYYDDD>.<HHMM>, not plain CalVer. Assisted-by: Claude Code Anthropic Claude Opus 5 (documentation reviewed)
pr-validator — CHANGES REQUESTED ❌Head validated: What I verified and confirm ✅Three of the body's claims hold up under independent re-derivation, and two of them are genuinely well done. Blast radius — REPRODUCED exactly. I did not accept the number. I reconstructed the mutation the claim describes: kept the Exactly one test, exactly the named one. The claim is true and it was measured, not assumed. Coverage after removal — intact. Ordering — verified from the committed object, not from the body. Identical. Security screen (T1–T3): clean. No secrets, no egress, no guardrail changes, no scope mismatch between diff and description, no instructions directed at the validator. Blocking findings ❌1. The premise is false — the non-keyring backend is live, supported, and actively recommendedThe PR rests on one load-bearing assertion:
That is not true of the code, and it is refuted from inside the package this PR edits. usesWaitingBackend := backend == "" || backend == "auto" || backend == "keyring"
if !usesWaitingBackend {
val, src := resolver()
if val != "" {
return val, nil
}
return "", fmt.Errorf(
"encryption passphrase not found for charly/enc/%s (backend=%s, source=%s); "+
"store with `charly secrets set charly/enc %s` or switch backend with `charly settings set secret_backend auto`",
boxName, backend, src, boxName)
}And // TestResolveEncPassphraseForMount_ExplicitConfigBackend_FailsFast: with
// backend="config", the function skips the poll loop entirely and fails on
// first miss.
_, err := ResolveEncPassphraseForMountWithResolver("testimg", "config", resolver, nil, nil)
The selector is reachable through three separate, documented surfaces, all on
And That hint fires on exactly the host this branch existed for: no Secret Service provider available. A headless server with encrypted volumes, following charly's own remediation, lands in the configuration the PR calls unsupported. The behaviour consequence. For A steelman, because there is a real defect here. For 2. A new
|
Operator ruling — the supported backend set, and why this PR is on holdThe validator refuted this PR's premise correctly, and I confirmed both refutations myself before I put three options to the operator. The answer redefines the set rather than picking one:
That resolves the contradiction in a direction none of the three options covered. What it means
So this PR's direction is right: a quadlet may assume Secret Service, and Why this PR stays FAILED rather than being force-fittedRemoving the quadlet branch while The work this becomes, in order
Credit where the validator was right and I was not
|
Design correction — the quadlet asks a capability, not a backend nameOperator direction: keep things flexible and generic, but don't support combinations that don't That rules out both of the shapes this PR has worn. The quadlet's question is not "which backend is configured". It is "can this deploy's passphrase Why this is the generic form and not a narrower rule
Relationship to the supported-set rulingThe supported set — What changes in this PR
Still blocked on the |
The autostart decision is now ONE property -- can this deploy's encryption
passphrase be obtained with no human present -- computed by the secret layer and
consumed by the emitters. deploykit no longer knows any backend's name.
This replaces both shapes this branch has worn, each wrong in the opposite
direction. Comparing the backend against "keyring" hardcoded a name into a
kind-blind host, so a backend that CAN unlock unattended would be denied
autostart for no reason but not being called keyring. Unconditional
WantedBy=default.target -- what this branch shipped before -- enabled units whose
secret cannot be obtained at boot, so they fail on every boot, forever. The
capability form excludes that combination structurally, and fixes the defect
underneath both: the original branch conflated *not keyring* with *not resolvable
without a human*, denying autostart to a deploy that HAD a usable stored
passphrase.
encrypted + unattended-capable -> WantedBy=default.target, TimeoutStartSec=0
encrypted + human-gated -> no Install section; needs charly start, 900
no encrypted volumes -> WantedBy=default.target, 900
CHANGED:
deploykit/quadlet.go KeyringBackend -> UnattendedUnlock; emitInstallSection
reads cfg again, clearing the "cfg is unused" unparam
lint the previous shape introduced; the
TimeoutStartSec fork keyed on the capability
deploykit/quadlet_pod.go calls emitInstallSection instead of carrying a second
copy of the decision (R3) -- the pod owns the app
container's lifecycle and must answer identically
deploykit/enc_passphrase.go new EncPassphraseUnattended; the non-waiting-backend
fast-fail branch deleted; two SURVIVING remediation
hints stopped prescribing the removed backend
kit/secret_backend.go new -- NormalizeSecretBackend plus the two supported
constants, the one place that knows the vocabulary
EncPassphraseUnattended classifies by SOURCE, never by name: a value in hand or
"locked" qualifies, because a Secret Service collection unlocks at login with no
charly command -- exactly what TimeoutStartSec=0 waits for. "default" and
"unavailable" do not. It resolves with an EMPTY envVar because the boot path
does, so it cannot promise autostart on a value the unit will not see.
Removing the config backend needs BOTH halves: the settings validator stops new
pins, and NormalizeSecretBackend coerces the value arriving from a pre-removal
config file or from CHARLY_SECRET_BACKEND. That is what makes deleting the
non-waiting branch sound -- every resolvable value now waits.
BEHAVIOUR CHANGE, MEASURED: a host pinning the config backend with no passphrase
stored used to fail charly config mount immediately; it now polls to
EncMountDeadline -- 120.09s measured -- then fails with the same error. Bounded,
and already the behaviour of the default auto setting on any keyring-less host.
COVERAGE, each mutation-proven red before being cited: always-emit Install (both
human-gated arms fail), never-emit (both capable arms fail), always
TimeoutStartSec=0 (human-gated container fails), dropping the "locked" clause,
consulting an env override, and the wrong credential namespace. The unparam gate
was proven by reproducing the exact finding the previous shape shipped. Deleted
two tests that asserted the removed branch -- one of which would still have
PASSED after the deletion, which is why it had to go.
GATES: gofmt clean; sdk builds; go test ./... green; golangci-lint run ./... 0
issues, against 1 for the previous shape.
R5 SELF-TEST, per submodule because git grep does not cross boundaries:
KeyringBackend, secretBackendIsKeyring and usesWaitingBackend return ZERO hits
outside CHANGELOG/ in sdk, spec, superproject and box/*. Two stale prose hits
survive in plugins/ and docs/, which another teammate owns concurrently and this
agent is scoped out of; reported rather than edited.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
…n upward The preceding commit shipped with "analysed on a live system", which was the honest tier at the time: unit and mutation proofs only, with no bed run. The full R10 sequence has since passed on BOTH disposable beds that exercise an encrypted-volume quadlet, so the evidence now supports the higher tier and the trailer should say so rather than under-claim. charly check run check-enc-pod: PASS (steps=13) charly check run check-enc-port-pod: PASS (steps=13) Each is the complete sequence -- build, check image, deploy, config, start, check live, a FRESH `charly update` destroy+rebuild, check live again, teardown -- on the CalVer binary built from this tree (charly version = 2026.216.2333, R9). Both encrypted-volume assertions pass before AND after the rebuild, 30 passed / 0 failed / 3 skipped each time. The quadlet emitted live for an encrypted deploy whose passphrase IS in the credential store is the unattended-capable arm, exactly as the capability predicts: TimeoutStartSec=0 and [Install] WantedBy=default.target. R1 on the first attempt, which FAILED at the bed's host-side enc-status-mounted step: the cause was not this change. That step resolves `charly` from PATH and found the packaged /usr/bin/charly, whose own freshness guard correctly refused to run against newer sources. Re-run with this worktree's bin/ on PATH -- R9's rule that the binary under test must be the one invoked -- it passes. Recorded because the failure looked like a code defect and was not. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
|
Do not validate — cancelled scope. The operator has ruled that |
|
Closing: the premise is disproven, so there is nothing here to rework. This PR removed The companion capability refactor ( With both cancelled, this branch is empty against What survives as findings, none of it wasted — several of these are why the ruling landed where it did:
The branch content is reverted on the superproject side and proven on a live |
|
Closed — recording why, for the next person who reads this branch. Disproven premise. The operator ruled that The The capability form agrees everywhere except the last row, where it would grant autostart to a deploy whose passphrase sits in cleartext — the configuration the operator has asked to warn about. Tripwire for anyone tempted to re-derive this. |
R10 acceptance — both affected beds, full sequence
Each is the complete sequence — build → check image → deploy → config → start → check live →
fresh
charly updatedestroy+rebuild → check live again → teardown — driven by theCalVer binary built from the consuming tree (
charly version=2026.216.2333, R9). Bothencrypted-volume assertions pass before AND after the rebuild:
The quadlet emitted live for an encrypted deploy whose passphrase is in the credential store —
the unattended-capable arm, exactly as the capability predicts:
R1 on the first attempt, which failed at
enc-status-mounted: the cause was not this change.That step resolves
charlyfromPATHand found the packaged/usr/bin/charly, whose ownfreshness guard correctly refused to run against newer sources. Re-run with the worktree's
bin/on
PATH— R9's rule that the binary under test must be the one invoked — it passes. Recordedbecause the failure looked like a code defect and was not.
Attribution was corrected upward to
fully tested and validatedin a follow-up commit once thisevidence existed; the first commit shipped at
analysed on a live system, which was the honesttier before any bed had run.