Skip to content

fix: remove the stray charly submodule; fetch charly at CI time into a temp checkout - #1

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/remove-charly-submodule
Aug 28, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/remove-charly-submodule

Conversation

@atrawog

@atrawog atrawog commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The candy de-submodule scaffold copied the umbrella structure into every standalone repo, declaring a charly git submodule (path = charly, url = https://github.com/opencharly/charly.git, branch = main). The refs downloader's populateSubmodules (spec/refs/git.go) initializes EVERY declared submodule on fetch — so a consumer fetching this candy at any ref pulls the ENTIRE opencharly/charly repo into charly/ inside the fetched tree. That leaked tree breaks the charly parity test (TestFleetCompileParity_PluginRoundTrip): its seedParityProject copies the fetched fixture into .parity/candy/, the .parity root's discover: candy recursive walks into .parity/candy//charly/ finding the ROOT's charly.yml (agentteams box + 663 candy manifests), so cfg.AllBoxNames() returns the root's boxes and the compile resolves "agentteams" instead of the 3 parity fixtures.

Fix: remove the submodule gitlink + .gitmodules. The CI gate (deploy.yml) keeps validating against the pinned charly by cloning it at CI time into a temp checkout (/tmp/charly, pinned tag v2026.238.1242) — the candy repo itself no longer carries any charly tree. (Pinned tag replaces the previous floating branch = main — a tightening.)

How tested

1. Diff (real, from the live branch)

$ git diff main --stat
 .github/workflows/deploy.yml | 15 ++++++++++-----
 .gitmodules                 |  4 ----
 charly                      |  1 -
 3 files changed, 9 insertions(+), 11 deletions(-)

2. The submodule was the ONLY gitlink — removed cleanly

$ git ls-tree HEAD | grep 160000
(empty — no gitlinks remain)

3. The CI replacement works: charly builds from a CI-time temp checkout (no repo submodule) — the EXACT shipped commands

$ git clone --recursive --depth 1 --branch v2026.238.1242 https://github.com/opencharly/charly.git /tmp/charly
$ mkdir -p /tmp/charly/bin
$ cd /tmp/charly/charly && go build -buildvcs=false -ldflags "-X main.BuildCalVer=candy-ci" -o /tmp/charly/bin/charly .
$ /tmp/charly/bin/charly version
candy-ci

4. The candy manifest validates at the pinned charly (the deploy.yml gate, exactly as CI runs it)

$ cd <repo-root> && /tmp/charly/bin/charly box validate
$ echo $?
0

Zero lines of output, exit 0 — a clean validate of the candy manifest at the repo root with the CI-built binary (the exact /tmp/charly/bin/charly path the workflow ships).

5. Repo-wide old-submodule sweep — zero hits

$ grep -rn "charly" .gitmodules 2>/dev/null | wc -l
0
$ git ls-tree HEAD | grep 160000 | wc -l
0

Rulebook compliance

Rule Status
R0 (skills first) git-workflow + layer skills loaded before the change.
R1 (RCA) Full RCA above: the scaffold copied the umbrella's submodule structure into the standalone repos; populateSubmodules materializes every declared submodule on fetch, leaking the charly repo into consumer fetch trees; the parity test's recursive discover then folds the ROOT's boxes.
R2 (no deferral) N/A — the submodule is removed in-tree; no deferral.
R3 (no duplication) The CI validation logic is the single canonical gate; the submodule was a duplicated copy of the charly repo.
R4 (no workarounds) The fix is mechanism-level: remove the offending submodule + fetch charly at CI time; no sleeps/retries/hand-pins.
R4a (no ad-hoc fixes) N/A — no ad-hoc scripting; the change is a clean submodule removal + CI rewrite.
R5 (delete legacy) The submodule gitlink + .gitmodules are deleted in this PR.
R6 (git safety) No force-push, no hook bypass, no direct main push; PR-only landing. git status confirmed a clean tree before the gitlink deletion.
R7 (prove the gate) N/A — task verify is umbrella-scoped; the repo's CI gate (deploy.yml) is exercised by the pasted charly box validate run (section 4).
R8 (fresh proof) The CI binary is built fresh from the pinned charly checkout (section 3).
R9 (live exercise) The validate gate runs against the CI-time charly build (section 4); the candy composes clean.
R10 (zero warnings) charly box validate emits zero lines / exit 0 (section 4).

Change classification

  • Change class: repo-structure fix — remove the stray charly git submodule (scaffold defect) + rewrite the CI gate to fetch charly at CI time (pinned tag).
  • Verification gate: charly box validate (exit 0, zero output) with the CI-time charly build + repo-wide submodule sweep.
  • Attribution tier: analysed on a live system — the validate gate ran live with the freshly-built charly; the full repo CI suite was not run.

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

…a temp checkout

The candy de-submodule scaffold copied the umbrella structure into every
standalone repo, declaring a 'charly' git submodule pointing at
opencharly/charly. The refs downloader (populateSubmodules) initializes every
declared submodule on fetch, so a consumer fetching this candy at any ref
pulls the ENTIRE opencharly/charly repo into charly/ inside the fetched tree.

That leaked tree breaks the charly parity test (TestFleetCompileParity_PluginRoundTrip):
its seedParityProject copies the fetched fixture into .parity/candy/<name>, and
the .parity root's 'discover: candy recursive' walks into
.parity/candy/<name>/charly/ finding the ROOT's charly.yml (agentteams box +
663 candy manifests), so cfg.AllBoxNames() returns the root's boxes and the
compile resolves 'agentteams' instead of the 3 parity fixtures.

Fix: remove the submodule gitlink + .gitmodules. The CI gate (deploy.yml)
keeps validating against the pinned charly by cloning it at CI time into a
temp checkout (/tmp/charly, pinned tag v2026.238.1242) instead of a committed
repo submodule — the candy repo itself carries no charly tree.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 643ce111ae64be7e6e5c063402aeb4f99c2ecabd (branch: fix/remove-stray-charly-submodule)

Change class: repo-structure + CI workflow (submodule gitlink + .gitmodules removal; deploy.yml rewrite to clone charly at CI time, pinned tag v2026.238.1242).

Blocks

  1. Ground rule 4 / A1 — pasted diff stat contradicts the CURRENT diff (body-truthfulness). The body's "How tested" section 1 pastes git diff main --stat as "real, from the live branch" showing 3 files changed, 8 insertions(+), 11 deletions(-). The CURRENT diff (head 643ce111 vs base 79129f3, re-derived line-by-line, and confirmed by PR meta additions: 9) contains 9 insertions in .github/workflows/deploy.yml (the added blank line after the removed with: block, the 3-line "Fetch the pinned charly source" step, the 2 setup-go cache lines, the 2 build lines, and the new validate line), and 11 deletions — so the real stat is 9 insertions(+), 11 deletions(-). The insertion count in the pasted evidence is wrong by one. Correct the pasted output (re-run git diff main --stat on the live branch and paste the actual result), or state the corrected count explicitly.

Everything else cross-checked clean against the CURRENT state: file list (3 files) and deletion count match; .gitmodules and the charly gitlink are deleted with no residual charly/ path references left in the workflow; the git ls-tree HEAD | grep 160000 → 0 sweep is consistent; the clone/build/charly version → candy-ci output is consistent with the shipped ldflags; the charly box validate (exit 0, zero output) matches the rewritten gate; the submodule removal RCA (parity-test recursive discover folding the root's charly.yml) is coherent; attribution tier analysed on a live system is not inflated; the body ends with the correctly-formed *Assisted-by:* footer; no forbidden framings (flake/pre-existing/deferral) appear; no security, placement, or concurrency findings. Comment thread is empty — nothing to dispose.

Verdict: BLOCK


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

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 643ce111ae64be7e6e5c063402aeb4f99c2ecabd (branch: fix/remove-stray-charly-submodule)

Security screen: PASS — no scope mismatch, no secrets/exfiltration, no weakened guardrails. The CI gate is preserved (charly box validate) and the charly pin is tightened (floating branch = main submodule → pinned tag v2026.238.1242). Intent matches the diff exactly with explicit RCA justification.

Checklist: All applicable rules PASS or NA.

Comment intake: The single prior comment (github-actions[bot] BLOCK) is stale-superseded. It claimed the body pasted 8 insertions(+), 11 deletions(-) while the diff had 9. The CURRENT body now pastes 9 insertions(+), 11 deletions(-), which I re-derived line-by-line against the current diff: deploy.yml = 9 insertions + 6 deletions (15 changes ✓), .gitmodules = 4 deletions ✓, charly gitlink = 1 deletion ✓, total = 9 insertions / 11 deletions ✓ matching PR meta (additions: 9, deletions: 11). The finding no longer reproduces against the current state.

Cross-checks against current state: submodule gitlink + .gitmodules removed with no residual charly/ path references in the workflow; the CI clone/build/validate rewrite is internally consistent (build output /tmp/charly/bin/charly matches the validate invocation; -C .. correctly dropped since the workflow's working dir is now the repo root); charly version → candy-ci matches the shipped ldflags; validate exit 0 / zero output matches the rewritten gate; attribution tier analysed on a live system is not inflated; *Assisted-by:* footer correctly formed; no forbidden framings; no placement, concurrency, or security findings.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 28, 2026 01:22
@github-actions
github-actions Bot merged commit e717bcc into main Aug 28, 2026
2 of 3 checks passed
@aitrawog
aitrawog deleted the feat/remove-charly-submodule branch September 25, 2026 19:26
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