Repository navigation
fix(scaffold): correct the scaffold the main bootstrap seeded from the template - #2
Conversation
…m template Three defects, each found by auditing against the org's actual conventions rather than copying a template: 1. .github/workflows/ci.yml DELETED. It was copied from plugin-jetkvm and referenced candy/plugin-jetkvm/go.mod|go.sum (a path that does not exist here), so every gate step would fail on a non-existent module. Beyond the wrong path: a repo-local workflow enforces nothing org-wide — the org ruleset requires EXACTLY ONE check (validate / validate) and FORBIDS per-repo rulesets (org-ruleset.sh verify fails if one survives), so a repo-local workflow is advisory-only. The R10 gate for a plugin repo is its own disposable bed (cua-verb-probe), not a repo ci.yml. 6 of 7 plugin repos ship no ci.yml; the closest analogue (plugin-kubevirt, a Go module with tests and a vendored client) has none. 2. deploy.yml pin v2026.258.0219 -> v2026.269.1034. The load-time schema gate (sdk/loaderkit/load_unified.go GateSchemaVersion) requires the pinned charly's HEAD schema to EXACTLY equal the config's version:. The old pin's HEAD schema is 2026.249.2125 while this repo's charly.yml is 2026.261.1747, so the copied pin FAILS with 'config schema 2026.261.1747 is newer than this charly supports (max 2026.249.2125)' — verbatim the failure plugin-jetkvm's deploy.yml hits on its own main today. v2026.269.1034 is a release whose HEAD schema IS 2026.261.1747. 3. .gitignore extended with the canonical charly-generated-artifact patterns (.check/, .containerignore, .dockerignore, .build/, migration backups). Proven live with the corrected pin's charly built from the pinned tag: $ /tmp/pinproof/bin/charly box validate charly box validate: OK — checked 1 candy, 2 deploys, 7 distros, 7 builders; 0 warnings, 0 errors *Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)*
Review — BLOCKHead SHA: Change class: workflow/config — one CI workflow deleted, one pin bumped, Security screen: T3/T4 finding — the diff disables a repo test/CI gate (see Block 1). Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…t caught
Review round: deleting ci.yml was WRONG. My first-principles test answered 'is a
repo-local check REQUIRED by the org?' (no) and wrongly concluded about the real
question — 'does it RUN this repo's tests?' (yes: this repo ships a real Go module
+ 8 unit tests, and nothing else runs them; deploy.yml checks only the manifest,
the bed only verb dispatch). A test gate's purpose is to run THIS repo's tests.
So ci.yml is REPAIRED: go-version-file/cache-dependency-path/working-directory
repointed from candy/plugin-jetkvm (a path that does not exist here) to
candy/plugin-cua, and the JetKVM prose replaced with this repo's real rationale.
Running the repaired gate then caught TWO REAL DEFECTS it is designed to catch —
dead code (R5), invisible because nothing was running golangci-lint:
- client.go: unused hostname() helper ('a small helper for evidence rows'), zero
callers, removed with its now-unused 'os' import.
- kind.go: unused kindCapability() helper — a redundant DUPLICATE (R3) of the
inline {Class: "kind", Word: "cua", InputDef: "#CuaDeviceInput"} already
advertised in plugin.go:46; removed.
The gate now runs green end to end (the exact ci.yml steps):
gofmt -l . -> clean
go vet ./... -> clean
golangci-lint run -> 0 issues
go test ./... -> ok github.com/opencharly/plugin-cua/candy/plugin-cua
And the plugin still serves + validates: charly box validate -> OK, 0 warnings.
*Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)*
The body was rewritten for the corrected approach (repair the Go gate, not delete it; the two dead-code findings it caught). The validator keys to the head SHA and reads the body THEN, so this empty commit re-triggers a run keyed to a head whose body is already final. *Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)*
Review — PASSHead SHA: Security screen: PASS — the CI workflow is REPAIRED, not weakened (T4: gate strengthened with explicit justification; no secrets/egress/scope mismatch; pin bump is a version-pin change with stated rationale). Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary of changes
Corrects the repo scaffold that the
mainbootstrap seeded into this new repo, and repairsthe Go gate it broke. The bootstrap (
opencharly/.githubbootstrap-repo-main.yml→scripts/bootstrap-repo-main.sh) creates the first protectedmainfrom the already-pushedfeat/cuahead, somainbegan carrying the feature-branch content verbatim, includingscaffold defects copied from the
plugin-jetkvmtemplate.The concrete edits:
.github/workflows/ci.yml— REPAIRED. It was copied fromplugin-jetkvmand itsgo-version-file/cache-dependency-path/working-directorypointed atcandy/plugin-jetkvm/…, a path that does not exist here, so every gate step would fail.Repointed to
candy/plugin-cua/…and the JetKVM prose replaced with this repo's realrationale.
candy/plugin-cua/client.go— removedhostname(), an unused helper (its onlyreference was its own definition).
candy/plugin-cua/kind.go— removedkindCapability(), an unused helper that was aredundant duplicate (R3) of the inline
{Class: "kind", Word: "cua", InputDef: "#CuaDeviceInput"}capability already advertised inplugin.go:46.deploy.yml— pinv2026.258.0219→v2026.269.1034..gitignore— extended with the canonical charly-generated-artifact patterns.The plugin's substantive content (the
cuaverb, thekind: cuaentity, the CUE schema,the client/catalog/providers, 8 Go tests, and the
cua-verb-probebed) is already onmainvia the bootstrap seed.
Why the gate was repaired, not deleted
An earlier revision of this PR deleted
ci.yml; that was wrong, and the review caught it.The reasoning error was answering "is a repo-local check required org-wide?" (no — the
org ruleset requires exactly one check,
validate / validate) and drawing a conclusion abouta different question: "does it run this repo's tests?" (yes). A test gate's purpose is
to run THIS repo's tests, and this repo ships a real Go module with 8 unit tests that nothing
else runs —
deploy.ymlchecks only the manifest and the bed only exercises verb dispatch.So the correct action is to repair the gate. (
layer-cua, the companion repo, ships no Gomodule, so its
ci.ymlgates nothing and is correctly deleted there — same review round, theopposite disposition, decided by whether the repo has Go code to gate.)
The repaired gate immediately caught two real defects
Running the repaired gate surfaced exactly the class of defect it exists to catch — dead code
(R5), previously invisible because nothing ran
golangci-lint:Both are removed above (
kindCapabilitywas also a duplicate of the inline capability — R3).Change class
hook/workflow + charly Go code — a repo's CI workflow (repaired), a CI pin,
.gitignore,and the removal of two unused Go functions.
Closes / relates to:
nonefor this repo. Related:opencharly/plugin-jetkvm#10— thesame
deploy.ymlschema-pin defect filed against the repo this scaffold was copied from (itsmainis red today with the identical error); not a blocker here.Breaking change + rollback:
none— the removed functions are unexported and unused, sono surface changes. Rollback is a revert; nothing is tagged/published by this PR.
How R10-tested — exact gate, commands, and pasted output
gofmt+golangci-lint+go vet+go test) — the exactci.ymlsteps; plus the candy class'scharly box validateat the pinned charly (the exactdeploy.ymlstep, run with the NEWpin built from its tag, since this PR changes that pin).
N/A — this diff changes no runtime code path: it removes two unused functions, repairs a CI workflow, and corrects a pin. The plugin's own bed (cua-verb-probe, disposable: true) is unchanged by this diff.v2026.269.1034) — theliteral
deploy.ymlstep — and run against this repo.gate) was executed locally step by step, and its two findings were then fixed and re-run to
green; the manifest gate was executed live with the corrected pin.
N/A— no shared-state surface touched.Evidence — put each item in the block whose label names it.
1. Fresh-rebuild gate output (
charly version+ the gate run, at zero warnings):2. Each changed code path executing (the lines proving the changed branch ran):
3. Docs-only evidence (the R5 grep self-test result + the cross-reference/markdown review):
Attribution tier
fully tested and validated — the changed artifact (the repaired Go gate) was executed live
step by step, its two findings fixed and re-run to green; the manifest gate ran live with the
corrected pin built from its tag.
Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)/charly-internals:plugin(plugin repo shape),/charly-internals:git-workflow(PR-only landing + body-before-push),/charly-build:image(candy config),/charly-check:check(R10 matrix).ci.ymldecision error was root-caused (conflating "required check" with "runs this repo's tests") and corrected; the two dead functions the repaired gate found were root-caused (never referenced) and removed.box validate= 0 warnings; all four Go gates clean.layer-cuascaffold defects are fixed in its own PR (passed), and the identicaldeploy.ymldefect in the repo this scaffold was copied from is filed asplugin-jetkvm#10.kindCapability()was a redundant duplicate of the inline capability inplugin.goand is removed; no new parallel mechanism.git grep 'plugin-jetkvm'output is pasted above with each remaining hit classified as an accurate sibling reference; the template's false prose is gone.git statuschecked; the pre-push stale commit was unpushed and reset--soft(legal until first push); no force-push.N/A(no runtime path touched).N/A— no Containerfile/label generation changes.N/A— no charly binary change; the CI pin was aligned to the repo's schema and a charly built from that tag was used for the manifest gate.golangci-lint). Nodisposable: trueentity touched.description:+plan:are unchanged and valid. SDD — no.cueedit.N/A— a scaffold + dead-code fix in a plugin repo; no kernel surface.N/A— no destroy/rebuild.gofmt -l .empty,golangci-lint run ./...= 0 issues,go vetclean,go test ./...green; the two deprecated/unused helpers are removed.N/A — this repo keeps no CHANGELOG yet; the org tag-on-merge workflow creates CHANGELOG/<CalVer>.md from this PR body at merge.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)