You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 537fa69
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pr): bind review artifacts to the PR being landed
scripts/pr review artifacts carried no PR identity, so a review authored for
another PR validated clean and could gate someone else's landing. Stamp both
review.json and review.md with the reviewed PR number and head, anchor
pr-meta.json to the guarded pr-meta.env, and re-stamp foreign artifacts on init
instead of silently adopting them. review-claim now works in the PR worktree so
no subcommand writes review state to the shared canonical checkout.
`Review artifact identity mismatch in .local/review.json: authored for PR #${stamp.number} at ${stamp.headSha}, but .local/pr-meta.json describes PR #${prMeta.number} at ${prMeta.headRefOid}; re-run scripts/pr review-artifacts-init`,
169
+
);
170
+
}
171
+
if(prMetaIdentifiesHead){
172
+
constexpectedLine=reviewIdentityLine({
173
+
number: prMeta.number,
174
+
headSha: prMeta.headRefOid,
175
+
});
176
+
if(reviewMarkdown.split("\n")[0]!==expectedLine){
177
+
add(
178
+
`Review artifact identity mismatch in .local/review.md: first line must be ${jsonValue(expectedLine)}; re-run scripts/pr review-artifacts-init`,
179
+
);
180
+
}
181
+
}
182
+
103
183
constrecommendationIsString=requireType(
104
184
typeofvalue.recommendation==="string",
105
185
"Invalid recommendation in .local/review.json: recommendation must be a string",
`Usage: review-artifacts.mjs ${command} <pr-number> <head-sha>; pr-number must be a positive integer and head-sha a 40-character lowercase hex commit id.`,
echo"Review artifact identity mismatch: .local/pr-meta.json describes PR #$meta_number at $meta_head, which does not match .local/pr-meta.env. Re-run: scripts/pr review-init"
0 commit comments