MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / createDiffComparisonPrompt

Function createDiffComparisonPrompt

tests/judgeConsistency.test.ts:65–76  ·  view source on GitHub ↗

* Helper to create the user prompt for diff comparison. * Uses the same prompt creation functions as production.

(
  diffPair: DiffPair,
  scoreType: "logic-equivalence" | "api-signature",
)

Source from the content-addressed store, hash-verified

63 * Uses the same prompt creation functions as production.
64 */
65function createDiffComparisonPrompt(
66 diffPair: DiffPair,
67 scoreType: "logic-equivalence" | "api-signature",
68): string {
69 const { reference, candidate } = diffPair;
70
71 if (scoreType === "logic-equivalence") {
72 return createLogicEquivalencePrompt(reference, candidate);
73 } else {
74 return createApiSignaturePrompt(reference, candidate);
75 }
76}
77
78/**
79 * Run consistency test: evaluate the same diff pair N times and check results.

Callers 1

testConsistencyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected