


























@@ -889,6 +889,86 @@ describe("barnacle-auto-response", () => {
889889expect(calls.removeLabel).toEqual([expectedRemoveLabel(123, PROOF_SUFFICIENT_LABEL)]);
890890});
891891892+it("preserves stale sufficient proof while ClawSweeper automerge owns the PR", async () => {
893+const { calls, github } = barnacleGithub([file("src/gateway/server.ts")]);
894+895+await runBarnacleAutoResponse({
896+ github,
897+context: barnacleContext(
898+{
899+head: {
900+ref: "fix/memory-search-event-loop-yield-81172",
901+sha: "0ede3d716805e7d2ced8df37c6666af510dc9e19",
902+},
903+body: realBehaviorProofBody(
904+"",
905+),
906+},
907+[PROOF_SUPPLIED_LABEL, PROOF_SUFFICIENT_LABEL, "clawsweeper:automerge"],
908+{ action: "synchronize" },
909+),
910+core: {
911+info: () => undefined,
912+},
913+});
914+915+expect(calls.removeLabel).toEqual([]);
916+});
917+918+it("preserves stale sufficient proof on ClawSweeper branch updates", async () => {
919+const { calls, github } = barnacleGithub([file("src/gateway/server.ts")]);
920+921+await runBarnacleAutoResponse({
922+ github,
923+context: barnacleContext(
924+{
925+head: {
926+ref: "clawsweeper/repair-pr-83758",
927+sha: "0ede3d716805e7d2ced8df37c6666af510dc9e19",
928+},
929+body: realBehaviorProofBody(
930+"",
931+),
932+},
933+[PROOF_SUPPLIED_LABEL, PROOF_SUFFICIENT_LABEL],
934+{ action: "synchronize" },
935+),
936+core: {
937+info: () => undefined,
938+},
939+});
940+941+expect(calls.removeLabel).toEqual([]);
942+});
943+944+it("preserves stale sufficient proof on ClawSweeper-authored PR updates", async () => {
945+const { calls, github } = barnacleGithub([file("src/gateway/server.ts")]);
946+947+await runBarnacleAutoResponse({
948+ github,
949+context: barnacleContext(
950+{
951+body: realBehaviorProofBody(
952+"",
953+),
954+user: {
955+login: "clawsweeper[bot]",
956+type: "Bot",
957+},
958+},
959+[PROOF_SUPPLIED_LABEL, PROOF_SUFFICIENT_LABEL],
960+{ action: "synchronize" },
961+),
962+core: {
963+info: () => undefined,
964+},
965+});
966+967+expect(calls.removeLabel).not.toContainEqual(
968+expect.objectContaining({ name: PROOF_SUFFICIENT_LABEL }),
969+);
970+});
971+892972it("preserves ClawSweeper's sufficient proof label on ordinary label events", async () => {
893973const { calls, github } = barnacleGithub([file("src/gateway/server.ts")]);
894974此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。