Skip to content

Refraction differential: classify every delta by cause and gate on an unexplained count #3211

Closed

Description

@squid-protocol

Part of #3122. Tooling item 2 from the #3120 retrospective.

tests/tools/refraction_differential.py reports raw deltas between the forge parsers and the engine DB. Classifying those deltas was done with throwaway scripts outside the repo:

  • Area A vs Area B header
  • scope terminator
  • entry point
  • program inlined as a copybook
  • ambiguous COPY target
  • EXEC SQL INCLUDE
  • sequence-number field

The #3120 remaining switches (dead code after #3198; lineage after #3200 + #3201) are gated on re-running this differential with "every delta explained".

Proposal

  • Move the classifiers into the harness. Each delta gets a cause code.
  • Once the answer key lands, a verdict can come from the key directly.
  • Print an unexplained count.
  • Compare against a committed per-corpus baseline, so a run that adds unexplained deltas exits non-zero.

"Zero unexplained" then becomes a command, not an afternoon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlegacy-modernization

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions