@@ -9,7 +9,6 @@ import { buildAvailabilityProbeEnv } from "../fixtures/availability-env.ts";
99import type { HostCliClient } from "../fixtures/clients/host.ts" ;
1010import { validateSandboxName } from "../fixtures/clients/sandbox.ts" ;
1111import { expect , test } from "../fixtures/e2e-test.ts" ;
12- import { requireHostedInferenceConfig } from "../fixtures/hosted-inference.ts" ;
1312import { shouldRunLiveE2EScenarios } from "../fixtures/live-project-gate.ts" ;
1413
1514// Migrated from test/e2e/test-credential-migration.sh. This is a focused live
@@ -18,10 +17,10 @@ import { shouldRunLiveE2EScenarios } from "../fixtures/live-project-gate.ts";
1817// a successful real onboard registers the migrated value with the OpenShell
1918// gateway, the plaintext file is removed after success, credentials list reads
2019// from the gateway, and secure unlink removes a planted symlink without touching
21- // its target. The repository secret is named NVIDIA_INFERENCE_API_KEY, but the
22- // hosted E2E service is the OpenAI-compatible inference-api.nvidia.com endpoint,
23- // so the migration contract stages that value as COMPATIBLE_API_KEY and expects
24- // the compatible-endpoint gateway provider .
20+ // its target. The live onboard intentionally follows the legacy default NVIDIA
21+ // Endpoints path: NVIDIA_INFERENCE_API_KEY is present only in the legacy file, absent from
22+ // the onboard child env, and must migrate into the nvidia-prod gateway provider.
23+ // No registry, migration ledger, or shared helper is introduced .
2524
2625const REPO_ROOT = path . resolve ( import . meta. dirname , "../../.." ) ;
2726const CLI_ENTRYPOINT = path . join ( REPO_ROOT , "bin" , "nemoclaw.js" ) ;
@@ -108,10 +107,7 @@ async function cleanupCredentialMigrationState(host: HostCliClient, home: string
108107 host . command ( "node" , [ CLI_ENTRYPOINT , SANDBOX_NAME , "destroy" , "--yes" ] , {
109108 artifactName : "cleanup-nemoclaw-destroy" ,
110109 env,
111- redactionValues : [
112- process . env . NVIDIA_INFERENCE_API_KEY ?? "" ,
113- process . env . COMPATIBLE_API_KEY ?? "" ,
114- ] ,
110+ redactionValues : [ process . env . NVIDIA_INFERENCE_API_KEY ?? "" ] ,
115111 timeoutMs : 120_000 ,
116112 } ) ,
117113 ) ;
@@ -142,18 +138,15 @@ runCredentialMigrationTest(
142138 "credential migration stages legacy file into gateway and removes plaintext safely" ,
143139 { timeout : ONBOARD_TIMEOUT_MS + INSTALL_TIMEOUT_MS + 5 * 60_000 } ,
144140 async ( { artifacts, cleanup, host, secrets, skip } ) => {
145- // Use the existing nightly secret as the legacy provider credential. The
146- // onboard child env below deliberately does not receive that credential , so
141+ // Use the existing nightly secret as the legacy NVIDIA credential. The
142+ // onboard child env below deliberately does not receive NVIDIA_INFERENCE_API_KEY , so
147143 // the only source is ~/.nemoclaw/credentials.json — matching the retired
148144 // shell lane's migration contract.
149- const hostedInference = requireHostedInferenceConfig ( secrets , process . env , {
150- model : CREDENTIAL_MIGRATION_MODEL ,
151- } ) ;
152- const migratedCredentialValue = hostedInference . apiKey ;
153- const {
154- [ hostedInference . credentialEnv ] : _omittedCredential ,
155- ...hostedInferenceEnvWithoutCredential
156- } = hostedInference . env ;
145+ const migratedCredentialValue = secrets . required ( "NVIDIA_INFERENCE_API_KEY" ) ;
146+ expect (
147+ migratedCredentialValue . startsWith ( "nvapi-" ) ,
148+ "NVIDIA_INFERENCE_API_KEY must start with nvapi-" ,
149+ ) . toBe ( true ) ;
157150 expect ( fs . existsSync ( CLI_ENTRYPOINT ) , "bin/nemoclaw.js missing" ) . toBe ( true ) ;
158151 expect (
159152 fs . existsSync ( DIST_CREDENTIAL_STORE ) ,
@@ -190,9 +183,8 @@ runCredentialMigrationTest(
190183 sandboxName : SANDBOX_NAME ,
191184 contracts : [
192185 "legacy credentials.json stages allowlisted provider keys into onboard env" ,
193- `successful onboard registers the migrated value with the ${ hostedInference . providerName } OpenShell gateway provider` ,
194- `${ hostedInference . sourceSecretName } is migrated into the ${ hostedInference . credentialEnv } provider credential` ,
195- `onboard uses the ${ hostedInference . provider } provider and ${ hostedInference . endpointUrl } endpoint path` ,
186+ "successful default NVIDIA Endpoints onboard registers the migrated value with OpenShell gateway" ,
187+ "onboard keeps the default NVIDIA provider/key/endpoint/policy path while pinning a low-quota catalog model" ,
196188 "successful onboard removes plaintext credentials.json" ,
197189 "tampered non-credential keys do not become gateway providers" ,
198190 "credentials list reads providers from the gateway, not disk" ,
@@ -209,7 +201,7 @@ runCredentialMigrationTest(
209201 legacyFile ,
210202 JSON . stringify (
211203 {
212- [ hostedInference . credentialEnv ] : migratedCredentialValue ,
204+ NVIDIA_INFERENCE_API_KEY : migratedCredentialValue ,
213205 OPENSHELL_GATEWAY : "evil-gw-from-tampered-file" ,
214206 NODE_OPTIONS : "--require=/tmp/evil.js" ,
215207 } ,
@@ -222,9 +214,11 @@ runCredentialMigrationTest(
222214 const onboard = await host . command ( "node" , [ CLI_ENTRYPOINT , "onboard" , "--non-interactive" ] , {
223215 artifactName : "onboard-from-legacy-credentials" ,
224216 env : testEnv ( home , {
225- ...hostedInferenceEnvWithoutCredential ,
226217 NEMOCLAW_SANDBOX_NAME : SANDBOX_NAME ,
227218 NEMOCLAW_RECREATE_SANDBOX : "1" ,
219+ // Keep the default NVIDIA provider/key/endpoint/policy path while
220+ // avoiding the high-quota default Nemotron validation model.
221+ NEMOCLAW_MODEL : CREDENTIAL_MIGRATION_MODEL ,
228222 } ) ,
229223 redactionValues : [ migratedCredentialValue ] ,
230224 timeoutMs : ONBOARD_TIMEOUT_MS ,
@@ -253,10 +247,9 @@ runCredentialMigrationTest(
253247 . split ( / \r ? \n / )
254248 . map ( ( line ) => line . trim ( ) )
255249 . filter ( ( line ) => / ^ [ a - z A - Z ] [ a - z A - Z 0 - 9 _ - ] * $ / . test ( line ) ) ;
256- expect (
257- providerNames ,
258- `expected migrated ${ hostedInference . providerName } provider\n${ providersText } ` ,
259- ) . toContain ( hostedInference . providerName ) ;
250+ expect ( providerNames , `expected migrated NVIDIA provider\n${ providersText } ` ) . toContain (
251+ "nvidia-prod" ,
252+ ) ;
260253 expect ( providerNames ) . not . toContain ( "OPENSHELL_GATEWAY" ) ;
261254 expect ( providerNames ) . not . toContain ( "NODE_OPTIONS" ) ;
262255
@@ -299,17 +292,15 @@ runCredentialMigrationTest(
299292 await artifacts . writeJson ( "scenario-result.json" , {
300293 id : "credential-migration" ,
301294 sandboxName : SANDBOX_NAME ,
302- model : hostedInference . model || CREDENTIAL_MIGRATION_MODEL ,
303- provider : hostedInference . providerName ,
304- credentialEnv : hostedInference . credentialEnv ,
295+ model : CREDENTIAL_MIGRATION_MODEL ,
305296 providerNames,
306297 assertions : {
307298 onboardSucceeded : onboard . exitCode === 0 ,
308299 migrationNoticeEmitted : onboardText . includes (
309300 "Staged 1 legacy credential(s) for migration to the OpenShell gateway." ,
310301 ) ,
311302 legacyFileRemovedAfterOnboard : ! fs . existsSync ( legacyFile ) ,
312- migratedProviderRegistered : providerNames . includes ( hostedInference . providerName ) ,
303+ migratedNvidiaProviderRegistered : providerNames . includes ( "nvidia-prod" ) ,
313304 tamperedKeysExcluded :
314305 ! providerNames . includes ( "OPENSHELL_GATEWAY" ) && ! providerNames . includes ( "NODE_OPTIONS" ) ,
315306 credentialsListReadsGateway : credentialsText . includes (
0 commit comments