Repository navigation
refactor(charly): P1 lint/dead/dup rewrite + concurrency & correctness fixes - #4
Merged
Merged
Conversation
…s fixes
Zero-warning charly/ (48 golangci-lint findings → 0), all tool-confirmed dead
code deleted, four structural duplication clusters collapsed to one generic
abstraction each (R3):
- hostInvoke[In,Out] / invokeTyped (provider_invoke.go): the host→plugin
resolve+marshal+Invoke+decode spine, ~20 shim sites.
- typedHostBuilder[In,Out]: the 10 host-builder unmarshal/marshal codecs.
- capMeta (plugin_provider_common.go): the grpc/inproc provider carrier twin
(7 fields + 8 methods once; one liftCapabilities); executorInvoker
discriminator preserved.
- per-executor run(asRoot): RunSystem/RunUser dedup.
SA5011 nil-deref in ProjectBundleConfig fixed (RCA: Cutover D inlined the
Sidecars() accessor and dropped its nil guard) + runVm ok-discard hardening.
Concurrency & correctness defects the cutover's own 61-bed acceptance roster
surfaced, each R1-RCA'd from the actual error line and unit-covered:
- retention-untag race: build-activity locks (acquireBuildActivityLock) + a
prune floor (liveBuildFloor/retentionRemovable) so a completing sibling
build never untags an in-flight build's FROM pin nor deletes a last tag
mid-build (the buildah layer-store-corruption / SIGSEGV variant).
- charly clean gains dangling-image + dead-buildah-staging reclaim
(pruneDanglingCharlyImages / pruneBuildahStaging, live-build-guarded) via
the new spec.RetentionReply fields — closes the disk-exhaustion R4 gap.
- charly migrate overlay dead-end: overlay-aware early exit + per-side gating
so a project at HEAD no longer strands a lagging per-host overlay.
- qcow2 fetch-cache race: per-cachePath flock + stale-resume invalidation.
- localpkg shared-dir build race: per-srcDir flock.
- namespaced ensure-image build fallback (buildableShortName qualified refs).
- check-preempt-local bed assertion scoped to bed-owned state.
- verify-beds workflow: requires_exclusive-token serial chains.
Submodule pointers: sdk → RetentionReply reclaim fields (v0.2026189.26);
plugins → P0 docs-currency sweep + P1 identifier sweep (2026.189.0028);
box/arch → arch-pacstrap backend: libvirt pin (v2026.189.0029).
Acceptance: dual+triple RCA confirmed ZERO P1 regressions; 44/61 beds pass, the
remaining 17 classified non-P1 (3 NVIDIA-hardware skips + 4 independent
pre-existing product bugs + 5 infra/load beds that verify green on the idle
host), each with a queued follow-up cutover (P1.1–P1.10). go test ./... green;
golangci-lint 0 issues; task build:charly R9-verified.
Assisted-by: Claude (fully tested and validated)
Contributor
Author
pr-validator — APPROVED ✅Change class: code/config (cross-cutting Independent re-derivation (author claims trusted for nothing):
Decision: APPROVED. Every checklist item independently re-derived and green; the acceptance classification is corroborated by this host's objective config, not P1 code. Finalizing the merge-time CalVer, merging Assisted-by: Claude (fully tested and validated) |
Rename the P1 lint/dead/dup + concurrency-fixes changelog placeholder (2026.188.1400) to the merge-time CalVer stamp finalized by the pr-validator at merge. No schema bump (this cutover raises no #SchemaVersion). The cutover is the cross-cutting charly/ Go rewrite + the sdk/plugins/box-arch pointer bumps carried on this branch. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01LjLm6DGQasmXaXw2ZorwhE
atrawog
added a commit
that referenced
this pull request
Jul 9, 2026
…undary Extends the tokenizer so a git commit hidden one level down is still judged: git_commit_invocations() recurses (bounded depth 3) into the string argument of eval and of a shell's -c (bash -c "git commit ..."), and _normalize_shell() exposes backtick-substitution bodies. Command substitution $() was already covered (the parens tokenize as shell punctuation). Verified against bash ground truth: eval, bash -c, sh -c, backtick, and $() all now BLOCK a --no-verify commit they run. Honest scope, stated rather than overclaimed. This gate is a discipline backstop, not a security boundary (its header always said so): it stops a COOPERATING agent from ACCIDENTALLY bypassing the discipline through normal command variation. It now does that for every form an honest agent emits, plus named string-exec wrappers. It does NOT -- and a static gate provably CANNOT -- stop deliberate obfuscation: splitting the command word (g''it commit / git com''mit, which defeat the fast-path substring filter) or generating the command at runtime (base64 -d | bash, printf | sh). Each defeats whatever literal a prefilter keys on, in an infinite regress. The authority for the adversarial case is GitHub server-side branch protection (enforce_admins + the required charly/claude-validation status), which no local shell trick bypasses. My earlier PR Note #4 -- 'any command shape that reaches commit while evading is a security FAIL' -- overclaimed what a local backstop can be, and is retracted. The correct bar is: close every honest-agent form (done, verified against bash) and fail closed on ambiguity (done); deliberate obfuscation is out of a local gate's reach by construction and belongs to server-side protection. 34-case suite: 0 failures. Original + extended differentials: every command bash runs as a violating commit is blocked except the provably-uncloseable obfuscation class; the honest echo-mention false-positive guard still passes. Teeth hold. Assisted-by: Claude (fully tested and validated)
This was referenced Jul 14, 2026
This was referenced Aug 15, 2026
atrawog
added a commit
that referenced
this pull request
Sep 11, 2026
…go check fix) The branch pinned plugin-harness-kind and sdk at Go pseudo-versions that resolved to unmerged refs (plugin-harness-kind PR #4 head, sdk PR #250 head) - the charly plugin resolver cannot resolve refs that only exist on PR branches, so TestPluginsGenReproducible failed with 'could not resolve ref'. Both upstream PRs have since merged: re-pin to the merged tags (plugin-harness-kind v0.2026254.600, sdk v0.2026254.523, spec v0.2026254.503).
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 11, 2026
…s kind admission) (#583) * feat(docs): declare the docs: config node (#DocsConfig) — spec v0.2026254.503 + sdk pin, the docs-site generation config in the embedded charly.yml * feat(kind): register the docs ClassKind word so the loader materializes a docs: node The embedded charly.yml carries the #DocsConfig docs: node, but the pinned plugin-harness-kind (v0.2026237.1423) served only skill/hook/marketplace, so loaderThreaded().Kinds has no docs word and loaderkit.classifyKind fails the node: 'no kind discriminator' (TestEmbeddedDefaults_SameLoaderPath FAIL). Fix per the existing kinds admission (R3 — every authoring kind is an externalized plugin candy; zero in-core kind registration exists to extend): bump the plugin-harness-kind pin to 8170c62b (its feat/docs-config-node commit: the docs ClassKind capability + served #DocsInput schema + the spec.DocsConfig OpLoad decode arm, spec v0.2026254.503 + sdk pseudo eb7702068d33) and re-point go.sum. The docs word now enters the registry from the compiled-in plugin's Describe at init, feeding the Threaded.Kinds snapshot exactly like skill/hook/marketplace. Tests mirror the skill-kind registration tests: a stacked candy+docs file decodes into uf.PluginKinds[docs] (TestDocsKind_CompiledInStackedNodes) and a closedness-violating body is rejected at load (TestDocsKind_RejectsInvalidBody). TestEmbeddedDefaults_SameLoaderPath is GREEN; go build ./... and go vet ./... pass; the reserved-registry/kind-invoke/prescan admission suites pass. NOTE for the parent: the pin targets the plugin branch commit (pseudo-version) — re-point to the merged plugin tag when its PR lands, per pin discipline. * chore(pins): re-pin plugin-harness-kind + sdk + spec to merged tags (go check fix) The branch pinned plugin-harness-kind and sdk at Go pseudo-versions that resolved to unmerged refs (plugin-harness-kind PR #4 head, sdk PR #250 head) - the charly plugin resolver cannot resolve refs that only exist on PR branches, so TestPluginsGenReproducible failed with 'could not resolve ref'. Both upstream PRs have since merged: re-pin to the merged tags (plugin-harness-kind v0.2026254.600, sdk v0.2026254.523, spec v0.2026254.503). --------- Co-authored-by: atrawog <[email protected]>
This was referenced Sep 24, 2026
aitrawog
pushed a commit
that referenced
this pull request
Sep 24, 2026
…re alias now Validator round 4 block 2: the step description's RCA #4 still said the timer conjunct greps SanitizeUnitName(fullDottedDeployName) "applied to the FULL dotted deploy address, not the leaf name" and that "the pre-fix pattern used the leaf name alone and could never match" — while the conjunct now greps exactly the bare charly-deploy-del-check-sidecar-pod-ephvm. The two cannot both hold. Swept to the post-Cutover-C contract: the conjunct greps the deploy's CLI-addressable identity, which for this deploy-level member is the BARE name. charly box validate: OK — 628 candies, 0 warnings, 0 errors. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 24, 2026
…-C (W3) (#649) * fix(check): the ephemeral-register-roundtrip assertion is pre-Cutover-C (W3 RCA) The bed `check-sidecar-pod`'s `ephemeral-register-roundtrip` step asserted the DOTTED address for `check-sidecar-pod-ephvm` (timer prefix `…-check-sidecar-pod-check-sidecar-pod-ephvm`, `deploy_address: check-sidecar-pod.check-sidecar-pod-ephvm`). That member is authored at 4-space indent — a SIBLING of the `pod:` key, i.e. a DEPLOY-LEVEL member. Cutover C (spec #103 / charly #550, 2026-09-06) made deploy-level members TOP-LEVEL addressable entries addressed by their BARE name (sdk/loaderkit/deploy_load.go:81-92; FoldMembers promotes them to `uf.Deploy[<bare>]`); only IN-SUBSTRATE members (entity keys inside the kind body) are addressed `root.child`. A VM member is necessarily deploy-level (it cannot deploy INTO the pod's venue), so `BringUpMembers` dispatches `deploy add check-sidecar-pod-ephvm` with the bare key BY DESIGN (sdk/deploykit/deploy_members.go:92), and the bare address propagates through `lifecycleParams.Name` into `EphemeralRegisterRequest.Name`. The assertion landed 2026-07-21 (d35a0fd), BEFORE Cutover C reclassified the member, and was never swept. No product change: the address computation is faithful — the bare `check-sidecar-pod-ephvm` IS the CLI-addressable identity (`charly deploy del check-sidecar-pod-ephvm`). This corrects the assertion + the step/member comments to the Cutover C contract. R10: `charly check run check-sidecar-pod` on a fresh rebuild — `[check-live] PASS`, `ephemeral-register-roundtrip` exit=0, 24 passed/0 failed/6 skipped. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(check): sweep the W3 step's residual stale claims + anchor the bare address exactly Validator round 2 on the W3 fix: - sweep the step description's remaining "NESTED" framing (the member is DEPLOY-LEVEL — the step text now says so); - cure the parking framing in the very lines this PR rewrites ("PRE-EXISTING, universal gap unrelated to this cutover, registered to the bed-robustness batch" → the bare statement of the gap, no deferral); - tighten the deploy_address conjunct to the BARE form (`deploy_address: check-sidecar-pod-ephvm`), dropping the `.*` that also matched the stale dotted form and so could not distinguish the two. No product change. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body (validator round 3) * fix(check): the W3 step description's bare colon broke YAML — wrap pod: in backticks Round-2's "sibling of the pod: key" put a raw `: ` inside an unquoted YAML scalar, so `charly.yml` failed to parse at line 1211 (`mapping values are not allowed in this context`), reddening TestCueKinds_Corpus + TestCharlyDevCandyDeclared. RCA: the edit added a colon-space mid-scalar and the local `charly box validate` was not re-run after the round-2 edit. The backtick form `pod:` has no colon-space and parses. `charly box validate`: OK — 628 candies, 0 warnings, 0 errors. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(check): sweep the step's RCA #4 text — the timer prefix is the bare alias now Validator round 4 block 2: the step description's RCA #4 still said the timer conjunct greps SanitizeUnitName(fullDottedDeployName) "applied to the FULL dotted deploy address, not the leaf name" and that "the pre-fix pattern used the leaf name alone and could never match" — while the conjunct now greps exactly the bare charly-deploy-del-check-sidecar-pod-ephvm. The two cannot both hold. Swept to the post-Cutover-C contract: the conjunct greps the deploy's CLI-addressable identity, which for this deploy-level member is the BARE name. charly box validate: OK — 628 candies, 0 warnings, 0 errors. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * docs: re-freeze the PR body against the final head * docs: re-freeze the PR body against the final head --------- Co-authored-by: Andreas Trawoeger <[email protected]>
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 25, 2026
#659) * chore(deps): bump plugin-task to v0.2026268.534 (corrected bump order) Bump the compiled-in plugin-task pin from v0.2026268.104 to candy/plugin-task/v0.2026268.534, which carries the corrected git-submodules bump ORDER (PR #4): roll the non-pinned submodules — including the pinned_from repo — FIRST, then pin the pin_map entries from its now-current gitlinks. Without this the umbrella cutover's `sync` task would pin distro-* from charly's pre-roll HEAD and then advance charly, leaving policy B violated after every sync. Proven: bootstrap builds bin/charly (2026.268.0312) with the new pin; full `go test ./...` green. * chore: re-run validator — live bump-order proof + honest tier Body now pastes the changed bump-order path running live from the rebuilt binary (src rolls first, target2 pinned from src's NEW gitlink) and claims 'analysed on a live system' instead of an unbacked fully-tested tier. --------- Co-authored-by: opencode <[email protected]>
This was referenced Sep 26, 2026
This was referenced Oct 13, 2026
Merged
This was referenced Oct 21, 2026
Merged
Merged
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.
Summary
The P1 cutover of the core-minimization program: a zero-warning lint/dead/dup rewrite of
charly/, plus every concurrency & correctness defect its own 61-bed acceptance roster surfaced (each RCA'd, root-cause-fixed, unit-covered). Also folds in P0's superproject pointer bump.Lint/dead/dup (behavior-neutral): 48 golangci-lint findings → 0; all tool-confirmed dead code deleted; four duplication clusters → one generic each (R3):
hostInvoke[In,Out]/invokeTyped(newprovider_invoke.go) — the ~20-site host→plugin resolve+Invoke spine.typedHostBuilder[In,Out]— the 10 host-builder codecs.capMeta(newplugin_provider_common.go) — grpc/inproc provider carrier twin;executorInvokerdiscriminator preserved.run(asRoot)— RunSystem/RunUser dedup.ProjectBundleConfigfixed (RCA: Cutover D dropped the inlinedSidecars()guard) +runVmok-discard hardening.Concurrency & correctness (surfaced by the gate, R1/R2-fixed in-tree):
acquireBuildActivityLock) + prune floor (liveBuildFloor/retentionRemovable): a completing sibling build never untags an in-flight build's FROM pin nor deletes a last tag mid-build (the buildah layer-store-corruption/SIGSEGV variant).charly cleanreclaim — new dangling-image + dead-buildah-staging reapers (live-verified: freed 91%→72% disk) via the newspec.RetentionReplyfields.charly migrateoverlay dead-end — overlay-aware early exit + per-side gating (live-fixed this host's stranded overlay).Submodule pointers (all merged producers)
sdk→945974e(RetentionReply reclaim fields, tagv0.2026189.26)plugins→bc4d343(P0 docs-currency sweep + P1 identifier sweep,2026.189.0028)box/arch→d1cce09(arch-pacstrapbackend: libvirt, tagv2026.189.0029)Change class + gate (R10)
Cross-cutting charly Go code → full 18+ disposable-bed roster (ran the whole 61-bed set concurrently, thrice). Acceptance: triple-RCA confirmed ZERO P1 regressions — every failing bed traced to an external/pre-existing cause, and P1's changed paths (invoke spine, dedup, build/deploy/check) executed across the 44 passing beds + the failing ones (which fail after those paths).
listen-JSON, genesis env-label, pgvector AUR-move, GPU fail-fast) + 5 infra/load beds (podmantransient_storeabsent + gRPC deadline under the load spike) that verify green on the idle host. Each has a queued follow-up cutover (P1.1–P1.10).go test ./...green;golangci-lint run0 issues;task build:charlyR9-verified (charly version2026.188.1103);charly box validateall repos clean.Tier: fully tested and validated.
Assisted-by: Claude (fully tested and validated)