← run

lc-04-buried-routes

1.000
3/3 tests· long-context
Challenge · difficulty 3/5
# Service-route resolver

Below is a read-only snapshot of our internal `mesh/` package — 40 service-routing
modules. Each module defines its own `ROUTES_NN` table mapping upstream status codes to the
downstream service that handles them.

Your task: implement `solution.py` with a function

```python
def resolve(code: int) -> str:
    ...
```

that reproduces **exactly the routing table defined in module `svc_20`** (the
`ROUTES_20` dict). For a status code present in that table, return its service name;
for any other code, return `"unknown"`.

Rules:
- Use the table from `svc_20` ONLY. The other modules are decoys with different tables.
- Do NOT import from the snapshot (it is not packaged). Inline the mapping you need.
- Return the literal string `"unknown"` for unrouted codes.

The snapshot follows.

---

# ============================ svc_00.py ============================
"""Service routing for the svc_00 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_00 = {
    1174: 'willow-quorum-11',
    1146: 'yarrow-atlas-40',
    1729: 'verde-prism-11',
    1930: 'cobalt-prism-11',
    1941: 'slate-cipher-73',
    1167: 'tundra-relay-69',
    1115: 'ivory-broker-85',
    1089: 'basal-harbor-84',
    1091: 'nimbus-lattice-55',
    1156: 'rill-cipher-32',
}


def resolve_00(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_00.get(code, "unknown")


def is_routed_00(code: int) -> bool:
    return code in ROUTES_00


# ============================ svc_01.py ============================
"""Service routing for the svc_01 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_01 = {
    1403: 'xenon-atlas-54',
    1384: 'amber-ledger-30',
    1580: 'jade-anchor-25',
    1561: 'ember-harbor-86',
    1905: 'pyrite-quorum-38',
    1695: 'onyx-ledger-86',
    1006: 'zephyr-ledger-72',
    1948: 'quartz-spindle-17',
    1591: 'cobalt-spindle-37',
    1806: 'yarrow-warden-93',
}


def resolve_01(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_01.get(code, "unknown")


def is_routed_01(code: int) -> bool:
    return code in ROUTES_01


# ============================ svc_02.py ============================
"""Service routing for the svc_02 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_02 = {
    1702: 'tundra-atlas-55',
    1936: 'willow-lattice-48',
    1674: 'amber-harbor-24',
    1038: 'quartz-gateway-69',
    1223: 'loom-prism-50',
    1414: 'cobalt-warden-30',
    1187: 'amber-warden-77',
    1767: 'onyx-beacon-86',
    1686: 'umber-ledger-37',
    1452: 'nimbus-gateway-90',
}


def resolve_02(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_02.get(code, "unknown")


def is_routed_02(code: int) -> bool:
    return code in ROUTES_02


# ============================ svc_03.py ============================
"""Service routing for the svc_03 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_03 = {
    1894: 'ember-cascade-41',
    1518: 'cobalt-anchor-61',
    1739: 'willow-cipher-96',
    1239: 'quartz-cascade-57',
    1289: 'onyx-cascade-58',
    1871: 'verde-lattice-46',
    1769: 'basal-anchor-76',
    1054: 'verde-cascade-70',
    1099: 'slate-harbor-43',
    1373: 'ember-harbor-11',
}


def resolve_03(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_03.get(code, "unknown")


def is_routed_03(code: int) -> bool:
    return code in ROUTES_03


# ============================ svc_04.py ============================
"""Service routing for the svc_04 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_04 = {
    1974: 'kelp-warden-19',
    1684: 'slate-forge-27',
    1803: 'jade-spindle-53',
    1201: 'xenon-conduit-34',
    1089: 'kelp-atlas-73',
    1790: 'garnet-harbor-58',
    1160: 'slate-atlas-68',
    1297: 'garnet-spindle-63',
    1789: 'kelp-warden-75',
    1306: 'amber-cascade-88',
}


def resolve_04(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_04.get(code, "unknown")


def is_routed_04(code: int) -> bool:
    return code in ROUTES_04


# ============================ svc_05.py ============================
"""Service routing for the svc_05 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_05 = {
    1840: 'rill-warden-12',
    1235: 'tundra-lattice-84',
    1761: 'quartz-vault-56',
    1501: 'ivory-prism-92',
    1620: 'dusk-lattice-51',
    1944: 'mica-forge-11',
    1538: 'onyx-lattice-10',
    1385: 'zephyr-warden-63',
    1139: 'jade-conduit-18',
    1670: 'rill-warden-67',
}


def resolve_05(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_05.get(code, "unknown")


def is_routed_05(code: int) -> bool:
    return code in ROUTES_05


# ============================ svc_06.py ============================
"""Service routing for the svc_06 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_06 = {
    1865: 'slate-conduit-37',
    1210: 'flint-warden-45',
    1261: 'garnet-warden-52',
    1552: 'verde-forge-87',
    1329: 'pyrite-lattice-39',
    1861: 'onyx-anchor-77',
    1272: 'flint-cipher-25',
    1544: 'pyrite-cipher-23',
    1803: 'onyx-gateway-20',
    1579: 'pyrite-vault-72',
}


def resolve_06(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_06.get(code, "unknown")


def is_routed_06(code: int) -> bool:
    return code in ROUTES_06


# ============================ svc_07.py ============================
"""Service routing for the svc_07 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_07 = {
    1009: 'willow-conduit-41',
    1166: 'verde-anchor-27',
    1960: 'ivory-quorum-64',
    1732: 'basal-cascade-70',
    1489: 'verde-lattice-24',
    1661: 'jade-broker-88',
    1559: 'rill-relay-98',
    1422: 'harbor-quorum-51',
    1518: 'cobalt-relay-53',
    1037: 'nimbus-quorum-19',
}


def resolve_07(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_07.get(code, "unknown")


def is_routed_07(code: int) -> bool:
    return code in ROUTES_07


# ============================ svc_08.py ============================
"""Service routing for the svc_08 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_08 = {
    1573: 'nimbus-prism-97',
    1068: 'umber-harbor-76',
    1075: 'zephyr-cascade-31',
    1641: 'nimbus-quorum-74',
    1415: 'onyx-vault-15',
    1741: 'loom-ledger-10',
    1807: 'loom-vault-47',
    1399: 'umber-cascade-47',
    1335: 'tundra-warden-15',
    1368: 'cobalt-cascade-86',
}


def resolve_08(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_08.get(code, "unknown")


def is_routed_08(code: int) -> bool:
    return code in ROUTES_08


# ============================ svc_09.py ============================
"""Service routing for the svc_09 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_09 = {
    1442: 'zephyr-relay-71',
    1556: 'nimbus-conduit-31',
    1380: 'yarrow-cipher-83',
    1871: 'jade-broker-45',
    1170: 'flint-forge-34',
    1904: 'xenon-anchor-27',
    1291: 'zephyr-atlas-59',
    1599: 'dusk-cascade-22',
    1886: 'amber-vault-62',
    1159: 'willow-prism-88',
}


def resolve_09(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_09.get(code, "unknown")


def is_routed_09(code: int) -> bool:
    return code in ROUTES_09


# ============================ svc_10.py ============================
"""Service routing for the svc_10 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_10 = {
    1699: 'basal-broker-54',
    1075: 'rill-vault-48',
    1549: 'ember-prism-39',
    1355: 'dusk-lattice-53',
    1620: 'nimbus-lattice-41',
    1843: 'willow-forge-56',
    1274: 'ivory-vault-16',
    1434: 'loom-vault-24',
    1599: 'harbor-anchor-95',
    1169: 'loom-spindle-26',
}


def resolve_10(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_10.get(code, "unknown")


def is_routed_10(code: int) -> bool:
    return code in ROUTES_10


# ============================ svc_11.py ============================
"""Service routing for the svc_11 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_11 = {
    1264: 'flint-conduit-55',
    1226: 'dusk-anchor-77',
    1414: 'pyrite-warden-65',
    1971: 'rill-spindle-16',
    1295: 'garnet-lattice-73',
    1293: 'basal-vault-17',
    1581: 'tundra-spindle-90',
    1174: 'umber-cipher-70',
    1943: 'willow-cascade-97',
    1870: 'slate-conduit-24',
}


def resolve_11(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_11.get(code, "unknown")


def is_routed_11(code: int) -> bool:
    return code in ROUTES_11


# ============================ svc_12.py ============================
"""Service routing for the svc_12 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_12 = {
    1626: 'mica-ledger-78',
    1613: 'amber-beacon-82',
    1595: 'zephyr-atlas-25',
    1692: 'quartz-warden-25',
    1995: 'umber-prism-82',
    1153: 'basal-anchor-53',
    1513: 'basal-anchor-53',
    1499: 'xenon-spindle-30',
    1597: 'ivory-harbor-57',
    1005: 'ivory-vault-38',
}


def resolve_12(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_12.get(code, "unknown")


def is_routed_12(code: int) -> bool:
    return code in ROUTES_12


# ============================ svc_13.py ============================
"""Service routing for the svc_13 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_13 = {
    1095: 'yarrow-spindle-96',
    1255: 'nimbus-spindle-51',
    1646: 'rill-warden-89',
    1749: 'ember-warden-97',
    1550: 'ivory-prism-34',
    1222: 'cobalt-quorum-60',
    1375: 'dusk-vault-56',
    1987: 'mica-vault-95',
    1994: 'zephyr-anchor-58',
    1430: 'pyrite-warden-26',
}


def resolve_13(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_13.get(code, "unknown")


def is_routed_13(code: int) -> bool:
    return code in ROUTES_13


# ============================ svc_14.py ============================
"""Service routing for the svc_14 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_14 = {
    1708: 'yarrow-warden-25',
    1276: 'zephyr-spindle-55',
    1189: 'rill-broker-69',
    1544: 'cobalt-warden-50',
    1144: 'garnet-harbor-45',
    1024: 'rill-broker-51',
    1577: 'flint-beacon-91',
    1175: 'verde-cipher-95',
    1755: 'loom-beacon-52',
    1895: 'willow-lattice-61',
}


def resolve_14(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_14.get(code, "unknown")


def is_routed_14(code: int) -> bool:
    return code in ROUTES_14


# ============================ svc_15.py ============================
"""Service routing for the svc_15 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_15 = {
    1122: 'zephyr-cipher-45',
    1469: 'jade-quorum-50',
    1950: 'yarrow-forge-98',
    1634: 'mica-gateway-78',
    1451: 'loom-warden-69',
    1589: 'ivory-atlas-14',
    1684: 'kelp-broker-12',
    1493: 'verde-harbor-60',
    1371: 'harbor-ledger-37',
    1598: 'nimbus-vault-88',
}


def resolve_15(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_15.get(code, "unknown")


def is_routed_15(code: int) -> bool:
    return code in ROUTES_15


# ============================ svc_16.py ============================
"""Service routing for the svc_16 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_16 = {
    1910: 'tundra-harbor-11',
    1000: 'nimbus-warden-73',
    1218: 'verde-prism-86',
    1681: 'rill-lattice-59',
    1245: 'loom-ledger-88',
    1820: 'ivory-harbor-52',
    1055: 'mica-atlas-58',
    1673: 'zephyr-spindle-29',
    1870: 'loom-beacon-39',
    1384: 'flint-conduit-14',
}


def resolve_16(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_16.get(code, "unknown")


def is_routed_16(code: int) -> bool:
    return code in ROUTES_16


# ============================ svc_17.py ============================
"""Service routing for the svc_17 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_17 = {
    1226: 'basal-gateway-48',
    1087: 'slate-forge-64',
    1122: 'umber-vault-54',
    1768: 'xenon-quorum-94',
    1297: 'nimbus-atlas-48',
    1357: 'umber-prism-69',
    1711: 'mica-prism-22',
    1401: 'jade-lattice-77',
    1350: 'jade-broker-10',
    1020: 'verde-forge-74',
}


def resolve_17(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_17.get(code, "unknown")


def is_routed_17(code: int) -> bool:
    return code in ROUTES_17


# ============================ svc_18.py ============================
"""Service routing for the svc_18 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_18 = {
    1656: 'amber-harbor-66',
    1966: 'harbor-quorum-66',
    1225: 'basal-forge-77',
    1485: 'willow-lattice-98',
    1136: 'ember-anchor-37',
    1651: 'zephyr-warden-78',
    1254: 'nimbus-cascade-15',
    1954: 'umber-cascade-98',
    1525: 'zephyr-forge-31',
    1742: 'rill-cipher-22',
}


def resolve_18(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_18.get(code, "unknown")


def is_routed_18(code: int) -> bool:
    return code in ROUTES_18


# ============================ svc_19.py ============================
"""Service routing for the svc_19 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_19 = {
    1050: 'flint-conduit-11',
    1677: 'garnet-warden-40',
    1969: 'ivory-gateway-71',
    1624: 'slate-conduit-98',
    1971: 'verde-cipher-19',
    1427: 'onyx-forge-26',
    1239: 'zephyr-conduit-93',
    1347: 'umber-cascade-75',
    1571: 'dusk-gateway-33',
    1963: 'willow-relay-87',
}


def resolve_19(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_19.get(code, "unknown")


def is_routed_19(code: int) -> bool:
    return code in ROUTES_19


# ============================ svc_20.py ============================
"""Service routing for the svc_20 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_20 = {
    1043: 'slate-conduit-35',
    1985: 'slate-atlas-86',
    1452: 'yarrow-broker-77',
    1216: 'umber-relay-15',
    1306: 'umber-vault-80',
    1223: 'garnet-anchor-37',
    1970: 'slate-ledger-28',
    1121: 'yarrow-harbor-44',
    1655: 'flint-prism-85',
    1006: 'ember-cipher-73',
}


def resolve_20(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_20.get(code, "unknown")


def is_routed_20(code: int) -> bool:
    return code in ROUTES_20


# ============================ svc_21.py ============================
"""Service routing for the svc_21 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_21 = {
    1582: 'verde-cascade-60',
    1736: 'rill-ledger-33',
    1069: 'cobalt-relay-98',
    1034: 'jade-atlas-63',
    1665: 'xenon-atlas-40',
    1417: 'cobalt-harbor-31',
    1400: 'amber-conduit-15',
    1879: 'harbor-anchor-64',
    1715: 'willow-cipher-95',
    1275: 'ivory-relay-43',
}


def resolve_21(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_21.get(code, "unknown")


def is_routed_21(code: int) -> bool:
    return code in ROUTES_21


# ============================ svc_22.py ============================
"""Service routing for the svc_22 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_22 = {
    1846: 'tundra-gateway-75',
    1216: 'kelp-ledger-75',
    1169: 'willow-anchor-49',
    1208: 'flint-lattice-87',
    1968: 'tundra-broker-76',
    1299: 'basal-atlas-56',
    1660: 'quartz-cipher-10',
    1363: 'pyrite-relay-60',
    1154: 'nimbus-atlas-22',
    1328: 'willow-ledger-73',
}


def resolve_22(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_22.get(code, "unknown")


def is_routed_22(code: int) -> bool:
    return code in ROUTES_22


# ============================ svc_23.py ============================
"""Service routing for the svc_23 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_23 = {
    1656: 'jade-beacon-89',
    1784: 'umber-anchor-41',
    1203: 'loom-broker-16',
    1799: 'flint-spindle-62',
    1070: 'harbor-lattice-40',
    1928: 'harbor-anchor-19',
    1739: 'mica-harbor-52',
    1925: 'dusk-cipher-83',
    1648: 'tundra-prism-22',
    1937: 'pyrite-ledger-79',
}


def resolve_23(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_23.get(code, "unknown")


def is_routed_23(code: int) -> bool:
    return code in ROUTES_23


# ============================ svc_24.py ============================
"""Service routing for the svc_24 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_24 = {
    1633: 'cobalt-ledger-64',
    1285: 'pyrite-spindle-40',
    1725: 'ember-beacon-68',
    1363: 'cobalt-relay-95',
    1022: 'dusk-warden-10',
    1332: 'flint-warden-75',
    1089: 'zephyr-atlas-11',
    1984: 'zephyr-broker-50',
    1509: 'rill-vault-87',
    1105: 'jade-relay-30',
}


def resolve_24(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_24.get(code, "unknown")


def is_routed_24(code: int) -> bool:
    return code in ROUTES_24


# ============================ svc_25.py ============================
"""Service routing for the svc_25 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_25 = {
    1061: 'amber-gateway-75',
    1089: 'cobalt-lattice-74',
    1361: 'quartz-lattice-77',
    1071: 'ember-prism-26',
    1926: 'yarrow-harbor-69',
    1148: 'dusk-ledger-18',
    1824: 'dusk-spindle-79',
    1282: 'rill-vault-50',
    1435: 'zephyr-gateway-17',
    1778: 'tundra-atlas-41',
}


def resolve_25(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_25.get(code, "unknown")


def is_routed_25(code: int) -> bool:
    return code in ROUTES_25


# ============================ svc_26.py ============================
"""Service routing for the svc_26 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_26 = {
    1609: 'harbor-cascade-15',
    1225: 'cobalt-lattice-67',
    1410: 'basal-beacon-24',
    1031: 'onyx-cascade-84',
    1516: 'verde-anchor-29',
    1560: 'onyx-anchor-13',
    1048: 'flint-cipher-41',
    1267: 'mica-forge-46',
    1178: 'amber-conduit-20',
    1337: 'umber-vault-93',
}


def resolve_26(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_26.get(code, "unknown")


def is_routed_26(code: int) -> bool:
    return code in ROUTES_26


# ============================ svc_27.py ============================
"""Service routing for the svc_27 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_27 = {
    1455: 'yarrow-cipher-74',
    1260: 'garnet-cascade-14',
    1350: 'loom-beacon-84',
    1810: 'verde-prism-82',
    1213: 'dusk-quorum-41',
    1071: 'yarrow-broker-51',
    1854: 'cobalt-spindle-48',
    1708: 'jade-spindle-16',
    1698: 'kelp-harbor-15',
    1270: 'rill-ledger-71',
}


def resolve_27(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_27.get(code, "unknown")


def is_routed_27(code: int) -> bool:
    return code in ROUTES_27


# ============================ svc_28.py ============================
"""Service routing for the svc_28 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_28 = {
    1734: 'ivory-warden-43',
    1198: 'ivory-harbor-78',
    1451: 'cobalt-harbor-87',
    1445: 'cobalt-anchor-79',
    1756: 'slate-anchor-51',
    1443: 'harbor-prism-78',
    1287: 'mica-relay-27',
    1231: 'slate-lattice-46',
    1944: 'willow-forge-43',
    1108: 'ivory-conduit-76',
}


def resolve_28(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_28.get(code, "unknown")


def is_routed_28(code: int) -> bool:
    return code in ROUTES_28


# ============================ svc_29.py ============================
"""Service routing for the svc_29 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_29 = {
    1128: 'nimbus-quorum-97',
    1381: 'onyx-broker-88',
    1633: 'amber-cipher-53',
    1960: 'cobalt-forge-48',
    1309: 'harbor-warden-58',
    1239: 'mica-quorum-81',
    1089: 'ivory-quorum-63',
    1412: 'verde-vault-67',
    1555: 'nimbus-cascade-65',
    1975: 'garnet-forge-43',
}


def resolve_29(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_29.get(code, "unknown")


def is_routed_29(code: int) -> bool:
    return code in ROUTES_29


# ============================ svc_30.py ============================
"""Service routing for the svc_30 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_30 = {
    1179: 'basal-prism-35',
    1070: 'ivory-broker-25',
    1135: 'tundra-prism-20',
    1923: 'pyrite-spindle-14',
    1514: 'yarrow-quorum-39',
    1576: 'cobalt-prism-95',
    1059: 'pyrite-conduit-88',
    1614: 'pyrite-spindle-83',
    1731: 'umber-conduit-64',
    1846: 'mica-forge-34',
}


def resolve_30(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_30.get(code, "unknown")


def is_routed_30(code: int) -> bool:
    return code in ROUTES_30


# ============================ svc_31.py ============================
"""Service routing for the svc_31 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_31 = {
    1869: 'mica-prism-51',
    1753: 'harbor-relay-18',
    1328: 'harbor-broker-66',
    1695: 'zephyr-relay-15',
    1452: 'garnet-relay-20',
    1634: 'kelp-beacon-43',
    1019: 'harbor-cipher-74',
    1059: 'harbor-beacon-64',
    1350: 'amber-conduit-44',
    1242: 'verde-conduit-60',
}


def resolve_31(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_31.get(code, "unknown")


def is_routed_31(code: int) -> bool:
    return code in ROUTES_31


# ============================ svc_32.py ============================
"""Service routing for the svc_32 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_32 = {
    1199: 'willow-cipher-88',
    1331: 'harbor-anchor-80',
    1297: 'yarrow-conduit-36',
    1699: 'willow-ledger-27',
    1167: 'garnet-anchor-94',
    1826: 'rill-anchor-37',
    1773: 'tundra-spindle-20',
    1398: 'umber-gateway-37',
    1629: 'flint-cipher-61',
    1268: 'ember-cascade-61',
}


def resolve_32(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_32.get(code, "unknown")


def is_routed_32(code: int) -> bool:
    return code in ROUTES_32


# ============================ svc_33.py ============================
"""Service routing for the svc_33 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_33 = {
    1823: 'umber-warden-55',
    1768: 'cobalt-relay-10',
    1544: 'umber-cascade-43',
    1514: 'willow-anchor-51',
    1343: 'quartz-broker-78',
    1458: 'nimbus-broker-40',
    1996: 'jade-warden-38',
    1468: 'slate-cipher-39',
    1809: 'nimbus-relay-64',
    1977: 'flint-prism-62',
}


def resolve_33(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_33.get(code, "unknown")


def is_routed_33(code: int) -> bool:
    return code in ROUTES_33


# ============================ svc_34.py ============================
"""Service routing for the svc_34 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_34 = {
    1693: 'nimbus-beacon-71',
    1306: 'zephyr-vault-36',
    1725: 'yarrow-conduit-73',
    1127: 'onyx-quorum-95',
    1746: 'rill-atlas-88',
    1353: 'umber-conduit-92',
    1404: 'verde-vault-50',
    1446: 'slate-forge-87',
    1056: 'cobalt-gateway-70',
    1403: 'nimbus-lattice-67',
}


def resolve_34(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_34.get(code, "unknown")


def is_routed_34(code: int) -> bool:
    return code in ROUTES_34


# ============================ svc_35.py ============================
"""Service routing for the svc_35 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_35 = {
    1992: 'slate-prism-38',
    1095: 'ivory-atlas-92',
    1928: 'basal-forge-82',
    1508: 'basal-atlas-93',
    1897: 'jade-relay-42',
    1545: 'zephyr-gateway-32',
    1504: 'quartz-cipher-67',
    1982: 'verde-spindle-56',
    1077: 'pyrite-spindle-20',
    1964: 'onyx-beacon-46',
}


def resolve_35(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_35.get(code, "unknown")


def is_routed_35(code: int) -> bool:
    return code in ROUTES_35


# ============================ svc_36.py ============================
"""Service routing for the svc_36 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_36 = {
    1470: 'zephyr-broker-47',
    1082: 'rill-relay-22',
    1900: 'onyx-atlas-41',
    1570: 'loom-anchor-16',
    1861: 'nimbus-anchor-46',
    1708: 'rill-atlas-44',
    1932: 'mica-warden-31',
    1574: 'yarrow-relay-44',
    1115: 'umber-vault-63',
    1517: 'cobalt-beacon-68',
}


def resolve_36(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_36.get(code, "unknown")


def is_routed_36(code: int) -> bool:
    return code in ROUTES_36


# ============================ svc_37.py ============================
"""Service routing for the svc_37 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_37 = {
    1415: 'basal-beacon-72',
    1322: 'flint-ledger-80',
    1644: 'garnet-forge-54',
    1444: 'basal-warden-98',
    1127: 'quartz-warden-59',
    1054: 'cobalt-vault-90',
    1241: 'dusk-anchor-53',
    1918: 'loom-vault-74',
    1555: 'amber-atlas-75',
    1349: 'willow-atlas-14',
}


def resolve_37(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_37.get(code, "unknown")


def is_routed_37(code: int) -> bool:
    return code in ROUTES_37


# ============================ svc_38.py ============================
"""Service routing for the svc_38 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_38 = {
    1471: 'ivory-harbor-39',
    1219: 'ivory-broker-88',
    1083: 'cobalt-cipher-91',
    1595: 'mica-spindle-27',
    1484: 'verde-relay-61',
    1010: 'cobalt-spindle-95',
    1770: 'nimbus-beacon-95',
    1892: 'rill-vault-19',
    1581: 'quartz-anchor-95',
    1863: 'umber-quorum-37',
}


def resolve_38(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_38.get(code, "unknown")


def is_routed_38(code: int) -> bool:
    return code in ROUTES_38


# ============================ svc_39.py ============================
"""Service routing for the svc_39 edge cluster.

Auto-generated from the service mesh manifest. Maps upstream status codes to the
downstream service that should handle the retry/escalation for that code.
"""

ROUTES_39 = {
    1935: 'ivory-warden-73',
    1540: 'verde-vault-66',
    1950: 'onyx-spindle-81',
    1923: 'basal-ledger-25',
    1574: 'jade-broker-59',
    1925: 'mica-prism-82',
    1240: 'ember-ledger-10',
    1041: 'verde-quorum-65',
    1595: 'pyrite-prism-80',
    1073: 'verde-atlas-55',
}


def resolve_39(code: int) -> str:
    """Return the handling service for a status code, or "unknown" if unrouted."""
    return ROUTES_39.get(code, "unknown")


def is_routed_39(code: int) -> bool:
    return code in ROUTES_39

tests/test_resolve.py
from solution import resolve


def test_routes_from_the_needle_module():
    # every code in module svc_20's ROUTES_20 table resolves to its service
    assert resolve(1043) == 'slate-conduit-35'
    assert resolve(1985) == 'slate-atlas-86'
    assert resolve(1452) == 'yarrow-broker-77'
    assert resolve(1216) == 'umber-relay-15'
    assert resolve(1306) == 'umber-vault-80'
    assert resolve(1223) == 'garnet-anchor-37'
    assert resolve(1970) == 'slate-ledger-28'
    assert resolve(1121) == 'yarrow-harbor-44'
    assert resolve(1655) == 'flint-prism-85'
    assert resolve(1006) == 'ember-cipher-73'


def test_unrouted_code_is_unknown():
    assert resolve(1001) == "unknown"      # in no module's table


def test_decoy_module_code_is_unknown():
    # 1000 appears in a DIFFERENT module's table but not in svc_20 -> unknown
    assert resolve(1000) == "unknown"
System prompt
You are an expert programmer. Solve the task exactly as specified. Output your solution as fenced code blocks using the required file name(s) and the exact function/type signatures requested. Prefer correctness; do not include prose outside code unless asked.
Proposed solution


To solve this problem, we need to implement a function that routes a given status code to a specific service based on a predefined mapping from the `svc_20` module. If the status code is not found in the mapping, the function should return "unknown".

### Approach
1. **Understand the Problem**: We need to create a function `resolve` that takes an integer status code and returns the corresponding service name. If the status code is not found in the predefined mapping, it should return "unknown".
2. **Extract the Mapping**: The `svc_20` module contains a dictionary `ROUTES_20` that maps status codes to service names. We will use this dictionary directly in our solution.
3. **Implement the Function**: The function will use the dictionary to look up the status code. If the code is found, it returns the corresponding service name; otherwise, it returns "unknown".

### Solution Code
```python
# solution.py

ROUTES_20 = {
    1043: 'slate-conduit-35',
    1985: 'slate-atlas-86',
    1452: 'yarrow-broker-77',
    1216: 'umber-relay-15',
    1306: 'umber-vault-80',
    1223: 'garnet-anchor-37',
    1970: 'slate-ledger-28',
    1121: 'yarrow-harbor-44',
    1655: 'flint-prism-85',
    1006: 'ember-cipher-73',
}

def resolve(code: int) -> str:
    return ROUTES_20.get(code, "unknown")
```

### Explanation
- **Dictionary Definition**: The `ROUTES_20` dictionary is defined with the mappings from the `svc_20` module. Each key is a status code, and each value is the corresponding service name.
- **Function Implementation**: The `resolve` function uses the `get` method of the dictionary to look up the status code. If the code is found, it returns the service name; if not, it returns "unknown".

This approach ensures that we efficiently route status codes to their respective services using a direct lookup, providing an optimal solution to the problem.

Test output (stdout)

...                                                                      [100%]
3 passed in 0.01s
Reasoning (chain-of-thought)

Okay, I need to solve this problem where I have to write a Python function called resolve that takes an integer code and returns a string representing the service name based on the routing table from svc_20. If the code isn't in the table, it should return "unknown".

First, I should look at the provided code. There are 40 modules, each with their own ROUTES_XY dictionary. But the task specifically says to use only the table from svc_20, which is the 20th module. So I need to find what's in svc_20's ROUTES_20.

Looking through the modules, I find svc_20.py. Let me copy its ROUTES_20 dictionary. It has the following key-value pairs:

1043: 'slate-conduit-35',
1985: 'slate-atlas-86',
1452: 'yarrow-broker-77',
1216: 'umber-relay-15',
1306: 'umber-vault-80',
1223: 'garnet-anchor-37',
1970: 'slate-ledger-28',
1121: 'yarrow-harbor-44',
1655: 'flint-prism-85',
1006: 'ember-cipher-73',

So, I'll create a similar dictionary in my solution. The function should check if the code is a key in this dictionary. If it is, return the corresponding value; else, return "unknown".

I don't need to import anything because the snapshot isn't available. So I'll inline the mapping directly into the function.

So the steps are:

1. Define the ROUTES_20 dictionary with the correct mappings.
2. The resolve function takes code as input.
3. Use get() on the dictionary with code as the key, defaulting to "unknown".

I should make sure that the keys are integers and the values are exactly as in the module. Also, ensure that the function returns the string "unknown" when the code isn't found.

Let me write the code. I'll start by defining the dictionary inside the function or outside? Since the function is supposed to be in solution.py, I'll define the dictionary inside the function for encapsulation.

Wait, no, in Python, it's more efficient to define the dictionary outside the function if it's used multiple times, but since the function is called per code, it's fine to have it inside. Alternatively, define it outside for better performance, but for a function that's called once, it's negligible. But for the sake of code structure, I'll define it inside the function.

Wait, no, actually, in Python, if the dictionary is defined inside the function, it's reinitialized every time the function is called, which is not a problem here but might be slightly less efficient. However, for a function that's not called excessively, it's acceptable. Alternatively, define it outside.

But in this case, since the function is simple, I'll define the dictionary inside the function.

Wait, no, actually, it's better to define it outside so that it's created once, not every function call. So I'll define it outside the function.

So the code structure will be:

ROUTES_20 = {
    # the mappings
}

def resolve(code: int) -> str:
    return ROUTES_20.get(code, "unknown")

Yes, that makes sense.

Now, I'll make sure to copy all the key-value pairs correctly from svc_20.

Let me list them again to ensure accuracy:

1043: 'slate-conduit-35',
1985: 'slate-atlas-86',
1452: 'yarrow-broker-77',
1216: 'umber-relay-15',
1306: 'umber-vault-80',
1223: 'garnet-anchor-37',
1970: 'slate-ledger-28',
1121: 'yarrow-harbor-44',
1655: 'flint-prism-85',
1006: 'ember-cipher-73',

I'll make sure each key is correctly entered as an integer, and the values are exact strings.

So the final code will have the dictionary defined, and the function uses get with the default.

I think that's all. Now, I'll write the code accordingly.