# LDC-W8305 — A table row no input can reach ## What it means A decision table is read top to bottom: the first row whose guards accept the input wins. When an earlier row already accepts every input a later row would accept, the later row can never fire — it is dead text that suggests a decision the table never makes. The checker warns at the unreachable row and points at the earlier row that covers it. An unreachable row is usually a leftover: a guard narrowed above it, a case split that moved. Either delete the row or narrow the earlier guard until the row accepts inputs of its own again. A table where every row can fire needs no warning. ## Example ```run {"argv": ["a3-lower", "$ROOT/table.json", "urn:demo:diagnostics"], "files": {"table.json": "{\"schemaVersion\": \"law.decision/0.1\", \"kind\": \"decision-table\", \"id\": \"urn:demo:diagnostics#rate\", \"mode\": \"function\", \"hitPolicy\": \"first\", \"total\": true, \"inputs\": [{\"id\": \"days_late\", \"name\": \"\\u0414\\u043d\\u0438 \\u043f\\u0440\\u043e\\u0441\\u0440\\u043e\\u0447\\u043a\\u0438\", \"type\": {\"name\": \"urn:law:std#Natural\"}}], \"outputs\": [{\"id\": \"rate\", \"name\": \"\\u0421\\u0442\\u0430\\u0432\\u043a\\u0430\", \"type\": {\"name\": \"urn:law:std#Decimal\"}}], \"rows\": [{\"id\": \"any_case\", \"when\": [{\"input\": \"days_late\", \"condition\": {\"kind\": \"any\"}}], \"then\": [{\"output\": \"rate\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Decimal\"}, \"value\": \"0.005\"}}], \"anchors\": [\"urn:demo:diagnostics#table\"]}, {\"id\": \"narrow_case\", \"when\": [{\"input\": \"days_late\", \"condition\": {\"kind\": \"comparison\", \"op\": \"gte\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Natural\"}, \"value\": 10}}}], \"then\": [{\"output\": \"rate\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Decimal\"}, \"value\": \"0.005\"}}], \"anchors\": [\"urn:demo:diagnostics#table\"]}]}"}, "expect": "LDC-W8305"} ``` ## Fix ```run {"argv": ["a3-lower", "$ROOT/table.json", "urn:demo:diagnostics"], "files": {"table.json": "{\"schemaVersion\": \"law.decision/0.1\", \"kind\": \"decision-table\", \"id\": \"urn:demo:diagnostics#rate\", \"mode\": \"function\", \"hitPolicy\": \"first\", \"total\": true, \"inputs\": [{\"id\": \"days_late\", \"name\": \"\\u0414\\u043d\\u0438 \\u043f\\u0440\\u043e\\u0441\\u0440\\u043e\\u0447\\u043a\\u0438\", \"type\": {\"name\": \"urn:law:std#Natural\"}}], \"outputs\": [{\"id\": \"rate\", \"name\": \"\\u0421\\u0442\\u0430\\u0432\\u043a\\u0430\", \"type\": {\"name\": \"urn:law:std#Decimal\"}}], \"rows\": [{\"id\": \"any_case\", \"when\": [{\"input\": \"days_late\", \"condition\": {\"kind\": \"any\"}}], \"then\": [{\"output\": \"rate\", \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Decimal\"}, \"value\": \"0.005\"}}], \"anchors\": [\"urn:demo:diagnostics#table\"]}]}"}, "expect": null} ``` ## Engine message The table checker reports this in its own wording (one JSON document): ```text {"code":"LDC-W8305","machineData":{"row":"narrow_case"},"message":"first row narrow_case is unreachable","primaryLocation":{"column":"days_late","jsonPointer":"/rows/1/when/0","kind":"table_cell","row":"narrow_case","table":"urn:demo:diagnostics#rate","uri":"$ROOT/table.json"},"relatedLocations":[{"location":{"column":"days_late","jsonPointer":"/rows/0/when/0","kind":"table_cell","row":"any_case","table":"urn:demo:diagnostics#rate","uri":"$ROOT/table.json"},"message":"previous row takes part in the full coverage"}],"severity":"warning"} ``` ## Related - [LDC-E8301](/diagnostics/LDC-E8301/) — overlapping rows under hit unique.