chore: add positive proof labels (#78117)

This commit is contained in:
pashpashpash
2026-05-05 16:10:17 -07:00
committed by GitHub
parent a4c860a70c
commit 33c42c8d3b
5 changed files with 195 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ import {
MOCK_ONLY_PROOF_LABEL,
NEEDS_REAL_BEHAVIOR_PROOF_LABEL,
PROOF_OVERRIDE_LABEL,
PROOF_SUPPLIED_LABEL,
evaluateRealBehaviorProof,
labelsForRealBehaviorProof,
} from "../../scripts/github/real-behavior-proof-policy.mjs";
@@ -56,7 +57,26 @@ describe("real-behavior-proof-policy", () => {
});
expect(evaluation.status).toBe("passed");
expect(labelsForRealBehaviorProof(evaluation)).toEqual([]);
expect(labelsForRealBehaviorProof(evaluation)).toEqual([PROOF_SUPPLIED_LABEL]);
});
it("passes CRLF-formatted external PRs with screenshot proof", () => {
const evaluation = evaluateRealBehaviorProof({
pullRequest: externalPr(
proofBody("![after](https://github.com/user-attachments/assets/gateway-ready)").replace(
/\n/g,
"\r\n",
),
),
});
expect(evaluation.status).toBe("passed");
expect(evaluation.fields).toMatchObject({
behavior: "Gateway startup no longer drops the configured Discord channel.",
evidence: "![after](https://github.com/user-attachments/assets/gateway-ready)",
observedResult: "The gateway stayed connected and the Discord channel showed ready.",
});
expect(labelsForRealBehaviorProof(evaluation)).toEqual([PROOF_SUPPLIED_LABEL]);
});
it("fails external PRs without a real behavior proof section", () => {