Skip to content

Commit 50063d4

Browse files
fix(review): require relevant support evidence
1 parent 2367832 commit 50063d4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ export function sessionBrief(
15431543
.filter((item): item is JsonObject => Boolean(item) && typeof item === "object" && !Array.isArray(item))
15441544
.map((item) => String(item.filename || "").trim())
15451545
.filter(Boolean);
1546-
let instruction = "This run is evidence-backed. The trusted worker embedded review_context in the session brief; it is not a separate repository file. Do not search /workspace for a review_context artifact or report the absence of a separate file as a limitation. Review the changed files in the workspace and cite each one you inspected in the result summary.";
1546+
let instruction = "This run is evidence-backed. The trusted worker embedded review_context in the session brief; it is not a separate repository file. Do not search /workspace for a review_context artifact or report the absence of a separate file as a limitation. Review the changed files in the workspace and cite each one you inspected in the result summary. Use Read to inspect and cite at least one relevant supporting repository file when one exists; the repository AGENTS.md is relevant supporting context when present because it defines review and contribution constraints. A review intentionally bounded to all changed files plus relevant supporting context is complete, so do not describe the absence of unrelated-file inspection as a limitation.";
15471547
if (changedFiles.length) {
15481548
instruction += ` Changed files supplied by the trusted worker: ${JSON.stringify(changedFiles)}.`;
15491549
}

tests/webhook-adapter.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,9 @@ test("hosted review brief directs failed trusted validation into source-backed f
11191119
assert.match(instruction, /embedded review_context in the session brief/);
11201120
assert.match(instruction, /not a separate repository file/);
11211121
assert.match(instruction, /Do not search \/workspace for a review_context artifact/);
1122+
assert.match(instruction, /Use Read to inspect and cite at least one relevant supporting repository file/);
1123+
assert.match(instruction, /AGENTS\.md is relevant supporting context/);
1124+
assert.match(instruction, /do not describe the absence of unrelated-file inspection as a limitation/);
11221125
assert.match(instruction, /probe\/covencat-live\.mjs/);
11231126
assert.match(instruction, /executed outside the model/);
11241127
assert.match(instruction, /SyntaxError: Unexpected end of input/);

0 commit comments

Comments
 (0)