Skip to content

fix(validate): unresolved variables pass validate but block render #114

Description

@LeadcodeDev

Surfaced while implementing #110 (wave 2 of #102). Pre-existing, and out of that workstream's file scope.

cmd_validate's blocking decision never accounts for unresolved_vars. A scenario whose only problem is unresolved $variable references is reported as valid and exits 0 — while render refuses it.

So validate says go and render says no, for the same file. That is the exact class of contradiction the post-audit chantier set out to remove: the validator must be trustworthy in both directions, or it is not worth running.

Where: crates/rustmotion-cli/src/commands/validate.rs.

Acceptance: a scenario with unresolved variables fails validate with a message naming the variables, and validate and render agree on every scenario. Add a regression test — validate.rs had no test module at all before wave 1 and still has very few.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions