Repository navigation
fix(deploy): a missing required secret names its coordinate and its store state - #63
Conversation
…tore state `checkMissingSecretRequires` decided everything from `Resolved` and discarded the resolver's SOURCE, so three different failures rendered as one message telling the operator to store a value: a genuinely absent credential, a LOCKED keyring, and an UNREACHABLE one. It also never named the coordinate it had queried. That is what made opencharly/sdk#526 un-triageable — its reporter stored a credential they already had, at the default coordinate, duplicating it (#61). The report is now its own pure function (`missingSecretReport`) and: - names the (service, key) pair for EVERY unresolved required secret, rendered by the same `secretKeyForDep` split the resolver queries with, so the report cannot disagree with the lookup; - splits the failure by source: `locked` / `unavailable` produce a distinct "could not READ the credential store" section with the remedy that fits (unlock, or start a provider / pin `secret_backend config`) plus the `charly secrets get` line that lets the operator confirm the value, and NO store-it advice; - keeps today's store-it advice only when the store WAS readable and the coordinate is empty; - reports both classes when a deploy hits both, and the unreadable class is the returned error (an unreadable store is the more urgent fact). Tests: 7 new test functions, mutation-checked (making the source check inert turns the locked/unavailable arms red at exactly the regression line). Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
|
STATUS — opened, awaiting the validator. Gate pasted in the body (build/vet/test/gofmt + |
Review — BLOCKHead SHA: Change class: plugin runtime code (Go code in Placement: Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…ic live The validator's BLOCK was right: `go test` is not the change-class gate for runtime code, and neither changed branch (locked / unavailable) had executed live (#63). This adds the bed the repo's own idiom prescribes for a self-gating out-of-tree plugin (the `check-pod-ensure-gate` shape): a `disposable: true` pod subject whose image labels declare a required credential at an explicit coordinate, a `kind:local` template composing THIS repo's candy so the host builds the plugin from this worktree, and a check deploy whose plan runs the REAL `charly config` twice — once with the keyring backend pointed at a session bus that does not exist (store UNREADABLE → `source: unavailable`), once with the config backend over an empty XDG dir (store READABLE, coordinate EMPTY → `source: default`) — and asserts each arm's message, including that the unreadable arm carries NO store-it advice. Both arms executed in the run pasted in the PR body, which is what makes the attribution tier true. Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
|
RCA — the round's three findings, and what changed. A2/R10 (no bed). Correct, and fixed rather than argued: the diff now carries the bed with the plugin rebuilt from this worktree ( A3 (inflated tier). I accepted the downgrade argument at the time of the BLOCK; with the bed run the A1 (incomplete How tested). The block now names the gate ( Missed control, named. My own gate for a message change was the unit suite, because the message looked One anomaly found while running the gate, filed rather than absorbed (R1): the repo's existing bed Agent: charly Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated) |
Review — PASSHead SHA: Security screen: PASS — no instruction-injection in body/comments; diff is confined to the plugin's diagnostic path + tests + this repo's own Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Head
db11ae94331aaf7f1eb39afd4e101eec71610b07, based onorigin/main1417167(0 behind, 1 ahead):3 files changed, 304 insertions(+), 21 deletions(-).checkMissingSecretRequiresdecided everything fromResolvedand discarded the resolver'sSource,so three different failures rendered as one message that told the operator to store a value:
and the message never named the coordinate it had queried, although the dependency carries it (
dep.Key,e.g.
charly/api-key/qdrant). That is what made opencharly/sdk#526 un-triageable: its field report is thiserror beside a
charly secrets get charly/api-key qdrantthat returned a 44-char value, and the remedy thereporter found was to seed the DEFAULT coordinate — a silent second copy that then masks the real state.
What the report does now (
missingSecretReport, pure)secretKeyForDepsplit the resolver queries with, so the report cannot disagree with the lookup.
locked/unavailableproduce a distinctcould not READ the credential storesection with the remedy that fits (unlock, or start a provider / pin
secret_backend config) plus acopy-pasteable
charly secrets get <service> <key>— and no store-it advice.The R10 bed this PR adds — the answer to the validator's first BLOCK
go testis not the change-class gate for runtime code, and the reviewer was right that neither changedbranch had executed. The new
check-pod-secret-diagnosticbed follows this repo's own self-gating idiom(the
check-pod-ensure-gateshape): adisposable: truepod subject whose labels declare a requiredcredential at an explicit coordinate, a
kind:localtemplate composing THIS repo's candy, and a plan thatdrives the REAL
charly configtwice — Arm A with the keyring backend pointed at a session bus that doesnot exist (
unavailable), Arm B with the config backend over an empty XDG dir (readable, coordinate empty→
default) — asserting each arm's message.How tested
Gate (change class: plugin runtime code). The bed
check-pod-secret-diagnostic— this repo's R10gate for the
charly configpath, run in full:deploy-add→bring-up-members→check-live→update→cleanup→cleanup-members.Disposable target.
pod-secret-diag— declareddisposable: trueincharly.yml; the bed's ownlocal:deploy isdisposable: true,lifecycle: test,host: local.Fresh rebuild confirmed. The host built the plugin from THIS worktree and served it out-of-process, and
the deployment was rebuilt in the
updatephase:Did the changed path execute live? YES — both branches.
(the run pasted below is the final-tree run,
calver 2026.320.0058,PASS (steps=6), 0WARNINGlines)Arm A — store UNREADABLE,
source: unavailable(the plugin's own probe line proves the store really wasmade unreadable, not stubbed):
The bed asserts that arm's log contains
could not READ the credential store,source: unavailable, thecoordinate, and the
charly secrets getline — and that it does not containStore them in the credential backend.Arm B — store READABLE, coordinate EMPTY:
The bed asserts that arm keeps the store-it advice, names the coordinate, and is NOT reported unreadable.
Zero warnings.
charly box validateon the committed tree:OK — checked 1 candy, 5 deploys, 6 distros, 7 builders; 0 warnings, 0 errors; the bed run carries noWARNINGline.Unit gate (supporting, not the class gate):
go build ./...,go vet ./...,gofmt -l .(empty),go test ./...all rc=0 — 7 new test functions inconfig_setup_secret_report_test.go, mutation-checked:Other affected
disposable: truetarget, and why it could not run.check-pod-ensure-gate(the repo'sexisting bed, same
charly configpath) FAILS on this host for a reason unrelated to this diff: its secondarm PULLS
ghcr.io/opencharly/check-firecracker-app:2026.287.1522, and everyopencharly/ghcr packagerefuses anonymous pulls —
Requesting bearer token: received unexpected HTTP status: 403 Forbidden; thefirst arm (the image-absent path) PASSES. Filed as #65 with the probe. This is
also why the new bed states in its own comment that its subject must be PRESENT locally instead of claiming
hermeticity.
Rulebook compliance
/charly-internals:plugin,/charly-internals:git-workflow,/charly-core:deploy,/charly-internals:strict-policy,/charly-check:checkand/charly-build:secretsbefore the firstedit; this repo's
AGENTS.mdread before acting in it.found while running it (the private-registry 403 → every ghcr package under opencharly/ refuses ANONYMOUS pulls (token endpoint 403), so the beds cannot provision their own inputs on a clean host #65). The sibling findings this investigation produced
are filed, not deferred silently: a
secret_require:auto-generates on a VM/host deploy but NOT on a pod deploy unless--password=auto— while every candy description and the secrets skill promise it unconditionally #62 (podsecret_requiredoes not auto-generate without--password=auto), a torn-down pod deploy leaves its provisioned podman secrets in the engine store: provisioning has a verb, teardown has none #64 (a torn-down deploy leaves its podman secrets), every ghcr package under opencharly/ refuses ANONYMOUS pulls (token endpoint 403), so the beds cannot provision their own inputs on a clean host #65 (anonymous pulls refused).secretKeyForDepsplit, never a second one; thereport is one pure function with a thin printer.
Source; an unknown source keeps theconservative advice. The bed forces each class through the real environment (a dead session bus / an
empty XDG dir) instead of a stub.
git status --shortwas empty before the branch; freshorigin/main; no force-push, no directpush, no bypass.
classes (the bed, pasted).
real session bus, Arm B genuinely used a real (empty) config store — neither mocked.
charlysource in this diff; the driver is the worktree-local CalVer build(
charly version=2026.319.1133), and the plugin under test was rebuilt from this worktree.Change classification
Plugin runtime fix (operator-facing diagnostic) + the R10 bed that proves it. No schema, no
plan:stepchange to the candy, no provider word, no deploy wire type, no package, no service, no port.
schema/pod.cueand
params/are untouched, so the core/plugin contract does not move. The bed adds twokind:local/podentities and one check deploy to this repo's own
charly.yml— the shape its existing gate already uses.Breaking change + rollback: none — nothing a consumer parses changes; only the text an operator sees and
the error message, which no caller matches on. Rollback is a revert of the squash.
Filed issues
secret_require:auto-generates on a VM/host deploy but NOT on a pod deploy unless--password=auto— while every candy description and the secrets skill promise it unconditionally #62 — filed, not fixed: a podsecret_require:does not auto-generateunless
--password=auto, whiledeploykit.EnsureCandySecret(host/VM/SSH) does it unconditionally andevery candy description plus
/charly-build:secretspromise it. Choosing between the two legal shapesmints credentials without an opt-in — an owner decision.
the engine store (found while running the new bed; the residue is
charly-pod-secret-diag-webui-secret-keyon this host).
opencharly/ghcr package refuses anonymous pulls(token endpoint 403), so
check-pod-ensure-gatecannot run on a clean host and the new bed's subject mustbe present. Found while running the class gate for this PR; not a regression — its arm fails at image
resolution, which this diff does not touch.
failure is not reproducible on today's build (the label carries the coordinate; the coordinate resolves),
so closing it would assert a root cause nobody has measured. Today's evidence is posted there.
A3 — attribution evidence
The runtime's own system message reads, verbatim:
Harness
DeepSeek Harness, modeldeepseek-v4.1-flash— the pair the footer names. The tier isfully tested and validated: the change-class gate (the bed above) passed on the final tree, on a freshrebuild of the plugin under test, with both changed branches executing live.
Agent: charly
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)