Skip to content

feat(loaderkit): root-level remote candy name derivation (the candy de-submodule cutover) - #159

Merged
github-actions[bot] merged 4 commits into
mainfrom
feat/candy-root-name
Aug 23, 2026
Merged

github-actions[bot] merged 4 commits into
mainfrom
feat/candy-root-name

Conversation

@atrawog

@atrawog atrawog commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The candy de-submodule cutover's root-level remote candy support (sdk-side): a standalone candy repo's manifest lives at the repo ROOT, so the bare ref IS the repo path (no /candy/<name> sub-path). ScanRemoteCandy now:

  1. treats a ref that equals the repo path as an empty sub-path (the manifest at the repo root — the previous TrimPrefix left the full ref as the sub-path and the scan looked for repoDir/github.com/opencharly/ripgrep), and
  2. derives the candy name from the repo's own name (path.Base(repoPath)) when the sub-path is empty.

The sub-path form (a candy library inside a repo — the pre-cutover shape) is unchanged.

How tested

The new tests on the CURRENT head (pasted — all three, incl. the foreign-ref guard test):

$ git log --oneline -1
24a1886 test: the foreign-ref error is the hard not-found error (assert the message)
$ GOWORK=off go test ./loaderkit/ -run "TestScanRemoteCandy" -v
=== RUN   TestScanRemoteCandy_RootLevelNameDerivation
--- PASS: TestScanRemoteCandy_RootLevelNameDerivation (0.00s)
=== RUN   TestScanRemoteCandy_SubPathNameUnchanged
--- PASS: TestScanRemoteCandy_SubPathNameUnchanged (0.00s)
=== RUN   TestScanRemoteCandy_ForeignRefStillErrors
--- PASS: TestScanRemoteCandy_ForeignRefStillErrors (0.00s)
PASS
ok  	github.com/opencharly/sdk/loaderkit	0.003s

The full sdk suite (pasted — disposable target: the sdk worktree at /tmp/sdk-name-deriv, fresh branch off main):

$ GOWORK=off go build ./...
$ echo "build exit: $?"
build exit: 0
$ GOWORK=off go test ./...
$ echo "test exit: $?"
test exit: 0
$ grep -c "^ok" /tmp/sdk-test.out
10
$ tail -4 /tmp/sdk-test.out
ok  	github.com/opencharly/sdk/kit	(cached)
ok  	github.com/opencharly/sdk/loaderkit	0.006s
ok  	github.com/opencharly/sdk/packagekit	(cached)
ok  	github.com/opencharly/sdk/vmshared	(cached)

Rulebook compliance

Rule How / N/A
R0 the owning skills per the sdk's CLAUDE.md dispatcher: /charly-internals:plugin (the plugin/provider model — the remote candy scan is the plugin-loading mechanism), /charly-internals:go (the Go module discipline), /charly-internals:install-plan (N/A — no deploy wire types touched). The change honors the plugin skill's placement doctrine: the scan mechanism stays in sdk/loaderkit, the name derivation is a pure ref-shape rule with tests
R1 N/A — no surfaced failure
R2 N/A — no surfaced issue parked
R3 the name derivation lives in the ONE scan mechanism (ScanRemoteCandy); the sub-path regression test guards the pre-cutover shape
R4 N/A — no workaround
R5 N/A — the sub-path form is preserved (the cutover's legacy deletion happens charly-side)
R6 status checked; no force-push; feat-branch + PR landing
R7 the test + build outputs pasted above
R8 N/A — no generation changes
R9 N/A — no deploy target change
R10 the tests ran on the committed tree

Change classification

  • Change class: sdk mechanism change (remote candy scan) + tests
  • Verification gate: the full sdk Go suite (pasted above)
  • Attribution tier: fully tested and validated — the changed path (ScanRemoteCandy) executed live via the new tests; the full suite green
  • Landing: fresh charly/pr-validator; tag-on-merge

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)

…e-submodule cutover)

A standalone candy repo's manifest lives at the repo ROOT: the bare ref IS the
repo path (no /candy/<name> sub-path). ScanRemoteCandy now treats a ref that
equals the repo path as an empty sub-path (the manifest at the repo root) and
derives the candy name from the repo's own name (path.Base(repoPath)). The
sub-path form (a candy library inside a repo) is unchanged. Tests: the
root-level derivation + the sub-path regression.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 9661efa05691 (branch: feat/root-level-remote-candy)

Change class: sdk mechanism change (loaderkit remote-candy scan) + tests

Blocks

  1. A1 — How-tested evidence gap (PR body, "How tested"). The block labeled "The full sdk suite (pasted)" contains only the commands with inline comments ($ GOWORK=off go build ./... # clean / $ GOWORK=off go test ./... # 10 packages ok, 0 failures) — it is NOT pasted output. The claim "10 packages ok, 0 failures" is a promise, and CI (validate / validate) is still in_progress, so nothing corroborates it. The How-tested section also never names a disposable target or a fresh-rebuild confirmation with output. Fix: paste the actual go build ./... and go test ./... output (and either name the disposable target or give an explicit N/A reason for this change class).

  2. R0 — N/A unjustified (PR body, rulebook table, R0 row). The change is Go code in an sdk mechanism kit (loaderkit/scan_candy.go); a Go change on a skill-owned sdk surface cannot be waved off with "no skill-owned surface touched". Name the owning skill(s) per the Skill Dispatcher and state how the change honors them, or the compliance table is incomplete.

  3. Code correctness — root-level guard is broader than stated intent (loaderkit/scan_candy.go:73-76). if subPath == bareRef { subPath = "" } also fires for a ref that is NOT under repoPath at all (e.g. a typo'd github.com/opencharly/charlyy/candy/x against repoPath github.com/opencharly/charly): the previous hard error (remote candy ... not found) silently becomes a scan of this repo's root with the name derived from path.Base(repoPath), silently mis-resolving a mismatched ref. The comment states the intent is the ref that IS the repo itself — guard on bareRef == repoPath (i.e. set subPath = "" only when the ref equals the repo path), and add a test for a foreign/prefix-mismatched ref to pin the error behavior.

Verdict: BLOCK


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

…r B3)

A ref NOT under repoPath (a typo'd repo path) keeps the full ref as the
sub-path and fails the candyDir stat — never silently scans the repo root.
Test: the foreign-ref hard error.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: c68835f3c423 (branch: feat/root-level-remote-candy)

Change class: sdk mechanism change (loaderkit remote-candy scan) + tests

Placement: CORRECT — the scan mechanism stays in sdk/loaderkit (a kind-blind kit); the name derivation is a ref-shape rule inside that mechanism; no core imports, no alias-file growth, no Legacy* identifiers.

Comment intake:

  • github-actions[bot] (5387181727), finding 1 (A1 evidence gap) — verified-blocking, survives in modified form (see Block 1: build output is still comment-only, and the test output now pasted omits the third test).
  • finding 2 (R0 N/A unjustified) — stale-superseded: the R0 row now names the owning skills (/charly-internals:plugin, /charly-internals:go, /charly-internals:install-plan) and states the HOW.
  • finding 3 (root-level guard broader than intent) — stale-superseded: current diff guards on bareRef == repoPath exactly (loaderkit/scan_candy.go:73-76), and the new TestScanRemoteCandy_ForeignRefStillErrors pins the error behavior.

Blocks

  1. A1/R10 — pasted evidence contradicts the committed tree. The committed tree contains THREE tests — TestScanRemoteCandy_RootLevelNameDerivation, TestScanRemoteCandy_SubPathNameUnchanged, and TestScanRemoteCandy_ForeignRefStillErrors — but the pasted go test ./loaderkit/ -run "TestScanRemoteCandy" -v output shows only the first two. The missing test is exactly the one added by the fix commit c68835f3c423, and it fails on the pre-fix code (at 9661efa, the foreign ref would have been silently mis-resolved and the test's if err == nil { t.Fatal(...) } fires). Its absence means the R10 claim "the tests ran on the committed tree" is contradicted by the PR's own evidence — the output was captured before the guard fix, so nothing proves the CURRENT head's scan code passes. Separately, the go build evidence is still presented as an inline comment ($ echo "build exit: $?" # build exit: 0), not pasted output — the same promise-pattern the prior review blocked on. Fix: paste the actual go test ./loaderkit/ -run "TestScanRemoteCandy" -v output run on the current head showing all three tests pass, and the real go build ./... output (not a comment). Until then the fully tested and validated attribution tier is not justified by the evidence.

Verdict: BLOCK


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: c68835f3c423 (branch: feat/root-level-remote-candy)

Change class: sdk mechanism change (loaderkit remote-candy scan) + tests

Blocks

  1. B18/R1 — CI validate / validate FAILS on the current head while the body claims a green suite. Live CI (get_ci_status) on head c68835f3c423 reports validate / validate → conclusion: failure. The body's "How tested" asserts the full sdk suite is green (test exit: 0, grep -c "^ok" … → 10) and claims the fully tested and validated tier, but never mentions or explains this failing check. The body's evidence and the live state contradict each other. Per R1 every surfaced failure needs a root-cause RCA and a real fix — a failing validation gate on the PR's own head is a BLOCK until the author investigates, fixes (or documents with a legitimate RCA), and the check is green on the current head.

Comment intake

  • github-actions[bot] 5387181727 — finding 1 (A1 evidence gap): verified-non-blocking — the current body now pastes real output (all three TestScanRemoteCandy_* runs, build exit: 0/test exit: 0, grep -c → 10, tail -4) and names the target (/tmp/sdk-name-deriv, fresh branch off main). finding 2 (R0 N/A): stale-superseded — the R0 row now names /charly-internals:plugin, /charly-internals:go, /charly-internals:install-plan with a HOW. finding 3 (guard broader than intent): stale-superseded — the diff guards on bareRef == repoPath exactly and the new TestScanRemoteCandy_ForeignRefStillErrors pins the error path.
  • github-actions[bot] 5387200328 — finding 1 (pasted output omitted the third test): stale-superseded — the current body's pasted output shows all three tests including TestScanRemoteCandy_ForeignRefStillErrors passing. The remaining "build output comment-only" sub-claim: verified-non-blocking — the body now shows executed output lines (build exit: 0, test exit: 0), consistent with a silent-success go build.

Placement

Placement: CORRECT — the scan mechanism stays in sdk/loaderkit (kind-blind kit); name derivation is a ref-shape rule inside that mechanism; no core imports, no alias growth, no Legacy* identifiers.

Non-blocking notes

  • B15: two commits (feat + validator-B3 fix) — flagging that the intended squash collapses them; no partial/split-work pattern in the final tree.
  • The focused go test shows (cached), consistent with the preceding full-suite run having executed loaderkit live (0.006s); not independently blocking.

Required fix

  1. Resolve the failing validate / validate check on head c68835f3c423: root-cause it (R1), fix it in-tree, and update the body so the pasted evidence matches the live CI state.

Verdict: BLOCK


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: e38e13a85dec (branch: feat/root-level-remote-candy)

Change class: sdk mechanism change (loaderkit remote-candy scan) + tests

Placement: CORRECT — the scan mechanism stays in sdk/loaderkit (kind-blind kit); the name derivation is a ref-shape rule inside that mechanism; no core imports, no alias growth, no Legacy* identifiers.

Security screen: PASS — no secrets, no new deps, no guardrail changes, description↔diff scope matches.

Blocks

  1. B18/R1 — the new test file does not compile. loaderkit/scan_candy_root_test.go calls strings.Contains(err.Error(), "not found") (third test, ~line 103) but its import block (os, path/filepath, testing, spec) never imports strings. go test ./loaderkit/ fails to build with undefined: strings. Fix: add "strings" to the import block, re-run the tests, and paste the output from the current head.

  2. A1/R10 — pasted evidence predates the current head. The body claims "The new tests on the CURRENT head", but its own pasted git log --oneline -1 shows c68835f, while the current head is e38e13a — the commit that added the strings.Contains assertion to the foreign-ref test. The committed evidence proves nothing about the head it is offered for: the current head's test edit has never been shown to run, and it cannot, given Block 1. The body's R1 row ("N/A — no surfaced failure") is likewise contradicted. Fix: re-run go test ./loaderkit/ -run "TestScanRemoteCandy" -v on e38e13a and paste the real output.

  3. A3 — attribution tier not justified. fully tested and validated requires the changed paths to have executed against the fresh rebuild of the committed head. The pasted run is from the prior commit, and the current head's changed test path neither ran nor compiles. Downgrade the tier and supply current-head proof.

Non-blocking: B15 — three commits (feat + validator-B3 fix + test assertion); the intended squash collapses them, no partial/split-work pattern in the final tree. CI validate / validate is in_progress on this head with no conclusion; given Block 1 it will fail — resolve it and address it in the body.

Comment intake

  • github-actions[bot] 5387181727 — finding 1 (evidence gap): verified-blocking in modified form (evidence is from a prior head, not current); finding 2 (R0 N/A): stale-superseded (body names the owning skills with a HOW); finding 3 (guard broader than intent): stale-superseded (diff guards on bareRef == repoPath exactly, and the foreign-ref test pins the error).
  • github-actions[bot] 5387200328 — finding 1 (third test missing from pasted output / nothing proves the CURRENT head passes): verified-blocking in stronger form — the current head's test file cannot even compile.
  • github-actions[bot] 5387252829 — finding 1 (CI failure vs green claim): verified-blocking in modified form — live CI is in_progress (not green), and the diff's compile error guarantees the gate fails.

Verdict: BLOCK


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 24a1886ed456b2a70846bb96a8bf805027d556e2 (branch: feat/root-level-remote-candy)

Security screen: PASS — no scope mismatch, no secrets/exfiltration, no guardrail weakening, no supply-chain change; PR content contains no embedded directives.

Comment intake (all three prior reviews):

  • 5387181727 — all three findings stale-superseded: body now pastes real output, R0 row names owning skills with HOW, and the diff guards on bareRef == repoPath exactly.
  • 5387200328 — stale-superseded: current body's focused run shows all three tests (incl. ForeignRefStillErrors) passing on head 24a1886; build evidence is now executed output (build exit: 0), not comment-only.
  • 5387252829 — stale-superseded: the validate / validate "failure" was on head c68835f3; on the CURRENT head the check is in_progress (this validator's own run), so the failure does not reproduce against the current state, and the body's pasted evidence is internally consistent with the committed tree.

Checklist: All applicable rules PASS or NA — A1 body complete with executed-output evidence and correct Assisted-by footer; A2 gate matches class (full sdk Go suite, no bed required for a library mechanism change); A3 tier justified (changed path executed live via new tests); R1 zero warnings/failures in evidence; R2 no parked issues (all prior findings fixed in-tree); R3/R4/R5 no duplication/workarounds/sweep gaps; R10 fresh-worktree run on committed head with coverage that fails without the change; B13 ADE/SDD N/A (no candy/schema/generated files); B15 four commits flagged — intended squash collapses them, no partial/split work in final tree; B16 placement: CORRECT (ref-shape rule inside the kind-blind loaderkit kit, no core imports/aliases/Legacy*); B18 diff is gofmt-clean.

Verdict: PASS


deepseek.com/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 23, 2026 17:15
@github-actions
github-actions Bot merged commit 1337795 into main Aug 23, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 23, 2026
@aitrawog
aitrawog deleted the feat/candy-root-name branch September 25, 2026 19:07
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