Repository navigation
fix(agents): repair fresh-clone agent-configuration drift; drop machine-local scratch paths - #159
Conversation
Two committed drifts made agent-configuration validation fail on a pristine clone: - .agents/skills/.charly-profile.json was stale relative to the plugins gitlink (v2026.200.1901): plugins gained automation/skills/agent and internals/skills/root-cause-analyzer, so plugins/setup <kimi|codex> --check developer failed until a local sync. Re-synced via plugins/setup kimi developer (292 links) and committed the result, including the new charly-automation--agent link. - scripts/validate-agent-config.py still required the literal '-o ../bin/charly' in taskfiles/Build.yml, but build:binary now builds to ../bin/.charly.next and promotes atomically (56b1a6b, the split-brain freshness guard). The required terms now pin the temp-output + promote contract. Verified: plugins/setup <claude|codex|kimi> --check developer pass; scripts/validate-agent-config.py passes including its self-test; .claude/hooks/gate_test.py 35/35; a fresh clone at an unrelated path reproduced both drifts and passes with this change. Assisted-by: Kimi Code (Moonshot K3; documentation reviewed)
…3s bed Two repo-tooling inputs depended on host-local scratch state: - taskfiles/Cue.yml bootstrap-cue preferred /tmp/cue-rdd/cue, an RDD-spike scratch binary present since the genesis import; a stale file there silently won over the checksum-verified pinned download. The sdk checkout's sdk/bin/cue fallback and the verified download are now the only sources (sdk-side residue removed in opencharly/sdk#74). - The check-k3s-vm bed's kv-charly-version step probed /tmp/charly-build/charly first, a host scratch path no step ever populates; the || fallback always ran ${CHARLY_BIN} version except on hosts carrying the stale binary. The step now invokes ${CHARLY_BIN} version directly, per the host-side plan-command rule. Verified: task cue:bootstrap-cue resolves the pinned v0.16.1 via sdk/bin/cue; bin/charly box validate exits 0 on the edited charly.yml; YAML parse clean; grep sweep finds no remaining cue-rdd or /tmp/charly-build references outside dated CHANGELOG history. Assisted-by: Kimi Code (Moonshot K3; documentation reviewed)
runVenueHomeArtifactBuilder shipped the artifact tarball to a fixed per-candy venue path (/tmp/charly-builder-<candy>.tar.gz): two concurrent deploys of the SAME candy to the SAME venue could interleave, the second PutFile overwriting the first's tarball before its extract ran. The name now carries the host staging dir's unique MkdirTemp suffix via venueBuilderTarName; covered by TestVenueBuilderTarNameUniquePerScope (fails to compile without the helper, pins the uniqueness property). Verified: go test ./... + go vet ./... clean, golangci-lint 0 issues, task build:binary rebuilt (content marker present), bin/charly box validate exits 0. Assisted-by: Kimi Code (Moonshot K3; analysed on a live system)
… schema README The pinned-cue bootstrap and the spec reproducibility test consulted `/tmp/cue-rdd/cue` — a leftover RDD-spike scratch path present since the initial import. A stale binary at that machine-local path silently won over the checksum-verified download and the repo's own `bin/cue`, making build and test inputs host-dependent. Separately, `schema/README.md` still described the pre-sdk-extraction layout. Both are removed/corrected; a supply-chain strengthening (a machine-local binary trust path is deleted, not added). - `Taskfile.yml`: `bootstrap-cue` drops the scratch-binary preference branch; the checksum-verified pinned download is the only source. - `spec/gen_repro_test.go`: `findCue` drops the `/tmp/cue-rdd/cue` candidate; resolves the repo `bin/cue` or a PATH `cue` at the pinned version. - `schema/README.md`: rewritten to the post-extraction contract (schema.FS + schemaconcat, sdk/spec, internal/schemagen, superproject wrapper task, source-pointed @go(-) set). - `CHANGELOG/2026.201.0603.md`: the merge-time CalVer entry. Gate (validator re-run on the validated head): sdk standalone battery (`GOWORK=off go mod tidy` no-op + verify + build + vet + test), edited `bootstrap-cue` executed live from forced-clean state (checksum-verified download), `TestGenReproducible` PASS (not skipped), `task cue:gen` clean-regeneration no-op, gofmt/golangci-lint 0 issues, R5 grep self-test zero hits. Consumer leg: opencharly/charly#159. Assisted-by: Kimi Code (Moonshot K3; analysed on a live system)
Bumps the sdk submodule to the merged opencharly/sdk#74 squash (9b29e8b, tag v0.2026201.603) — the producer leg of this cutover — and the charly/go.mod require to the same version (in-tree resolution rides the ../sdk replace; the require matters for out-of-tree consumers). The delta also carries the independently landed sdk#72 (F-CLI-NEST); assembly re-gated: go test ./... + go vet clean, golangci-lint 0 issues, task build:binary rebuilt (2026.201.0515), box validate exit 0, non-runtime suite green. Assisted-by: Kimi Code (Moonshot K3; analysed on a live system)
Coordination note (from
|
pr-validator — APPROVED ✅ (phase one)Bound head SHA (live Change class (validator-derived): cross-repo consumer leg (sdk#74 producer MERGED FIRST, verified: tag Checklist
Comments considered: none — the PR carries zero comments. Cross-PR interactions considered:
Decision: PASS. The one defective claim (item-2's "no bed can exercise the venue naming") was corrected by my own green run of the correct bed rather than by failing the PR back for an author re-run — the spec's re-run authority exists for exactly this. Finalization under the mid-validation main-advance protocol: update-branch merge (FF push) → delta re-gate (overlap non-empty → rebuild + go test/vet/gofmt/golangci-lint + Assisted-by: Kimi Code (Moonshot K3; analysed on a live system) |
…ft-repair Update-branch recovery after #160 landed mid-validation (09172e1, F-CLI-NEST consumer of sdk#72). Overlap with this cutover: charly/go.mod + the sdk gitlink. Resolved descendant-wins per /charly-internals:git-workflow: sdk gitlink fast-forwards to 9b29e8b (sdk#74, tag v0.2026201.603, descendant of #160's 3ea39b1) and the go.mod require stays at v0.2026201.603. Delta re-gate (non-empty overlap) follows: rebuild + go test/vet/gofmt/golangci-lint + check-builder-vm re-run. Assisted-by: Kimi Code (Moonshot K3; analysed on a live system)
Rename the placeholder CHANGELOG/2026.201.0437.md to the merge-time CHANGELOG/2026.201.0706.md and re-stamp its H1 (fresh pr-validator Phase-3; uniqueness-guarded vs main CHANGELOG + tags). Assisted-by: Kimi Code (Moonshot K3; fully tested and validated)
pr-validator — LANDED ✅ (Phase 3 outcome)All gated actions ALLOWED, zero denials (auto permission mode).
Verdict: PASS → merged (squash) as Follow-up left to the orchestrator (outside this validator's enumerated mutations): advance the local Assisted-by: Kimi Code (Moonshot K3; fully tested and validated) |
…loader-cone Merges origin/main (6d436e2, "thematic hygiene batch — sdk-interface-drift fixtures, dead code, stale refs" — #161, which fixes the plugin-http/ plugin-port fakeCC fixture failures + #159 builder_venue.go work) into feat/w9-loader-cone. Clean auto-merge, one conflict: charly/go.mod's sdk require version (HEAD v0.2026201.636 vs main v0.2026201.603) — resolved to v0.2026201.649, matching the sdk gitlink bump below. No overlap between #159/#161's touched files (builder_venue.go, k8s_generate.go, k8s_deploy_from_box.go, validate_preempt.go, bundle_add_cmd_k8s.go deleted, plugin-substrate/status_k8s.go) and the W9 retype surface (layers.go/unified.go/resolved_project_host.go/render_baked_metadata.go). sdk gitlink -> 5cf230d (sdk#76, a docs-only hygiene fix, confirmed a descendant of the previous db63ef1 pin). Verified: task build:binary (2026.201.0649, zero go.work.sum drift); charly go test ./... 97.7s green; gofmt/vet/golangci-lint clean; GOWORK=off go mod verify clean; superproject task cue:gen no-op beyond the pre-existing untouched box/cachyos pointer noise; charly box validate exit 0. candy/plugin-http + candy/plugin-port: the previously-reproduced fakeCC fixture failures are now GREEN after this merge (confirming #161's fix landed correctly here). This is the W9 loader-cone cutover's FINAL rebase — the full 10/10 disposable bed roster (check-exampledeploy, check-substrate, check-builder-vm, check-k3s-vm, check-group, check-structkind, check-sidecar-pod, check-charly-vm, check-local-vm, check-k8s-deploy) passed against this lineage's immediate predecessor (6b07a93); check-k8s-deploy's one roster-run flake was concurrency contention (isolated re-run PASS 10/10), not a regression, and is tracked separately (bed-robustness batch). Axis measurements (charly/ only, vs 6d436e2): axis-A (non-test non-alias files importing an sdk mechanism kit) 139 vs main's 141 (net -2); non-test LOC 46,835 vs main's 48,177 (net -1,342); *_aliases.go count 1 (vmshared_aliases.go) on both sides — no regression. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
Summary of changes
Repo-configuration validation failed on a pristine clone of
main(
5f173df), two build/check inputs silently depended on machine-localscratch state, and the venue builder tarball name was a concurrency hazard.
Five fixes, one theme (repo tooling/config hygiene), from a full repo-wide
sweep with zero deferrals:
.agents/skillsdeveloper profile was stale relative to the pluginsgitlink (
v2026.200.1901,4b2b96b): the plugins tree gainedautomation/skills/agentandinternals/skills/root-cause-analyzer, butthe committed
.charly-profile.jsonwas never re-synced, soplugins/setup <kimi|codex> --check developerfailed on every freshclone. Committed the synced profile (292 repo-native skill links)
including the previously untracked
charly-automation--agentsymlink.scripts/validate-agent-config.pyrequired a stale build-gate term —the literal
-o ../bin/charly, whilebuild:binaryhas built to../bin/.charly.nextwith an atomic promote since56b1a6b. The requiredterms now pin the temp-output + promote contract.
taskfiles/Cue.ymlbootstrap-cuepreferred/tmp/cue-rdd/cue— anRDD-spike scratch binary present since the genesis import (
2e3eb76) thatsilently won over the checksum-verified pinned download. The sdk
checkout's
sdk/bin/cuefallback and the verified download are now theonly sources. (The matching sdk-side residue is the producer leg
fix(build): remove /tmp/cue-rdd scratch-binary residue; rewrite stale schema README sdk#74.)
check-k3s-vmbed'skv-charly-versionstep probed/tmp/charly-build/charlyfirst — a host scratch path no step everpopulates; the
||fallback always ran${CHARLY_BIN} versionexcept onhosts carrying the stale binary. The step now invokes
${CHARLY_BIN} versiondirectly.(
/tmp/charly-builder-<candy>.tar.gzinrunVenueHomeArtifactBuilder):two concurrent deploys of the same candy to the same venue could
interleave, the second
PutFileoverwriting the first's tarball beforeits extract ran. The name now carries the host staging dir's unique
MkdirTempsuffix (venueBuilderTarName), covered by the newTestVenueBuilderTarNameUniquePerScope.Change class
cross-repo — consumer leg. Repos + landing order: opencharly/sdk#74
(producer) FIRST → this PR, which then bumps the
sdkgitlink to themerged sdk commit before its own validation (B2 order).
How R10-tested — exact gate, commands, and pasted output
(config/validation-script/build-tooling metadata) → the full non-runtime
standards; item 5 is a one-function runtime change (internal scratch
naming; no interface/schema/artifact change) → the core Go gate (
go test ./...+go vet+golangci-lint+task build:binary+ content markerbin/charly box validate). No disposable bed exercises harness-configdrift repair or venue-scratch naming; the live executions are the edited
tasks/tests/checks below.
N/A — no disposable bed can exercise .agents/skills profile sync, agent-config validation terms, cue bootstrap sourcing, or the venue tarball NAME computation; the bed whose step text changed (check-k3s-vm) had its file load-validated (box validate exit 0), and its step's effective command is unchanged wherever /tmp/charly-build was absent (always).task build:binaryrebuilt from this tree;bin/charly version=2026.201.0455(HEAD at build time); the fix-fix(labels): ai.opencharly.env reader decodes the object writeLabels bakes #5content marker is present in the binary
(
strings bin/charly | grep -c charly-venue-builder-tar→ 2).items 1–4 executed live (setup checks ×3, agent-config validator,
bootstrap-cuevia sdk/bin/cue,box validateon the edited charly.yml,fresh-clone repro below). Item 5's changed branch executed via its new
unit test + the rebuilt binary's content marker — NOT on a live venue
deploy → tier capped at
analysed on a live system.fix (same-candy same-venue collision class); its coverage is the unit
property test (unique-per-scope). No roster applies to a naming-only
change.
Fresh-clone reproduction (RDD): a
--no-localclone at/tmp/charly-path-test.*/charlywith plugins at the recorded gitlink FAILEDplugins/setup kimi --check developerbefore this change and PASSES after;pre-push-gate.shcorrectly blockedgit push origin mainfrom the clonepath;
gate_test.py35/35 there.Attribution tier
analysed on a live system — the changed runtime path (item 5) ran via
unit test + rebuilt binary but not on a live venue; items 1–4 executed live
but no disposable-bed roster applies to their class. (The item 1–4 commits
carry
documentation reviewed; the item-5 commit carriesanalysed on a live system.)Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)git-workflow,skills,agents(hooks doctrine) loadedby path before acting; landing follows B1/B2 (feat branch, PR-only,
producer→consumer order, placeholder CHANGELOG).
(profile drift ← gitlink bump without re-sync; validator drift ←
56b1a6bcontract change; cue-rdd ← genesis spike residue; venue-tar ← fixed-name
collision class); all gate outputs zero-warning.
cutover (incl. the sdk-side residue via fix(plugin): synchronize the InvokeWithExecutor reverse-server handoff (data race) #74 and the README sibling) —
nothing parked as pre-existing/follow-up.
mechanism introduced; the venue-tar naming extracted to ONE helper.
preference, dead probe prefix, fixed name) — no sleeps/retries/shims.
git grep 'cue-rdd\|/tmp/charly-build' -- . ':!CHANGELOG'→ zero hits; the stale sibling claim insdk/schema/README.mdfixed in fix(plugin): synchronize the InvokeWithExecutor reverse-server handoff (data race) #74; no transitional/dual-mode paths.M sdkworking-tree state (submodule on its feat branch) is deliberate andunstaged; no destructive git action.
Go gate + live binary rebuild + content marker (no bed exists for the
naming-only path — tier capped accordingly).
bin/charly box validateexit 0 confirms the edited bed file's emittedconfig stays valid.
task build:binaryrebuilt;bin/charly version=2026.201.0455; no new OS deps.change —
TestVenueBuilderTarNameUniquePerScope(item 5),plugins/setup --checkpassing on a pristine clone (item 1),validate-agent-config.pypassing (item 2), the editedbootstrap-cueresolving the pinned cue (item 3).
an arbitrary path before the fix and passes after; ADE N/A — no candy
change; SDD —
task cue:genclean-regeneration no-op; no schema edit.squash commit on main.
existing core machinery (no new capability, no kind-word switch, no new
alias —
golangci-lint+ the pre-commit ZERO-ALIASES gate both green); noboundary change.
gofmtclean,golangci-lint0issues,
go vetclean,go test ./...green.CHANGELOG/2026.201.0437.mdstaged (placeholder CalVer —the pr-validator finalizes it at merge).
Assisted-by: Kimi Code (Moonshot K3; analysed on a live system)