Skip to content

fix(loaderkit): root-level remote bare dep must not be enqueued as a sibling (fix-point mirror of #160) - #161

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/enqueue-root-skip
Aug 24, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/enqueue-root-skip

Conversation

@atrawog

@atrawog atrawog commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The batch-1 candy cutover (charly#385) revealed a second sibling-ref fabrication site in the remote-candy fetch fix-point. The #160 fix guarded QualifyRemoteSiblingDeps (the scan-time .Resolved qualification), but ScanCandyFromLocal's fix-point enqueue leg independently fabricates the same wrong sibling ref for a root-level remote candy:

// before
return enqueue(dl.RepoPath, dl.Version, dl.RepoPath+"/"+sc.View.SubPathPrefix+dep.Raw)
// with SubPathPrefix "" → github.com/opencharly/layer-cuda/nvidia for a bare "nvidia" dep

The next fix-point round then scans that fabricated ref against the repo at the tag and fails the resolve with remote candy github.com/opencharly/layer-cuda/nvidia not found at .../[email protected]/nvidia — the exact charly check run check-marketplace bed failure at the charly#385 head.

The fix (34edc0d): mirror the #160 skip in the enqueue leg — a root-level remote candy (SubPathPrefix "") has NO siblings, so a plain-name dep is left to resolve against the scan set (the local library or another downloaded remote). The pre-cutover sub-path form (SubPathPrefix "candy/") keeps the same-repo sibling enqueue unchanged.

The negative control (24f20df): TestScanCandyFromLocal_SubPathBareDepStillEnqueued holds the candy-library form to its existing sibling enqueue, so the skip cannot degenerate into "drop all plain-name deps of remote candies".

How tested (all at the current head 24f20df)

The new regression gate (PASS):

$ go test ./loaderkit/ -run TestScanCandyFromLocal_RootLevelBareDepNotEnqueued -count=1 -v
=== RUN   TestScanCandyFromLocal_RootLevelBareDepNotEnqueued
--- PASS: TestScanCandyFromLocal_RootLevelBareDepNotEnqueued (0.00s)
PASS
ok  	github.com/opencharly/sdk/loaderkit	0.003s

The negative control (PASS, current head):

$ go test ./loaderkit/ -run TestScanCandyFromLocal_SubPathBareDepStillEnqueued -count=1 -v
=== RUN   TestScanCandyFromLocal_SubPathBareDepStillEnqueued
--- PASS: TestScanCandyFromLocal_SubPathBareDepStillEnqueued (0.00s)
PASS
ok  	github.com/opencharly/sdk/loaderkit	0.003s

The same tests against the pre-fix file (origin/main's scan_orchestrate.go restored; FAIL — proves the gate catches the regression, and that the fix did not overreach):

$ go test ./loaderkit/ -run "TestScanCandyFromLocal_RootLevelBareDepNotEnqueued|TestScanCandyFromLocal_SubPathBareDepStillEnqueued" -count=1
--- FAIL: TestScanCandyFromLocal_RootLevelBareDepNotEnqueued (0.00s)
    scan_candy_root_test.go:239: ScanCandyFromLocal: scanning github.com/opencharly/layer-cuda:v2026.235.2110: fix-point scanned fabricated ref "github.com/opencharly/layer-cuda/nvidia" — the root-level bare dep must not be enqueued as a sibling
FAIL
FAIL	github.com/opencharly/sdk/loaderkit	0.003s
FAIL

(The sub-path control passes pre-fix too — it only guards overreach.)

Full sdk suite at the current head:

$ go test ./...
ok  	github.com/opencharly/sdk/deploykit	(cached)
ok  	github.com/opencharly/sdk/enginekit	(cached)
ok  	github.com/opencharly/sdk/kit	(cached)
ok  	github.com/opencharly/sdk/loaderkit	0.007s
ok  	github.com/opencharly/sdk/packagekit	(cached)
ok  	github.com/opencharly/sdk/vmshared	(cached)

(The seam-based fixture reproduces the exact bed shape: a root-level remote repo whose manifest carries a bare dep nvidia plus an @-pinned remote dep layer-ffmpeg; asserts the fix-point never asks the ScanRemote seam for the fabricated ref, the root materializes from the fetched repo dir, and the local bare-name dep stays present under its bare key.)

Rulebook compliance

Rule Status
R1 — RCA every anomaly The residual failure was traced to a second fabrication site (the fix-point enqueue), not a stale build or config — reproduced, fixed at the mechanism
R3 — No duplication The skip mirrors the #160 qualify skip in the same loaderkit scan pipeline; the sub-path form keeps its enqueue
R7 — Prove the gate go test ./... green on the final tree (output above, current head)
R10 — Fresh proof Verified from the committed tree 24f20df

Change classification

  • Change class: bug fix (remote-candy fetch fix-point), sdk loaderkit mechanism
  • Verification gate: the new regression gate (proven to fail pre-fix) + the negative control + full sdk suite at the current head
  • Attribution tier: fully tested and validated — changed path executed live via the unit seams + full suite

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

…ote's bare dep as a sibling (the candy de-submodule cutover)

ScanCandyFromLocal's fix-point enqueues a remote candy's plain-name
require:/candy: dep as a same-repo sibling at the SAME git tag:
repoPath+"/"+SubPathPrefix+dep.Raw. For a ROOT-LEVEL remote candy (the
standalone candy repo layout, SubPathPrefix "") that fabricates
repoPath/nvidia for a bare nvidia dep; the next fix-point round then
scans that ref against the repo at the tag and dies "remote candy
github.com/opencharly/layer-cuda/nvidia not found at
.../[email protected]/nvidia" — the batch-1 bed failure.

Mirrors the #160 qualify skip: a root-level remote candy has NO
siblings, so the bare dep is left to resolve against the scan set (the
local library or another downloaded remote). The sub-path form
(SubPathPrefix "candy/") keeps the sibling enqueue unchanged.

Gated by TestScanCandyFromLocal_RootLevelBareDepNotEnqueued: the seam
fails the scan if the fix-point ever asks for the fabricated ref; the
test reproduces the exact bed shape (root repo with a bare dep plus an
@-pinned remote dep) and holds both the root materialization and the
local bare-name dep.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 34edc0d08e032761ccb5314d2311ee2347add8cb

Change class: code change — loaderkit fetch fix-point bug fix + regression test (2 files, +113/-0).

Blocks

  1. A1 — evidence supplied as assertion, not pasted output. The How tested block claims concrete results — "go test ./loaderkit/ -run TestScanCandyFromLocal_RootLevelBareDepNotEnqueued -count=1 — PASS with the fix; the same test FAILS with the fix stashed", "go test ./... — full sdk suite green" — but pastes no actual command output anywhere in the body. A1 requires pasted output, not a described outcome, and the ground rules forbid accepting a run claim on the author's word alone ("Never let a missing re-run pass on the author's word alone"). The new test's logic does gate the regression (the ScanRemote seam errors on any fabricated .../layer-cuda/nvidia ref), but the pass/fail/stash-reversal claims are unverifiable as written. Fix: paste the real go test output (and the stash-reversal failure output if claimed).

  2. B18 — CI Go gates not yet green. get_ci_status shows validate / validate in_progress with no conclusion on head 34edc0d. B18 requires the Go gates to show green; the body's "full sdk suite green" claim is not corroborated by CI. Fix: let CI complete green (or paste the gate evidence) before re-requesting review.

No security-screen findings; placement of the fix in loaderkit (sdk mechanism layer) is CORRECT; the diff is internally consistent with the body's RCA and the regression fixture reproduces the described bed failure shape.

Verdict: BLOCK


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

View action run

The root-level skip (#161) must not degenerate into dropping plain-name
deps of SUB-PATH remote candies: a sub-path remote's bare dep IS a
same-repo sibling at the same tag and the fix-point must keep enqueuing
repoPath+"/candy/"+dep. TestScanCandyFromLocal_SubPathBareDepStillEnqueued
holds the candy-library form (SubPathPrefix "candy/") to that behavior.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 24f20dfe65fb56495945eb97806d506380b62cba (PR #161, opencharly/sdk)

Change class: code change — loaderkit remote-candy fetch fix-point bug fix + two regression tests (2 files, +175/-0).

Comments considered:

  • 5389233271 (github-actions[bot] BLOCK @ 34edc0d) — finding A1 "no pasted output": stale-superseded (the CURRENT body now pastes real go test output for the regression gate, both PASS and pre-fix FAIL). Finding B18 "CI not green": verified-blocking — re-derived against the current head, validate / validate is still in_progress with no conclusion (below).

Blocks

  1. B18 — CI Go gates not green on head. get_ci_status for head 24f20dfe shows validate / validate in_progress, no conclusion. B18 requires the Go gates to show green, and the body's "full sdk suite green" claim is not corroborated by CI. Fix: let the validate run complete green (or paste the gate evidence for the current head) before re-requesting review.

  2. A1/R10 — no run evidence at the CURRENT head for the negative-control test. The second commit (24f20dfe, test(loaderkit): add the sub-path sibling-enqueue negative control, loaderkit/scan_candy_root_test.go TestScanCandyFromLocal_SubPathBareDepStillEnqueued) has no pasted run output of its own, and the body's pasted suite output is attributed to tree 34edc0d (the R10 row: "Verified from the committed tree (34edc0d)") — i.e., before that test existed. R10 requires pasted output for each changed piece. Fix: paste go test ./loaderkit/... output from the head tree (or a green CI run covering it).

Security screen: no findings (no scope mismatch, no exfiltration, no guardrail change; placement of the fix in loaderkit is correct).

Verdict: BLOCK


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

View action run

@atrawog

atrawog commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Ground rule 3 — the check IS the fresh validator run itself: it cannot be green while the reviewer is mid-run. The body now carries the gate evidence for the current head (24f20df) per B18's own alternative, and the pasted outputs cover both changed commits (R10).

@atrawog

atrawog commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Ground rule 3 — the validate / validate check IS the fresh validator run itself; it cannot be green while the reviewer is mid-run. The body now carries gate evidence for the current head (24f20df): pasted output for both changed commits (the regression gate + the negative control), the pre-fix FAIL proof, and the full suite.

@atrawog

atrawog commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

workflow_dispatch re-run note: the previous run (BLOCK verdict) is stale-superseded by the current body; re-triggering the gate on the current head 24f20df.

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 24f20dfe65fb56495945eb97806d506380b62cba (opencharly/sdk, PR #161)

Security screen: PASS — no scope mismatch (fix + two regression tests match the summary exactly), no secrets/exfiltration, no guardrail changes, no new dependencies, no obfuscation.

Change class: code change — loaderkit remote-candy fetch fix-point guard (mirror of #160) + regression gate + negative control (loaderkit/scan_orchestrate.go +1 guard; loaderkit/scan_candy_root_test.go +2 tests; +175/-0).

Placement: CORRECT — fix lives in the loaderkit scan pipeline (sdk mechanism layer); no core import, no alias file, no capability pulled inward.

Checklist: All applicable rules PASS or NA (A1–A3, B4–B18). Cross-checks performed:

  • A1/A3 — body accounts for both commits, pastes real output for every changed piece at the current head (regression gate PASS, negative-control PASS, pre-fix FAIL proof, full go test ./... suite), and ends with the correctly-formed *Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)* footer; the tier is justified (the changed guard executes in the fresh-run regression gate).
  • B12/R10 — pasted outputs are internally consistent: real test names matching the diff, correct module path, loaderkit run fresh (0.007s, uncached) while the other suites are cached, and the pre-fix FAIL reproduces the exact seam error string from the diff (fix-point scanned fabricated ref "github.com/opencharly/layer-cuda/nvidia"). The regression gate fails without the fix (pasted) and the negative control holds the sub-path sibling enqueue, so the fix cannot degenerate into dropping all plain-name deps.
  • B18/CI — the only check (validate / validate) is the validator run itself: one in_progress (this run) and one completed failure (the prior validator BLOCK verdict on this same head, not a Go-gate failure). Per ground rule 3, the self-gated check cannot be green mid-run; the Go-gate evidence is the body's pasted go test output, which cross-checks cleanly. No visible lint/gofmt defects in the diff.
  • B5/R1, B14 — RCA is a real second fabrication site with a mechanism-level fix; no flake/transient/pre-existing framing anywhere.

Comments considered:

  • 5389233271 (bot BLOCK @ 34edc0d, A1 "no pasted output" / B18 "CI in_progress") — stale-superseded: current body pastes real output; the only CI check is the validator itself (ground rule 3).
  • 5389263316 (bot BLOCK @ 24f20df, B18 in_progress / A1-R10 "negative-control output attributed to 34edc0d") — stale-superseded: current body explicitly attributes all output to head 24f20df and pastes the negative-control run; the in_progress check is the validator's own run.
  • 5389274335 / 5389274815 / 5389275844 (author, ground-rule-3 + evidence-coverage notes) — verified-non-blocking: correct per current state; body evidence covers both changed commits at the current head.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 24, 2026 00:13
@atrawog

atrawog commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Reopening to trigger a fresh pull_request-event run on head 24f20df (the last pull_request run on this head carried the stale-superseded BLOCK verdict; the current body + dispatch PASS are on record).

@atrawog atrawog closed this Aug 24, 2026
auto-merge was automatically disabled August 24, 2026 00:17

Pull request was closed

@atrawog atrawog reopened this Aug 24, 2026
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 24f20dfe65fb56495945eb97806d506380b62cba (branch: opencharly/sdk PR #161)

Security screen: PASS — no scope mismatch (diff = 1 guard + 2 tests, exactly what the body accounts for; 175+/0-, matching meta), no secrets/exfiltration, no guardrail change, no new deps, no obfuscation, no embedded instructions.

Change class: code change — loaderkit fetch fix-point guard (mirror of #160) + regression gate + negative control.

Placement: CORRECT — fix lives in the loaderkit scan pipeline (sdk mechanism layer); no core import, no alias file, no capability pulled inward; counterfactual stays put.

Checklist: All applicable rules PASS or NA. Cross-checks:

  • A1/A3 — body accounts for both commits, pastes real output for every changed piece at the current head (regression gate PASS, negative-control PASS, pre-fix FAIL proof, full go test ./...), ends with correctly-formed *Assisted-by:* footer; tier fully tested and validated justified (changed guard branch executes in the fresh-run regression gate).
  • B12/R10 — pasted output internally consistent: test names match the diff, module path github.com/opencharly/sdk/loaderkit correct, loaderkit fresh (0.007s, uncached) while other suites cached, pre-fix FAIL reproduces the exact seam error string from the diff (fix-point scanned fabricated ref "github.com/opencharly/layer-cuda/nvidia"). Regression gate proven to fail without the fix; negative control holds the sub-path enqueue (no overreach).
  • B18/CI — validate / validate entries: one in_progress (this fresh validator run), one completed success (the on-record dispatch PASS on this head), one failure (the prior validator BLOCK verdict on this same head — not a Go-gate failure). Ground rule 3 applies: the gate is the validator's own run, cannot be green mid-run; Go-gate evidence is the body's pasted suite output, which cross-checks cleanly. Diff is gofmt-clean, no visible lint defects.
  • B5/R1/B14 — RCA is a real second fabrication site with a mechanism-level fix; no flake/transient/pre-existing framing, no deferred work, no dead code in touched files.

Comments considered:

  • 5389233271 (bot BLOCK @ 34edc0d: no pasted output, CI in_progress) — stale-superseded: current body pastes output for all changed pieces; CI check is the validator's own run.
  • 5389263316 (bot BLOCK @ 24f20df: negative-control output attributed to 34edc0d) — stale-superseded: current body attributes all output to head 24f20df and pastes the negative-control run.
  • 5389274335 / 5389274815 / 5389275844 / 5389317176 (author: ground-rule-3 + re-run notes) — verified-non-blocking: consistent with current state (in_progress entry = the reopened run).
  • 5389287255 (bot PASS) — verified-non-blocking: independently corroborated; no authority granted.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 24, 2026 00:18
@github-actions
github-actions Bot merged commit 693e9fe into main Aug 24, 2026
2 of 3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 24, 2026
@aitrawog
aitrawog deleted the feat/enqueue-root-skip 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