Skip to content

Legacy >> servings metadata warns spuriously (expected number, got string) #713

Closed

Description

@drawmeanelephant

Suggested labels: bug, area: parser, upstream


Discovery audit finding L2 (low) — cooklang/cookcli @ 7c2f48b (v0.38.1), audited 2026-10-12. Repro verified. Root cause is in the cooklang dependency (a cooklang-rs issue at heart).

Summary

>> servings: 4 — perfectly valid legacy metadata — warns Unsupported value for key: 'servings' ("Expected 'number' but got 'string'").

Where

cooklang crate, analysis/event_consumer.rs:415: >> values are always strings, so every numeric std key on a deprecated-syntax recipe warns spuriously. The deprecation help even suggests converting to servings: '3' (quoted string), which would warn too.

Repro

A recipe using >> servings: 4 → cook doctor validate warns Unsupported value for key: 'servings'.

Expected

No warning for valid legacy metadata.

Actual

A spurious type warning for every numeric std key written with >>.

Acceptance criteria (red → green)

  • Red: the repro warns on >> servings: 4.
  • Green: the repro validates clean (no warning).

Verification

Executed repro.

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