feat: complete native BOM and Harness execution acceptance
This commit is contained in:
1 parent
4f8fbd7806
commit
65438cb7e5
234 files changed
+24402
-865
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/** Model-free integration check of the runtime observer's official executor path. */
|
||||
import {mkdir,writeFile} from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import {bootRuntime} from '../integration/dsh/start.mjs';
|
||||
import {verifyShell} from './acceptance_runtime_state.mjs';
|
||||
const [root,python]=process.argv.slice(2);
|
||||
for(const key of ['DSH_API_KEY','DSH_API_BASE','DSH_MODEL','DX_DSH_MODELS'])delete process.env[key];
|
||||
process.env.DX_DSH_HOME=path.join(root,'home');
|
||||
process.env.DX_DSH_CONTEXT_FILE=path.join(root,'context.json');
|
||||
process.env.DX_ACCEPTANCE_PYTHON=python;
|
||||
await writeFile(process.env.DX_DSH_CONTEXT_FILE,'{"task_id":"","revision":"shell-preflight"}');
|
||||
const profile=path.join(process.env.DX_DSH_HOME,'profiles/dx-task');
|
||||
await mkdir(profile,{recursive:true});
|
||||
await writeFile(path.join(profile,'cordis.patch.yml'),JSON.stringify([{id:'pwsh-sandbox',config:{pwshPath:path.join(process.env.SystemRoot,'System32/WindowsPowerShell/v1.0/powershell.exe')}}]));
|
||||
const {ctx,shutdown}=await bootRuntime({announce:false});
|
||||
try{
|
||||
const workspace=process.env.DX_DSH_WORKSPACE;
|
||||
const proof=await verifyShell(ctx,workspace,ctx.sandboxPolicy.resolve());
|
||||
console.log(JSON.stringify(proof));if(!proof.passed)process.exitCode=1;
|
||||
}finally{await shutdown.shutdown(0);}
|
||||
Reference in new issue
Block a user