|
3 | 3 |
|
4 | 4 | import { afterEach, describe, expect, it, vi } from "vitest"; |
5 | 5 |
|
6 | | -import { |
7 | | - hostLocalInferenceReceipt, |
8 | | - serializedHostLocalInferenceReceipt, |
9 | | - serializedLlamaCppHostLocalInferenceReceipt, |
10 | | -} from "../../../../test/helpers/host-local-inference-receipt"; |
11 | 6 | import type { |
12 | 7 | ProviderRecoveryReceipt, |
13 | 8 | RegistryInferenceRoute, |
14 | 9 | } from "../../onboard/rebuild-route-handoff"; |
15 | | -import { serializeHostLocalInferenceReceipt } from "../../onboard/runtime-provider/host-local-inference"; |
16 | 10 | import type { SandboxBaseImageResolutionMetadata } from "../../sandbox-base-image"; |
17 | 11 | import { |
18 | 12 | pinRebuildTargetGatewayForReadiness, |
19 | 13 | runRebuildGatewayRecoveryAfterReadiness, |
20 | 14 | stageRebuildBaseImageResolutionHandoff, |
21 | | - stageRecordedManagedVllmIntent, |
22 | 15 | stageRegistryProviderRecoveryReceipt, |
23 | 16 | } from "./rebuild-preflight-target-phase"; |
24 | 17 |
|
@@ -128,145 +121,6 @@ describe("stageRegistryProviderRecoveryReceipt", () => { |
128 | 121 | }); |
129 | 122 | }); |
130 | 123 |
|
131 | | -describe("stageRecordedManagedVllmIntent", () => { |
132 | | - const n1xExpressEntry = { |
133 | | - provider: "vllm-local", |
134 | | - model: "nvidia/Qwen3.6-35B-A3B-NVFP4", |
135 | | - endpointUrl: "http://host.openshell.internal:8000/v1", |
136 | | - endpointSource: "onboard" as const, |
137 | | - openshellDriver: "docker", |
138 | | - }; |
139 | | - const n1xExpressSelection = { |
140 | | - provider: n1xExpressEntry.provider, |
141 | | - model: n1xExpressEntry.model, |
142 | | - pinEndpoint: true, |
143 | | - endpointUrl: null, |
144 | | - }; |
145 | | - |
146 | | - it.each([ |
147 | | - { receiptState: "absent", sandboxEntry: n1xExpressEntry }, |
148 | | - { |
149 | | - receiptState: "null", |
150 | | - sandboxEntry: { ...n1xExpressEntry, hostLocalInferenceReceipt: null }, |
151 | | - }, |
152 | | - ])( |
153 | | - "carries the v0.0.109 N1x Express selection with a $receiptState receipt into rebuild readiness (#9292)", |
154 | | - ({ sandboxEntry }) => { |
155 | | - const recreateOptions: { allowDeferredN1xManagedVllm?: true } = {}; |
156 | | - |
157 | | - stageRecordedManagedVllmIntent(recreateOptions, sandboxEntry, n1xExpressSelection); |
158 | | - |
159 | | - expect(recreateOptions.allowDeferredN1xManagedVllm).toBe(true); |
160 | | - }, |
161 | | - ); |
162 | | - |
163 | | - it("also accepts a canonical vLLM receipt on the exact N1x Express selection (#9292)", () => { |
164 | | - const recreateOptions: { allowDeferredN1xManagedVllm?: true } = {}; |
165 | | - const genericReceipt = hostLocalInferenceReceipt("docker"); |
166 | | - const n1xReceipt = serializeHostLocalInferenceReceipt({ |
167 | | - ...genericReceipt, |
168 | | - endpoint: { |
169 | | - ...genericReceipt.endpoint, |
170 | | - host: "host.openshell.internal", |
171 | | - }, |
172 | | - inference: { |
173 | | - protocol: "openai-chat-completions", |
174 | | - model: n1xExpressEntry.model, |
175 | | - toolCallingRequired: true, |
176 | | - }, |
177 | | - }); |
178 | | - |
179 | | - stageRecordedManagedVllmIntent( |
180 | | - recreateOptions, |
181 | | - { ...n1xExpressEntry, hostLocalInferenceReceipt: n1xReceipt }, |
182 | | - n1xExpressSelection, |
183 | | - ); |
184 | | - |
185 | | - expect(recreateOptions.allowDeferredN1xManagedVllm).toBe(true); |
186 | | - }); |
187 | | - |
188 | | - it.each([ |
189 | | - { |
190 | | - caseName: "different recorded provider", |
191 | | - sandboxEntry: { ...n1xExpressEntry, provider: "compatible-endpoint" }, |
192 | | - rebuildSelection: n1xExpressSelection, |
193 | | - }, |
194 | | - { |
195 | | - caseName: "different recorded model", |
196 | | - sandboxEntry: { ...n1xExpressEntry, model: "meta-llama/Llama-3.1-8B-Instruct" }, |
197 | | - rebuildSelection: n1xExpressSelection, |
198 | | - }, |
199 | | - { |
200 | | - caseName: "different recorded endpoint", |
201 | | - sandboxEntry: { ...n1xExpressEntry, endpointUrl: "http://host.openshell.internal:8001/v1" }, |
202 | | - rebuildSelection: n1xExpressSelection, |
203 | | - }, |
204 | | - { |
205 | | - caseName: "different endpoint source", |
206 | | - sandboxEntry: { ...n1xExpressEntry, endpointSource: "inference-set" as const }, |
207 | | - rebuildSelection: n1xExpressSelection, |
208 | | - }, |
209 | | - { |
210 | | - caseName: "different OpenShell driver", |
211 | | - sandboxEntry: { ...n1xExpressEntry, openshellDriver: "podman" }, |
212 | | - rebuildSelection: n1xExpressSelection, |
213 | | - }, |
214 | | - { |
215 | | - caseName: "malformed receipt", |
216 | | - sandboxEntry: { ...n1xExpressEntry, hostLocalInferenceReceipt: "not-json" }, |
217 | | - rebuildSelection: n1xExpressSelection, |
218 | | - }, |
219 | | - { |
220 | | - caseName: "different host-local service", |
221 | | - sandboxEntry: { |
222 | | - ...n1xExpressEntry, |
223 | | - hostLocalInferenceReceipt: serializedLlamaCppHostLocalInferenceReceipt(), |
224 | | - }, |
225 | | - rebuildSelection: n1xExpressSelection, |
226 | | - }, |
227 | | - { |
228 | | - caseName: "conflicting vLLM receipt", |
229 | | - sandboxEntry: { |
230 | | - ...n1xExpressEntry, |
231 | | - hostLocalInferenceReceipt: serializedHostLocalInferenceReceipt(), |
232 | | - }, |
233 | | - rebuildSelection: n1xExpressSelection, |
234 | | - }, |
235 | | - { |
236 | | - caseName: "different rebuild provider", |
237 | | - sandboxEntry: n1xExpressEntry, |
238 | | - rebuildSelection: { ...n1xExpressSelection, provider: "compatible-endpoint" }, |
239 | | - }, |
240 | | - { |
241 | | - caseName: "different rebuild model", |
242 | | - sandboxEntry: n1xExpressEntry, |
243 | | - rebuildSelection: { ...n1xExpressSelection, model: "meta-llama/Llama-3.1-8B-Instruct" }, |
244 | | - }, |
245 | | - { |
246 | | - caseName: "unresolved rebuild endpoint", |
247 | | - sandboxEntry: n1xExpressEntry, |
248 | | - rebuildSelection: { ...n1xExpressSelection, pinEndpoint: false }, |
249 | | - }, |
250 | | - { |
251 | | - caseName: "noncanonical rebuild endpoint", |
252 | | - sandboxEntry: n1xExpressEntry, |
253 | | - rebuildSelection: { |
254 | | - ...n1xExpressSelection, |
255 | | - endpointUrl: "http://host.openshell.internal:8001/v1", |
256 | | - }, |
257 | | - }, |
258 | | - ])( |
259 | | - "does not infer N1x Express intent from a $caseName (#9292)", |
260 | | - ({ sandboxEntry, rebuildSelection }) => { |
261 | | - const recreateOptions: { allowDeferredN1xManagedVllm?: true } = {}; |
262 | | - |
263 | | - stageRecordedManagedVllmIntent(recreateOptions, sandboxEntry, rebuildSelection); |
264 | | - |
265 | | - expect(recreateOptions).not.toHaveProperty("allowDeferredN1xManagedVllm"); |
266 | | - }, |
267 | | - ); |
268 | | -}); |
269 | | - |
270 | 124 | describe("stageRebuildBaseImageResolutionHandoff", () => { |
271 | 125 | it("binds outer resolver provenance to its immutable local handoff (#7144)", () => { |
272 | 126 | const imageId = `sha256:${"a".repeat(64)}`; |
|
0 commit comments