Repository navigation
Commit bf7bdcf
feat(wd): accept a variant subdirectory for the model cache
Profiles may declare `hf_subdir` for repos that ship several builds under one
name. The sidecar resolved the model directory from the model id alone, so
yu-server had to forward those profiles to Python — the last reason a
supported ONNX profile could not run here.
`model_subdir` is optional and validated before it is joined: up to four
segments of `[A-Za-z0-9._-]`, `.` and `..` refused, empty treated as absent.
That mirrors `validate_hf_subdir` on the Python side. The value arrives over
the wire and becomes a filesystem path, so it is refused rather than
sanitised.
`is_profile_model_downloaded` becomes `is_profile_model_ready` and takes the
resolved directory, and the engine cache key follows the resolved directory
too — two variants of one repo are two engines.
Verified: 56 core tests (2 new, covering both the accepted and the refused
subdirectory shapes), workspace 65 tests serially, clippy clean, and the camie
cross-implementation check still matches Python exactly (16 / 23 / 20 tags,
worst confidence delta 0.00005).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 8e52d2e commit bf7bdcf
2 files changed
Lines changed: 99 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 26 | + | |
32 | 27 | | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
36 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
37 | 66 | | |
38 | 67 | | |
39 | 68 | | |
| |||
83 | 112 | | |
84 | 113 | | |
85 | 114 | | |
86 | | - | |
| 115 | + | |
87 | 116 | | |
88 | | - | |
| 117 | + | |
89 | 118 | | |
90 | | - | |
| 119 | + | |
91 | 120 | | |
92 | 121 | | |
93 | 122 | | |
94 | 123 | | |
95 | | - | |
| 124 | + | |
96 | 125 | | |
97 | 126 | | |
98 | 127 | | |
99 | 128 | | |
100 | 129 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 130 | + | |
106 | 131 | | |
107 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
108 | 172 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| |||
1672 | 1677 | | |
1673 | 1678 | | |
1674 | 1679 | | |
1675 | | - | |
1676 | | - | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
1677 | 1692 | | |
1678 | 1693 | | |
1679 | 1694 | | |
| |||
1685 | 1700 | | |
1686 | 1701 | | |
1687 | 1702 | | |
1688 | | - | |
| 1703 | + | |
1689 | 1704 | | |
1690 | 1705 | | |
1691 | 1706 | | |
| |||
0 commit comments