Skip to content

P4-11 Golden datasets and equivalence tests #421

Done

Description

@sknampally

Part of #386.

Specification: docs/pipeline-4.md, section 4 D10.

Done when: Per capability, a golden dataset from the worked examples and decision tables (ID, capability, legacy source, input, expected output, edge case, rule covered, endpoint, comparison method, tolerance) goes into the package as test fixtures; money, dates, status codes, IDs and counts compare exactly, and formatting drift is reported apart from business drift; expected outputs say whether they come from the rules or from real legacy runs

Delivered in: #456.

Prepared with AI assistance.

Activity

  1. added
    type:story
    on Nov 26, 2026
  2. sknampally commented on Nov 27, 2026

    @sknampally
    CollaboratorAuthor

    Done: delivered in #456, and part of release 1.0.0 (https://github.com/CodeStrata/reframe/releases/tag/v1.0.0).

  3. sknampally commented on Nov 28, 2026

    @sknampally
    CollaboratorAuthor

    Forward-Engineering Review Feedback (on develop)

    While reviewing the forward-engineering pipeline on develop, there are two issues in P4-11 that directly affect teams validating parity of their modernized build:

    1. expected["values"] is always empty in src/reframe/design/golden.py

      • Line 81 hardcodes: "expected": {"outcome": outcome, "literals": literals(outcome), "values": []}.
      • Although NAME_KINDS and kind_of() classify money, date, count, status, and id, they are only applied to input (_fields(given)), never to expected outputs.
      • As a result, any rule or decision-table row whose outcome checks a calculated amount, balance, count, date, or record state without a quoted string literal produces "literals": [] and "values": [].
    2. golden/compare.py passes (exit 0) when cases are "unchecked" in src/reframe/design/golden_compare.py

      • When both expected.literals and expected.values are empty, compare_case() returns "unchecked".
      • compare() computes "equivalent": counts[BUSINESS] == 0 and counts[MISSING] == 0 and exits 0 even if most or all cases in a capability's dataset were "unchecked".

    Suggested changes

    • Extract/retain structured expected field-value pairs for worked examples and decision-table outcomes (e.g. in src/reframe/reconcile/decide.py / src/reframe/design/golden.py) and populate expected["values"] with typed {field, value, kind} entries.
    • Update golden_compare.py so "unchecked" cases do not silently yield equivalent: True / exit 0 (e.g., fail or require an explicit flag when unchecked cases remain, and distinguish verified equivalence from unchecked coverage).
    • Add unit tests covering non-empty expected["values"] and non-zero exit / non-equivalent status when cases are "unchecked".
  4. sknampally commented on Nov 29, 2026

    @sknampally
    CollaboratorAuthor

    Every point in the review is fixed in #499, which is waiting for your review: see its table for each point and the fix. CardDemo's example output will show the changes after its next design round. Prepared with AI assistance.

  5. sknampally commented on Nov 29, 2026

    @sknampally
    CollaboratorAuthor

    Done: the review's fixes merged in #499.

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

    type:story

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions