Repository navigation
Conversation
… autostart as a capability
The consumer half of the sdk change of the same name. Encryption passphrases come
from the environment, the system keyring via Secret Service, or a forwarded GPG
agent. Quadlet autostart is served by Secret Service alone -- not because any
emitter checks for it by name, but because it is the backend that can unlock with
no human running a command. The supported set is now an outcome of that property
rather than a list the code carries.
CHANGED:
plugin-deploy-pod computes the capability (resolveEncUnattendedUnlock) and
threads it into BOTH QuadletConfig sites, replacing
secretBackendIsKeyring(). Asked only when the deploy HAS
encrypted volumes -- otherwise it is a pointless credential
round trip, and on a locked keyring a needless probe
plugin-settings secret_backend accepts only auto and keyring; config is
rejected with a message naming what to use instead
plugin-secrets resolveSecretBackend normalizes through
kit.NormalizeSecretBackend; the now-unreachable config store
selection deleted; five remediation hints stopped
prescribing the removed value
plugin-doctor two InstallHints stopped prescribing it, and the
now-unreachable "config file (explicit)" OK branch deleted
plugin-pod pluginResolveSecretBackend normalizes through the SAME
helper, so the backend it reports and the backend that
selects the store cannot diverge (R3 -- the two were a
verbatim duplicate pair)
MIGRATION -- NOT via charly migrate. The brief specified charly migrate; the code
refutes it. secret_backend lives in the RUNTIME config ~/.config/charly/config.yml,
while charly migrate processes the project charly.yml and the per-host deploy
overlay ~/.config/charly/charly.yml -- a different file it never opens
(candy/plugin-migrate/command.go:54 -> spec/spec/deployconfig.go:23). The
migration belongs where the value is READ, which is also the only place that
catches the CHARLY_SECRET_BACKEND override no validator sees. Both readers coerce
to auto, once, with a notice. Nothing becomes unreachable -- auto still falls back
to the config file with no keyring present -- so an already-configured host keeps
resolving the credentials it has; it loses only the ability to PIN the plaintext
store.
BEHAVIOUR CHANGE, MEASURED: on such a host with no passphrase stored, charly
config mount used to fail immediately via the removed backend's fail-fast path. It
now classifies as unavailable and polls to EncMountDeadline -- 120.09s measured --
then fails with the same actionable error. Bounded, and already what the default
auto setting does on any keyring-less host; the pin was the only opt-out.
COVERAGE: TestResolveEncUnattendedUnlock asserts both arms plus the short-circuit
AND counts credential-store calls -- the wiring assertion, because a capability
that never asks would still return the right answer for two rows by accident.
TestSetConfigValue_SecretBackend asserts the rejection and that the message names
both supported values. TestResolveSecretBackendRemovedConfigCoercesToAuto and its
env-override sibling are the migration gates. Each mutation-proven red before
being cited: a capability returning a constant (4 rows fail), one ignoring
hasEncrypted (short-circuit row fails), a validator accepting config again, and a
resolveSecretBackend that stops normalizing.
TESTS THAT PINNED THE REMOVED BACKEND now reach the config store the way a
headless host does -- an auto probe against an unreachable session bus -- which is
better isolation than the pin was. That includes
charly/credential_await_unlock_external_test.go, whose plugin subprocess inherits
the arrangement. TestPluginEncMount_NoShortCircuit_WhenOneUnmounted is where the
regression above first surfaced (instant -> 120.09s); it now shrinks
EncMountDeadline rather than skipping the wait, so the retry path is still run.
GATES: gofmt clean; charly core + sdk build and test green; all 86 candy modules
build under GOWORK=off -- the sweep that has been vacuous before, because
./charly/... never compiles the candies; every changed candy tested individually;
golangci-lint 0 issues on charly, sdk and each changed candy.
R5 SELF-TEST, per submodule because git grep does not cross boundaries:
KeyringBackend, secretBackendIsKeyring, usesWaitingBackend and the
secret_backend-config prescriptions return ZERO hits outside CHANGELOG/ in the
superproject, spec, sdk and box/*.
NOT DONE HERE, reported not edited: stale prose in two plugins/ skills and two
docs/ recipes (another teammate owns those repos concurrently), and
spec/hostenv/runtime_config.go's field comment still listing "config" -- fixing it
means moving a gitlink that 87 go.mod files pin.
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 the outcome. Disproven premise: Both cancelled commits are reverted on Verified rather than asserted:
|
…er-drop heads (#1219) `./bin/charly task sync` — this repo's own pin verb, which advances EVERY pin this repo declares — moved the two `box/*` gitlinks that were behind the ref their own `.gitmodules` entries name: box/cachyos 7f0c6c15fe5d -> ba2c187a1626 (distro-cachyos main: #209's CDI VM-driver drop, #199, #211 and #212's pod-comfyui offload pins) box/fedora 01887aee5c9a -> e9696d3e85f8 (distro-fedora main: #129 and #131, the same VM-driver drop on the Fedora side) The other three (`box/arch`, `box/debian`, `box/ubuntu`) were already at the tips their `.gitmodules` declare. Both advances are fast-forwards onto merged heads (`git -C box/cachyos merge-base --is-ancestor 7f0c6c15fe5d ba2c187a1626` -> rc=0, and the same for fedora), so there is nothing to reconcile. Control after the wave: currency: 0 of 5 pin(s) NOT current [5 cur] What the `box/*` gitlinks actually govern here, measured rather than assumed (#1218): the `cachyos` namespace is composed by the @github TAG pin (`charly.yml:30`), so `charly box list boxes` exposes the tag's box names and not one `-cdi` box — the distro beds are NOT what this moves. The gitlink is what this repo's OWN gate reads: `charly/cue_kinds_corpus_test.go` (the `../box/*/box/*/charly.yml` corpus), `charly/refs_sweep_test.go` and `charly/build_test.go` (`LoadBuildConfigForBox` over this repo's production box/cachyos distro config). That is where the corpus was run, and it passes on the moved trees. This is the hop that lets the umbrella's `charly:box/cachyos` and `charly:box/fedora` edges become current — until it lands, both report `blocked-by charly:box/...` (behind). Agent: `edge-1182` · DeepSeek Harness session `a8d6ae4d-d0e0-4b37-8e6c-58081b9e6040` Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (fully tested and validated)
Remove the
configsecret backend; compute quadlet autostart as a capabilityThe consumer half of opencharly/sdk#121, which must merge first (this PR's
sdkgitlinkpoints at its head).
Encryption passphrases come from the environment, the system keyring via Secret Service, or a
forwarded GPG agent. Quadlet autostart is served by Secret Service alone — not because any
emitter checks for it by name, but because it is the backend that can unlock with no human running
a command. The supported set is an outcome of that property rather than a list the code carries.
plugin-deploy-podresolveEncUnattendedUnlock) and threads it into BOTHQuadletConfigsites, replacingsecretBackendIsKeyring()plugin-settingssecret_backendaccepts onlyautoandkeyring;configis rejected with a message naming what to use insteadplugin-secretsresolveSecretBackendnormalizes throughkit.NormalizeSecretBackend; the now-unreachablecase "config"store selection deleted; five remediation hints stopped prescribing the removed valueplugin-doctorInstallHints stopped prescribing it, and the now-unreachable "config file (explicit)" OK branch deletedplugin-podpluginResolveSecretBackendnormalizes through the SAME helper, so the backend it reports and the backend that selects the store cannot divergeThe capability is asked only when a deploy has encrypted volumes. A deploy without them
autostarts unconditionally, so probing the credential store for it would be a pointless round trip
— and, on a locked keyring, a needless probe.
plugin-secrets' andplugin-pod's backend readers were an R3 duplicate pair — the latter's owncomment described itself as a verbatim mirror. They now share one helper.
A refuted premise: this is not a
charly migratechangeThe task specified that
charly migratemust handle a host already carryingsecret_backend: config. It cannot.secret_backendlives in the runtime config~/.config/charly/config.yml, whilecharly migrateprocesses the projectcharly.ymland theper-host deploy overlay
~/.config/charly/charly.yml— a different file it never opens(
candy/plugin-migrate/command.go:54→spec/spec/deployconfig.go:23). The precedent agrees: theretired
kdbxvalue was handled by a reject gate in the runtime-config loader.This matters beyond bookkeeping. Rejecting the value in the settings setter alone would not
remove it from service — it also arrives from a pre-removal config file and from
CHARLY_SECRET_BACKEND, which no validator sees. Both readers therefore coerce it toauto, once,with a notice. That guarantee is what makes sdk#121's deletion of the non-waiting mount branch
sound.
Coercion rather than rejection keeps an already-configured host working:
autostill falls back tothe config file when no keyring is present, so nothing becomes unreachable. The operator loses only
the ability to pin charly to the plaintext store, which is the point of the removal.
One measured regression, disclosed rather than smoothed over
secret_backend: configwas not purely vestigial — it was the only way to declare "this host hasno keyring, fail fast". On such a host with no passphrase stored,
charly config mountused tofail immediately. It now classifies as
unavailableand polls toEncMountDeadline: 120.09smeasured, then the same actionable error.
Bounded, and already what the default
autodoes on any keyring-less host — the pin was the onlyopt-out. It surfaced as
TestPluginEncMount_NoShortCircuit_WhenOneUnmountedgoing from 0.00s to120.09s. If fast-fail should be preserved, that is a separate classification fix in
resolveStoreChainand does not belong in this cutover.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 — on the CalVer binarybuilt from this tree (
charly version=2026.216.2333, R9). Both encrypted-volume assertionspass 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.
Coverage, each mutation-proven red before being cited
hasEncrypted(probes on every deploy)configagainresolveSecretBackendstops normalizingTestResolveEncUnattendedUnlockcounts credential-store calls, not just the return value — thewiring assertion, because a capability that never asks would still return the right answer for two
rows by accident. That is the failure mode this PR's predecessor had.
Other gates
gofmtclean;charlycore andsdkbuild and test green.GOWORK=off— the sweep that has been vacuous before,because
./charly/...never compiles the candies.golangci-lint— 0 issues oncharly,sdk, and each changed candy.git grepdoes not cross boundaries) over.,spec,sdk,plugins,docs,box/*:KeyringBackend,secretBackendIsKeyring,usesWaitingBackendandthe
secret_backend configprescriptions → zero hits outsideCHANGELOG/.Tests that pinned the removed backend
Several used
secret_backend: configpurely to force the config-file store deterministically. Theynow reach it the way a headless host does — an
autoprobe against an unreachable session bus —which is better isolation than the pin was.
charly/credential_await_unlock_external_test.godoesthe same, and its plugin subprocess inherits the arrangement.
Reported, not edited
Stale prose naming the removed backend survives in
plugins/automation/skills/enc/SKILL.md,plugins/build/skills/settings/SKILL.md, and twodocs/recipes — repositories a concurrentteammate owns and this change is scoped out of.
spec/hostenv/runtime_config.go's field commentstill lists
"config"; fixing it means moving a gitlink that 87go.modfiles pin. Both needa follow-up.
Branch note
fix/readme-straightalso carries these two commits, but underneath eight unrelated docs commits.This branch is the clean extraction off
mainso the cutover lands on its own, per theone-cutover-per-PR rule. Every path touched here is byte-identical between the two.
Authored with Claude Code (Anthropic Claude Opus 5), fully tested and validated.