The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
fix(test): allow background native preparation in npm acceptance
qindong6145956f63b3
diff --git a/scripts/smoke-npm-package.mjs b/scripts/smoke-npm-package.mjsindex 4028203e..191b381f 100644--- a/scripts/smoke-npm-package.mjs+++ b/scripts/smoke-npm-package.mjs@@ -5,7 +5,7 @@ import path from 'node:path';import { fileURLToPath } from 'node:url';import { acceptTransport, protocolClient, testPort } from './smoke-test-package.mjs';import { canonical, relativePath, runFile, sha256 } from './runtime-assets.mjs';-import { nativeConfiguration } from './npm-runtime.mjs';+import { nativeConfiguration, nativeRuntimeStatus } from './npm-runtime.mjs';export async function smokeNpm(filename, codexJS) {filename = path.resolve(filename); codexJS = path.resolve(codexJS);@@ -46,14 +46,17 @@ export async function smokeNpm(filename, codexJS) {const installed = JSON.parse(await runFile(process.execPath, [codexJS, 'mcp', 'get', 'openmotion', '--json'], { env, cwd: project }));assert.equal(installed.transport.command, process.execPath); assert.deepEqual(installed.transport.args, [first.launcher]);const native = await nativeConfiguration(first.appRoot);- await assert.rejects(access(path.join(home, 'cache/native')), { code: 'ENOENT' });- // Three sequential native downloads each have a five-minute bound; allow extraction as well.+ // Setup already starts background preparation, so the cache can be present or ready.+ const nativeStatusAfterSetup = await nativeRuntimeStatus(first.appRoot);+ assert.equal(nativeStatusAfterSetup.managed, true);+ assert.deepEqual(nativeStatusAfterSetup.components.map(component => component.id), native.components);+ // Native downloads have a five-minute bound; allow lock waiting and extraction as well.await runFile(process.execPath, [npm, 'exec', '--yes', '--package', candidate, '--', 'openmotion', 'prepare', '--home', home], { env, cwd: project, timeout: 16 * 60_000 });const reportFile = path.join(path.dirname(filename), `smoke-npm-${target}.json`);const report = await acceptTransport({ transport: { ...installed.transport, cwd: first.appRoot },env: { ...env, PATH: process.platform === 'win32' ? path.join(process.env.SystemRoot, 'System32') : '/usr/bin:/bin' }, data,metadata: { ...manifest, target }, archive: installer, ffmpeg: native.paths.HYPERFRAMES_FFMPEG_PATH, reportFile,- installation: { format: 'npm', applicationSHA256: manifest.application.sha256, npmLockSHA256: manifest.locks.npm, nativeLockSHA256: manifest.locks.native, repeatInstall: 'passed', nativeSkills: 'passed', setupDefersNativeDownload: 'passed', explicitNativePreparation: 'passed', bundledApplicationInstall: 'passed', isolatedDirectory: out } });+ installation: { format: 'npm', applicationSHA256: manifest.application.sha256, npmLockSHA256: manifest.locks.npm, nativeLockSHA256: manifest.locks.native, repeatInstall: 'passed', nativeSkills: 'passed', nativeStatusAfterSetup, explicitNativePreparation: 'passed', bundledApplicationInstall: 'passed', isolatedDirectory: out } });const before = await readFile(path.join(native.cache, 'browser-' + native.info.browser.sha256, 'ready.json'), 'utf8');await runFile(process.execPath, [npm, 'exec', '--yes', '--package', candidate, '--', 'openmotion', 'prepare', '--home', home], { env, cwd: project });assert.equal(await readFile(path.join(native.cache, 'browser-' + native.info.browser.sha256, 'ready.json'), 'utf8'), before);