Skip to content

fix(candywalk): collect every remote ref form, never drop a branch or SHA (opencharly/sdk#322) - #356

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/c2-content-identity
Oct 8, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/c2-content-identity

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

candywalk's remote-ref collector matched CalVer tags only:

var remoteRefRe = regexp.MustCompile(`@github\.com/opencharly/[a-zA-Z0-9._/-]+:v[0-9]+\.[0-9]+\.[0-9]+`)

A branch (:feat/…) or a commit SHA matched nothing — no error, no warning. In a fail-closed
generator (charly marketplace generate rejects an undeclared family) a silently dropped ref means
the generator validates a stale entity and reports a failure the author cannot fix by editing the
map, because the map is never read. Same "a ref that does not pin" class as opencharly/charly#715.

Implements the issue's preferred arm (1): the collector now hands over every ref form the
loader can resolve. The path class stops at the first : (so the version stays unambiguous even when
the ref itself contains /, . and - — a branch is indistinguishable from the path by character
class, which is exactly why the CalVer anchor existed), and the ref class stops at the delimiters that
end a YAML scalar.

Why arm (2) is NOT implemented — measured, not skipped

Arm (2) is "hard-error when a ref is present but unrecognised". collectRefs scans raw file bytes,
comments included
, and a sweep of the org's tracked charly.yml files finds 42 distinct
VERSIONLESS @github.com/opencharly/… tokens living in PROSE
— a layer-nodejs mention in a
comment, a distro-* glob, a trailing-backtick example:

$ grep -rhoE "@github\.com/opencharly/[^ '\"',}#]+" --include=charly.yml . | grep -v ':' | grep -v '/charly/' | sort -u | wc -l
42

Failing closed on those would break every tree that documents a repo path. A versionless token is
therefore not evidence of a declared ref; only a token carrying a :version is, and every such form
is now collected. The measurement is recorded in collectRefs' doc so the arm is not re-attempted
blind.

How tested — the changed path executed live, with a control

collectRefs is reached by CollectEntitiesRemote, the discovery entry point the two consumers
(plugin-docs, plugin-marketplace) drive. That entry point was executed live, against the real
GitHub remotes, over a scratch project declaring two refs at a branch (:main), with the real
refs.DownloadRepo as the resolver seam:

########## POST-FIX (this branch):
  resolve(github.com/opencharly/plugin-box, "main")
  resolve(github.com/opencharly/plugin-example-kind, "main")
remote entities collected: 4 (from the two declared refs)

########## PRE-FIX (CalVer-only pattern, restored for the control):
remote entities collected: 0 (from the two declared refs)

Not one resolve(...) line is even reached pre-fix: both declared refs vanish before the fetcher
sees them, which is precisely the "the map is never read" failure the issue describes. Post-fix the
branch refs are handed over and 4 remote entities are collected. That harness is a scratch module
under /tmp, never committed; the same call is pinned by
candywalk.TestCollectRefs_AcceptsEveryRefForm, which fails on the pre-fix pattern (the branch
and the SHA are DROPPED) and passes with it.

Gates on the committed tree: gofmt -l . empty · GOWORK=off go vet ./... clean ·
GOWORK=off go test ./... exit 0 · the repo's CI cross-compile matrix (amd64/arm64/arm/386) green.

Rulebook compliance

  • R0 — skills loaded before the first tool call and re-read per step class: git-workflow
    (before every git/gh action), strict-policy (R1–R5 + RDD/ADE), agents, go. RDD: the
    arm-(2) question is an RDD spike and it was run before the decision (the 42-token sweep), not
    after.
  • R1 — the issue's stated "minimum" arm was measured before being declined, and the reason lives
    in the code rather than as an omission. The collector's own doc comment is corrected with it
    (claim-keyed, rule 11).
  • R2 — no deferral of a BLOCKING item: the preferred arm lands in full. The one genuinely
    separable item — the consumer-side corpus regeneration — is routed by name in the next section,
    with the batch that owns it.
  • R3 — one collector, one pattern; the in-repo charly-form skip keeps its single site. No second
    regex was added for the fail-closed arm (it was refused, see above) so no duplicate predicate
    exists.
  • R4 — no sleep, retry, magic number or environment shim. The pattern change is a correctness
    fix, and the measurement behind the refused arm is recorded rather than papered over.
  • R5 — the deleted identifier here is the old pattern's behaviour (CalVer-only matching); the
    claim-keyed sweep is the org-wide token sweep pasted above (42 prose tokens, deliberately not
    treated as refs) plus the two collectRefs callers, which are unchanged in signature because the
    collection is total.
  • R7 — a test that fails without the change (verified by restoring only the pre-fix pattern
    line), and the changed path executed live end-to-end with a control, both pasted above.
  • R10 — candywalk is a library with no runtime deployment target of its own; its change-class
    gate is this module's CI (build, vet, test, and the four-way cross-compile matrix), all green on
    the head. The live execution of the changed path is the consumer entry point run pasted above —
    the strongest available form for a library whose consumers are generators. No disposable: true
    bed exists for sdk itself; the beds that exercise the consumers are plugin-docs'/marketplace's
    and are named below.

Change classification

Library change in sdk/candywalk (unexported collector; CollectEntitiesRemote's signature is
unchanged). Gate: the module's Go suite + the live consumer-entry-point run, both pasted.

Consumer adoption, routed by name. The collector now surfaces refs it previously dropped, so a
consumer's fetched-ref set can grow; the two consumers are plugin-docs and plugin-marketplace.
No consumer source change is needed (the seam is untouched), so the adoption is the corpus
regeneration that follows producer merges — the deliverable of cluster C7, task-3 on this team's
board (docs-truth, owner of the marketplace corpus regeneration and the docs#143 drift gate),
which is in progress. That is a named task with an owner and a start, not a parked "same landing".

Closes #322.

Agent: cache-identity
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

… SHA (#322)

`candywalk`'s remote-ref collector matched CalVer tags only:

    var remoteRefRe = regexp.MustCompile(`@github\.com/opencharly/[a-zA-Z0-9._/-]+:v[0-9]+\.[0-9]+\.[0-9]+`)

A branch (`:feat/...`) or a commit SHA matched NOTHING — no error, no warning. In a fail-closed
generator (`charly marketplace generate` rejects an undeclared family) a silently dropped ref means
the generator validates a STALE entity and reports a failure the author cannot fix by editing the
map, because the map is never read. Same "a ref that does not pin" class as opencharly/charly#715.

Implements the issue's PREFERRED arm (1): the collector now hands over every ref form the loader can
resolve. The path class stops at the first `:` so the version stays unambiguous even when the ref
itself contains `/`, `.` and `-` — a branch is indistinguishable from the path by character class,
which is exactly why the CalVer anchor existed — and the ref class stops at the delimiters that end a
YAML scalar.

The issue's "minimum" arm (2), hard-error on a ref the collector cannot name, is NOT implemented: it
was MEASURED and refused. collectRefs scans raw file bytes, comments included, and a sweep of the
org's tracked charly.yml files finds 42 distinct VERSIONLESS `@github.com/opencharly/...` tokens
living in PROSE (a layer-nodejs mention in a comment, a distro-* glob, a trailing-backtick example).
Failing closed on those would break every tree that documents a repo path. A versionless token is
not evidence of a declared ref; only a token carrying a `:version` is, and every such form is now
collected. The measurement is recorded in collectRefs' doc so the arm is not re-attempted blind.

R7: candywalk.TestCollectRefs_AcceptsEveryRefForm declares a CalVer tag, a branch, a 40-hex SHA and
the pre-cutover in-repo charly form; it FAILS on the pre-fix pattern (verified by restoring only that
line — the branch and the SHA are DROPPED) and passes with it, with the in-repo form still skipped.
gofmt -l . empty; GOWORK=off go vet ./... clean; GOWORK=off go test ./... exit 0.

Consumer note: the fetched-ref set a consumer sees can grow (plugin-docs and plugin-marketplace are
the two consumers); their adoption is the same-landing follow-on.

Agent: cache-identity
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: ae2cb3d6572eb6f08cf8836195faee13b34c8ee0 (branch: feat/c2-content-identity)

Change class: code (Go library change in sdk/candywalk, unexported collector; not docs-only, not config).

Blocks

  1. A2 — no executed end-to-end evidence for a code change. The only pasted executed gate is GOWORK=off go test ./... — a bare unit test, which the change-class matrix names as FRAUD for a code change. The changed behavior is runtime: collectRefs now hands branch/SHA refs to CollectEntitiesRemote/the marketplace generator. That path is never exercised; the unit test only asserts the regex matches. The body concedes this itself by self-attributing analysed on a live system ("a change whose changed branch never ran live"). The How tested block names no disposable: true target and no fresh rebuild. Fix: run the affected path (a charly marketplace generate / consumer over a tree declaring :feat/… and a 40-hex SHA) on a disposable: true bed after a fresh charly update, at zero warnings, and paste the output.

  2. R2 / B6 / B14(b) — consumer adoption deferred without a named batch, contradicting the body's own claim. Change classification states "the fetched-ref set a consumer sees can grow — plugin-docs and plugin-marketplace are the two consumers, and their adoption belongs to the same landing, not a separate cutover." No consumer change is in the diff (2 files, both in sdk/candywalk), and no thematic batch/cutover is named — "the same landing" is exactly the vague deferral B14(b) bans. This directly contradicts the body's own R2 — no deferral bullet. Fix: either bring the consumer updates into this tree, or name the exact batch/task the adoption is routed to.

  3. A1 — rulebook-compliance section incomplete. The section answers only R1/R2/R3/R7 (plus a note). For a code change, R0 (skills), R4 (workarounds), R5 (hard-cutover/grep) and R10 are applicable and are neither answered with a one-line HOW nor given N/A — <reason>. Fix: answer each applicable rule, or mark it N/A with the reason.

Comment thread: none (0 comments) — nothing to disposition; no maintainer sign-off present, and none is required for this class.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: ae2cb3d6572eb6f08cf8836195faee13b34c8ee0 (branch: feat/c2-content-identity)

Security screen: PASS — regex + doc-comment + new test only; no secrets, no network egress, no dependency/pin change, no guardrail or rulebook edit. T4 N/A (does not touch security machinery).

Comment intake (1):

  • Comment by @github-actions[bot] (BLOCK) — stale-superseded. All three findings are re-derived against the CURRENT body/diff and no longer hold: (1) A2 "only pasted gate is bare go test" — the body now pastes a live consumer-entry-point run (CollectEntitiesRemote over the real remotes) with a pre/post control, i.e. the changed runner executes, which is not the rulebook's fraud pattern; (2) R2 "same-landing deferral" — the body no longer contains the quoted "same landing" text and now routes consumer adoption to a named task (C7 / task-3, docs-truth, docs#143), so not a vague deferral; (3) A1 "section answers only R1/R2/R3/R7" — the body now answers R0/R1/R2/R3/R4/R5/R7/R10. No maintainer sign-off is required for this class.

Checklist: All applicable rules PASS or NA. R10/live-run and CI-green claims are tool-limited (no re-run possible); pasted output is internally consistent with the diff — two :main refs resolve to 4 remote entities post-fix vs 0 pre-fix, and TestCollectRefs_AcceptsEveryRefForm fails on the pre-fix CalVer-only pattern (branch + SHA dropped) and passes with the new one. Diff is clean (no gofmt/lint/dead-code issues), one atomic commit, no transitional path, no duplication or workaround.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 7, 2026 22:43
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 1bf4b24cf3bc7254b40dcc2759b8fb6e4e53b8ee (branch: feat/c2-content-identity)

Change class: code — Go library change in sdk/candywalk (unexported collector + new test); gate is the module Go suite plus the live consumer-entry-point run.

Security screen: PASS — regex + doc-comment + new test only; no secrets, no network egress, no dependency/pin change, no guardrail/rulebook edit. T4 N/A (does not touch security machinery).

Comment intake (2):

  • @github-actions[bot] BLOCK (head ae2cb3d) — stale-superseded. All three findings re-derived against the CURRENT body/diff no longer reproduce: (1) A2 "only bare go test pasted" — the body now pastes a live CollectEntitiesRemote run with a pre/post control, so the changed path executes; (2) R2 "same-landing deferral" — the body now routes consumer adoption to a named batch (cluster C7 / task-3, owner docs-truth, docs#143); (3) A1 "section answers only R1/R2/R3/R7" — the body now answers R0/R1/R2/R3/R4/R5/R7/R10.
  • @github-actions[bot] PASS (head ae2cb3d) — verified-non-blocking. Its reasoning holds against the current body (only imprecision: "same landing" still appears, but negated as a disclaimer, not as a deferral).

Checklist: All applicable rules PASS or NA. R7/R10 live-run and CI-green claims are tool-limited (no re-run possible); pasted output is internally consistent with the diff — :main/SHA refs collected post-fix vs 0 pre-fix, and TestCollectRefs_AcceptsEveryRefForm provably fails on the CalVer-only pattern (branch + SHA dropped) and passes on the new one. Diff is gofmt-clean, one atomic fix commit (+ merge-from-main), no duplication, workaround, transitional path, or scope mismatch. No maintainer sign-off required (no security machinery touched).

Non-blocking note: the Assisted-by: footer is not markdown-italicized; its content is correct and it ends the body, so it is not treated as an A1 block.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

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.

candywalk: the remote-ref regex silently DROPS non-CalVer refs (branches/SHAs) — a fail-closed generator then validates a stale entity

1 participant