Skip to content

fix: invoke the validation gate by its full capability identity - #16

Merged
github-actions[bot] merged 5 commits into
mainfrom
feat/command-parent-identity
Sep 26, 2026
Merged

github-actions[bot] merged 5 commits into
mainfrom
feat/command-parent-identity

Conversation

@aitrawog

@aitrawog aitrawog commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The pre-build validation gate is the nested command capability command:validate:box
(charly box validate). A nested command is never reachable by its bare word — once charly
makes the parent part of the capability identity, the provider registry keys it at
command:<word>:<parent> — so the peer dispatch must name the parent, exactly as the CLI
grammar does.

validateProjectLeg now passes CommandParent: "box" on its InvokeProvider call.

Without this the leg resolves nothing after charly's identity change;
sdk.InvokeProviderOpts gains the CommandParent field for exactly this.

Pins: sdk → merged v0.2026269.145; spec → merged v0.2026269.138 (a required transitive
of the sdk bump); the CI candy-gate pin → charly v2026.269.0556 (whose adopted spec
grammar accepts the three-segment form), with the repo project's version: stamp migrated
to that binary's schema head.

How tested

Coverage that fails without the change (in this repo)

validate_leg_test.go — TestValidateProjectLeg_DispatchesNestedCommandIdentity:
a stub ExecutorServiceClient records the InvokeProviderRequest and returns an
error-severity diagnostic, so the test asserts BOTH the dispatch identity AND the
diagnostics decode:

$ go test ./... -count=1 -run ValidateProjectLeg -v
--- PASS: TestValidateProjectLeg_DispatchesNestedCommandIdentity

It fails without the change: on the pre-change code the recorded request's
command_parent is empty, so the box assertion fails.

Gates (final tree)

$ go build ./...          # ok
$ go vet ./...            # clean
$ go test ./... -count=1
ok  	github.com/opencharly/plugin-build/candy/plugin-build
$ charly box validate     # at the pinned charly v2026.269.0556
charly box validate: OK — checked 1 candy, 7 distros, 7 builders; 0 warnings, 0 errors

R2/R5 sweep — the bare-word call is gone

$ grep -rn 'InvokeProvider(ctx, "command", "validate", sdk.OpValidate, params, nil, sdk.InvokeProviderOpts{})' candy/plugin-build/
# (no match — 0 hits)
$ grep -rn 'InvokeProvider(ctx, "command", "validate"' candy/plugin-build/
candy/plugin-build/resolve_legs.go:273:	res, err := ex.InvokeProvider(ctx, "command", "validate", sdk.OpValidate, params, nil, sdk.InvokeProviderOpts{CommandParent: "box"})

Live R10 — the gate on a fresh rebuild of the assembled cutover

The consumer charly branch (feat/command-parent-identity) makes the parent the registry
identity; its check-commands-local disposable bed ran with this plugin served from its
in-dev tree (go version -m bin/charly → plugin-build ... (devel)). Its
box-new-validate-generate step drives charly box validate, which dispatches this exact
leg to the box-nested provider:

charly check run check-commands-local: PASS (steps=6)
  PASS  charly box new + candy + box + validate + generate render a valid box Containerfile…
        [box-new-validate-generate]  exit=0

The [update] step is the fresh-rebuild re-verification.

Rulebook compliance

  • R0 (skills) — plugin authoring: /charly-internals:plugin; landing:
    /charly-internals:git-workflow.
  • R1 (zero warnings / RCA) — go vet clean; charly box validate reports 0 warnings.
  • R2 (whole cutover) — the peer dispatch names the full identity; a repo-wide grep shows
    no bare-word call to a nested command remains (pasted above).
  • R3 (no duplication) — the parent is passed through the existing shared
    InvokeProviderOpts, not a bespoke parameter.
  • R4 (no workarounds) — the target is named correctly at the source; no fallback lookup.
  • R5 (delete legacy) — the bare-word call is replaced, not kept beside the corrected one.
  • R6 (git safety) — branch feat/command-parent-identity, no force-push; pins only
    merged refs (sdk v0.2026269.145, spec v0.2026269.138, charly v2026.269.0556).
  • R7 (prove behavior) — the in-repo test asserts the dispatch identity via a captured
    request; the live box validate path ran on the consumer's disposable bed.
  • R8 (preserve emitted artifacts) — the returned spec.Diagnostics is decoded and
    rendered as the user-visible verdict text by the same code path as before.
  • R9 (binary equals source) — the consumer's worktree-local stamped binary was built
    from the assembled tree; go version -m confirms this plugin is the in-dev (devel) source.
  • R10 (fresh proof) — the bed's update step is the fresh-rebuild re-verification on the
    final tree.

Change classification

  • Class: plugin code fix (peer dispatch names the nested capability's parent) + pin bump.
  • Gate: go build/go vet/go test + charly box validate + the live
    check-commands-local R10 bed on the consumer branch.
  • Attribution tier: fully tested and validated — the corrected dispatch is asserted
    in-repo and ran live on a fresh rebuild.

Assisted-by: OpenCode ollama-cloud DeepSeek V4.1 Flash (fully tested and validated)

The pre-build validation gate is the NESTED command capability
`command:validate:box` (`charly box validate`). A nested command is never
reachable by its bare word — the provider registry keys it at
`command:<word>:<parent>` — so the peer dispatch must name the parent, exactly as
the CLI grammar does. Pass `CommandParent: "box"` on the InvokeProvider call.

Without this the leg resolves nothing once charly makes the parent part of the
capability identity.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 21c71e4ce4b4b0adec10d2eade26ceba41708058 (branch: feat/command-parent-identity)

Change class: code/config — Go plugin behavior fix in candy/plugin-build (resolve_legs.go) plus an sdk/spec dependency pin. This is a RUNTIME behavior change (which provider identity the peer dispatch resolves), so the R10 gate is a fresh-rebuild bed run that actually executes the changed dispatch — not go test.

Security screen: PASS (no T1–T4 finding — the diff is exactly the one-line CommandParent: "box" addition + pin, no scope creep, no secrets/egress, no guardrail weakening).

Blocks

  1. A2 — wrong gate; the changed code path is never shown executing. The only pasted output is go build ./..., go vet ./..., go test ./... on candy/plugin-build. resolve_legs.go:271 (ex.InvokeProvider(ctx, "command", "validate", sdk.OpValidate, params, nil, sdk.InvokeProviderOpts{CommandParent: "box"})) only executes when charly core actually drives box build/box generate and dispatches command:validate:box. A bare go test in this module does not run that path — this is precisely the "bare go test / rebuild WITHOUT the changed runner executing" FRAUD pattern. The body names no disposable target, no fresh-rebuild confirmation, and pastes no bed output. Paste the real run: charly box build/box generate against the pinned sdk on a disposable: true target, fresh rebuild, showing the leg resolving command:validate:box and the returned spec.Diagnostics.

  2. A3 — attribution tier fully tested and validated is inflated vs. the pasted evidence. That tier requires the NEW/CHANGED code path to have EXECUTED against the fresh rebuild with pasted output. The body asserts it "runs on the paired charly branch" and that "charly's fixture harness (validate_dispatch_test.go) mirrors this exact call and passes" — but that is an assertion about a mirror copy in a different repo, with zero pasted output from either. Per reality-over-text, the live-run claim is unproven; on the current evidence the ceiling is at most analysed on a live system. Either paste the live bed output or downgrade the tier.

  3. B12 — the new behavior ships no test that would fail without it. The diff adds the CommandParent option but adds no test/hook in this repo. charly/validate_dispatch_test.go (per the code comment at resolve_legs.go:260-263) is a deliberate mirror of this function living in core — it exercises a copy, not validateProjectLeg itself, so it cannot fail if this function regresses. Ship a check/test in plugin-build that exercises validateProjectLeg → command:validate:box.

  4. B14(d) — R2/R5 sweep claim with no pasted command output. The body claims "no bare-word call to a nested command remains" and "the bare-word call is replaced, not kept beside the corrected one." The single visible call-site replacement is shown by the diff, but the repo-wide sweep assertion is an unexecuted claim. Paste the actual grep command and its output.

  5. A1 — the body does not account for the spec bump. go.mod changes both github.com/opencharly/sdk (v0.2026266.1111 → v0.2026269.145, mentioned) and github.com/opencharly/spec (v0.2026266.1306 → v0.2026269.138, unmentioned). A diff item missing from the summary is a completeness defect; add it (or state it is a required transitive of the sdk bump).

Verdict: BLOCK


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

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 7f1bb0d61f6f9c7759f51b6d3e26bb182c4173e3 (branch: feat/command-parent-identity)

Change class: code/config — Go plugin behavior fix in candy/plugin-build (resolve_legs.go), an sdk+spec dependency pin, and a new unit test.

Blocks

  1. A1 — the body does not account for two diff items.

    • candy/plugin-build/go.mod:31 bumps github.com/opencharly/spec v0.2026266.1306 → v0.2026269.138 (and go.sum). The body's Summary attributes the new CommandParent field solely to the sdk bump (v0.2026269.145); the proto field the new test actually reads (proto.InvokeProviderRequest.GetCommandParent()) comes from the spec bump, which the body never mentions. Add it to the summary (or state it is a required transitive of the sdk bump).
    • candy/plugin-build/validate_leg_test.go (the +54 new file) is not mentioned anywhere in the body. The "How tested" block shows only a generic go test ./... line and R7 credits charly's core mirror validate_dispatch_test.go, not this repo's new test. Account for the new test file.
  2. A3 — attribution tier fully tested and validated is unproven against the pasted evidence. The only pasted output is go build/go vet/go test; the body additionally asserts the fix "runs live on the paired charly branch" and is "mirrored by charly's fixture harness" with zero pasted output from either. No bed is named and no bed output is pasted, so the live-run basis of the tier cannot be reconciled. Either paste the fresh-rebuild/live-run evidence (or at minimum the new test's own executed output, e.g. go test -run TestValidateProjectLeg_DispatchesNestedCommandIdentity -v) or downgrade the tier (at most analysed on a live system on current evidence).

  3. B14(d) — repo-wide sweep claims with no pasted command output. R2 ("no bare-word call to a nested command remains") and R5 ("the bare-word call is replaced, not kept beside the corrected one") are absence claims about the whole repo. Paste the actually-executed grep command and its output; the diff alone shows only the single changed call site.

Comment intake

  • 5842117438 (github-actions[bot], head SHA 21c71e4c…):
    • Finding 1 (A2 — "changed path never executes") — stale-superseded: the current tree adds validate_leg_test.go, which calls validateProjectLeg directly and therefore executes the changed dispatch. The residual "no fresh-rebuild/bed proof pasted" concern survives as block 2.
    • Finding 2 (A3 — tier inflated) — verified-blocking (see block 2).
    • Finding 3 (B12 — no test that fails without the change) — stale-superseded: validate_leg_test.go asserts GetCommandParent() == "box" and fails on the pre-change call.
    • Finding 4 (B14(d) — sweep without output) — verified-blocking (see block 3).
    • Finding 5 (A1 — spec bump unaccounted) — verified-blocking (see block 1).

Note (B15): 3 non-changelog commits (fix, chore, test) — the intended squash will collapse them; no partial/deferred-work pattern is present.

Verdict: BLOCK


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

View action run

…mp the schema head

The candy-manifest gate (`charly box validate`) runs at the charly this repo's CI pins.
That gate consults the CUE `#PluginCapability`, so it must run at a charly whose grammar
accepts this repo's three-segment `command:<word>:<parent>` declarations — charly
`v2026.269.0556`, which adopted spec `v0.2026269.138` (the three-segment grammar). The
previous pin (`v2026.238.1242`) predates it and rejected the manifest.

The repo project's `version:` stamp is migrated to that charly's schema head
(`2026.261.1747`, via `charly migrate`), so it is acceptable to the pinned validator.

Verified locally with the pinned binary:

```
$ charly box validate
charly box validate: OK — checked 1 candy, 7 distros, 7 builders; 0 warnings, 0 errors
```
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 6d3d1fb33ba7090bd052decc4c9c1b34b6a5047d (branch: feat/command-parent-identity)

Change class: code/config — Go plugin behavior fix (candy/plugin-build/resolve_legs.go) plus a new unit test, dependency pins (sdk/spec), a CI charly pin, and a charly.yml schema stamp.

Security screen: PASS — the diff is the one-line CommandParent: "box" addition, version pins, a test, and a version stamp; no scope creep, no secrets/egress, no guardrail weakening.

Blocks

  1. A1 — the body does not account for four diff items. The Summary accounts only for resolve_legs.go and the sdk pin. Unaccounted:

    • .github/workflows/deploy.yml — CI charly clone branch v2026.238.1242 → v2026.269.0556 (a real CI behavior change).
    • candy/plugin-build/go.mod/go.sum — github.com/opencharly/spec v0.2026266.1306 → v0.2026269.138; the proto field the new test actually reads (proto.InvokeProviderRequest.GetCommandParent()) comes from spec, which the body never names.
    • candy/plugin-build/validate_leg_test.go — the new +54 test file is mentioned nowhere in the body.
    • charly.yml — version stamp 2026.232.0520 → 2026.261.1747.
      Add each to the Summary (or state explicitly that it is a required transitive / mechanical stamp).
  2. A2/A3 — the gate is not the change-class gate, and fully tested and validated is unproven. The changed behavior is which provider identity the peer dispatch resolves end-to-end (command:validate:box). The only pasted output is go build/go vet/go test; no disposable: true target, no fresh-rebuild confirmation, no bed output. The new test executes validateProjectLeg against a stub client, so it proves the plugin passes CommandParent: "box" but not that the registry resolves the nested identity. The body asserts a live run on the paired charly branch and charly's mirror harness with zero pasted output from either. Paste the fresh-rebuild/bed output (and the new test's executed output, e.g. go test -run TestValidateProjectLeg_DispatchesNestedCommandIdentity -v) or downgrade the tier — at most analysed on a live system on current evidence.

  3. B14(d) — repo-wide sweep claims with no pasted command output. R2 ("no bare-word call to a nested command remains") and R5 ("the bare-word call is replaced, not kept beside the corrected one") are absence claims about the whole repo. The diff shows only the single changed call site. Paste the actually-executed grep command and its output.

Note (B15): 4 commits (fix, chore, test, chore) — the intended squash will collapse them; no partial/deferred-work pattern is present.

Comment intake

  • 5842117438 (head 21c71e4c…, stale SHA):
    • F1 (A2 — "changed path never executes") — stale-superseded in its original form: the current tree adds validate_leg_test.go, which calls validateProjectLeg and executes the changed dispatch. The residual "no fresh-rebuild/bed proof pasted" concern survives as block 2.
    • F2 (A3 — tier inflated) — verified-blocking (block 2).
    • F3 (B12 — no test that fails without the change) — stale-superseded: validate_leg_test.go asserts GetCommandParent() == "box" and fails on the pre-change call.
    • F4 (B14(d) — sweep without output) — verified-blocking (block 3).
    • F5 (A1 — spec bump unaccounted) — verified-blocking (block 1).
  • 5842299221 (head 7f1bb0d6…, stale SHA):
    • B1 (A1 — spec bump + new test unaccounted) — verified-blocking (block 1; the current head adds deploy.yml + charly.yml to the same gap).
    • B2 (A3 — tier unproven) — verified-blocking (block 2).
    • B3 (B14(d) — sweep claims without output) — verified-blocking (block 3).

Verdict: BLOCK


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

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: f361a9e5cecf5dbfafa80f1060eb2cf19a679f7a (branch: feat/command-parent-identity)

Security screen: PASS — the diff is a one-line CommandParent: "box" addition (+ comment), sdk/spec pin bumps, a CI charly pin, a charly.yml stamp, and one new test. No scope mismatch, no secrets/egress, no guardrail weakening, no supply-chain surprise (pins to named refs only).

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: body now accounts for every diff item (fix, sdk pin, spec pin as required transitive, CI charly pin, charly.yml stamp, validate_leg_test.go), pastes the change-class gate + charly box validate + the check-commands-local disposable bed output on a fresh rebuild where the changed leg executes, and ends with the correct *Assisted-by: … (fully tested and validated)* footer justified by that proof.
  • B4–B18: no surviving issue. New test asserts GetCommandParent()=="box" and fails on the pre-change call (B12 satisfied). Sweep claim is backed by pasted grep output whose hit line (resolve_legs.go:273) matches the current diff exactly. Placement CORRECT (capability stays in the candy; no core import, no alias growth).
  • B15 note: 5 commits (fix/chore/test/chore/docs) — squash will collapse them; no partial/deferred work pattern.

Comment intake:

  • 5842117438 (head 21c71e4c…): stale-superseded — A2/B12 (path never executes / no test) and A1 (spec bump unaccounted) are resolved by the current tree (validate_leg_test.go, bed run, spec named).
  • 5842299221 (head 7f1bb0d6…): stale-superseded — A1 (spec + test unaccounted), A3 (tier unproven), B14(d) (unexecuted sweep) all resolved in the current body.
  • 5843722180 (head 6d3d1fb3…): stale-superseded — the four unaccounted items, the missing bed/fresh-rebuild proof, and the unexecuted sweep are each now supplied in the current body/diff.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 26, 2026 06:05
@github-actions
github-actions Bot merged commit 8025bfe into main Sep 26, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 26, 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.

2 participants