Skip to content

fix(candy): claude-code npm → official native installer - #143

Merged
atrawog merged 4 commits into
mainfrom
fix/claude-code-native-installer
Jul 19, 2026
Merged

atrawog merged 4 commits into
mainfrom
fix/claude-code-native-installer

Conversation

@atrawog

@atrawog atrawog commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

candy/claude-code installed @anthropic-ai/claude-code via a package.json
(npm builder). That npm package regressed upstream into a thin launcher that
defers its native-binary download to first RUNTIME, so claude --version
failed "claude native binary not installed" in a hermetic (offline)
charly box build / check-image — BASELINE-CONFIRMED pre-existing on main.

Concrete edits:

  • candy/claude-code/charly.yml: replaced the npm install with the official
    native installer (curl -fsSL https://claude.ai/install.sh | bash), dropped
    require: [nodejs] (the native binary needs no node), and added a new
    root-run plan: step that relocates the installer's real binary to
    /usr/local/bin/claude — a system path that survives the deploy-time
    home-volume mount (the installer self-installs under ${HOME}, which a
    live pod's persistent home volume shadows). Both check: steps updated to
    the new system path; version: bumped to 2026.198.2107.
  • git rm candy/claude-code/package.json (R5 — the old npm path fully removed).
  • candy/hermes-full/charly.yml, candy/openclaw-full/charly.yml: their own
    composed checks asserted the OLD ${HOME}/.local/bin/claude path; swept to
    /usr/local/bin/claude to match (R2 — these compose the local claude-code
    candy by bare name, not an @github pin, so they would have broken).
  • CHANGELOG/2026.198.2154.md: placeholder entry narrating both RCAs below.

Change class

candy/box-config

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: charly box validate + charly check run check-charly-selftest-pod (the disposable pod bed that composes claude-code, hermes-full/openclaw-full are not composed by any bed in this repo but are fixed for correctness — see R2 note above).
  • Eval beds run:
    check-charly-selftest-pod | pod | FAIL (2 pre-existing, unrelated failures) | 83 steps (72 passed / 2 failed / 9 skipped) | 1196s — run-calver 2026.198.2109, binary charly version = 2026.198.1029, launched from box/cachyos (single bed, not a cross-cutting change — no concurrent roster needed).
    Two earlier runs on the SAME bed are part of the RCA trail, not separate coverage: 2026.198.1857 (image-build FAILED — RCA feat!: PR-only agent-validated landing — forbid + disable direct pushes to main #1, curl transient) and 2026.198.2030 (image-build passed; check-live FAILED — RCA docs: bump plugins → pr-validator always comments on the PR #2, home-volume shadowing, led to the /usr/local/bin rework).
  • Fresh rebuild: task build:binary on this commit's source; ./bin/charly version → 2026.198.1029. The bed's image-build step (232s) is itself a fresh, uncached-installer rebuild of the charly-selftest image from this candy's final content; check-image (18s) and the full deploy→config→start→check-live sequence all ran against that fresh image — zero warnings in the gate output.
  • Did the CHANGED code path execute live? Yes. Both new/changed claude-code plan steps executed at BUILD time (image-build log shows the installer running + the relocate step); both new/changed check: steps executed at BOTH check-image (build-scope) and check-live (deploy-scope) time and PASSED at deploy-scope — the scope that actually exercises the home-volume-shadowing fix.
  • Concurrency: N/A — a single self-contained candy's install steps; not a shared-state/loader/deploy-ledger/resource-arbiter change.
$ ./bin/charly box validate
(exit 0, zero warnings)

$ cd box/cachyos && ../../bin/charly check run check-charly-selftest-pod
[run 2026.198.2109]
  image-build   232s  ok
  check-image    18s  ok
  deploy-add     30s  ok
  config          4s  ok
  start           9s  ok
  bring-up-members 0s ok
  check-live    903s  FAIL

check-live.log (claude-code lines):
  PASS  check the claude binary is installed at the system-wide native install location  [plan:candy:...claude-code:2]  ok
  PASS  check running claude --version exits cleanly and prints the Claude Code banner    [plan:candy:...claude-code:3]  exit=0
  FAIL  check mcp=call  [mcp-charly-call-list-boxes]  mcp: call: exit=1, want 0 (stderr: unknown tool "box.list.boxes")
  FAIL  check command=charly check --help  [charly-cli-check-group]  stdout: expected to contain "live" ...
83 steps: 72 passed, 2 failed, 9 skipped

The 2 failures are pre-existing main defects, unrelated to this cutover
(reproduced identically on an independent branch by another teammate and
confirmed as baseline; tracked + being fixed under a separate, parallel task —
NOT part of this PR's scope per R2's separability test: this cutover's own
gate passes without needing that fix).

Attribution tier

fully tested and validated — the cutover's new/changed code paths (the
native-install steps + the relocate step + both check steps) executed against
a fresh rebuild at both build-scope and deploy-scope, and both R10 outputs
(exploratory RCA runs 2026.198.1857/2026.198.2030 + the final proving run
2026.198.2109) are pasted above / in the CHANGELOG entry.

Harness rulebook compliance

  • R0 skills: /charly-image:layer (candy authoring) + /charly-internals:git-workflow (branch/commit/PR mechanics) loaded before any edit.
  • R1 RCA + zero warnings: two full RCAs performed (curl exit-23 transient, home-volume shadowing) before any retry/fix — see CHANGELOG; final gate output carries zero warnings.
  • R2 no out-of-scope: hermes-full/openclaw-full path fix folded in (same-repo, directly caused by this change); the 2 pre-existing check-live failures are a genuinely separate, already-tracked, in-flight fix (independently reproduced on a different branch) — not this cutover's to fix. Round 2: the validator's R2/R5 finding (stale plugins skill claims) is fixed in the owning repo as docs(claude-code): sync skill with the native-installer candy marketplace#93 (the complete claim-keyed sweep, validator-verified), and the layer-skill version: mandate finding is fixed by the appended bump commit on this branch.
  • R3 no duplication: the getent passwd 1000 user-resolution pattern reuses the SAME idiom already used by container-nesting/virtualization candies in this repo, rather than inventing a new one.
  • R4 no workaround: no sleep/retry/magic-number; the curl failure was root-caused (not retried blindly) before a legitimate, evidenced re-run.
  • R5 hard cutover + grep: package.json deleted; git grep for the removed npm-global claude path returns only (a) this candy's own description explaining WHY it changed, (b) an unrelated openclaw-full sentence about OTHER (still-npm) binaries, and (c) the out-of-scope box/cachyos bed pinned to an old remote tag (self-resolves via charly box reconcile once this candy is tagged — a separate, standard cross-repo landing step, not a stale reference in the changed surface). Round 2: the mandated grep now also extends into the plugins submodule — the stale claude-code/nodejs/kimi/forgecode/hermes/openclaw-desktop skill claims it surfaces are swept in docs(claude-code): sync skill with the native-installer candy marketplace#93 (same cutover family, owning repo).
  • R6 git safety: no destructive git actions taken.
  • R7 runtime gate: full charly check run <bed> end-to-end gate run (not just go test/validate).
  • R8 artifact invariants: N/A — no OCI-label/Containerfile-generation-shape change (a normal candy install-step edit).
  • R9 binary == source + deps: task build:binary rebuilt from this source; charly version = 2026.198.1029 confirmed; no new runtime OS dependency introduced (curl was already declared).
  • R10 disposable + coverage: all runs on check-charly-selftest-pod, disposable: true; fresh rebuild; the candy's own check: steps are the coverage that would FAIL without this fix (and did, in the exploratory RCA runs).
  • RDD / ADE / SDD: RDD — the install.sh interface + real on-disk binary layout were RDD-verified in a throwaway container (not guessed) before writing the relocate step. ADE — description: + plan: with ≥1 deterministic check: present; charly box validate passes. SDD — N/A, no schema/.cue change.
  • Hard cutover: ONE atomic commit; no deferred/Phase-2 scope.
  • Kernel/plugin boundary law: N/A — no charly/sdk core change, candy-only.

Salvage update (validator round 2)

Round-1 fresh validator: CHANGES REQUESTED (head ec92e60, verdict comment on this PR) with two blocking findings, both resolved:

  1. Stale plugins skill claims (R5/R2) → fixed by docs(claude-code): sync skill with the native-installer candy marketplace#93 (coder/skills/claude-code + nodejs/kimi/forgecode/hermes/openclaw-desktop sibling sweep; its own fresh-validator loop).
  2. Layer-skill version: mandate → appended commit bumps version: on candy/hermes-full/charly.yml (2026.156.1921 → 2026.200.1600) and candy/openclaw-full/charly.yml (2026.144.1443 → 2026.200.1600); charly box validate exit 0 on the new head.

The validator's bed evidence (check-openclaw-full-pod serial PASS 12/12 @ 2026.200.1546; selftest baseline with only the 2 known F-CLI-NEST failures) carries over as the runtime baseline for the round-2 delta re-gate: the appended commit touches only version: metadata (no plan/check/runtime content).

  • Disposable-only autonomy: all destroy/rebuild cycles ran on the disposable: true check-charly-selftest-pod bed.
  • Clean architecture + Go gates: N/A — no Go source touched.
  • CHANGELOG: CHANGELOG/2026.198.2154.md staged (placeholder CalVer).

Salvage update (2026-07-19, Kimi Code)


Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)

The npm @anthropic-ai/claude-code package regressed upstream into a thin
launcher that defers its native-binary download to first runtime, breaking
`claude --version` in hermetic (offline) image builds (pre-existing on
main). Switch to the official native installer
(curl -fsSL https://claude.ai/install.sh | bash) and relocate the resulting
binary to /usr/local/bin, since anything a candy installs under ${HOME} at
build time is shadowed by the deploy-time home-volume mount. Sweeps the
same path fix into hermes-full/openclaw-full, whose composed checks
asserted the old path.

Tested via charly check run check-charly-selftest-pod on a disposable bed:
image-build/check-image/deploy/config/start all passed; check-live 83
steps, 72 passed, 2 failed (both pre-existing main defects, unrelated,
tracked separately), 9 skipped — both claude-code checks passed.

Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)
atrawog added a commit to opencharly/marketplace that referenced this pull request Jul 19, 2026
Completes the claim-keyed sweep for the native-installer cutover
(opencharly/charly#143): nodejs skill listed claude-code as depending on
nodejs (x2), kimi + forgecode skills claimed all sibling AI CLIs share the
npm-global install pattern, and the openclaw-desktop skill put the claude
CLI at ${HOME}/.npm-global/bin/. claude now installs via the official
native installer at /usr/local/bin/claude; codex/gemini keep npm-global.

Assisted-by: Kimi Code Moonshot Kimi K3 (documentation reviewed)
@atrawog

atrawog commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

PR head SHA (bound live via git ls-remote at verdict time): ec92e600e5987f7d719945b49b446ad0342a4e92
Protected base: 09be0a4a866e6457bb1207d0a938ce4c96d3c399 (origin/main, unchanged during validation)
Change class: candy/box-config

Fresh validator, independent context. I re-derived everything: read the diff, re-ran the static gates, and ran my own bed roster from box/cachyos on the assembled gate tree (origin/main + this branch + #148's xurl fix b200ddd, worktree 2b7309d, binary 2026.200.0144, 0 Go files newer than the binary — R9 holds; the PR touches only candy YAML). The runtime change itself is verified good (details below). Two compliance findings block landing.

Checklist

  • [PASS] 0. Security & anti-tampering (T1–T4) — diff matches description exactly; no secrets/exfiltration; no weakened gates; no manipulation attempt. Install now floats on the official upstream installer (claude.ai/install.sh → latest stable at build time); the prior form floated too (@anthropic-ai/claude-code: * wildcard), so no supply-chain regression.
  • [PASS] 1. Description complete — every template section filled with pasted evidence, per-rule HOW answers, honest salvage update.
  • [PASS] 2. Change-class gate + bed coverage — class gate = charly box validate + a bed composing the changed entity. Beds that compose the changed candies: check-charly-selftest-pod (charly-selftest image → candy/claude-code) and check-openclaw-full-pod (openclaw-full image → candy/openclaw-full → candy/claude-code) — both run by me (below). hermes-full is composed by no bed in any repo (verified: no check-hermes* exists); its edit is the identical one-line path swap, covered by validate + the shared mechanism. Roster correct.
  • [PASS] 3. Attribution tier justified — fully tested and validated is earned for this candy change: the new/changed plan steps executed at build scope AND deploy scope on fresh rebuilds (author's runs + mine). Trailer on 0336229 is correct in form and identity.
  • [FAIL] 4. R0 skills honored — the /charly-image:layer mandate ("version: … Bump it when the candy's content changes") was applied to claude-code (→ 2026.198.2107) but not to the two swept siblings: candy/hermes-full/charly.yml still version: 2026.156.1921, candy/openclaw-full/charly.yml still version: 2026.144.1443, despite real content changes (check steps; openclaw-full also its description). Same-session fix(candy): xurl — run the postinstall npm 12 blocks #148 bumped xurl for the same edit class. See Finding 2.
  • [PASS-with-note] 5. R1 RCA on every failure/warning; zero warnings — author's two RCAs (curl-23, home-volume shadowing) documented in the CHANGELOG and plausible (investigated before re-run; atomic .part→mv cache design correctly cited; the shadowing mechanism is real and the /usr/local/bin relocation is the correct root fix, not a workaround). My own roster surfaced a NEW failure class (pnpm / nested-podman, HOME-empty exec) — full RCA below in the Decision; it is not this PR's defect and is not dismissed as "flake": the mechanism trail is recorded and a named follow-up task is required. Pacman "local is newer" chatter in build logs is upstream repo noise, not gate output.
  • [FAIL] 6. R2 no pre-existing/out-of-scope split — the two check-live failures the PR routes away ARE genuinely separable (I reproduced both on main's Go myself; the named in-flight fix is feat(proto,spec): F-CLI-NEST — declared subcommand catalogs for command-class plugins sdk#72 F-CLI-NEST) → those two: verified-non-blocking. But the cutover's OWN sibling sweep is incomplete (Finding 1: stale owning-skill + sibling-skill claims in plugins), surfaced during this review and neither fixed nor routed to a named batch.
  • [PASS] 7. R3 no duplication — the getent passwd 1000 idiom is the repo-standard pattern; no copies introduced.
  • [PASS] 8. R4 no ad-hoc workarounds — no sleeps/retries/magic numbers/shims.
  • [FAIL] 9. R5 hard cutover + grep self-test — superproject sweep is clean (npm-global/bin/claude → 0 hits outside CHANGELOG; anthropic-ai/claude-code → only the candy's own explanation; the box/cachyos @github …:v2026.183.1359 pins are the standard post-merge charly box reconcile step, honestly disclosed). But the mandated grep was never run inside the plugins submodule, where it returns live stale claims — Finding 1.
  • [PASS] 10. R6/R8/R9 — no destructive git; no generation-shape change (R8 N/A justified); worktree binary 2026.200.0144 fresh against Go sources; no new host runtime dep (curl is an in-image package).
  • [PASS] 11. R10 disposable-only, fresh-rebuild, coverage — all runs on disposable: true beds; every image freshly built per run; the candy's own check: steps are the would-fail-without-it coverage (they failed pre-rework in RCA run 2026.198.2030, pass now).
  • [PASS] 12. RDD / ADE / SDD — installer on-disk layout proven live (author's throwaway-container RDD + my beds' confirmation); description: + plan: with 2 deterministic check: steps; charly box validate exit 0 (re-run by me); no schema surface touched (SDD N/A).
  • [PASS-with-note] 13. Concurrency mandate + anti-cheat — this change class mandates NO concurrent roster (single candy). I ran my two beds concurrently anyway (scope-expanding) and surfaced a concurrency-window defect in the host machinery (below). It is RCA'd to mechanism level, NOT waved off as "load", and it does not touch this PR's mechanism; the class-mandated serial gate is green three times over (author 2026.200.1317, author's 2026.198.2109 baseline modulo the 2 known F-CLI-NEST defects, my 2026.200.1546).
  • [PASS] 14. Hard cutover, one atomic phase — one atomic change commit (0336229) + a sanctioned gh pr update-branch merge; CHANGELOG placeholder staged.
  • [PASS] 15. Architecture gate — placement: CORRECT. Capability stays in a candy; zero charly/*.go staged (per-item trace: nothing to trace — no alias files, no kit imports, no core seams touched).
  • [PASS] 16. Disposable-only autonomy — every destroy/rebuild on disposable: true beds.
  • [N/A] 17. Go gates — no Go touched. (charly box validate re-run by me: exit 0.)
  • [PASS] 18. CHANGELOG present — CHANGELOG/2026.198.2154.md (placeholder; merge-time validator re-stamps).

Validator's own gate evidence (all from box/cachyos, binary 2026.200.0144, tree 2b7309d)

Run Bed Result Detail
2026.200.1517 (concurrent roster, mine) check-charly-selftest-pod FAIL exit 2 build 291s ✓, check-image ✓, deploy/config/start ✓; check-live 924s: 83 steps, 71 passed, 9 skipped; failures = exactly the 2 baseline F-CLI-NEST defects + 1 INFRA (nested-podman-run, HOME-empty — RCA below). Both claude-code checks PASS (build+live); all charly-cli/mcp checks pass except the 2 known.
2026.200.1517 (concurrent roster, mine) check-openclaw-full-pod FAIL exit 2 10 phases ok through update; feature-run-rebuild: 173 steps, 146 passed, 1 failed — nodejs:6 pnpm --version "ERROR Could not find the homedir" (RCA below). claude-code ×2 and openclaw-full ×3 checks PASS in every phase.
2026.200.1546 (serial, mine) check-openclaw-full-pod PASS exit 0 12/12 phases ok, 389s; pnpm green in all three live phases; zero FAIL lines; host left clean.
author's 2026.200.1317 check-openclaw-full-pod PASS (verified on disk) summary ok: true, 12/12, 604s, zero FAIL lines — cross-checked, matches the salvage-note claim.
author's 2026.198.2109 check-charly-selftest-pod not on disk (retention/other worktree) claim substituted by my own 2026.200.1517 run, which reproduces its exact baseline (72→71 passed only because of the extra HOME-anomaly victim).

The 2 claimed pre-existing failures — independently verified pre-existing and out of this PR's power. On the worktree binary (= main's Go): charly check --help prints only the generic out-of-process placeholder (no live/run/box/feature) — fails charly-cli-check-group; charly box list --help is likewise a placeholder while charly box list boxes itself works — the host-side Kong grammar for out-of-process command plugins lacks nested subcommands, so the MCP leaf walk never registers box.list.boxes — fails mcp-charly-call-list-boxes. ONE root mechanism (F-CLI-NEST), owned by the named, in-flight opencharly/sdk#72 (+ its paired charly cutover). A candy-YAML PR cannot fix Go CLI/MCP behavior; the separability claim holds. Disposition: verified-non-blocking.

RCA — the HOME-empty exec anomaly (surfaced ONLY under my concurrent two-bed window, NOT this PR's defect). Symptom: containers created by charly during the concurrent window (selftest initial 17:23:08, openclaw update-recreate 17:25:08) yield broken podman exec env/user resolution: exec sessions get uid=1000(user) gid=0(root) with HOME empty, while the OCI runtime spec carries uid/gid 1000/1000 + HOME=/home/user, the quadlet injects HOME=/home/user, image labels carry ai.opencharly.home=/home/user, and in-container /etc/passwd is correct. Effects: nested rootless podman computes storage as /.local/share/… → nested-podman-run INFRA failure (selftest); pnpm needs a homedir → nodejs:6 failure (openclaw, post-update only). Verified NOT the image (a plain podman run from the same image at 17:41 resolves exec env correctly), NOT the PR diff (untouched nodejs/container-nesting candies; PR checks green everywhere), NOT the arch base refresh under test (arch:2026.200.1313 was already used by the green 2026.200.1317 run). Serial re-run 2026.200.1546: full PASS. Mechanism as far as traced: podman 6.0.1 rootless exec-time env assembly diverging for systemd-transient-store containers created during a concurrent build/deploy window — below charly's layer. This is a real defect in the concurrent-bed machinery the project's roster design depends on: it MUST get a named follow-up RCA task (suggest F-EXEC-HOME) — recorded here so it cannot evaporate — but it is outside this PR's mechanism and power to fix. Disposition: verified-non-blocking for #143. (Cosmetic side-note for that task: the runner's tally line counted the INFRA failure ("3 failed") while the exit message said "2 check(s) failed".)

Blocking findings (what the author must fix)

Finding 1 — R5/R2: the owning skill + sibling skill claims in plugins go stale at merge and are unswept. git -C plugins grep (at recorded gitlink 9ab9b98) returns, verbatim:

  • coder/skills/claude-code/SKILL.md — frontmatter description: line 4: "Claude Code CLI installed globally via npm from @anthropic-ai/claude-code."; the "Dependencies: nodejs" and "Install files: charly.yml, task:" property rows; "sibling AI CLIs (all three share the npm-global install pattern)"; line 39: "this candy's test verifies ${HOME}/.npm-global/bin/claude + claude --version".
  • coder/skills/nodejs/SKILL.md:59 — "/charly-coder:claude-code -- depends on nodejs" (PR drops require: [nodejs]).
  • coder/skills/kimi/SKILL.md:36 and coder/skills/forgecode/SKILL.md:37 — "… claude-code … sibling AI CLIs (all share the npm-global install pattern)".

The skills tree is the R0 control plane every agent loads first; post-merge it would instruct agents to verify a path this PR deletes. No open plugins PR covers these files (plugins#88 touches only git-workflow + install-plan). Fix: open a small opencharly/plugins docs PR sweeping those four files (native-installer description, /usr/local/bin/claude test path, drop the nodejs-dependency claims, correct the "all share npm-global" sibling claims) and either land it with this cutover or name its docs-batch explicitly in this PR body's R5/R2 answers.

Finding 2 — layer-skill version: mandate unmet on the swept candies. Bump version: in candy/hermes-full/charly.yml (2026.156.1921 → fresh CalVer) and candy/openclaw-full/charly.yml (2026.144.1443 → fresh CalVer) in a fix commit on this branch — the field is the per-entity content identity that drives cross-repo pickCandyVersion, and the PR already (correctly) bumped claude-code.

Comments considered

None — the PR carried no comments at validation time.

Cross-PR interactions considered

Decision

CHANGES REQUESTED. The runtime change is verified good — the native-installer fix, the /usr/local/bin relocation, and both swept check-path updates pass at build and deploy scope on fresh rebuilds in my own runs, and the two baseline bed failures are confirmed pre-existing F-CLI-NEST defects owned elsewhere. Landing is blocked solely on the two sweep-completeness findings above (stale plugins skill claims; un-bumped version: on the two swept candies), both small and precisely fixable. Append the version bumps here, open/name the plugins docs sweep, re-push — the status resets and a fresh validator re-runs. My bed evidence (this comment) carries over as the runtime baseline for the delta re-gate.

Assisted-by: Kimi Code (Moonshot kimi-for-coding; analysed on a live system)

pr-validator Finding 2 (layer-skill mandate): the claude-code sweep
changed both candies' content (check paths, openclaw-full description)
without moving their per-entity content identity. version: is what
cross-repo pickCandyVersion and the consuming image's content-stable
ai.opencharly.version label key on — bump both to the edit-time CalVer,
matching the claude-code bump already in this PR.

Assisted-by: Kimi Code Moonshot Kimi K3 (analysed on a live system)
atrawog added a commit to opencharly/marketplace that referenced this pull request Jul 19, 2026
Sync the claude-code skill (and its sibling carriers) with the candy's
official native installer (opencharly/charly#143): the `claude` binary is
relocated to the system path `/usr/local/bin/claude`, the `nodejs`
dependency is gone, and the npm-global install claims are replaced.

- `coder/skills/claude-code`: frontmatter, dependency table, install
  files, PATH note, sibling framing, and check path all re-stated for the
  native installer.
- Sibling sweep of the same falsified claim: `nodejs` (transitive-dependency
  list), `kimi` + `forgecode` (npm-global sibling framing narrowed to
  codex/gemini), `openclaw-desktop` (`claude` CLI path), and
  `hermes` (brace-form `${HOME}/.npm-global/bin/{claude,codex,gemini}`
  claim corrected).
- Claim-keyed grep self-test re-run with a brace-tolerant pattern: zero
  live stale claims remain; codex/gemini stay on the npm-global pattern.

Docs-only change class — non-runtime standards gate, certified at
documentation reviewed by the fresh pr-validator.

Assisted-by: Kimi Code Moonshot Kimi K3 (documentation reviewed)
@atrawog

atrawog commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (round 2, delta re-gate; supersedes the round-1 CHANGES REQUESTED)

PR head SHA (bound live via git ls-remote origin refs/heads/fix/claude-code-native-installer at verdict time): e1f45f76f3cc519237412021348a6d2171c15426
Protected base: 09be0a4a866e6457bb1207d0a938ce4c96d3c399 (origin/main, unchanged during validation)
Change class: candy/box-config

Fresh validator, independent context (different agent from the author and from the round-1 validator). I re-derived everything from the live tree: bound the remote head/base myself, loaded protected policy + skills from the protected objects (plugins gitlink 9ab9b98 — my pr-validator spec byte-matches the protected-main object), reviewed the full diff 09be0a4a..e1f45f7, verified both round-1 findings resolved, cross-checked the round-1 bed evidence on disk, and re-ran the class pre-flight (charly box validate) myself on the final tree.

Round-1 findings — both independently verified RESOLVED

Finding 1 (R5/R2 — stale plugins skill claims): RESOLVED by opencharly/marketplace#93. Merged d47ec550f99b2f77f963d9fc4dbc2bb6c4af5c7a on plugins main (tag v2026.200.1559 exists; its own fresh-validator round-2 APPROVED + landing-outcomes comment). I verified the merged plugins main covers every carrier the round-1 verdict named, verbatim:

  • coder/skills/claude-code/SKILL.md — frontmatter now "installed via the official native installer (https://claude.ai/install.sh), relocated to the system path /usr/local/bin/claude"; test claim now verifies /usr/local/bin/claude; the quoted stale lines ("installed globally via npm from @Anthropic-AI…", "Dependencies: nodejs", "all three share the npm-global install pattern") return zero hits at d47ec55.
  • coder/skills/nodejs/SKILL.md — claude-code removed from both the transitive-dependency list and Related Candies (zero claude lines remain).
  • coder/skills/kimi/SKILL.md:36, coder/skills/forgecode/SKILL.md:37 — narrowed to "codex and gemini share the npm-global install pattern; claude-code uses the official native installer" (true statements).
  • hermes/skills/hermes/SKILL.md:146 — the brace-form ${HOME}/.npm-global/bin/{claude,codex,gemini} claim corrected (claude at /usr/local/bin/claude, codex/gemini stay npm-global).
  • openclaw/skills/openclaw-desktop/SKILL.md:86 — claude CLI path corrected to /usr/local/bin/claude.

Claim-keyed grep at d47ec55 (brace-tolerant, both directions) returns only true statements + historical CHANGELOG context. The #143 body names plugins#93 in both its R2 and R5 answers. (The superproject plugins gitlink still records 9ab9b98; advancing it to plugins main is the standard post-merge gitlink step, not this PR's content.)

Finding 2 (layer-skill version: mandate): RESOLVED by e1f45f7. The delta ec92e60..e1f45f7 touches exactly two lines (verified by my own git diff of the fetched objects): candy/hermes-full/charly.yml version: 2026.156.1921 → 2026.200.1600 and candy/openclaw-full/charly.yml version: 2026.144.1443 → 2026.200.1600. Nothing else — no box/arch, no pkg/arch, no plan/check/runtime content. The layer skill's mandate ("the authoritative per-entity identity… Bump it when the candy's content changes") is now met for all three content-changed candies (claude-code was already bumped to 2026.198.2107 in the round-1 head). Sibling sweep re-verified at the head: only hermes-full and openclaw-full reference the claude-code candy among candy/*/charly.yml, both swept; the superproject R5 grep (npm-global/bin/claude, anthropic-ai/claude-code, .local/bin/claude) returns only CHANGELOG history, the candy's own truthful description, and its live relocate mechanism.

Checklist

  • [PASS] 0. Security & anti-tampering (T1–T4) — I reviewed the full diff myself: it matches the description exactly; no secrets/exfiltration; no weakened gate; no manipulation attempt aimed at the validator. Install floats on the official upstream installer over HTTPS (claude.ai/install.sh, the documented method), the prior form floated on an npm * wildcard — no supply-chain posture regression; installer runs as ${USER}, only the relocate step runs as root.
  • [PASS] 1. Description complete — every template section filled with pasted evidence and per-rule HOW answers; the round-2 salvage update names plugins#93 + the bump commit accurately (I verified both against reality).
  • [PASS] 2. Change-class gate + bed coverage — class gate = charly box validate + a bed composing the changed entity. Round-1 established the roster (check-charly-selftest-pod composes claude-code; check-openclaw-full-pod composes openclaw-full→claude-code; check-hermes* verified nonexistent in every repo — I re-grepped). Round-2 delta is version:-metadata-only; see the bed-judgment note below.
  • [PASS] 3. Attribution tier justified — fully tested and validated stands for the squash: the changed plan/check steps executed at build AND deploy scope on fresh rebuilds (author's 2026.200.1317 + round-1's 2026.200.1546, both verified on disk below), and the round-2 delta changes no runtime content. Trailers verified on both commits (0336229 Claude Code Sonnet 5; e1f45f7 Kimi K3, honest analysed on a live system for a metadata bump).
  • [PASS] 4. R0 skills honored — the /charly-image:layer version: mandate now applied to all three touched candies (Finding 2 resolved).
  • [PASS] 5. R1 RCA on every failure/warning; zero warnings — both author RCAs documented with evidence (curl-23: repro attempted 3/3 clean + atomic .part→mv cache design — the strict-policy "genuinely external, documented with evidence" clause; home-volume shadowing: the real defect, root-fixed via /usr/local/bin). The concurrent-window HOME-empty anomaly got a full mechanism RCA and its required named follow-up: F-EXEC-HOME: podman exec HOME/user resolution breaks for charly containers created during a concurrent bed window #149 (F-EXEC-HOME) — verified OPEN and capturing the RCA trail. Zero warnings in the final gate output.
  • [PASS] 6. R2 no pre-existing/out-of-scope split — the cutover's own sibling sweep is complete (Finding 1 resolved in the owning repo + named in the body). The 2 baseline bed failures remain verified-non-blocking: round-1 reproduced both on main's Go as one F-CLI-NEST mechanism, owned by the named in-flight feat(proto,spec): F-CLI-NEST — declared subcommand catalogs for command-class plugins sdk#72 (verified OPEN).
  • [PASS] 7. R3 no duplication — the getent passwd 1000 idiom is the repo-standard pattern; no copies introduced.
  • [PASS] 8. R4 no ad-hoc workarounds — no sleeps/retries/magic numbers/shims; the /usr/local/bin relocation is the root fix, not a workaround.
  • [PASS] 9. R5 hard cutover + grep self-test — package.json deleted; superproject grep re-run by me at e1f45f7 (clean, above); the plugins-submodule claim sweep landed via plugins#93 (verified at d47ec55, above). No transitional/dual-mode path survives.
  • [PASS] 10. R6/R8/R9 — no destructive git (my own assembled-tree merge was status-checked first); R8 N/A (no generation-shape change); worktree binary 2026.200.0144, 0 charly/*.go newer than the binary (R9 holds; PR touches only candy YAML).
  • [PASS] 11. R10 disposable-only, fresh-rebuild, coverage — all evidence on disposable: true beds; the candy's own check: steps are the would-fail-without-it coverage (failed pre-rework in RCA run 2026.198.2030, pass in both green runs).
  • [PASS] 12. RDD / ADE / SDD — installer on-disk layout proven live before the edit (throwaway-container RDD + both beds' confirmation); every touched candy ships description: + plan: with ≥1 deterministic check:; charly box validate re-run by me on the final tree (assembled gate tree + e1f45f7 merged): exit 0, zero warnings. SDD N/A (no schema surface).
  • [PASS] 13. Concurrency mandate + anti-cheat — single-candy class mandates no concurrent roster; the serial gate is green twice over on disk. The load-surfaced HOME-empty defect was NOT waved off: mechanism RCA + named follow-up charly#149, and it does not touch this PR's mechanism (candy-only diff).
  • [PASS] 14. Hard cutover, one atomic phase — one change commit + the sanctioned update-branch merge + one review-round fix commit; squash keeps main at exactly one commit. CHANGELOG placeholder staged.
  • [PASS] 15. Architecture gate — placement: CORRECT. Capability stays in a candy; zero charly/*.go staged (per-item trace: nothing to trace — no alias files, no kit imports, no core seams touched).
  • [PASS] 16. Disposable-only autonomy — every destroy/rebuild on disposable: true beds.
  • [N/A] 17. Go gates — no Go touched. (charly box validate re-run by me: exit 0.)
  • [PASS] 18. CHANGELOG present — CHANGELOG/2026.198.2154.md (placeholder; I re-stamp at merge).

Validator's gate evidence this round

  • git diff ec92e60..e1f45f7 → exactly the two version: lines (pasted above).
  • ./bin/charly version → 2026.200.0144; 0 Go files newer than the binary.
  • ./bin/charly box validate on the assembled gate tree with e1f45f7 merged in (worktree 7969c63, the envelope-sanctioned fast-forward of the assembled view) → exit 0, zero warnings.
  • Bed summaries cross-checked on disk (spec item 11): box/cachyos/.check/check-openclaw-full-pod/2026.200.1546/summary.yml → ok: true, 12/12 steps ok incl. cleanup + cleanup-members, 389s (round-1 validator's serial PASS — matches its claim exactly); …/2026.200.1317/summary.yml → ok: true, 12/12, 604s (author's green run — matches the salvage-note claim exactly).

Bed judgment for the delta (stated per the envelope): I did not re-run a full bed. The delta is exactly two version: metadata lines — the per-entity content identity that drives pickCandyVersion and the ai.opencharly.version label VALUE. It changes no plan step, check step, package, or install mechanism, so the bed-tested runtime content is byte-identical to what the two on-disk green runs exercised; a fresh bed cannot fail on anything this delta changed. Consequence accepted and recorded: if the version:-to-label plumbing itself mis-emitted, only a build would show it — but the field's CalVer format is validated at ingress (charly box validate exit 0 on the final tree) and label-shape (R8) is unchanged by a value bump.

Comments considered

  • Round-1 pr-validator verdict (atrawog, 2026-07-19T15:58Z, CHANGES REQUESTED) — two blocking findings + one required named follow-up. Finding 1: verified-resolved (plugins#93 merged d47ec55, per-carrier verification above). Finding 2: verified-resolved (exact two-line delta, above). Follow-up: verified-registered (charly#149 OPEN with the full RCA trail). Disposition: verified-non-blocking (all three demands independently confirmed satisfied; verdict superseded by this round).

Cross-PR interactions considered

Decision

PASS. Both round-1 blocking findings are independently verified resolved, the round-2 delta is exactly the mandated version: metadata, the class pre-flight passes on the final tree at zero warnings, and the runtime baseline (two green check-openclaw-full-pod summaries + the selftest baseline with only the 2 known F-CLI-NEST defects owned by sdk#72) stands cross-checked on disk. Proceeding to Phase 3: merge-time CalVer finalization, status re-post on the final head, squash-merge, tag.

Assisted-by: Kimi Code (Moonshot kimi-for-coding; analysed on a live system)

Assisted-by: Claude Code Anthropic Claude Sonnet 5 (fully tested and validated)
@atrawog

atrawog commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

Cross-PR coordination notice (from the #146 validation)

#146 (feat/agent-control-plane) is being validated for landing and touches the same two files as this PR: candy/claude-code/charly.yml and candy/claude-code/package.json. Once #146 merges, this PR will go CONFLICTING there: #146 pins the npm install at @anthropic-ai/[email protected], adds an npm rebuild --allow-scripts run step, a deterministic pin check, a CUE terminal_profile, and DISABLE_AUTOUPDATER=1. This PR's npm→native-installer cutover will need a rebase that reconciles against that surface (the pin/pin-check/rebuild step become obsolete if the installer replaces npm wholesale, but the terminal_profile + agent_provide block and DISABLE_AUTOUPDATER must be preserved or consciously re-homed).

No action needed until #146 lands; flagging so the conflict does not surprise the fresh validator of this PR.

Assisted-by: Kimi Code Moonshot Kimi K3 (analysed on a live system)

@atrawog
atrawog merged commit e38ce38 into main Jul 19, 2026
@atrawog
atrawog deleted the fix/claude-code-native-installer branch July 19, 2026 16:38
@atrawog

atrawog commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — landing outcomes (follow-up to the round-2 PASS verdict)

Phase 3 executed on the PASS verdict. Verbatim outcomes:

  • Durable verdict first: round-2 verdict comment posted before any gated action — fix(candy): claude-code npm → official native installer #143 (comment)
  • Success status (validated head): gh api --method POST repos/opencharly/charly/statuses/e1f45f76f3cc519237412021348a6d2171c15426 state=success context=charly/pr-validator → success — ALLOWED.
  • CalVer finalization: VER=2026.200.1635 from the live UTC clock; uniqueness guard clear (no v2026.200.1635 tag, no CHANGELOG/2026.200.1635.md on main); gh pr view mergeStateStatus CLEAN (branch not BEHIND — no update-branch needed). git mv CHANGELOG/2026.198.2154.md CHANGELOG/2026.200.1635.md + H1 rewrite; self-verify head -1 byte-equals # 2026.200.1635 — fix(candy): claude-code npm → official native installer. Finalization commit 00bf9a8e4450a9767ec3223a9d592dd71d062df6 pushed fast-forward (non-force) — ALLOWED.
  • Final-head R10 decision (validator's own, diff-based): the finalization delta over the validated head e1f45f7 is exactly the CHANGELOG rename + H1 line — docs-metadata only, no config/behavior surface; under the change-class matrix no bed or validate re-run can fail on it, so no further R10 was required.
  • Success status (final head): re-bound via git ls-remote → 00bf9a8e4450a9767ec3223a9d592dd71d062df6; state=success context=charly/pr-validator posted — ALLOWED.
  • Merge: gh pr merge 143 --repo opencharly/charly --squash --delete-branch --match-head-commit 00bf9a8e4450a9767ec3223a9d592dd71d062df6 --subject "fix(candy): claude-code npm → official native installer" --body-file - (composed squash body, attribution trailer carried) → executed successfully; PR state MERGED, merge commit e38ce38043264222f178cb20a6d3131bfcc3fcf5.
  • Tree equality: git diff e38ce380 00bf9a8e --stat → EMPTY — the merged tree on main is byte-identical to the validated head tree.
  • Tag: git tag -a v2026.200.1635 -m "fix(candy): claude-code npm → official native installer" e38ce38043264222f178cb20a6d3131bfcc3fcf5 (git cat-file -t = tag, annotated) → pushed; git ls-remote --tags confirms f9c9c9af47b7e44dcb6ecb9fadabef9404d69ac4 refs/tags/v2026.200.1635 on the remote.
  • Worktree: restored to assemble/candy-install-gate (7969c63 = the assembled gate tree + the envelope-sanctioned merge of e1f45f7 used for the validate re-run); box/arch/pkg/arch/.testcache state untouched throughout; no other repository mutated.

Assisted-by: Kimi Code (Moonshot kimi-for-coding; analysed on a live system)

atrawog added a commit to opencharly/distro-arch that referenced this pull request Jul 19, 2026
…ent bed

The claude-code candy cutover (opencharly/charly#143, landed e38ce38)
moved claude off npm to the official native installer with the binary
relocated to /usr/local/bin/claude. The claude-code-terminal-agent-live
check still asserted the npm layout (2.1.214 package.json pin, npm-global
binary path) and failed on the new candy. Resolve the installed version
dynamically from the binary and assert the native path; drop the npm pin
check. Verified live: check-agent-pod PASS 12/12 on the resolved tree.

Assisted-by: Kimi Code Moonshot Kimi K3 (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 19, 2026
… candy onto the native installer

main's #143 (landed e38ce38) replaced the npm claude-code candy with the
official native installer and deleted package.json; this branch pinned the
npm package and added the npm rebuild/pin machinery plus the agent
terminal surface. Semantic resolution: main's native installer is the new
base (install plan, curl package, /usr/local/bin checks); the branch's
mechanism-agnostic agent surface is re-homed onto it (env
DISABLE_AUTOUPDATER=1, agent_provide tmux provider, CUE terminal_profile);
the npm machinery is dropped as obsolete (require nodejs, path_append,
npm rebuild --allow-scripts, the 2.1.214 pin check, package.json);
version: bumped to the resolution-time CalVer. The sibling bed harness
asserting the npm layout is fixed on distro-arch feat/agent-control-plane
(4a4cfd7) — R5 claim-keyed sweep into the bed surface.

Gate on the resolved tree: charly box validate exit 0; go build/vet/test
exit 0 (no Go delta); full R10 roster check-tmux-pod PASS 12/12 +
check-agent-pod PASS 12/12 concurrently (run-calver 2026.200.1700/1710).

Assisted-by: Kimi Code Moonshot Kimi K3 (fully tested and validated)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant