Repository navigation
fix(plugin-box)!: the box scaffolder shipped --candies; the intent was --candy - #206
Merged
Merged
Conversation
… --candy
`charly box new box <name> --base <ref> --candy <a,b,c>` exited 80 with
"unknown flag --candy". The documentation was right and the binary was wrong.
box.go:626 declared:
Candies []string `long:"candy" sep:"," help:"…"`
The author intended `--candy` — singular, matching the `candy:` YAML key and the
`box add-candy` / `box rm-candy` verbs. But `long:` is go-flags syntax, not
Kong's. Kong ignores it and derives the flag from the FIELD NAME, so `Candies`
became `--candies`. Nothing errors; the intent is simply discarded.
`candy/plugin-check/run_cmd.go` shows the correct form: `name:"agent"`.
The tag is now `name:"candy"`. Verified end to end on a scaffolded project:
`charly box new box --help` shows `--candy=CANDY,...`, and
charly box new box my-shell --base fedora --candy my-tool
exits 0 and writes box/my-shell/charly.yml composing my-tool — with `candy:` as
the emitted key, so flag and schema now use the same word.
HOW THIS WAS NEARLY MADE PERMANENT. A validator caught the broken command by
RUNNING it, and the first fix changed the documentation to say `--candies`. That
would have cemented an accidental plural — derived from a Go field name — into
the published vocabulary. It was caught by an operator asking why a flag was
plural when everything in charly is singular. The lesson is narrow and worth
keeping: when documentation and code disagree, establish which one holds the
INTENT before deciding which to change. Here the code stated its own intent, in
a tag that had never taken effect.
WIDER FINDING, not fixed here: `long:` appears 328 times across the tree and
Kong ignores all of them. Most are harmless because the field name already
yields the intended flag. A static scan finds ~35 where it does not — including
`--assume-yes` (intended `--yes`), confirmed directly via `charly bundle del
--help`. Those live in out-of-process plugins whose flags the host help does not
enumerate, so each needs verifying individually, and renaming a shipped flag is
a breaking change. Tracked as its own audit rather than widened into this fix.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
The tag change alone shipped a broken tool. box.go:618 printed a "Next steps" hint using --candies, advertising a flag that no longer existed. box_test.go:103 parsed --candies and FAILED — and that failure was PUSHED: `go build .` on the plugin passed, `go test` was never run, so a PR went up red in the very package it changed. Building is not testing, and a flag rename is exactly the change where the difference shows. charly.yml:2289 and :2307 are two live check beds invoking `box new box … --candies my-candy`. That is the consumer class worth remembering: a flag invoked from a `command:` string in charly.yml is invisible to the compiler and the linter, so a rename that skips the bed definitions fails an R10 run at a step unrelated to the change. Also recorded in the entry: /charly-image:image documented --candy while /charly-build:new documents --candies. One skill captured the author's intent, the other captured the binary's behaviour, and both were internally consistent — so this was never simply docs-right-code-wrong. Choosing --candy obliges the plugins leg to fix the second, with docs regenerating after. charly box validate exits 0; plugin-box tests green. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
`git add -A` staged the `docs`, `pkg/arch` and `plugins` gitlinks alongside the flag fix. They belong to other legs of the chain — `docs` points at an unmerged feature branch — and had no business in a PR about a Kong struct tag. Restored to their `origin/main` values in the INDEX only, via `git update-index --cacheinfo`, deliberately not `git checkout origin/main -- <sub>` followed by `git add`: `git add` on a submodule records the WORKTREE head, so that sequence silently re-stages exactly what it was meant to remove. The submodule working trees stay where the other legs need them. PR scope is now the four files the change actually touches. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog
added a commit
to opencharly/docs
that referenced
this pull request
Aug 4, 2026
An earlier commit changed this page from --candy to --candies to match the binary. That was backwards: candy/plugin-box/box.go:626 declared `long:"candy"`, so the author intended the singular, consistent with the candy: YAML key and the box add-candy / box rm-candy verbs. `long:` is go-flags syntax that Kong ignores, so the plural was an accident of the Go field name leaking into the CLI. Restored to --candy. opencharly/charly#206 makes the binary agree. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
… gate it
Kong's tag for naming a flag is `name:`. The tree used `long:` — go-flags
syntax Kong ignores — in 328 places. Kong silently derives the flag from the Go
FIELD NAME instead, so every one of those tags documented an intent the binary
did not deliver. Nothing errored.
Most were harmless: `Session `long:"session"`` yields `--session` either way.
Fifteen diverged, and FOUR of those are documented commands that exit 80 when a
reader copies them:
charly box new box … --candy shipped --candies
charly box write … --from-stdin shipped --from-in
charly config --volume shipped --volume-flag
charly secrets gpg setup --skip-secret-service shipped --skip-ss
Those four now work. Where the shipped name was already good it was KEPT and
the tag corrected to match, decided per flag against every consumer across all
13 repos: --assume-yes stays (spec.BundleDelArgv emits it, 3 repos assert it in
tests, 4 call sites shell out with it); --run-id stays (8 sibling commands
declare it, 5 skills document it, --run appears in no doc);
--no-auto-detect stays (a runnable skill line documents it, --help has always
printed it — the six skill lines saying --no-autodetect were the wrong side,
fixed in opencharly/plugins).
`--persist` on `libvirt passwd` was UNREACHABLE, not shipped: LibvirtCmd is
mounted on no user-facing Kong tree and dispatchLibvirtVerb builds argv from the
libvirtMethods table. That rename is inert.
Also deleted `charly/devices.go`'s AutoDetectFlags — zero embedders across all
submodules including untracked files. A plugin-vm comment claiming core still
embedded it was false; corrected.
THE GATE. charly/kong_flag_tag_test.go fails if any `long:` tag returns. It
calls kong.New and reads the derived name back rather than reimplementing
Kong's rules — the same technique that corrected an earlier audit of mine, which
had inflated the divergence count from 15 to 35 by modelling the derivation
instead of running it. It also refuses to pass vacuously: it asserts at least
250 `name:`-tagged fields (actual 398 across 1078 files), so a moved directory
fails rather than going green over an empty walk.
Mutation-proven both ways. Reintroducing one tag:
--- FAIL: TestKongFlagTags_NoIgnoredLongTagSurvives
candy/plugin-pod/pod_cmd.go:55 field VolumeFlag long:"volume" is inert
— Kong ships --volume-flag
Restored: ok.
R10: charly check run check-tutorial-shell PASS (steps=13), all five legs at
24 steps / 0 failed, pre- and post-rebuild identical. charly check run
check-migrate-local PASS (steps=6), its 3 check: steps matching the 3
check-migrate-app declares. Both read from the .check logs, not the exit code —
a bed piped through tail reports the PIPELINE's status, and the harness
announced a failed bed as "completed (exit code 0)" during this work.
HOST HAZARD worth knowing: /usr/lib/charly/plugins/ holds pacman-installed
plugin binaries, and resolveCommandPluginBinary prefers them over project source
for candy, clean, doctor, feature, preempt, secrets, settings, udev and vm. A
worktree edit to those plugins looks like it did nothing. CHARLY_PLUGIN_DIR
overrides. This cost an RCA during the work and is recorded in the CHANGELOG.
Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
opencharly/spec#15 merged as 6ac5af7, tagged v0.2026216.939 (Go-module scheme — a leading-zero segment is invalid semver, so spec never carries a plain CalVer). Two comments described flag behaviour via a mechanism this PR removes: `long:` is go-flags syntax Kong ignores, so Kong derived flags from Go field names. The second was found only after the first was corrected — the same false belief, about the same field, in the same repo. This is leg 1 of a two-leg cutover and the ordering was forced, not preferred: this PR carries the 328-tag conversion AND the spec gitlink bump together, so landing it first would have required bumping to a spec commit that did not yet exist. Verified before discarding the local branch: the feat HEAD tree and origin/main tree are the same object (2652c300), and the tag dereferences to the merge commit (v0.2026216.939^{} -> 6ac5af7). Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
The evaluator generates the stamp at merge, not the author. Renames the placeholder CHANGELOG entry to CHANGELOG/2026.216.0808.md and rewrites its H1 to match, so the entry filename, its heading, and the v2026.216.0808 tag all carry one stamp. Assisted-by: Claude Code Anthropic Claude Opus 5 (fully tested and validated)
atrawog
added a commit
to opencharly/marketplace
that referenced
this pull request
Aug 4, 2026
opencharly/charly#206 merged (4ae8a2d4, v2026.216.0808) and renamed five flags whose shipped names were Go field-name artifacts rather than vocabulary. Four lines in this skill named the old `--candies`, and they went stale at that merge: build/skills/new/SKILL.md:31,60,68,89 Verified against the merged binary (2026.216.0810) in a scratch project: `charly box new box b --base fedora --candy t` exits 0. Two skills disagreed with each other before this. /charly-image:image documented `--candy` — the author's intent, which the binary did not deliver — while this one documented `--candies`, which is what actually shipped. Both were internally consistent; one recorded intent and the other behaviour. #206 made the intent real, so this is the leg where the second catches up. Sequenced deliberately AFTER #206 rather than with it: naming `--candy` before the binary accepted it would have published a command that exits 80, which is the defect this whole chain exists to remove. Whole-corpus sweep for all five renamed spellings (--candies, --from-in, --persist, --skip-ss, --volume-flag), instrument asserting what it read: 539 files enumerated, 539 read, 0 read failures, zero surviving outside CHANGELOG history. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog
added a commit
to opencharly/marketplace
that referenced
this pull request
Aug 4, 2026
…pped emitting opencharly/charly#206 cleared two pre-existing ST1005 findings in candy/plugin-secrets/secrets_gpg.go by extracting a duplicated error literal to one const and rephrasing it to lead lowercase, as Go convention wants. The hard error is now "no Secret Service on D-Bus (is KeePassXC running and unlocked?)". This skill's troubleshooting table still tabled the old wording. It was not dangling — secrets_gpg.go:1465 still prints "Secret Service not available" — but that survivor is a WARNING during `charly secrets gpg setup`, not the hard failure the row described. So a user hitting the real error would search the table for their message and not find it, while the row that looked like a match pointed at a different, milder condition. Both rows now quote strings verified present in the producer: the hard error and the setup-time warning, listed separately because they need different responses. Recorded because the rewording was FORCED, not gratuitous: reverting the two strings makes golangci-lint fail with 2x ST1005, and origin/main failed the same way before #206. A lint fix that changes a user-visible string is a documentation change too — the sweep for consumers has to include the docs, not just the callers. Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog
added a commit
to opencharly/marketplace
that referenced
this pull request
Aug 4, 2026
…not ship Three skills named flag spellings and an error string the binary does not ship. Six lines advertised `--no-autodetect`, which has never parsed; four named `--candies`, which stopped parsing when opencharly/charly#206 landed; and the secrets troubleshooting table quoted an error string #206 reworded away. The two flag families moved in OPPOSITE directions, which is the part worth keeping. `--no-autodetect` was a DOCS defect: Kong derives `--no-auto-detect` from `NoAutoDetect`, `--help` has always printed it, and this repo's own vm/skills/arch-cloud-vm/SKILL.md:308 documents a runnable invocation using it — six lines said otherwise and none of them ever worked. `--candies` was a CODE defect: plugin-box declared `long:"candy"`, go-flags syntax Kong never reads, so Kong shipped the field-derived `--candies`. /charly-image:image documented the intent, this skill documented the behaviour, and the two contradicted each other while each stayed internally consistent. #206 made the intent real; this is the leg where the second catches up. "Docs disagree with the binary" does not by itself say which is wrong — running both is what settles it. Round-1 review additionally caught a defect three lines from this PR's own edit: the `box new box` output sample showed `candy: {name: hello, …}`. The scaffolder writes the NAME as the node key with no `name:` field at all, as sdk/kit/scaffold.go:145 says in its own comment, and this same skill stated it correctly elsewhere — so the published page contradicted itself. A second instance in the candy-scaffold paragraph made the same claim. Both corrected. Proximity to the edit is not coverage. VALIDATION (fresh evaluator, inheriting nothing). Every claim re-derived against a binary built from super main 4ae8a2d4 (charly version 2026.216.0810), never from the diff: scaffolder RUN, output read from disk, not asserted from the diff — box new box hello --base quay.io/fedora/fedora:43 --candy sshd,tmux -> exit 0, writes hello:\n candy:\n base: …\n candy: [- sshd, - tmux] box new candy my-svc -> node key + candy: carrying version:, description:, plan: with one check: both match the corrected prose exactly; no third instance in 475 md files flag spellings RUN on all three commands (--help is useless for out-of-process plugin flags; only invocation surfaces an unknown flag) — --no-auto-detect shell/config/vm create -> exit 1, past parsing --no-autodetect shell/config/vm create -> exit 80, Kong usage --candy -> exit 0 and writes box/hello/charly.yml --candies -> exit 80 and writes nothing vm create was probed through CHARLY_PLUGIN_DIR at a plugin-vm built from this same tree; the pacman-baked plugin predates #206 and would have proved nothing. producer strings read at the source: errSecretServiceUnavailable (secrets_gpg.go:698) raised at :1004 and :1174; the old wording survives ONLY as the setup-time warning at :1465, inside SecretsGpgSetupCmd.ensurePassphrase — which is why it now has its own row rather than being deleted. R5 claim-keyed sweeps, instrument asserted against the 539 tracked files it searched: zero survivors of --no-autodetect and of all five spellings #206 renamed, outside CHANGELOG/. The lone --persist hit is --persistent, the NEW correct spelling, confirmed against #206 itself rather than assumed. cross-references: charly docs generate at this head exits 0 over 740 emitted files — the fail-closed gate that turns a dangling /charly-<plugin>:<skill> into a hard build error. Generated output carries zero stale spellings, with a positive control confirming the new spellings ARE published. figures re-derived at the scope each sentence names: 539 = all tracked files (git ls-files) at this head, 538 at the merge base plus this branch's own CHANGELOG entry; 475 = the *.md scope the name:-field sweep names. Change class: documentation-only — six files, all .md, no Go, no charly.yml, no hook or workflow. Gate: the non-runtime standards (adversarial consistency review, R5 grep self-test, cross-reference validation, command safety). No bed run, and none claimed: beds cannot fail on prose. Assisted-by: Claude Code Anthropic Claude Opus 5 (documentation reviewed)
atrawog
added a commit
that referenced
this pull request
Aug 18, 2026
plugins#206 landed the projection half of this PR — the two artifacts carrying
its corrected symbol attributions:
build/skills/generate/SKILL.md TaskCacheMounts is
sdk/deploykit/tasks_emit.go:203
internals/skills/install-plan/references/step-kinds.md EmitTasks is
sdk/deploykit/tasks_render.go:27
Merged 5bd2454a, tagged v2026.230.1422. Verified both directions before staging:
the pin is on plugins/main AND contains main's head (charly#301's criterion —
the second direction is what catches a pin that is a descendant of an OLD main
and silently drops landed commits).
marketplace drift falls 10 -> 8, exactly the two artifacts #206 landed.
The remaining 8 are not this PR's to repair and cannot be repaired from this
tree: three are landed projections of charly#289, still open, whose regeneration
from here deletes 710 lines of landed prose (77 insertions / 710 deletions,
exit 0, no conflict); five are other people's pending source edits. That is
charly#317's deadlock, unchanged.
Assisted-by: Claude Code Anthropic Claude Opus 5 (documentation reviewed)
atrawog
added a commit
that referenced
this pull request
Sep 5, 2026
…host InKindConnectPass The sdk pin bump to v0.2026248.1522 lands sdk#212: the materialized-tree cache (PR #206) keyed on the walk envelope + schema CalVer, which omits the provider-registry connect state - the F4 external-kind connect pre-pass's nested load cached its DEFERRED-entity tree under the SAME key the outer load then read, handing the outer load a tree with the kind entities missing (the go-check regression: TestExternalKind_PrescanConnectDecode + 3 siblings). hostLoaderExecutor.InKindConnectPass implements the sdk's optional connectPassAwareExecutor capability so loaderkit bypasses the cache for the connect pass's transient materialization; the outer load re-materializes with the providers registered. All 4 regression tests + the full charly suite pass.
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 5, 2026
… + fixtures) (#540) * wave: nested-capture Cutover A pin bumps + in-proc one-dial contract Bump spec v0.2026248.1234 + sdk v0.2026248.1237 + plugin-check v0.2026248.1222 + plugin-migrate v0.2026248.1106 (+ record v0.2026248.1204 external, runtime-resolved); embedded + parity configs migrated to schema head 2026.248.1030; hostCheckContext implements the new spec.CheckContext.InvokeProvider (in-proc half of the one-dial contract - providerRegistry.resolve + Provider.Invoke, mirroring the reverse server); go.work.sum converged via go work sync; pluginsgen re-run (no-op). * test: migrate remaining fixtures to the schema head (wave) * wave: sdk -> v0.2026248.1320 (cycle-fix tag); final pins * wave: sdk -> v0.2026248.1522 (materialized-cache connect-pass fix) + host InKindConnectPass The sdk pin bump to v0.2026248.1522 lands sdk#212: the materialized-tree cache (PR #206) keyed on the walk envelope + schema CalVer, which omits the provider-registry connect state - the F4 external-kind connect pre-pass's nested load cached its DEFERRED-entity tree under the SAME key the outer load then read, handing the outer load a tree with the kind entities missing (the go-check regression: TestExternalKind_PrescanConnectDecode + 3 siblings). hostLoaderExecutor.InKindConnectPass implements the sdk's optional connectPassAwareExecutor capability so loaderkit bypasses the cache for the connect pass's transient materialization; the outer load re-materializes with the providers registered. All 4 regression tests + the full charly suite pass. * wave: box/fedora -> b4a39ff (schema head 2026.248.1030, distro-fedora #48) The distro-fedora #48 schema-head bump merged (v2026.248.1529); the box/fedora gitlink advances so the charly tree's box/fedora validates at the wave's schema head (the CI go check's TestMaterializeSeam_RealFixtureDeterministic loads box/fedora and requires 2026.248.1030). * docs: reconcile the PR body with the go-suite evidence (A1/A2/A3 tier downgrade)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(plugin-box): the box scaffolder shipped --candies; the intent was --candy
charly box new box <name> --base <ref> --candy <a,b,c>exited 80 with"unknown flag --candy". The documentation was right and the binary was wrong.
box.go:626 declared:
The author intended
--candy— singular, matching thecandy:YAML key and thebox add-candy/box rm-candyverbs. Butlong:is go-flags syntax, notKong's. Kong ignores it and derives the flag from the FIELD NAME, so
Candiesbecame
--candies. Nothing errors; the intent is simply discarded.candy/plugin-check/run_cmd.goshows the correct form:name:"agent".The tag is now
name:"candy". Verified end to end on a scaffolded project:charly box new box --helpshows--candy=CANDY,..., andexits 0 and writes box/my-shell/charly.yml composing my-tool — with
candy:asthe emitted key, so flag and schema now use the same word.
HOW THIS WAS NEARLY MADE PERMANENT. A validator caught the broken command by
RUNNING it, and the first fix changed the documentation to say
--candies. Thatwould have cemented an accidental plural — derived from a Go field name — into
the published vocabulary. It was caught by an operator asking why a flag was
plural when everything in charly is singular. The lesson is narrow and worth
keeping: when documentation and code disagree, establish which one holds the
INTENT before deciding which to change. Here the code stated its own intent, in
a tag that had never taken effect.
WIDER FINDING, not fixed here:
long:appears 328 times across the tree andKong ignores all of them. Most are harmless because the field name already
yields the intended flag. A static scan finds ~35 where it does not — including
--assume-yes(intended--yes), confirmed directly viacharly bundle del --help. Those live in out-of-process plugins whose flags the host help does notenumerate, so each needs verifying individually, and renaming a shipped flag is
a breaking change. Tracked as its own audit rather than widened into this fix.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)