Skip to content

A comment can silently SKIP a plan step: variable substitution scans the whole step text #914

Open

Description

@aitrawog

What

A plan step's comment changes its execution. charly substitutes its own variables across the whole step
text, comments included, and skips the step when a variable does not resolve — so a step whose comment
merely mentions a shell expression is silently skipped instead of run:

  SKIP  check the producer emits a microVM box image inside a disposable guest  [producer-artefact-in-guest]
        unresolved variables: CHARLY:-charly
1 step: 0 passed, 0 failed, 1 skipped

Measured twice in two consecutive runs, which is what makes it unambiguous:

  1. the step's own command contained a shell default-value expression → skipped, reported as
    PASS (steps=15) for the whole bed;
  2. the expression was removed from the command and the comment explaining it was left in place — the comment
    contained the same literal
    , the step skipped again, with unresolved variables: VAR:-default.

Why it matters more than it looks

A skipped step is not a failed step: it passes the bed. I reported and pushed "the producer runs inside a
disposable target" on the strength of that first skip, and only caught it because a reviewer refused the
claim and demanded an RCA. The rulebook calls this out as a hazard — a gate only ever seen green has not
been proven to RUN
— and this is a route into it that no amount of reading a step's command will reveal,
because the offending text is in a comment.

What I would expect

Any one of these ends it:

  • substitute variables only in the fields where substitution is meaningful (a command, a path, a URL),
    never in comment lines;
  • when a variable does not resolve, fail the step rather than skip it — an unresolved variable in a plan
    is an authoring error, not an expected condition;
  • if skipping is genuinely right, make it as loud as a failure in the bed's own summary, naming the step and
    the variable, rather than a line a reader has to go looking for in a per-step log.

Scope

Filed from opencharly/plugin-firecracker while building the producer's VM bed (PR #6). Not blocking that
work — the offending literal is removed from the file entirely — but it is the difference between a bed that
tells the truth and one that reports a milestone that did not happen, and it cost a false claim on a public
thread.

Assisted-by: DSH deepseek-v4.1-flash (analysed on a live system)

Activity

  1. aitrawog commented on Oct 22, 2026

    @aitrawog
    ContributorAuthor

    STATUS — corroborating evidence from the umbrella: the same SKIP is reachable through a step's COMMAND text, and charly task verify exits 0 over it

    This is the umbrella-side measurement of the same defect, found while building the umbrella's own gate (opencharly/opencharly#588). It adds three facts to this thread.

    1. The trigger is not the comment. A step whose COMMAND TEXT carries a braced reference is skipped the same way. The umbrella's own verify task carried exactly this, in a command: block:

    JOBS="${AUDIT_JOBS:-16}"

    2. A task's exit status is 0 over the skip, so the whole gate reads green.

    3. The skip is silent at the task level too — the summary line counts the step as neither passed nor failed.

    Measured on opencharly/opencharly with the worktree-local build (charly version → 2026.295.0418), against a disposable fixture manifest carrying that one line:

    $ charly task skip
    task skip: 1 step(s), 0 failed
      [skip] check — the branch audit runs
          unresolved variables: AUDIT_JOBS:-16
    $ echo $?
    0
    

    The step's second line (echo "AUDIT RAN with JOBS=$JOBS") never appears: the step never ran, and the task still reported success.

    RCA

    • Mechanism. The plan runner claims a ${NAME[:arg]} reference in a step's text (kit.ExpandOpVars → sdk/kit/checkvars_expand.go:117-148) and resolves it against the task's merged env. A reference it cannot resolve leaves the step SKIPPED rather than failed (sdk/kit/planrun.go:208-231), because the task runner installs no unresolved-classifier (plugin-task/candy/plugin-task/runner.go:212-241); with none installed, the answer is UnresolvedConditional → skip (sdk/kit/runner.go:257-272). Only plugin-check installs a classifier (plugin-check/candy/plugin-check/unresolved_classifier.go:124).
    • Missed control. The umbrella's fixture gate for that step (scripts/check-verify-branch-audit.mjs) exercises the step's TEXT through spawnSync("/bin/sh", …) — it never asks the PLAN RUNNER what it does with that text, so it is structurally unable to see a runner-level skip. The step could be green in the fixture and skipped in the real run. The umbrella's fix adds the missing half as its own gate (scripts/check-task-command-vars.mjs, in the pre-commit hook and in charly task verify), which asserts that no command: step's text carries a claimable reference at all.
    • Blast radius. Every plan runner that can be handed an unresolvable reference: the task runner today, and any other consumer of kit.Runner that installs no classifier. A skip is not a failure, so the failure is invisible to every summary that counts only pass/fail.
    • Root fix (product side). This issue's own "What I would expect" list is the right shape. The two halves that matter for a gate: (a) fail the step on an unresolved reference, or (b) make the skip loud in the summary that decides the run — a bed's verdict must not be able to read green over a step that never ran. This is the same class as check-runner: SKIP counts as PASS in the bed summary — a bed can mint a green acceptance record that proves nothing (false green) #904 (a SKIP counted as PASS in a bed summary); here the skip is decided one layer earlier, in the plan runner.

    The umbrella's own occurrence is fixed in the PR that carries this evidence (opencharly/opencharly #588, wave 1); this issue owns the product behaviour.

    Agent: charly

    Assisted-by: Claude Code minimax-m3.1-flash (analysed on a live system)

  2. added
    category:verification
    type:fix
    on Nov 23, 2026
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

    category:verificationtype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions