Repository navigation
refactor(schema): derive the punktfunk word sets from vocabulary tables - #20
Conversation
Convert the two inline `|` word unions in candy/plugin-punktfunk/schema/punktfunk.cue — the 43-word `method` catalog and the 3-word `access` set — to the §10.1 S3 vocabulary-table idiom: a `_method` / `_access` table keyed by word, a derived `_methodWord` / `_accessWord` list, and the field as `or()` of that list, each table tagged `@vocab(punktfunk)`. The accepted word sets are IDENTICAL before and after (43 methods, 3 access words), read from the compiled CUE on both sides; the generated params type is byte-identical except for one doc comment, so no Go field, type or tag moves. The catalog test no longer parses the enum's TEXT. A derived enum has no body to parse, so the old reader would have found ZERO methods and left its invariant passing vacuously. It now reads the SERVED schema through the CUE API, and a new schema_served_test.go composes the plugin's own Describe reply and compiles the body the host receives — the load gate `charly box validate` does not provide (opencharly/spec#301). Refs opencharly/opencharly#945 (the census), opencharly/opencharly#950 (the sequence), opencharly/plugin-jetkvm#15 and opencharly/plugin-cua#10. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
|
STATUS — the punktfunk §10.1 S3 sweep is open as this PR. Head Next: the validator's verdict. The census and the pin are the lead's, by emission, in the umbrella change that advances the pin. Agent: charly |
Review — PASSHead SHA: Security screen: PASS — no injection/instructions, no secrets, no weakened guardrails, Checklist: All applicable rules PASS or NA. Cross-checks: the 43-word Comments: 1 — the Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…y table (#11) * refactor(schema): derive the omarchy method word set from a vocabulary table Convert the 17-word `#OmarchyInput.method` catalog in candy/plugin-omarchy/schema/omarchy.cue to the §10.1 S3 vocabulary-table idiom: a `_`-prefixed table keyed by word, a derived `_methodWord` list, and the field as `or()` of that list, the table tagged `@vocab(omarchy)`. That is the 6 `union` rows design/dpat-baseline.tsv records for this file — ONE disjunction written one alternative per line, so five of the six rows carry a trailing `|` and the 17th word, `version`, closes it and carries none. A union's row count is a property of its formatting, not a count of disjunctions. The `*"cli"` default is PRESERVED, written inline as `*"cli" | or(_methodWord)`: S3 permits a literal default, and the default is a value choice the table does not carry. So `{}` still validates and still resolves to `cli`, which is also what the verb does with an omitted method (the Go zero value) — one test pins those two together. The accepted set is IDENTICAL before and after — 17 method words and the same default — read from the compiled CUE on both sides. The generated params projection moves by exactly one doc comment (the S3 statement on the method field); every generated type, field and tag is byte-identical, and `cue exp gengotypes` at the pinned [email protected] reproduces the committed file byte-for-byte on a re-run. Two tests are added. schema_served_test.go composes the plugin's own Describe reply and compiles the body the host receives — the load gate `charly box validate` does not provide (opencharly/spec#301, measured here: a dangling `or(_methodWordX)` inside the served def leaves box validate at "OK — 0 warnings, 0 errors") — and pins the table -> derived list -> enum derivation, plus the default against the verb's own zero-value arm. catalog_invariant_test.go keeps the served enum and omarchyCommand's switch in step in both directions, so an advertised method cannot be unrouted and a routed arm cannot be unreachable. The repo's own `go:generate` line could not run: `cue exp gengotypes` has no `-o` flag at the pinned [email protected] (`unknown shorthand flag: 'o' in -o`), and a served schema has to stay package-less anyway, so the directive could never have produced this file. It now stages a `package params` copy and generates from that — the same mechanism the org's candy-validate projection check runs — so `go generate ./...` exits 0 and leaves the committed projection byte-identical. Refs opencharly/opencharly#945 (the census), opencharly/opencharly#950 (the sequence), opencharly/plugin-jetkvm#15, opencharly/plugin-cua#10, opencharly/plugin-punktfunk#20 and opencharly/plugin-gh#13. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(candy): make gen.sh generate in a fresh dir, and pin the @vocab owner Two BLOCK findings from the round-1 verdict, both fixed here. **Block 2 — gen.sh did not demonstrably write the projection.** It generated into params/ itself, so `[ -f cue_types_gen.go ]` and `gofmt -w` both passed vacuously against the file that was already there; the "unchanged sha" evidence was therefore equally consistent with cue never having run. gen.sh now generates inside a FRESH EMPTY temp dir and the only write to params/ is the final `mv`, so the output's existence is a real proof that cue ran and a generator failure leaves the committed projection untouched. Verified by tampering: the file is restored to its committed sha, `ls` shows no stray `cue_types_params_gen.go`, and a second run is a no-op. **Block 1 — the pasted R5 grep was false.** The body claimed `git grep -n '|' head -- schema/omarchy.cue` exits 1, but the new line `method: *"cli" | or(_methodWord)` carries the S3-permitted literal default, so a bare `|` grep matches it and exits 0. The claim was transcribed from a precedent instead of run against this tree. The PR body now carries the real greps: no line ENDS in `|` (the multi-line union is gone), no retired word is an alternative any more, and the ONE surviving `|` is named and is the default this change is required to keep. Also, from the verdict's notes: the `@vocab(omarchy)` ownership tag is now PINNED by a test rather than asserted in prose — `TestVocabularyTablesNameTheirOwner` fails on a table tagged for another plugin (proved by that plant). Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(candy): make gen.sh name-agnostic about the emitted projection The round-2 BLOCK found the two section-1 evidence blocks naming different files: the org mechanism's `cue exp gengotypes .` emits cue_types_params_gen.go while gen.sh's `cue exp gengotypes schema.cue` emits cue_types_gen.go, and the body never reconciled them, so the fix's proof looked self-contradictory. The two names are real and both are correct, which is now MEASURED rather than implied: the generator names its output from the INPUT it was handed, per its own help (the package name is omitted from the filename if it is implied by the import path). A package input keeps the package name in the filename, a single-file input drops it, and the two files are byte-identical, one sha256. gen.sh no longer depends on that rule at all: it requires the fresh output dir to hold EXACTLY ONE cue_types_star_gen.go match and installs that one. Both refusals are proved: a generator that emits nothing exits 1 and leaves the committed projection untouched, and one that emits two files exits 1 naming both. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(candy): make the projection comment true in both files, and sweep the script header Two comment-accuracy findings from the round-3 verdict, both real. **The schema's S3 note described constructs that exist only in the schema.** It said the table is "at the foot of this file" and "the enum below", which is accurate in schema/omarchy.cue and misleading in the generated Go it is carried verbatim into: params/cue_types_gen.go has no table and no enum, only a plain string field. Reworded so it is true in BOTH places, and the projection regenerated. **gen.sh's header still described the pre-round-1 script.** Its first paragraph said the generator "writes cue_types_gen.go into THIS directory" while the code generates in a fresh temp dir and moves the output in, and its own third paragraph said the opposite. The stale sentence survived the commit that moved the generation, which is exactly the unswept claim R5 is for. Rewritten to describe the staged copy and the generation in its own directory. The three commits before this one each left a claim that a later commit invalidated; the fix here is that the two comments now describe the mechanism the code has, so nothing in the tree contradicts the body. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: aitrawog <[email protected]>
) * refactor(schema): derive the agent word sets from vocabulary tables Convert the five inline `|` word unions in candy/plugin-agent/schema/agent.cue to the §10.1 S3 vocabulary-table idiom: a `_`-prefixed table keyed by word, a derived `_...Word` list, and the field as `or()` of that list, each table tagged `@vocab(agent)`. The five census rows are five single-line disjunctions across five defs — `mode` (#AgCredentialMount, 2 words), `evidence_policy` (#AgentTeamInput, 3), `transport` (#AtTargetHop, 5), `persistence` (#AtTerminalProfile, 3) and `transcript` (#AtTerminalProfile, 4). Every one is a pure word list: no default, no scalar-type alternative, no heterogeneous or struct alternative. Nothing is left to judgement. The two inline literal defaults this schema already carries (`prompt_via: *"argv" | "file"` and `output_format: *"" | "stream-json"`) are NOT unions written out alternative by alternative — S3 permits a literal default inline — so they stay exactly as they are, and a test pins both. The accepted sets are IDENTICAL before and after (2/3/5/3/4 words), read from the compiled CUE on both sides, and the differential is zero-verdict: 185 cases across 43 categories, no verdict moved in either direction. The generated projection does not move at all: `charly candy params plugin-agent --check` says current on the pristine tree and after the sweep, so this diff carries no params/cue_types_gen.go change. Raw `cue exp gengotypes` would NOT reproduce it — it drops the `yaml:` retag the wrapper adds to all 53 tagged fields, 212 diff lines — so the wrapper is the instrument that owns the file, and a tamper test proves it rewrites it. Two tests are added. schema_served_test.go composes the plugin's own Describe reply and compiles the body the host receives (the load gate `charly box validate` does not provide, opencharly/spec#301), pins the table -> derived list -> enum derivation for all five tables and the @vocab owner, and MUTATES a table to prove each field is derived from it rather than merely equal to it. The second file, capability_invariant_test.go, keeps the two advertised input defs and the served `#...Input` set in step in both directions: a capability naming a def the body lacks fails, and a def no capability advertises fails. Refs opencharly/opencharly#945 (the census), opencharly/opencharly#950 (the sequence), opencharly/plugin-jetkvm#15, opencharly/plugin-cua#10, opencharly/plugin-punktfunk#20, opencharly/plugin-gh#13 and opencharly/plugin-omarchy#11. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(candy): wire schemaWordList into the field-enum assertion it was written for Two BLOCK findings from the round-1 verdict, both real and both about this file. **Dead code.** schemaWordList and its only callee collectWords were defined and never called: the derived-list comparison reads the harness's decoded Words map, and the accept/refuse probe goes through Unify, so nothing used the reader. Rather than delete a reader that asserts something real, it is now WIRED IN: for every vocabulary table the test asserts that the FIELD's own enum equals the table's row set, not merely that it accepts every row today — the direction that catches a field bound to a literal list. **The body's R2 claim named a helper that does not exist here.** schemaFieldWordList is the sibling plugin-task draft's reader; this file has schemaWordList, and capability_invariant_test.go calls only servedSchema. The body now names the helpers that exist and their actual callers. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: aitrawog <[email protected]>
…es (#65) Convert the five `mode` word unions in candy/plugin-task/schema/task.cue to the §10.1 S3 vocabulary-table idiom: a `_`-prefixed table keyed by word, a derived `_...Word` list, and the field as `or()` of that list, each table tagged `@vocab(task)`. That is the 4 `union` rows design/dpat-baseline.tsv records for this file, and the row count is a property of the OLD file's FORMATTING: four distinct lines, five FIELD SITES — `mode?: "sync" | "check"` appears twice (#SpliceRegionInput and #ModulePinsInput, written identically) and the census records it once with a count of 2. So THREE tables cover FIVE fields: _submodulesMode status bump verify currency #GitSubmodulesInput.mode _checkSync check sync #FileParityInput.mode #SpliceRegionInput.mode #ModulePinsInput.mode _pruneMode report prune #PruneInput.mode `_checkSync` is the one two-word set three verbs share, so it has ONE home and three consumers rather than three copies that could drift apart (R2). No union in this file carried a default, a scalar-type alternative, or a heterogeneous or struct alternative; nothing is left to judgement. The accepted sets are IDENTICAL before and after (4/2/2/2/2 words), read from the compiled CUE on both sides, and the differential is zero-verdict: 163 cases across 46 categories, no verdict moved in either direction. The generated projection does not move at all: `charly candy params plugin-task --check` says current on the pristine tree and after the sweep, so this diff carries no params/cue_types_gen.go change. Raw `cue exp gengotypes` would NOT reproduce it — it drops the `yaml:` retag the wrapper adds to all 28 tagged fields, 112 diff lines — so the wrapper is the instrument that owns the file. Two tests are added. schema_served_test.go composes the plugin's own Describe reply and compiles the body the host receives (the load gate `charly box validate` does not provide, opencharly/spec#301), pins the table -> derived list -> field-enum derivation for all three tables and the @vocab owner, and mutates a table to prove each field is DERIVED from it rather than merely equal to it. mode_dispatch_test.go keeps each of the five `mode` fields and the Go function that dispatches on it in step in BOTH directions, and pins the four Go-level defaults for an omitted mode against the words the schema accepts. Refs opencharly/opencharly#945 (the census), opencharly/opencharly#950 (the sequence), opencharly/plugin-jetkvm#15, opencharly/plugin-cua#10, opencharly/plugin-punktfunk#20, opencharly/plugin-gh#13, opencharly/plugin-agent-pi#11, opencharly/plugin-omarchy#11 and opencharly/plugin-agent#15. Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated) Co-authored-by: aitrawog <[email protected]>
Summary
Convert the two inline
|word unions incandy/plugin-punktfunk/schema/punktfunk.cueto the §10.1 S3 vocabulary-tableidiom, so each closed set of words has ONE home and the enum an author meets is
or()of that table's keys:That is the 11
unionrowsdesign/dpat-baseline.tsvrecords forplugin-punktfunk/candy/plugin-punktfunk/schema/punktfunk.cue. They are TWOdisjunctions, not 11: the 43-word
methodcatalog is written one alternativeper line (10 rows carry a
|), andaccessis written on one line (1 row). Thecatalog's 43rd word,
stream-probe, closes the disjunction and carries no|,so it never had a row. A union's row count is a property of its formatting, so
the row number is the only honest way to compare repos and it is not a count of
disjunctions.
How this repo was picked, by shape. The umbrella's
unionrows, grouped byowner, on
origin/main:specis the producer and out of scope.plugin-egress's 16 rows are 16separate single-line unions and ~3 are not word lists at all, so its row count
overstates its S3 debt.
plugin-agent-pi's 13 rows are one 9-line catalog plusfour one-line word lists — mechanical, and kept as a later candidate. After the
jetkvm (92-row) and cua (30-row) precedents,
plugin-punktfunkis the cleanestremaining leaf repo: two disjunctions, both pure word lists, nothing else.
Every row this repo carried is retired by this PR; no row is left to judgement.
The three accepted sets are IDENTICAL before and after — 43 methods, 3 access
words — read from the compiled CUE on both sides (284-case differential below).
The generated Go does not move either:
Method stringandAccess stringarebyte-identical, and the only line the regeneration changes is one doc comment
(the SDD half of the change, and what makes the sweep safe for every Go caller).
Files the diff carries:
schema/punktfunk.cueparams/cue_types_gen.goschema_served_test.goDescribereply, compiles the served body, pins the table → derived list → enum derivationcatalog_invariant_test.goresolveCalland the client-CLI set, both directions, and every advertised method actually buildsplugin_test.gogo.modcuelang.org/gobecomes a direct requirement (the tests import it)Head
c54b90f6ec74322c5d4accad055709455ac7af33.How tested
Everything below ran on the committed tree, at that head.
1. The projection is the repo's own generator's output, and a re-run is
byte-identical. The instrument is
cue exp gengotypesat the pinned[email protected], not the binary'scandy paramswrapper (which opencharly/plugin-cua#8measured as diverging on the
yaml:retag). Three fresh runs plus the committedfile carry one sha256, and the org gate's own comparison (
sed 1,1don bothsides, exactly as the reusable
candy-validatedoes it) is empty:2. The module gate, on the final tree:
These ran with
GOTOOLCHAIN=go1.26.4, the versiongo.modpins. Host note (nofinding): this host's default
goisgo1.27.3-X:nodwarf5; pinning the module'sown version reproduces the version the gate reads, exactly as the two precedents
did.
3. The schema still LOADS through
NewMeta().Describe, and the body it servescompiles.
charly box validatedoes NOT compile a served schema(opencharly/spec#301), so the load gate is the plugin's own
Describereply,compiled with the same CUE library the runtime links:
and the repo's structural check, host-building the plugin from THIS tree:
4. The accepted surface did not move: 284 cases, 12 categories, ZERO verdicts
moved in either direction. Both schemas are compiled from source — BEFORE from
origin/main, AFTER from this tree — and the same documents are judged againsteach with the EXACT operation the host performs (
spec/climodel'sValidateCUEInput, whichsdk.SchemaValidator.ValidateJSONdelegates to:input.Unify(def).Validate(cue.Concrete(true))). The case set is derived from thecompiled enums, never restated by hand: six blocks over every method word
(accept; a near-miss suffix; a case mutation; an unknown key; with the access
word; near-miss plus access), the 3 access words and 5 refusals, 6 method-shape
cases, 5 structural cases, 3 full documents, and this repo's own authored forms
(the candy's scalar
punktfunk: healthdesugared, and the skill's threedocumented examples).
The 134 moved error TEXTS are CUE's own summarising, not the surface: a near-miss
method reports
43 errors in empty disjunctionbefore and5 errors in empty disjunctionafter. Same verdict, same failing field path, same refusal.The rig is not green by construction. Two plants were run against a copy of the
committed schema:
5. Every new test fails on a planted break — seven plants, each applied to
the committed tree, observed red, then restored from a saved copy:
6. The text-parsed disjunction was found before the sweep.
plugin_test.go'scountSchemaMethodsread the schema FILE, cut themethod:body at the firstblank line, and counted quotes — so it had silently covered only the host half of
the catalog and never the CLIENT half. A derived enum has no body at all, so the
same reader would now find ZERO. It is deleted; both new readers go through the
served schema and the CUE API, and the invariant is two-way (
catalog_invariant_test.go).7. The census gate. The umbrella's
design/dpat-baseline.tsvand itsemission are the lead's, by emission, in the change that advances the pin; this
PR touches neither the census nor the umbrella.
Rulebook compliance
R0 — skills first. Read this repo's
AGENTS.md(viagit show origin/main:AGENTS.md) and the umbrella's rulebook before the firstedit; loaded
/charly-internals:git-workflow,/charly-internals:plugin,/charly-internals:go,/charly-check:punktfunkand/charly-check:check—the five the dispatcher selects for a plugin CUE schema plus a PR landing. The
repo's
AGENTS.mdalso decided the instruments:go build/testincandy/plugin-punktfunk/,charly box validateat the root, and the projectionregeneration.
R1 — every anomaly root-caused, then fixed. Two findings, both in scope and
both fixed here. (a) The first regeneration DROPPED the file's header comment:
cue exp gengotypesattaches the leading comment to the FIRST declaration, andplacing the tables above
#PunktfunkInputmoved that attachment onto a hidden_methodtable, which is not emitted. Root fix: the tables sit at the foot ofthe file, so the header stays on the definition; the regenerated diff is one
intended doc comment. (b)
countSchemaMethodstruncated the catalog at thefirst blank line and could not read a derived enum at all — it is deleted and
replaced by the served-schema reader (finding 6 above). No gate warned: every
command below exited 0.
R2 — no duplication. Each word set has ONE home, the
_xtable; the derived_xWordlist is a comprehension, not a copy; the enum isor()of it. The testreaders (
servedSchema,schemaWordList) live once, inschema_served_test.go,and
catalog_invariant_test.gocalls them instead of compiling the schema itsown way.
R3 — no workarounds. No sleeps, retries or suppressions. The projection is
produced by the repo's own pinned generator instead of being hand-edited, and
the reproducibility check replicates the org gate's comparison (
sed 1,1donboth sides) rather than normalizing the diff.
GOTOOLCHAIN=go1.26.4runs theversion
go.modpins instead of hiding a toolchain skew.R4 — product before prose. N/A — no documented command, user-facing
instruction or emitted page changes here. The one prose edit in the schema
describes the shape it now has, corrected in the same commit that changed it.
R5 — legacy deleted completely, with the grep. The retired form is gone, and
so is the note that described it:
R6 — user work preserved, git safe.
git statuswas read before staging andis clean after the commit; the six intended paths were staged by literal
pathspec; the branch is
feat/s3-vocaboff freshorigin/main(a9ff745), onecommit,
git commit -F; no force-push, no history rewrite, no hook bypass, nodirect push to
main. The umbrella was never edited: no pin, nodesign/dpat-baseline.tsv, no census row. The identity used is repo-local(
aitrawog <[email protected]>), matching the sibling repos.R7 — proved behaviour, and the proof can fail. Seven plants turn the new
tests red (finding 5); the differential rig turns red on a semantic plant and
refuses a moved word set (finding 4); the changed artefact is validated at its
boundary — the served body as the host receives it, and the projection against
the generator that owns it. Commands, outputs and exit codes are pasted.
R8 — live or skip, never fake. N/A — this change crosses no service
boundary: it moves CUE words and a generated projection, and nothing in it
contacts a host, a driver or a registry. The verb's live path is untouched, and
the word sets are proven identical, so no live run could distinguish the before
and after trees.
R9 — binary equals source. No
charlysource changed and no new runtime OSdependency, so no package or binary rebuild is owed. The module's dependency
block moves one line:
cuelang.org/go v0.16.1becomes a DIRECT requirementbecause the new tests import the CUE API — the same promotion
refactor(schema): derive the jetkvm word lists from vocabulary tables plugin-jetkvm#15 and refactor(schema): derive the cua word sets from vocabulary tables plugin-cua#10 made for the same
reason. The
charlyused forbox validateis the umbrella tree'sworktree-local build (
2026.306.0314).R10 — fresh proof on the gate that owns the change. This repo declares no
per-repo candy gate; the gates that own it are the module build/test above, the
org reusable
candy-validate(manifest + projection currency), and theserved-schema load gate. All ran on the committed tree with zero warnings. The
two punktfunk beds (
check-punktfunk-pod,check-punktfunk-vm) are named, notclaimed: they live in opencharly/distro-cachyos and compose the RELEASED plugin
ref, so a run of them would prove the pinned plugin, not this unmerged tree.
Cutover and landing. One phase, one commit. The census rows live in the
umbrella and are lowered there by the lead only after this lands and the pin
advances, never from this PR — so this repo carries no half-finished state and
no follow-up.
AI attribution (A3). The trailer carries this runtime's exact names. The
harness's own session descriptor names the model
deepseek-v4.1-flashand thesession, and
dsh --versionprints the harness version — no config file is theevidence:
The tier
fully tested and validatedis the tier the gates above earned onthis tree.
Change classification
Internal schema refactor — no consumer-visible change. The accepted authored
surface does not move (284 cases, zero verdicts moved); the generated Go API does
not move (identical types, fields and tags, one comment); no definition is renamed
or removed (
#PunktfunkInputstill resolves and still carries both fields); noauthored word is added or dropped. What DOES change is the served CUE TEXT (the
schema a host splices), so a published page that renders that text verbatim will
show the derived form after its own regeneration — the lag both precedents left in
place, since those pages are pinned per plugin version.
Breaking change + rollback: none — no word is added, dropped or renamed, no
definition is renamed, and the generated Go is byte-identical apart from one doc
comment, so no consumer action and no migration is owed; backing the change out is
one inverse commit. The census rows this retires are lowered in the umbrella by the
lead, by emission, in the change that advances the pin.
Filed issues
None — neither R1 finding was separable from this change; both are fixed in this
diff.
Agent: charly
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)