fix(node): mirror orphaned wrapper protection
This commit is contained in:
1 parent
384f3053c0
commit
30257b2c76
2 files changed
+40
-3
No files matched your search
@@ -197,6 +197,24 @@ test('Auggie rejects orphaned and mismatched runtime identities before writes',
|
||||
}
|
||||
});
|
||||
|
||||
await t.test('orphaned wrapper', async () => {
|
||||
const fixture = await createFixture();
|
||||
try {
|
||||
await mkdir(fixture.agentDir, { recursive: true });
|
||||
await writeFile(fixture.guardWrapperPath, 'orphaned wrapper\n');
|
||||
const result = await fixture.install();
|
||||
assert.equal(result.code, 1);
|
||||
assert.match(result.stderr, /identity cannot be verified/i);
|
||||
assert.equal(
|
||||
await readFile(fixture.guardWrapperPath, 'utf-8'),
|
||||
'orphaned wrapper\n',
|
||||
);
|
||||
await assertMissing(fixture.settingsPath);
|
||||
} finally {
|
||||
await fixture.close();
|
||||
}
|
||||
});
|
||||
|
||||
await t.test('mismatched identity', async () => {
|
||||
const fixture = await createFixture();
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user