mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-18 22:24:17 +01:00
/ship no longer reports zero blockers when the second-model review found one (GST-3075) (#4485)
When /ship stopped on a second-model review finding marked "Blocks: yes", the record it left on the PR said no blockers were found; now the finding is counted and /ship will not write that record until it is fixed or ruled. Why: `ready` and the merge step trust that record, so an undercount let a blocked PR look clean. Nothing to do: the next /ship run logs Step 11's findings and checks them before writing. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: h2p1/red-team#1 reader=red-team Review-Finding: h2p1/red-team#2 reader=red-team Review-Finding: h2p1/red-team#3 reader=red-team Review-Finding: v1/outside-voice#1 reader=outside-voice
This commit is contained in:
1 parent
bbf48aa7ef
commit
07611a00a7
19 files changed
+190
-16
No files matched your search
@@ -336,6 +336,7 @@ gstack_result_anchor() {
|
||||
REVIEW_SCOPE_LEDGER) printf '%s' 'review-scope-ledger' ;;
|
||||
RECEIPT_CARRY_REFUSED) printf '%s' 'receipt-carry-refused' ;;
|
||||
PROSE_LINT_FOUND) printf '%s' 'prose-lint-found' ;;
|
||||
RECEIPT_BLOCKER_OPEN) printf '%s' 'receipt-blocker-open' ;;
|
||||
REVIEW_LOOP_EXCEPTION_INVALID) printf '%s' 'review-loop-exception-invalid' ;;
|
||||
CI_CARRY_RERUN_MALFORMED) printf '%s' 'ci-carry-rerun-malformed' ;;
|
||||
RECEIPT_CARRY_TREE_MISMATCH) printf '%s' 'receipt-carry-tree-mismatch' ;;
|
||||
|
||||
@@ -51,7 +51,7 @@ import { approvalForReceipt } from '../lib/approval-citations';
|
||||
import {
|
||||
CARRY_METADATA_GLOBS, CARRY_NAMED_PATHS, CARRY_TEST_GLOBS,
|
||||
bindReceipt, carryReceipt, recheckCarried, classifyCarryPath, computeCensus, extractReceipt, landedStackParent, missingIssueLines, orderReceipt, parseReviewLoop, placeReceipt, planCarry, planTreeCarry,
|
||||
receiptIssuesFrom, receiptRuns, receiptSummaryLine, renderCensus, renderReceiptBlock, validateReceipt, type CensusPr,
|
||||
receiptIssuesFrom, receiptRuns, receiptSummaryLine, renderCensus, renderReceiptBlock, unruledOpenBlockers, validateReceipt, type CensusPr,
|
||||
} from '../lib/ship-receipt';
|
||||
import { checkDocsCaps, docsCapLine, docsExceptionLine, parseReceiptDocs } from '../lib/ship-receipt-docs';
|
||||
import { comparePath, contextPacket, PACKET_SECTION_CAP, readScopedReview, touchedPaths } from '../lib/ship-patch';
|
||||
@@ -367,6 +367,8 @@ function cmdWrite(rest: string[], json: boolean): number {
|
||||
const loopRaw = jsonArg(flag(rest, '--review-loop'));
|
||||
const reviewLoop = loopRaw ? parseReviewLoop(loopRaw) : undefined;
|
||||
if (loopRaw && !reviewLoop) throw new Error('--review-loop needs integer passes, blocking_found and deferred (gstack-review-scope summary --out <file>, then @<file>)');
|
||||
const open = unruledOpenBlockers(loopRaw, ruledNotes, ruledHead => spawnSync('git', ['merge-base', '--is-ancestor', ruledHead, headSha ?? head], { cwd: repoRoot, timeout: 30_000 }).status === 0);
|
||||
if (open.length) { process.stderr.write(resultLineWithDocs('gstack-ship-receipt write', 'RECEIPT_BLOCKER_OPEN', `${open.join(', ')}; nothing written`) + '\n'); return EXIT.refused; }
|
||||
input = {
|
||||
schema_version: 1, pr: flag(rest, '--pr') !== undefined ? Number(flag(rest, '--pr')) : undefined, head,
|
||||
version: flag(rest, '--version') ?? receiptVersion(repoRoot, head, base), base,
|
||||
|
||||
Reference in new issue
Block a user