Repair native launcher skill rename and fail-closed regression coverage (#1498)
This commit is contained in:
@@ -74,7 +74,7 @@ for file in "${CONTEXT_FILES[@]}"; do
|
||||
[ -f "$file" ] && [ -r "$file" ] && [ -s "$file" ] || fail "missing, unreadable or empty context: $file"
|
||||
done
|
||||
SKILLS=(ms-tools ms-file-read ms-file-write ms-conductor ms-communications
|
||||
ms-agent-watch ms-sdlc ms-proactive-agent ms-goal ms-unslop)
|
||||
ms-watch ms-sdlc ms-proactive-agent ms-goal ms-unslop)
|
||||
SKILL_ARGS=()
|
||||
for skill in "${SKILLS[@]}"; do
|
||||
[ -s "$REPO/skills/$skill/SKILL.md" ] || fail "missing skill: $skill"
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user