mirror of
https://github.com/garrytan/gstack.git
synced 2026-12-02 04:43:59 +01:00
Let /gstack-ship handle very large results PRs (GST-4003) (#4847)
`/gstack-ship` now works on results PRs with tens of thousands of files and hundreds of megabytes of diff: more exclusion patterns, a secrets check with no size limit, a faster review plan and docs check, and bulleted ruled notes. Why: two 16,000-file results PRs hit each of these limits in real runs. Nothing to do: existing policies keep working unchanged. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p2/adversarial-native#1 reader=adversarial-native Review-Finding: p2/outside-voice#1 reader=outside-voice Review-Finding: p2/outside-voice#2 reader=outside-voice Review-Finding: p2/outside-voice#3 reader=outside-voice Review-Finding: p2/outside-voice#4 reader=outside-voice Review-Finding: p2/specialist-batched#2 reader=specialist-batched
This commit is contained in:
1 parent
0febbce1e4
commit
77da8a0160
21 files changed
+756
-101
No files matched your search
@@ -62,7 +62,7 @@ import { RISK_CLASSES, type RiskClass } from '../lib/review-risk';
|
||||
import { checkReceiptProse, proseLine } from '../lib/ship-receipt-prose';
|
||||
import { resolveStateRoot } from '../lib/state-root';
|
||||
import { readPause, receiptBaseRed } from '../lib/base-red';
|
||||
import { publicRuledNote, readRuledNotes, ruledNoteText } from '../lib/ruled-notes';
|
||||
import { bodyListsLine, publicRuledNote, readRuledNotes, ruledNoteText } from '../lib/ruled-notes';
|
||||
import { appliedGateDispositions, gateDispositionText, publicGateDisposition } from '../lib/gate-dispositions';
|
||||
import { securityFingerprints } from '../lib/security-findings';
|
||||
import { laneExceptionBodyLines } from '../lib/test-lane-exception';
|
||||
@@ -304,7 +304,7 @@ async function cmdWrite(rest: string[], json: boolean): Promise<number> {
|
||||
const leaked = securityFingerprints(bodyText);
|
||||
if (leaked.length) { process.stderr.write(resultLine('gstack-ship-receipt write', 'RECEIPT_INVALID', `${bodyFile} names security finding ${leaked.join(', ')}: a PR body is public, so a security finding appears only as the redacted line gstack-approvals rulings, dispositions or gstack-review-scope render prints, and its location and reason stay in the private record (docs/troubleshooting.md#security-finding-in-body); nothing written`) + '\n'); return EXIT.fail; }
|
||||
const ruledNotes = readRuledNotes(repoRoot);
|
||||
const unlisted = bodyFile ? ruledNotes.map(n => `Ruled note: ${ruledNoteText(n)}`).find(l => !bodyText.split(/\r?\n/).some(b => b.trim() === l)) : undefined;
|
||||
const unlisted = bodyFile ? ruledNotes.map(n => `Ruled note: ${ruledNoteText(n)}`).find(l => !bodyListsLine(bodyText, l)) : undefined;
|
||||
if (unlisted) { process.stderr.write(resultLine('gstack-ship-receipt write', 'RECEIPT_INVALID', `${bodyFile} does not list ruled note ${JSON.stringify(unlisted)} (gstack-approvals rulings prints each line the body carries); nothing written`) + '\n'); return EXIT.fail; }
|
||||
let gateDispositions: ReturnType<typeof appliedGateDispositions>['applied'];
|
||||
try { gateDispositions = appliedGateDispositions(repoRoot, { pin: 'HEAD' }).applied; }
|
||||
|
||||
Reference in new issue
Block a user