Skip to content

add_candy by @github ref silently drops the candy's baked check: steps on a vm bed #469

Closed
opencharly/plugin-check
#9

Description

@atrawog

A candy applied by an @github add_candy: ref loses its baked check: steps

On a kind: vm bed, a candy applied via add_candy: contributes its baked check: steps
to charly check live only when it is discovered locally. Referenced by @github tag,
the candy still installs — but every one of its checks is silently dropped.

The bed passes. It just asserts almost nothing.

Controlled A/B

Same kind: vm entity, same candy content, same bed shape, same run. The only variable
is how the candy is referenced. Both beds carry one marker step of their own so neither arm
can be zero-step.

check-ab-local:
    vm:
        from: ab-vm
        add_candy:
            - punktfunk-local            # a local copy, discovered
        ...
check-ab-remote:
    vm:
        from: ab-vm
        add_candy:
            - '@github.com/opencharly/layer-punktfunk:v2026.241.2145'
        ...

check-live results:

arm reference steps of which the candy's baked checks
check-ab-local local punktfunk-local 14 (12 passed, 2 skipped) 11
check-ab-remote @github…:v2026.241.2145 1 0

The remote arm's entire check-live:

  PASS  check bed-own marker so the arm is never zero-step  [ab-remote-marker]  exit=0

The local arm additionally ran the candy's punktfunk-host-package,
punktfunk-web-package, punktfunk-scripting-package, punktfunk-host-version,
punktfunk-repo-key-trusted, punktfunk-repo-stanza, punktfunk-host-env,
punktfunk-wrapper-installed, punktfunk-user-unit-enabled, punktfunk-mgmt-api-live
checks — 11 verdicts that the remote arm silently produced none of.

Both arms deployed successfully and both reported PASS (steps=9) for the overall run, so
nothing surfaces the difference.

Why it matters

Any VM or host bed that applies candies by @github ref — which is the normal, encouraged
form since the candy de-submodule cutover — is running only its own plan steps. The
candy's own acceptance checks, the ones its author wrote to prove the candy works, never
execute. A bed can be green while asserting a small fraction of what it appears to.

This is the inverse of a flaky test: it never fails, so it never draws attention.

Reproducer

The two beds above against any kind: vm entity, with any candy that ships check: steps.
Count check-live verdicts per arm.

Not diagnosed

I have not traced which stage drops them — candy-closure collection for add_candy, or the
check-collection walk for a vm bed. This is a controlled measurement, not a root cause.

Found while proving check-punktfunk-vm; that bed now states its load-bearing assertions in
its own plan: rather than relying on the candy's, which is why it was noticed.

Activity

  1. added a commit that references this issue on Aug 30, 2026
    7c82b0d
  2. atrawog commented on Aug 30, 2026

    @atrawog
    ContributorAuthor

    Fixed in opencharly/plugin-check#9

    Root cause: candyAddSteps skipped every @github ref outright —

    if deploykit.IsRemoteCandyRef(ref) {
        continue
    }

    — so a bed whose add_candy: pins a candy by ref contributed none of that candy's baked
    check: steps.

    The skip was unnecessary: BareRef is the map-key form (no @, no :version) and
    rp.CandyModels keys a fetched candy by exactly that, as the sibling
    candyDirsFromEnvelope documents. Local and remote are the same lookup, so the branch is
    deleted rather than a parallel remote path being added.

    The candy was never the problem — it is scanned and it installs. The A/B in this issue
    measured the right symptom; the cause was one stage further on, in plan collection.

    Regression test

    TestCandyAddStepsIncludesRemoteRefs covers the remote and local ref in one table-driven
    case. With the skip restored it fails with the original symptom:

    remote @github ref ("@github.com/opencharly/layer-probe:v2026.242.1200"):
      no steps collected — the candy's baked checks were dropped
    

    TestCandyAddStepsUnknownRefIsSkipped pins the other half: an unresolvable ref still
    contributes nothing rather than panicking.

    Reaching a bed

    plugin-check is host-built from its pinned candy source, so a project picks the fix up on
    its next repin of this candy.

    Worth keeping regardless: a bed should state its load-bearing assertions in its own plan:
    rather than relying on an add_candy: candy's baked checks. check-punktfunk-vm does that
    now, and it is why the discrepancy was noticed at all — the bed passed with 2 steps where
    15 were expected.

    Related and also now closed: #471, the sibling case where a remotely-pinned
    candy's plugin.primary: never reached the parse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions