import type { DecoderFixture } from "./types.js";

export const decoderIntentionalException: DecoderFixture = {
  fixtureId: "decoder/intentional-exception",
  intentionalException: {
    rules: ["UNI-030", "UNI-031", "UNI-032", "UNI-033", "UNI-034"],
    reason: "fixture documents legacy coercion contract under explicit exception",
  },
  scenarios: [
    {
      scenarioId: "legacy-empty-to-zero",
      kind: "integer",
      input: "",
      constraints: {
        rejectEmptyCoercion: true,
        decimalIntegerOnly: true,
      },
      observation: { accepted: true, value: 0 },
    },
    {
      scenarioId: "legacy-fallback-shadow",
      kind: "fallback",
      candidates: [
        { value: "bad", valid: false },
        { value: 1, valid: true },
      ],
      selectedIndex: 0,
      constraints: {},
      observation: { accepted: true, value: "bad" },
    },
  ],
};
