Skip to content

Commit c7bad0f

Browse files
committed
Pin tool-output URI prompt to a named truncation notice
Loose /named/i matchers still passed if the URI sentence dropped "named one", because harness facts already mention named specialists.
1 parent a364fcf commit c7bad0f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/prompts.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,17 @@ test("harness facts gate tool-output URI reads on a named truncation notice", ()
9292
expect(facts).toContain("read_file");
9393
expect(facts).toMatch(/filesystem path/i);
9494
expect(facts).toMatch(/tool-output:\/\//);
95-
expect(facts).toMatch(/truncat/i);
96-
expect(facts).toMatch(/named/i);
95+
expect(facts).toContain("truncation notice on that result named one");
96+
expect(facts).toContain("do not re-read a complete inline result");
9797
expect(facts).not.toMatch(/prefer the URI/i);
9898
expect(facts).not.toMatch(/re-reading huge blobs/i);
99-
expect(facts).toMatch(/complete inline/i);
10099
});
101100

102101
test("read_file catalog summary gates tool-output URI reads on truncation", () => {
103102
const listed = buildAvailableTools(["read_file"]);
104103
expect(listed).toContain("read_file");
105104
expect(listed).toMatch(/tool-output:\/\//);
106-
expect(listed).toMatch(/truncat/i);
107-
expect(listed).toMatch(/named/i);
105+
expect(listed).toContain("truncation notice named one");
108106
expect(listed).toContain("cat/head/tail");
109107
expect(listed).not.toMatch(/prefer the URI/i);
110108
});

0 commit comments

Comments
 (0)