Commit 58ddf4a
committed
fix(inference): sanitize pytorch kv truncate io errors
Route PyTorch KV-cache truncate temp-file read and write failures through the canonical pytorch_worker_kv_truncate_failed error path.
Generate the truncate request id before temp-file IO so local IO failures preserve request correlation and use the shared worker-message sanitizer instead of ad hoc inference errors.
Update the backend README and inference execution boundary plan with the KV truncate temp-file hygiene rule.
Validation: cargo fmt --all; cargo test -p inference --features backend-pytorch pytorch_kv; cargo test -p inference --features backend-pytorch test_pytorch_worker_kv_truncate; cargo check -p inference --features backend-pytorch; cargo check -p inference --no-default-features; git diff --check.1 parent 3e974b4 commit 58ddf4a
4 files changed
Lines changed: 49 additions & 12 deletions
File tree
- crates/inference/src/backend
- docs/plans/inference-execution-boundary-contracts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
2106 | 2110 | | |
2107 | 2111 | | |
2108 | 2112 | | |
| 2113 | + | |
2109 | 2114 | | |
2110 | 2115 | | |
2111 | 2116 | | |
2112 | 2117 | | |
2113 | | - | |
2114 | | - | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
2115 | 2124 | | |
2116 | 2125 | | |
2117 | | - | |
| 2126 | + | |
2118 | 2127 | | |
2119 | 2128 | | |
2120 | 2129 | | |
2121 | | - | |
| 2130 | + | |
2122 | 2131 | | |
2123 | | - | |
2124 | 2132 | | |
2125 | 2133 | | |
2126 | 2134 | | |
| |||
2130 | 2138 | | |
2131 | 2139 | | |
2132 | 2140 | | |
2133 | | - | |
| 2141 | + | |
2134 | 2142 | | |
2135 | | - | |
2136 | 2143 | | |
2137 | 2144 | | |
2138 | 2145 | | |
| |||
2142 | 2149 | | |
2143 | 2150 | | |
2144 | 2151 | | |
2145 | | - | |
2146 | | - | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
2147 | 2158 | | |
2148 | 2159 | | |
2149 | 2160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2486 | 2486 | | |
2487 | 2487 | | |
2488 | 2488 | | |
2489 | | - | |
| 2489 | + | |
2490 | 2490 | | |
2491 | | - | |
2492 | 2491 | | |
2493 | 2492 | | |
2494 | 2493 | | |
| |||
2500 | 2499 | | |
2501 | 2500 | | |
2502 | 2501 | | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
2503 | 2519 | | |
2504 | 2520 | | |
2505 | 2521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1852 | 1852 | | |
1853 | 1853 | | |
1854 | 1854 | | |
1855 | | - | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1856 | 1859 | | |
1857 | 1860 | | |
1858 | 1861 | | |
| |||
3834 | 3837 | | |
3835 | 3838 | | |
3836 | 3839 | | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
3837 | 3844 | | |
3838 | 3845 | | |
3839 | 3846 | | |
| |||
0 commit comments