Repair native launcher skill rename and fail-closed regression coverage (#1498)

This commit is contained in:
2026-09-08 18:12:20 -05:00
parent 12ff5da7df
commit f3dce32088
9 changed files with 62 additions and 14 deletions
+11
View File
@@ -48,6 +48,15 @@ fs.writeFileSync('capture.json', JSON.stringify({args: process.argv.slice(2), ag
assert.match(direct.stdout, /configuration checks passed/);
assert.notEqual(launch('--auth account --check', false).status, 0);
assert.equal(existsSync(join(root, '.pi/state')), false);
const watchSkill = join(root, 'skills/ms-watch/SKILL.md');
const watchContent = readFileSync(watchSkill, 'utf8');
rmSync(watchSkill);
const missingSkill = launch('--check', false);
assert.notEqual(missingSkill.status, 0);
assert.match(missingSkill.stderr, /missing skill: ms-watch/);
assert.equal(existsSync(join(root, '.pi/state')), false);
assert.equal(existsSync(join(root, 'capture.json')), false);
writeFileSync(watchSkill, watchContent);
ok(launch());
let captured = JSON.parse(readFileSync(join(root, 'capture.json')));
assert.equal(captured.incarnation, undefined);
@@ -60,6 +69,8 @@ fs.writeFileSync('capture.json', JSON.stringify({args: process.argv.slice(2), ag
assert.ok(captured.args.includes('--no-context-files'));
assert.ok(captured.args.includes('--no-skills'));
assert.equal(captured.args.filter(arg => arg === '--skill').length, 10);
assert.ok(captured.args.includes(join(root, 'skills/ms-watch')));
assert.equal(captured.args.includes(join(root, 'skills/ms-agent-watch')), false);
assert.ok(captured.args[captured.args.indexOf('--tools') + 1].includes('goal_report'));
const firstPrompt = captured.args[captured.args.indexOf('--append-system-prompt') + 1];
const context = readFileSync(firstPrompt, 'utf8');