mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 13:24:55 +01:00
fix(github): prevent duplicate review score headings (#18321)
Clarify the shared GitHub review submission contract for new and existing bots. Remove copied score headings while preserving the structured score and saved assessment. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
59e191c368
commit
5c807d11fa
11 files changed
+156
-7
No files matched your search
@@ -17,7 +17,25 @@ import {
|
||||
toolConnections,
|
||||
} from "@paperclipai/db";
|
||||
import { getEmbeddedPostgresTestSupport, startEmbeddedPostgresTestDatabase } from "../__tests__/helpers/embedded-postgres.js";
|
||||
import { githubGuestBotConnectionForSession } from "./chat-github-tools.js";
|
||||
import { GITHUB_BOT_TOOLS, githubGuestBotConnectionForSession } from "./chat-github-tools.js";
|
||||
|
||||
describe("GitHub review tool contract", () => {
|
||||
it("tells new bots which review sections Paperclip renders", () => {
|
||||
const submit = GITHUB_BOT_TOOLS.find(tool => tool.name === "submit_review")!;
|
||||
const properties = submit.schema.properties!;
|
||||
expect(properties.summary).toMatchObject({
|
||||
description: expect.stringContaining("Review body only"),
|
||||
maxLength: 24000,
|
||||
});
|
||||
expect(properties.summary).toMatchObject({
|
||||
description: expect.stringContaining("Paperclip adds"),
|
||||
});
|
||||
expect(properties.rationale).toMatchObject({
|
||||
description: expect.stringContaining("Do not repeat the summary"),
|
||||
maxLength: 12000,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
const support = await getEmbeddedPostgresTestSupport();
|
||||
(support.supported ? describe : describe.skip)("GitHub guest bot connection discovery", () => {
|
||||
|
||||
Reference in new issue
Block a user