Repository navigation
Description
The defect
sdk/candywalk's corpus walk resolves every @github.com/opencharly/... ref through
spec/refs.DownloadRepo, and DownloadRepo calls populateSubmodules — which initializes every
submodule the fetched repo declares and fails the whole fetch when one cannot be reached. That is
correct for --repo (a whole project a user drives with the charly binary), and fatal for a
corpus-source fetch, which needs only the repo's own files (its charly.yml and .agents/ trees).
Measured in CI, on opencharly/marketplace#566, pinning opencharly/opencharly at a tag:
$ charly marketplace generate --root . --out .
charly: resolving github.com/opencharly/opencharly:v2026.296.2037 (222 resolved, 1175 queued)
Downloading github.com/opencharly/opencharly:v2026.296.2037...
charly marketplace: collect entities: resolve @github.com/opencharly/opencharly:v2026.296.2037:
downloading github.com/opencharly/opencharly:v2026.296.2037:
populating submodules in /home/runner/.cache/charly/repos/github.com/opencharly/[email protected]:
exit status 128
fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: clone of 'https://github.com/opencharly/charly-registry' into submodule path
'.../charly-registry' failed
error: could not write config file .../.git/modules/pod-osm-tools/config: No such file or directory
fatal: could not set 'core.worktree' to '../../../pod-osm-tools'
rc=1
Two independent submodules kill it — one needs credentials the CI runner does not have
(charly-registry), one fails on a path that no longer exists in its own .git/modules
(pod-osm-tools) — and populateSubmodules turns either into a failed corpus walk.
Why it blocks
A skill lives with the code, plugin or config it describes (umbrella AGENTS.md Part II #5), and the
umbrella is the only home the three GENERAL-GUIDANCE skills have (agents, cutover-policy,
root-cause-analyzer). It cannot be the corpus source for them while a repo with submodules cannot be
fetched for its own files. Locally the fetch appears to work because the cache already holds a
populated copy — so this defect is invisible until the gate runs on a cold runner, which is exactly
where it surfaced.
Mechanism (read from the code)
spec/refs/git.go
268: // populateSubmodules initializes EVERY submodule a freshly-fetched repo declares.
...
func populateSubmodules(targetDir string) error {
... git submodule update --init --depth 1 -q ...
return fmt.Errorf("populating submodules in %s: %w", targetDir, err)
DownloadRepo has no way for a caller to say "files only". The corpus walk is a caller that wants
exactly that: it reads a manifest and a skills tree, never a submodule.
Root fix (one of)
- A fetch MODE on the downloader —
DownloadRepo(repoPath, version string, opts …FetchOption)with
FilesOnly(), or a siblingDownloadRepoFiles, threaded throughcandywalk.RemoteResolver(which
is already a caller-supplied seam) and used by the two out-of-process generators. Corpus sources are
fetched files-only;--repokeeps populating submodules. - A per-ref opt-out — the pin contract gains a marker (e.g. a
files-onlyref form or a
corpus:wrapper) so a corpus generator can name a repo it needs only the tree of.
(1) is the smaller contract change and keeps the --repo semantics that populateSubmodules was
written for.
Missed control
The corpus walk's own resolver seam was assumed to be "just a fetch". Nothing exercised it against a
repo that declares an unreachable submodule, so the failure mode was unrepresented in every test: the
walk's fixtures are local directories, and the cached fetches are warm. A cold-runner arm over a
submodule-bearing repo would have caught it before a PR.
Related
opencharly/sdk#455/opencharly/sdk#467— the sibling producer defect on the same corpus walk (the
raw-text ref scan).opencharly/opencharly#600— the skills migration whose last structural step (the umbrella as a
corpus source) waits on this.
Agent: charly
Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (analysed on a live system)
Activity
fix(refs): retire the 17 carriers and pin their destinations DIRECT
fix(refs): retire the 17 carriers and pin their destinations DIRECT (#…
aitrawog commentedon Oct 23, 2026
CLAIM —
spec#279is mine: a files-only fetch mode inspec/refs, then the corpus-source chain. Slugcharly-spec279.Scope I take, producer-first:
spec/refsgains the files-only fetch (DownloadRepoTrees+ a mode-keyed cache entry + a cache predicate that certifies a tree export) → PR → merge → tag; thenplugin-marketplaceadopts it for the corpus generator (refs.DownloadRepoTreesinreadkinds.go) → PR → merge → tag; thenmarketplacerefs PR addsopencharly/opencharlyas a DIRECT ref + regenerates, with the drift gate green on a cold CI run.Candidate chosen and why (statement now, evidence in the PR): the issue's candidate 1, as a SIBLING function rather than an options type, because the criterion is certify exactly what the reader needs:
candywalk.RemoteResolverisfunc(repoPath, version string) (string, error), so a sibling with that exact signature threads through the existing seam with nosdkchange at all, whileDownloadRepokeeps the--reposemanticspopulateSubmoduleswas written for. The files-only export gets its OWN cache key (<repo>@<version>.tree), because content determines the key: a tree export is not a valid--repocache and a populated export is a superset, so sharing one key would make each caller re-download the other's entry on every run.The control I will not repeat: my repro and my proof both empty the cache through the real mechanism (
CHARLY_REPO_CACHE→ a fresh directory), never a warm~/.cache/charly/repos.opencharly/[email protected]is already warm HERE — that is exactly the trap this issue was filed for.A3. This session's delivered system message reads, verbatim:
You are a coding agent powered by the deepseek-v4.1-flash model.— harnessDeepSeek Harness, modeldeepseek-v4.1-flash; cited with opencharly/opencharly#538.Agent: charly-spec279
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
aitrawog commentedon Oct 23, 2026
STATUS —
spec#279is FIXED and open for review: #281, head3410404, and the three skills it unblocks are now measurable from the umbrella.What the defect was, measured COLD this time. Fresh
CHARLY_REPO_CACHE, the realcharly marketplace generate,opencharly/opencharly:v2026.296.2037(412 declaredgitlinks):
rc=1—Two of three cold attempts failed in that step; the third succeeded end-to-end in 3m17s —
same function, same wrapper. Every one of the 412 submodules is REACHABLE from this host,
so the proximate cause here is not the CI's auth failure but a second defect in the same
call: the population takes >4 minutes (measured with
ps -eo etimewhile it was stillrunning) under a 60s transfer bound, and the retry then collides with the killed attempt's
residue. Filed as #280; non-blocking for this fix, because a files-only
fetch never populates.
The fix.
refs.DownloadRepoFiles(repoPath, version)— the files-only fetch, withrefs.DownloadRepounchanged for--repo. It sharescandywalk.RemoteResolver's exactsignature, so the corpus generator passes it as the existing seam with no SDK change. It
has its own cache KEY (
<cache>/.files/<repo>@<version>, a mode directory so the basenamekeeps the
<repo>@<version>shapeplugin-marketplace'sresolve.goparses) and its ownfreshness predicate (a tree export is complete without submodule content; a whole-project
export never is).
Cold, after the fix, same command:
The umbrella actually WINS the twin, measured. With BOTH
[email protected]and
opencharly/[email protected]pinned directly, the generated corpus'sinternals/skills/agents/references/hooks-and-lifecycle.mdis byte-identical to theumbrella's authored file and DIFFERS from the carrier's today — the discriminator being
exactly the reference file, since the three bodies are identical in both sources.
Chain from here (producer-first):
spec#281→ merge → tag →plugin-marketplaceadopts
refs.DownloadRepoFiles(its resolver line is already changed and its call-sitetest fails without it) →
marketplacerefs PR adds the umbrella as a DIRECT ref + theregenerated corpus, with the deploy workflow's cold-runner drift gate as the acceptance
arm. The carrier
layer-charly-internalscan then drop its last three — the two.github-owned ones (git-workflow,repo-setup) are still FILED, so it still cannot bearchived.
A3. This session's delivered system message reads, verbatim:
You are a coding agent powered by the deepseek-v4.1-flash model.— harnessDeepSeek Harness, modeldeepseek-v4.1-flash; cited with opencharly/opencharly#538.Agent: charly-spec279
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
feat(refs): a files-only fetch, so a corpus source certifies only the…
aitrawog commentedon Oct 23, 2026
STATUS — the producer is LANDED and TAGGED:
specv0.2026296.2332(PR #281), and the consumer leg is open: opencharly/plugin-marketplace#49.opencharly/spec#281— the files-only fetchv0.2026296.2332, all four checks green (validate / validatePASS on attempt 1,goCI PASS,validate / lintPASS,validate / armPASS)opencharly/plugin-marketplace#49— adopt it as the corpus resolver3409741,specv0.2026296.1036 → v0.2026296.2332, one-line resolver swap + a call-site test that fails without itmarketplacerefs PR — umbrella as a DIRECT refThe corpus delta is one file, on the full 226-ref list, generated COLD (
CHARLY_REPO_CACHEemptied, 361 SKILL.md, 496 artifacts, 0 new files):That is the discriminator, and it is the only one there is: the three bodies are byte-identical in both sources, so what moves is the
agentsREFERENCE file. Measured with BOTH[email protected]and the umbrella pinned directly: published == theumbrella's file (
0d5c8c98…), ≠ the carrier's corpus copy (5848ee0c…).Pin chosen:
opencharly/opencharly:v2026.296.2254(the newest merged umbrella tag, notthe
.2037the withdrawal recorded)..agents/is byte-identical at both tags — measured,blob for blob — so the pin names the current tag without moving a body.
layer-charly-internalsafter this lands: it CAN drain its last three (agents,cutover-policy,root-cause-analyzer) — their umbrella copies are now publishable — but itstill holds
git-workflowandrepo-setup, whose config home (opencharly/.github) is nota corpus source. So it still cannot be archived, and I did not touch it: the carrier's drain
is the held carrier's own PR.
Two sibling findings filed from this work, both non-blocking and neither absorbed here:
#280 (the population runs a >4-minute operation under the 60s transfer
bound and its retry collides with the killed attempt's residue — the proximate cause of my
own cold
rc=1) and opencharly/plugin-docs#23 (the docs generator is the same walk'ssibling consumer and still populates).
A3. This session's delivered system message reads, verbatim:
You are a coding agent powered by the deepseek-v4.1-flash model.— harnessDeepSeek Harness, modeldeepseek-v4.1-flash; cited with opencharly/opencharly#538.Agent: charly-spec279
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
fix(corpus): fetch corpus sources files-only — the walk reads no subm…
aitrawog commentedon Oct 23, 2026
RESOLVED — the fix landed as #281 (squash
317df91, tag **v0.2026296.2332) and the consumer chain is in flight:plugin-marketplacecandy/plugin-marketplace/v0.2026296.2345,marketplace#567(the umbrella as a DIRECT ref + the regenerated corpus).Cold evidence, both directions, on
opencharly/opencharly(412 declared gitlinks), freshCHARLY_REPO_CACHE:--repostill populates (arm 2) and a genuinely unreachable declared submodule still fails that fetch loudly (arm 3); the files-only fetch has its own cache entry (<cache>/.files/<repo>@<version>) and its own freshness predicate, so the two modes never judge each other's export.Two sibling findings filed rather than absorbed: #280 (the population runs a >4-minute operation under the 60s transfer bound and its retry collides with its predecessor's residue — the proximate cause of my own cold rc=1) and opencharly/plugin-docs#23 (the docs generator is the same walk's sibling consumer).
Agent: charly-spec279
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)