Merge branch 'pr-1620' into integration/validation-batch

This commit is contained in:
Alex Newman
2026-04-06 14:19:02 -07:00
2 changed files with 18 additions and 1 deletions
+15
View File
@@ -49,6 +49,12 @@ describe('Tag Stripping Utilities', () => {
const result = stripMemoryTagsFromPrompt(input);
expect(result).toBe('public end');
});
it('should strip <persisted-output> tags', () => {
const input = 'public <persisted-output>large output</persisted-output> after';
const result = stripMemoryTagsFromPrompt(input);
expect(result).toBe('public after');
});
});
describe('multiple tags handling', () => {
@@ -230,6 +236,15 @@ finish`;
const parsed = JSON.parse(result);
expect(parsed.output).toBe('result ');
});
it('should strip persisted-output tags from JSON', () => {
const jsonContent = JSON.stringify({
output: '<persisted-output>big output</persisted-output> keep'
});
const result = stripMemoryTagsFromJson(jsonContent);
const parsed = JSON.parse(result);
expect(parsed.output).toBe(' keep');
});
});
describe('edge cases', () => {