lc-01-buried-routes
1.000
Proposed solution
Looking at the requirements, I need to implement a `resolve` function that returns the service name for a given status code exactly as defined in `svc_33`'s `ROUTES_33` table. Any code not in that table should return `"unknown"`.
Let me extract the routing table from `svc_33.py`:
```python
# ============================ 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 = {
1936: 'umber-anchor-97',
1610: 'cobalt-cascade-23',
1686: 'cobalt-anchor-27',
1786: 'dusk-spindle-42',
1869: 'amber-gateway-79',
1748: 'jade-quorum-60',
1553: 'umber-prism-50',
1818: 'ivory-atlas-63',
1921: 'quartz-spindle-54',
1516: 'cobalt-spindle-28',
}
```
Now I'll implement the solution:
```python
def resolve(code: int) -> str:
ROUTES_33 = {
1936: 'umber-anchor-97',
1610: 'cobalt-cascade-23',
1686: 'cobalt-anchor-27',
1786: 'dusk-spindle-42',
1869: 'amber-gateway-79',
1748: 'jade-quorum-60',
1553: 'umber-prism-50',
1818: 'ivory-atlas-63',
1921: 'quartz-spindle-54',
1516: 'cobalt-spindle-28',
}
return ROUTES_33.get(code, "unknown")
```Test output (stdout)
... [100%] 3 passed in 0.01s
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.