test(skills): регресс ложного успеха через fake-платформу + гейт runtimeOnly

Кейсы с .cmd-заглушкой платформы (Start-Process исполняет .cmd) проверяют, что
db-create/db-run/db-dump-cf не рапортуют успех, когда платформа вышла с 0/умерла
без артефакта. Гейт runtimeOnly пропускает кейс на несовместимом порту (py
list-exec не запускает .cmd) — гоняются под powershell на Windows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-07-19 18:52:25 +03:00
co-authored by Claude Opus 4.8
parent 4b6ffc595e
commit b8e141e7ce
4 changed files with 33 additions and 0 deletions
@@ -0,0 +1,9 @@
{
"name": "Ложный успех: платформа вернула 0 без 1Cv8.1CD (fake platform)",
"runtimeOnly": "powershell",
"preRun": [
{ "writeFile": { "path": "fake.cmd", "content": "@echo off\r\nexit /b 0\r\n" } }
],
"args_extra": ["-V8Path", "{workDir}\\fake.cmd", "-InfoBasePath", "{workDir}\\ib"],
"expectError": true
}
@@ -0,0 +1,9 @@
{
"name": "Ложный успех: платформа вернула 0 без выходного файла (fake platform)",
"runtimeOnly": "powershell",
"preRun": [
{ "writeFile": { "path": "fake.cmd", "content": "@echo off\r\nexit /b 0\r\n" } }
],
"args_extra": ["-V8Path", "{workDir}\\fake.cmd", "-InfoBasePath", "{workDir}\\ib", "-OutputFile", "{workDir}\\out.cf"],
"expectError": true
}
@@ -0,0 +1,9 @@
{
"name": "Ранний выход: процесс умер в контрольном окне, не должно быть launched (fake platform)",
"runtimeOnly": "powershell",
"preRun": [
{ "writeFile": { "path": "fake.cmd", "content": "@echo off\r\nexit /b 1\r\n" } }
],
"args_extra": ["-V8Path", "{workDir}\\fake.cmd", "-InfoBasePath", "{workDir}\\ib"],
"expectError": true
}
+6
View File
@@ -539,6 +539,12 @@ async function runCaseAsync(testCase, opts) {
let workDir = null;
let inputFile = null;
// runtimeOnly: gate a case to a single port (e.g. a .cmd fake platform only runs via
// PowerShell's Start-Process; python's list-exec can't launch it). Skipped elsewhere.
if (caseData.runtimeOnly && caseData.runtimeOnly !== opts.runtime) {
return { id: testCase.id, skill: testCase.skillDir, name: testCase.name, passed: true, skipped: true, errors: [], elapsed: '0.0s' };
}
try {
const skillCasesDir = join(CASES, testCase.skillDir);
const fixturePath = ensureSetup(setupName, opts.runtime, skillCasesDir);