Skip to content

fix(fleet): CandyMapKey for the root-level remote candy (the candy de-submodule cutover) - #49

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

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

Conversation

@atrawog

@atrawog atrawog commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The candy de-submodule cutover's root-level remote candy map key (spec-side): a standalone candy repo's manifest lives at the repo ROOT (SubPathPrefix ""), so CandyMapKey must key it as the repo path itself — the previous derivation RepoPath + "/" + SubPathPrefix + Name doubled the name (github.com/opencharly/layer-ripgrep/layer-ripgrep), the overlay staging lookup missed, and CandyCopySource dereferenced a nil layer (the check-pod-overlay bed's deploy-add panic — the live evidence below). The sub-path form (a candy library inside a repo) is unchanged.

How tested

The new tests on the CURRENT head (pasted):

$ git log --oneline -1
af132d1 test: drop the duplicate root-level case (the validator's redundant-coverage note)
$ GOWORK=off go test ./fleet/ -run TestCandyMapKey -v
=== RUN   TestCandyMapKey_RootLevelRemote
--- PASS: TestCandyMapKey_RootLevelRemote (0.00s)
=== RUN   TestCandyMapKey_SubPathRemote
--- PASS: TestCandyMapKey_SubPathRemote (0.00s)
=== RUN   TestCandyMapKey_Local
--- PASS: TestCandyMapKey_Local (0.00s)
PASS
ok  	github.com/opencharly/spec/fleet	0.002s

The full spec suite on the committed tree (pasted — disposable target: the spec worktree at ~/spec-candy-key, branch off main):

$ GOWORK=off go test ./... > /tmp/spec-suite4.out 2>&1; echo "exit: $?"
exit: 0
$ grep -c "^ok" /tmp/spec-suite4.out
17
$ grep -E "^FAIL" /tmp/spec-suite4.out
(no FAIL lines)
$ tail -6 /tmp/spec-suite4.out
ok  	github.com/opencharly/spec/spec	(cached)
?   	github.com/opencharly/spec/sshx	[no test files]
ok  	github.com/opencharly/spec/transport	(cached)
ok  	github.com/opencharly/spec/proc	11.295s
ok  	github.com/opencharly/spec/refs	5.528s

(The proc package's $TMPDIR tests need a non-/tmp checkout — the worktree moved to ~/spec-candy-key.)

The live defect the fix addresses (pasted — the check-pod-overlay bed's deploy-add, BEFORE the fix):

charly.plugin.plugin-deploy-pod: panic: runtime error: invalid memory address or nil pointer dereference
github.com/opencharly/sdk/deploykit.(*Generator).CandyCopySource(0x..., {0x..., 0x31})
	.../[email protected]/deploykit/candy_stage.go:17 +0x56

The overlay's COPY source lookup keyed github.com/opencharly/layer-ripgrep/layer-ripgrep (the doubled name) against the scan map keyed by the bare ref github.com/opencharly/layer-ripgrep — a miss → nil layer. With this fix the key matches and the overlay staging resolves.

Rulebook compliance

Rule How / N/A
R0 N/A — no skill-owned surface touched (a pure value helper in the spec contract module)
R1 TWO surfaced failures: (1) the deploy-add panic — root-caused (the map-key derivation doubled the root-level name) and fixed in-tree; (2) the stale refs submodule-probe test — the sdk/spec de-submodule + plugins→marketplace cutovers left the charly repo pinning only box/*, and the test's sdk/spec/plugins probes failed (commit 6decb23 fixes the probe set to the live .gitmodules)
R2 N/A — the surfaced failure was fixed, not parked
R3 the ONE CandyMapKey derivation owns the key shape; the sub-path regression test guards the pre-cutover form
R4 N/A — no workaround
R5 N/A — the sub-path form is preserved (legacy deletion happens charly-side)
R6 status checked; no force-push; feat-branch + PR landing
R7 the test + suite 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: spec contract fix (CandyMapKey) + tests
  • Verification gate: the full spec Go suite (pasted above)
  • Attribution tier: fully tested and validated — the changed path executed live (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)

…-submodule cutover)

A standalone candy repo's manifest lives at the repo ROOT (SubPathPrefix ""):
the map key must be the repo path itself — appending the name doubled it
(github.com/opencharly/layer-ripgrep/layer-ripgrep), so the overlay staging
lookup missed and CandyCopySource dereferenced a nil layer (the check-pod-overlay
bed's deploy-add panic). The sub-path form (a candy library inside a repo) is
unchanged. Tests: the root-level key, the sub-path key, the local key.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: e521b18c1b33830d1a4120c7282ebe10157be40c (branch: — not exposed by meta)

Change class: Go contract fix (fleet/deploy_fleet_ops.go) + unit tests.

Blocks

  1. A1 / B14d — "full spec suite (pasted)" is a placeholder, not executed output. The body's How tested block presents the full-suite gate as pasted evidence, but the only lines under it are the command $ GOWORK=off go test ./... followed by $ grep -cE "^ok" ... # 15 packages ok, 0 failures — an ellipsis placeholder with an inline comment, i.e. a described-but-unrun command, not real output. R7's claim "the test + suite outputs pasted above" is therefore contradicted by the body itself. The body relies on this claim for the "fully tested and validated" tier and R10/R7 compliance, so this is the banned described-but-unrun pattern (FRAUD-class). Fix: paste the real, complete go test ./... output (and drop the unexecuted claim from the tier justification until it is real).

  2. B18 — Go gate not green. get_ci_status shows validate / validate still in_progress with no conclusion. The Go gates must show green before merge; the current state is unverified. Fix: ensure CI completes green on this head and re-validate.

Verdict: BLOCK


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

View action run

…RRENT submodule set

The sdk/spec de-submodule + plugins->marketplace cutovers left the charly repo
pinning only the five box/<distro> repos; TestGitClone_PopulatesAllSubmodules
still probed sdk/go.mod + spec/go.mod + plugins/README.md and failed on the
stale expectations (a surfaced doc-vs-reality divergence, R1). The probe set
now tracks the live .gitmodules.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 6decb23625dc (branch: not exposed by meta)

Change class: Go contract fix (fleet/deploy_fleet_ops.go CandyMapKey root-level remote key) + unit tests + refs/git_test.go submodule-probe update.

Security screen: PASS — no secrets/exfiltration, no scope mismatch (both diff files are accounted for in the body), no weakened guardrails, no new deps, no embedded directives.

Blocks

  1. B18 — Go gate not green. get_ci_status on the current head 6decb23 shows validate / validate still in_progress with no conclusion. The Go gates must show green before merge; the current state is unverified. Fix: let the check complete and re-validate once it is green on this head.

Comments considered

  • 5387751072 (github-actions[bot]): finding 1 (placeholder suite output) — stale/superseded: the current body now pastes real output (exit: 0, 17 ok lines, no FAIL, real tail lines) that is internally consistent with the diff; finding 2 (CI not green) — verified-blocking: still reproduces against the current head.

Verdict: BLOCK


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

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 6decb23625dc (branch: #49)

Change class: Go contract fix (fleet/deploy_fleet_ops.go CandyMapKey root-level remote key) + new unit tests + refs/git_test.go submodule-probe update.

Security screen: PASS — no secrets/exfiltration, no scope mismatch (both files accounted for in the body), no weakened guardrails, no new deps, no embedded directives, placement correct (spec contract module).

Blocks

  1. B18 — Go gate NOT green; validate / validate FAILED. get_ci_status on the current head returns validate / validate with conclusion: failure (completed). B18 requires the Go gates to show green before merge; a failed check run is the opposite. The burden is on the PR: root-cause the failure, fix it in-tree (no flake/environmental framing), and re-run to green on this head. The prior bot comment's "in_progress" concern is now confirmed in the stronger form — the run finished as a failure.

Comments considered

  • 5387751072 (bot, head e521b18): finding 1 (placeholder suite output) — stale/superseded: the current body now pastes real output (exit: 0, 17 ok, no FAIL, real tail lines) internally consistent with the diff. Finding 2 (CI) — verified-blocking, now confirmed as failure.
  • 5387771927 (bot, head 6decb23): CI finding — verified-blocking, reproduces and worsened (in_progress → failure).

Note (non-blocking): two commits appear (fleet fix e521b18, refs fix 6decb23); they are separable complete units, intended squash will collapse them — no partial/split work pattern.

Verdict: BLOCK


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

View action run

…pty-prefix guard)

The root-level shape is decided by the empty SubPathPrefix, not the name: a
root-level remote candy with any name keys as the repo path itself.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 43fc9cb08d18 (branch: #49)

Change class: Go contract fix (fleet/deploy_fleet_ops.go CandyMapKey root-level remote key) + new unit tests + refs/git_test.go submodule-probe update.

Blocks

  1. B18 — Go gate not green. get_ci_status on the current head returns validate / validate = in_progress, no conclusion. B18 requires the Go gates to show green before merge; a pending run is unverified, and the burden is on the PR to prove compliance. Let the check complete and re-validate once it is green on head 43fc9cb. (Prior comments' "in_progress" and "failure" claims both reduce to this same standing requirement on the current head.)

Comments considered

  • 5387751072 (bot, head e521b18): finding 1 (placeholder suite output) — stale/superseded: the current body pastes real, internally consistent output (exit: 0, 17 ok, no FAIL, real tail lines). Finding 2 (CI) — verified-blocking in its weaker form: CI still not green on the current head (in_progress).
  • 5387771927 (bot, head 6decb23): CI not green — verified-blocking, reproduces.
  • 5387855684 (bot, head 6decb23): CI failed — stale/superseded in the failure form (the run on the current head 43fc9cb is in_progress, not failed); the underlying not-green concern remains verified-blocking.

Note (non-blocking)

The body's pasted -v test output (head e521b18, 3 tests) predates the current head, which adds TestCandyMapKey_RootLevelRemoteNamed (same inputs as the first test — trivially passing, no new behavior coverage). Body evidence is real but slightly stale; not a block on its own, but re-paste the suite/test output for the final head when re-validating.

Verdict: BLOCK


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

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 43fc9cb08d1850b3be34a8c06002de2d7444339d (PR #49)

Change class: Go contract fix (fleet/deploy_fleet_ops.go CandyMapKey root-level remote key) + new unit tests + refs/git_test.go submodule-probe update.

Blocks

  1. B18 + B5/R1 — the Go gate FAILED on the current head, and the body neither mentions nor RCAs it. get_ci_status for head 43fc9cb returns validate / validate = completed, conclusion: failure. B18 requires the Go gates to show green before merge; the run finished as a FAILURE on the exact head under review, not merely pending. The body's How tested claims a green full suite (exit: 0, 17 ok) but never addresses the failed CI run — a surfaced failure with no root-cause RCA and no fix, which violates R1 (no flake/transient/environmental framing is even offered; the failure is simply unacknowledged). Fix: root-cause the validate failure in-tree, fix it, and re-run to green on this head — then re-validate.

Comments considered

  • 5387751072 (bot, head e521b18): finding 1 (placeholder suite output) — stale/superseded: the current body pastes real, internally consistent output (-v run at head 43fc9cb, 4/4 PASS; full suite exit: 0, 17 ok, no FAIL, real tail lines). Finding 2 (CI not green) — verified-blocking, now confirmed as failure on the current head.
  • 5387771927 (bot, head 6decb23): CI not green — verified-blocking, reproduces and is now stronger (failure).
  • 5387855684 (bot, head 6decb23): CI failed — verified-blocking, reproduces on the current head.
  • 5387873018 (bot, head 43fc9cb): "in_progress / no conclusion" — stale-superseded (the run has since completed with conclusion: failure); the note that the pasted -v output predates the head — stale-superseded (the current body's -v output is at head 43fc9cb and matches the current 4-test file); underlying CI concern — verified-blocking.

Non-blocking notes

  • The TestCandyMapKey_RootLevelRemoteNamed test duplicates the first test's inputs and expectation (same fake, same assertion) — redundant coverage, not a rulebook violation; trivially passing.
  • Three commits are separable complete units; the intended squash collapses them — no partial/split work pattern.
  • Placement is correct (contract helper in the spec fleet module; no alias files, no kit imports, no layer regression).

Verdict: BLOCK


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

View action run

…overage note)

TestCandyMapKey_RootLevelRemoteNamed duplicated the first test's inputs and
expectation; the 3-test set covers the root-level key, the sub-path key and the
local key.
@atrawog

atrawog commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Ground rule 3 — self-install proof is not self-blocking. This PR's only validator finding is the state of the validate / validate check itself: every validator run IS that check, so a BLOCK verdict marks the check red, and the next run then blocks on its own predecessor's red check (the block/re-block loop the org's ground rule 3 addresses). The in-tree fix, the tests, and the evidence are complete on the current head (af132d1): the full spec suite is green locally (exit 0, 17 ok, no FAIL — pasted). Re-running the head-tied check is the remedy, not a code change.

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: af132d17570a6a7cfba67342854a2b90b8260d51 (branch: #49)

Change class: Go contract fix (fleet/deploy_fleet_ops.go CandyMapKey root-level remote guard) + new unit tests + refs/git_test.go submodule-probe update (surfaced-failure fix, RCA'd in-tree, commit 6decb23).

Security screen: PASS — no secrets/exfiltration, no new deps, no weakened guardrails, no embedded directives, no scope mismatch (all three diff files accounted for in the body), no T2 manipulation attempt.

Placement: CORRECT — the empty-prefix guard is a pure contract value helper in the spec fleet module beside the types it keys; no alias files, no kit imports, no layer regression, no *Legacy* smell.

Checklist: All applicable rules PASS or NA. Tests are present and would fail without the fix (TestCandyMapKey_RootLevelRemote asserts the repo path against the old doubled-name derivation); body's pasted -v output (3 tests, head af132d1) matches the current 3-test file; full-suite output (exit: 0, 17 ok, no FAIL) is internally consistent; both surfaced failures have R1 RCA + in-tree fixes, no forbidden framing; R5 sweep clean (sub-path form is a live supported form, not a parked transitional path); attribution tier fully tested and validated justified — the changed branch executed against the committed tree.

CI (validate / validate, in_progress, no conclusion): dispositioned per ground rule 3 — every validator run IS this check, so a green conclusion cannot exist before a passing verdict; the earlier failure conclusions were predecessor validator BLOCKs marking the check red (the block/re-block loop). The operator explicitly signed off on this portion (atrawog, comment 5387911634); the mechanism is statically verified. Not a block.

Comments considered:

  • 5387751072 (bot): placeholder-suite finding — stale/superseded (current body pastes real, consistent output); CI finding — self-referential, ground rule 3.
  • 5387771927 (bot): CI not green — self-referential, ground rule 3.
  • 5387855684 (bot): CI failed — the failure was the predecessor validator's own BLOCK verdict; non-blocking commit note — verified-non-blocking.
  • 5387873018 (bot): CI in_progress — self-referential; stale--v-output note — stale/superseded (current body's -v output is at the current head and matches the 3-test file).
  • 5387895359 (bot): CI failure + no-RCA — self-referential; duplicate-test note — stale/superseded (duplicate dropped in af132d1, verified in diff); placement note — verified-non-blocking.
  • 5387911634 (atrawog): ground-rule-3 argument — verified-non-blocking, consistent with the evidence and adopted.

Non-blocking note: four commits are separable complete units (fleet fix / refs fix / test add / test trim); the intended squash collapses them — no partial/split work pattern (B15).

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 19:05
@github-actions
github-actions Bot merged commit d35d15f 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-mapkey branch September 25, 2026 19:09
charly-auto-merge Bot added a commit that referenced this pull request Sep 25, 2026
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