mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Fix cross-issue regressions found during post-0.4.4 merge review:\n\n- preserve permission mode across clear and empty-session replacement flows\n- keep provider effort passthrough and context-window estimates aligned with runtime metadata\n- invalidate recent project caches and trace message signatures when sessions change\n- recognize Windows ARM64 unpacked package-smoke output\n\nTested: bun test scripts/quality-gate/package-smoke/index.test.ts scripts/quality-gate/runner.test.ts\nTested: bun run check:desktop\nTested: bun run check:server\nConfidence: high\nScope-risk: moderate
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
#!/usr/bin/env bun
|
|
|
|
import { spawnSync } from 'node:child_process'
|
|
|
|
export function currentPackageSmokePlatform(platform: NodeJS.Platform = process.platform) {
|
|
if (platform === 'darwin') return 'macos'
|
|
if (platform === 'win32') return 'windows'
|
|
if (platform === 'linux') return 'linux'
|
|
return null
|
|
}
|
|
|
|
export function currentPackageSmokeArch(arch: NodeJS.Architecture = process.arch) {
|
|
return arch === 'arm64' || arch === 'x64' ? arch : null
|
|
}
|
|
|
|
if (import.meta.main) {
|
|
const platform = currentPackageSmokePlatform()
|
|
if (!platform) {
|
|
console.log(`[package-smoke] skipping unsupported host platform: ${process.platform}`)
|
|
process.exit(0)
|
|
}
|
|
|
|
const args = [
|
|
'run',
|
|
'test:package-smoke',
|
|
'--platform',
|
|
platform,
|
|
'--package-kind',
|
|
'dir',
|
|
'--artifacts-dir',
|
|
'desktop/build-artifacts/electron',
|
|
]
|
|
const arch = currentPackageSmokeArch()
|
|
if (arch) {
|
|
args.push('--arch', arch)
|
|
}
|
|
|
|
const result = spawnSync('bun', args, {
|
|
stdio: 'inherit',
|
|
})
|
|
process.exit(result.status ?? 1)
|
|
}
|