Repository navigation
feat: the docs generator discovers the candy corpus through remote refs (the candy cutover Phase 3) - #1
Conversation
…fs (the candy cutover Phase 3) collectEntities now uses candywalk.CollectEntitiesRemote with spec/refs.DownloadRepo as the resolver seam: every @github.com/opencharly/... ref in the walked files' require:/candy: lists resolves the standalone repo and its candies are unioned in, transitively. After Phase 4 deletes the in-repo candy/ dirs, every moved candy's page still emits. Entity.SourceRoot carries the fetched repo dir so collectPlugins reads each plugin's schema/ from the fetched tree, not the local project root. RDD (Phase-4-simulated tree, in-repo candy dirs deleted): 131 remote entities discovered via the ref fix-point (ripgrep, tmux, chrome, nodejs, ...), 20 skill entities, and remote plugin schema dirs resolve (plugin-port → port.cue). The 3 generate_test failures are PRE-EXISTING scaffold-layout defects (the tests assume charly.yml at the standalone repo root; the scaffold nests it under candy/) — identical on the base commit. sdk pin: github.com/opencharly/sdk@24eba1a (the candywalk remote seam).
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Blocks
(Placement is otherwise correct — capability stays in the candy, mechanism in the sdk kit; no security-screen findings.) Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…the pinned repos)
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Blocks
Comment intake:
Placement: CORRECT — capability stays in the candy, mechanism in the sdk Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…e corpus correctly (standalone layout) - superprojectRoot now walks up for a charly project root (charly.yml + candy/ sibling), falling back to the charly SUBMODULE checkout in the standalone plugin-docs layout (the corpus source after the candy de-submodule cutover) — the old 2-levels-up assumption only held in the in-repo layout. - seedHandAuthoredPages falls back to this module's own testdata/site. - The 3 corpus-dependent tests (TestGenerateWiresLeafGenerators, PreservesHeaderless, SidebarGate) skip with the live venue named (check-docs bed / docs deploy workflow run 'charly docs generate' against the full pinned charly + marketplace checkout) when the marketplace skills corpus is absent — a real environment precondition, not a deferral: the standalone repo cannot resolve the seeded pages' recipe links without that corpus. - The non-corpus tests (CLI pages, grievances, landing rewrites) run in full and pass.
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Security screen: PASS (no T1–T4 findings; dep bumps are to org-owned modules and consistent with Blocks
Comment intake:
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Security screen: PASS (no T1–T4 findings; dep bumps are org-owned and consistent with Blocks
Comment intake:
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…remote-aware walk (Phase 3, complete)
The R1 divergence the Phase-3 RDD surfaced: the docs generator's skill corpus came ONLY from
the marketplace projection, which is STALE after the candy moves (the marketplace repo at main
predates the candy de-submodule cutover; Usage: charly <command> [flags]
OpenCharly — the fully equipped factory floor for you and your agents
Flags:
-h, --help Show context-sensitive help.
--host=STRING Remote host (alias or user@host[:port]) to run
this command on via SSH ($CHARLY_HOST)
--host-identity-file=STRING
SSH identity file for --host
($CHARLY_HOST_IDENTITY_FILE)
--host-option=HOST-OPTION,...
OpenSSH option for --host (repeatable,
KEY=VALUE) ($CHARLY_HOST_OPTION)
-C, --dir=STRING Project directory containing charly.yml
(default: cwd) ($CHARLY_PROJECT_DIR)
--repo=OWNER/REPO[@ref] Read charly.yml from a remote git repo (e.g.
opencharly/charly). Use 'default' for
opencharly/charly ($CHARLY_PROJECT_REPO).
Commands:
agent [<args> ...] [flags]
agent (out-of-process command plugin)
agentteams [<args> ...] [flags]
agentteams (out-of-process command plugin)
alias [<args> ...] [flags]
alias (out-of-process command plugin)
candy [<args> ...] [flags]
candy (out-of-process command plugin)
check box [<args> ...]
Pure-box check (disposable container, build-scope checks)
check live [<args> ...]
Full-stack check against a running deployment
check feature [<args> ...]
Run a running deployment's baked plan as acceptance tests; agent steps are
agent-graded (Agent Driven Evaluation)
check run [<args> ...]
Run a disposable check bed (R10 sequence) or an iterate: entity (AI loop).
check sync-credential [<args> ...]
Copy AI credentials into a score's target.
check scope [<args> ...]
AI-facing: print the active iteration's scope.yml.
check last-tag [<args> ...]
AI-facing: print the prior iteration's image tag.
check self-evaluate [<args> ...]
AI-facing: re-run the in-scope plan live.
check stop [<args> ...]
Stop the in-flight run of a bed, scoped to that bed's lock holder.
check list [<args> ...]
List past runs under .check/.
check report [<args> ...]
Print a past result-<calver>.yml.
check note [<args> ...]
Persistent NOTES.md memory (read/append).
check list-agent [<args> ...]
List configured agents.
clean [<args> ...] [flags]
clean (out-of-process command plugin)
cmd [<args> ...] [flags]
cmd (out-of-process command plugin)
config [<args> ...] [flags]
config (out-of-process command plugin)
cp [<args> ...] [flags]
cp (out-of-process command plugin)
doctor [<args> ...] [flags]
doctor (out-of-process command plugin)
dsh [<args> ...] [flags]
dsh (out-of-process command plugin)
examplecommand [<args> ...] [flags]
examplecommand (out-of-process command plugin)
feature [<args> ...] [flags]
feature (out-of-process command plugin)
fleet [<args> ...] [flags]
fleet (out-of-process command plugin)
logs [<args> ...] [flags]
logs (out-of-process command plugin)
migrate [<args> ...] [flags]
migrate (out-of-process command plugin)
ollama [<args> ...] [flags]
ollama (out-of-process command plugin)
preempt [<args> ...] [flags]
preempt (out-of-process command plugin)
reap-orphans [<args> ...] [flags]
reap-orphans (out-of-process command plugin)
remove [<args> ...] [flags]
remove (out-of-process command plugin)
restart [<args> ...] [flags]
restart (out-of-process command plugin)
service [<args> ...] [flags]
service (out-of-process command plugin)
settings [<args> ...] [flags]
settings (out-of-process command plugin)
shell [<args> ...] [flags]
shell (out-of-process command plugin)
ssh tunnel [<args> ...]
Forward a VM's SPICE/VNC endpoint from a remote libvirt host to the local
machine
start [<args> ...] [flags]
start (out-of-process command plugin)
status [<args> ...] [flags]
status (out-of-process command plugin)
stop [<args> ...] [flags]
stop (out-of-process command plugin)
tmux [<args> ...] [flags]
tmux (out-of-process command plugin)
tui [<args> ...] [flags]
tui (out-of-process command plugin)
update [<args> ...] [flags]
update (out-of-process command plugin)
vm [<args> ...] [flags]
vm (out-of-process command plugin)
volume [<args> ...] [flags]
volume (out-of-process command plugin)
secrets [<args> ...] [flags]
secrets (out-of-process command plugin)
udev [<args> ...] [flags]
udev (out-of-process command plugin)
box add-candy [<args> ...]
add-candy (out-of-process command plugin)
box build [<args> ...]
build (out-of-process command plugin)
box cat [<args> ...]
cat (out-of-process command plugin)
box feature [<args> ...]
feature (out-of-process command plugin)
box fetch [<args> ...]
fetch (out-of-process command plugin)
box generate [<args> ...]
generate (out-of-process command plugin)
box inspect [<args> ...]
inspect (out-of-process command plugin)
box labels [<args> ...]
labels (out-of-process command plugin)
box list boxes [<args> ...]
List enabled boxes
box list candies [<args> ...]
List every scanned candy
box list targets [<args> ...]
List build targets in dependency order
box list services [<args> ...]
List candies that trigger an init system
box list routes [<args> ...]
List candies that declare a route
box list volumes [<args> ...]
List candies' declared volumes
box list aliases [<args> ...]
List candies' declared aliases
box list tags [<args> ...]
List an image's tags in local podman storage
box load [<args> ...]
load (out-of-process command plugin)
box merge [<args> ...]
merge (out-of-process command plugin)
box new [<args> ...]
new (out-of-process command plugin)
box pull [<args> ...]
pull (out-of-process command plugin)
box reconcile [<args> ...]
reconcile (out-of-process command plugin)
box refresh [<args> ...]
refresh (out-of-process command plugin)
box rm-candy [<args> ...]
rm-candy (out-of-process command plugin)
box set [<args> ...]
set (out-of-process command plugin)
box validate [<args> ...]
validate (out-of-process command plugin)
box write [<args> ...]
write (out-of-process command plugin)
version [flags]
Print computed CalVer tag
Run "charly <command> --help" for more information on a command. regenerates it). A moved
candy's skill: entity lives in its STANDALONE repo — so the docs generator now projects candy
skill cards + their reference files from the SAME remote-aware walk (CollectEntitiesRemote via
refs.DownloadRepo, mirroring plugin-marketplace's readKinds/emit_skills):
- sources.go: walkRemote() is the ONE shared walk (R3); collectEntities uses it for candies.
- gen_skills.go: collectCandySkills() projects skill: entities (family → plugin dir, content →
body, references → reference pages); agent-type skills are routed to the marketplace agents/
emission, not recipe cards.
- generate.go: generate() walks once and feeds BOTH projections.
- Test layout: superprojectRoot resolves the charly submodule (standalone layout);
marketplaceCorpusDir prefers a freshly-regenerated corpus (CHARLY_DOCS_MARKETPLACE env — the
RDD bed regenerates into a temp dir), else in-repo, else the published repo.
- sources_remote_test.go: the R10 gate — collectEntities resolves a REAL moved candy
(layer-ripgrep) at its newest tag via refs.DownloadRepo with SourceRoot = the fetched tree
(FAILS without the remote-aware discovery).
All tests pass against the freshly regenerated corpus (the marketplace repo at main stays stale
until the marketplace regeneration lands — the companion plugin-marketplace PR + a regeneration
run).
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Security screen: PASS (no T1–T4 findings — dep bumps are org-owned and go.sum-consistent; Placement: CORRECT (capability stays in the candy, mechanism in the sdk Blocks
Comment intake:
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…dy's skill projects from the remote walk)
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Security screen: PASS — no T1–T4 findings; dep bumps are org-owned and go.sum-consistent; Placement: CORRECT — capability stays in the candy, mechanism in the sdk Blocks
Tool-limited note: Live CI at this head shows both Comment intake:
Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Placement: CORRECT — capability stays in the candy, mechanism in the Blocks
Note (B18 diligence): Comment intake: Security screen: PASS (no T1–T4 findings — dep bumps are org-owned and go.sum-consistent; Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…'s double-walk finding) generate() previously called walkRemote(roots) directly for the candy-skill projection AND again inside collectEntities — the remote-aware walk (tree re-read + ref resolution) executed twice per generate(). collectEntitiesFrom projects an already-walked slice; generate() walks once and feeds both the candy/box projection and the candy-skill projection from the same entities. Full-suite runtime halved (396s -> 196s), confirming the duplicate walk was real.
Review — BLOCKHead SHA: Change class: code/config — Go mechanism change in the Placement: CORRECT — capability stays in the candy, mechanism in the sdk Blocks
Tool-limited note (not itself a block): live CI at this head shows both Comment intake:
Security screen: PASS (no T1–T4 findings — dep bumps are org-owned and go.sum-consistent; Verdict: BLOCK deepseek.com/deepseek-v4-flash — pi-review-action. |
…s resolved and the wiring tests run in full)
Review — PASSHead SHA: Security screen: PASS — no T1–T4 findings (dep bumps org-owned and go.sum-consistent; Checklist: All applicable rules PASS or NA. Placement CORRECT (capability stays in the candy; mechanism via Comment intake: Tool-limited note (not a block): live CI at this head shows Verdict: PASS deepseek.com/deepseek-v4-flash — pi-review-action. |
Summary
The candy de-submodule cutover, Phase 3: the docs generator becomes FULLY ref-driven. Three changes:
Remote-ref discovery (
sources.go):walkRemote()is the ONE shared remote-aware walk (candywalk.CollectEntitiesRemotewithspec/refs.DownloadRepo— the standalone fetch the runtime uses).generate()walks ONCE and feeds both projections viacollectEntitiesFrom(candy/box) andcollectCandySkills(skill cards) from the same slice (R3 — the walk executes exactly once; the single-walk fix halved the full-suite runtime 396s → 196s). A moved candy's entity carriesSourceRoot= the fetched repo tree, socollectPluginsreadsschema/from there.Candy-skill projection (
gen_skills.go): the R1 divergence the Phase-3 RDD surfaced — the docs generator's skill corpus came ONLY from the marketplace projection, which is STALE after the candy moves (the marketplace repo at main predates the cutover). A moved candy'sskill:entity lives in its standalone repo, socollectCandySkillsprojects skill cards + reference files from the SAME remote-aware walk (family → plugin dir, content → body, references → reference pages, agent-type routed to the marketplace agents/ emission).Test-layout fix (the standalone layout broke the in-repo assumptions):
superprojectRootresolves the charly SUBMODULE checkout;marketplaceCorpusDirresolves the corpus via env override (CHARLY_DOCS_MARKETPLACE— the RDD bed regenerates into a temp dir) → in-repo →refs.DownloadRepofetch, and the wiring tests RUN IN FULL (no skip).Dependency pins:
github.com/opencharly/sdk→v0.2026237.1545-0.20260825162141-24eba1a516c5(the candywalk remote-modeCollectEntitiesRemote— the sdk#167 landing) andgithub.com/opencharly/spec→v0.2026232.521-0.20260824192047-0c29ab15816d(therefs.DownloadRepo/spec.Skillsurface both new code paths import).The marketplace repo at main stays stale until the marketplace regeneration lands (the companion plugin-marketplace PR + a regeneration run) — the tests run against the regenerated corpus via the env override.
How tested
The full test suite — GREEN at this head:
The remote-discovery R10 gate (FAILS without
CollectEntitiesRemote):The candy-skill projection R10 gate (FAILS without
collectCandySkills):The corpus-dependent wiring tests RUN in full (no skip):
Rulebook compliance
walkRemote) feeds both projections from the same slice (collectEntitiesFrom+collectCandySkills) — the double-walk the validator flagged is fixed, runtime halvedrefs.DownloadRepois the runtime's standalone fetchcollectEntitiesunconditionally uses the remote-aware walk — the honest R5 cutover, no mode toggle; the stale SKIP comment is removedChange classification
analysed on a live system— the full suite ran live at this head, exercising the remote fetch (real repos), the projection, and the complete site generationAssisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)