mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-25 09:31:43 +01:00
Hash manifests no longer keep excluded results files in review, and the data-file scan cap can be raised (HARN-64) (#4643)
A results PR whose `pins.sha256` lists its data files now gets `review_exclude_paths` instead of a refused 13.3 MB review, and hash-manifest lines no longer read as money, auth or data for review depth. Why: harness-evals #538 kept all 2,140 excluded result files in review because the name scan timed out on a 2,140-path manifest and would have counted that manifest as code anyway. Nothing to do; `GSTACK_REVIEW_CONSUMER_SCAN_CAP` is a new optional override. 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: p1/outside-voice#1 reader=outside-voice
This commit is contained in:
1 parent
973b49eabb
commit
8d0e827cc3
11 files changed
+184
-25
No files matched your search
@@ -415,7 +415,14 @@ function but a same-file `url(#id)`, which closes `@import`, `image-set()`,
|
||||
`href` a same-file `#` reference or an inline raster image, no event handler and no
|
||||
entity declaration, and no DOCTYPE but a bare `<!DOCTYPE svg>` or W3C's own SVG DTD, read after character references are decoded. A `<style>` element's text is read as written. Any `&` in it keeps the SVG code, its comments are read as CSS, an opening tag it cannot read as quoted `name="value"` pairs keeps the SVG code, and only ASCII whitespace may come before the `>` of either tag, so no character-reference `</style>`, comment that only an HTML parser ends early, quoted `>` or Unicode space can hide CSS. A non-ASCII character in an element or attribute name, such as a `gé:` prefix, keeps the SVG code too (GST-940); anything else, a
|
||||
script or `foreignObject` included, keeps it code. More than
|
||||
2,000 data paths keep every one code; a `git grep` failure is `consumer_scan_failed`
|
||||
2,000 data paths keep every one code (`GSTACK_REVIEW_CONSUMER_SCAN_CAP` raises the count, a whole
|
||||
number; an empty, zero, negative or non-numeric value keeps 2,000), and the plan then prints a
|
||||
`CONSUMER_SCAN: skipped:` line naming both ways out: raise the cap or move the data into its own PR.
|
||||
The cap is read from the environment, not recorded in the receipt, so a raised cap must also be set
|
||||
wherever depth is recomputed (`gstack-ship-receipt carry` and the merge queue); without it they read
|
||||
2,000, find a deeper depth than the receipt's and refuse it (`RECEIPT_CARRY_REFUSED`).
|
||||
The cap counts files before `review_exclude_paths` applies, because the exclusion's own name scan reads
|
||||
the depth this scan decides, and it changes only depth: excluded files still stay out of the readers' diffs; a `git grep` failure is `consumer_scan_failed`
|
||||
and fails the depth closed. The scan first lists the files that contain a candidate's
|
||||
extension and then searches only those, docs files left out, so a large data tree
|
||||
costs one cheap pass. Each scan gets one 120-second deadline, set in milliseconds with
|
||||
|
||||
+7
-2
@@ -1526,8 +1526,13 @@ harness that writes the receipts names it) keeps nothing: the plan prints an
|
||||
informational `REVIEW_EXCLUDE_REFERENCE:` line naming the code that reads the
|
||||
folder. A data file never keeps another file: a results manifest such as
|
||||
`docs/receipts-manifest.json` lists every receipt by full path, and it is
|
||||
content, not a program that reads them. The name scan is an uncapped `git grep -F -f` of the candidates'
|
||||
paths over the consumer files alone (the head's and the merge base's trees filtered to code and tests and written into a
|
||||
content, not a program that reads them. A hash or pin manifest names nothing either (HARN-64:
|
||||
harness-evals #538's `pins.sha256` listed all 2,140 receipts): a file whose every non-blank line is a
|
||||
hex digest of 32 to 128 characters, one or two spaces, an optional `*` and a path made only of letters,
|
||||
digits and `. / _ - + @ ~`, as `sha256sum` writes it. Any other line, code or prose, makes it a consumer
|
||||
again, and its lines still count for the secret risk class. The name scan is an uncapped `git grep -F -l -f` of the candidates'
|
||||
paths, which lists the consumer files holding any of them, followed by a read of each such file
|
||||
(`git grep -o` with thousands of paths ran past its 120-second bound on #538), over the consumer files alone (the head's and the merge base's trees filtered to code and tests and written into a
|
||||
scratch index that one `git grep` per tree reads), never the data under the patterns, so its cost follows the code a results PR
|
||||
can be read by and not the receipts it adds (GST-1435), and its git calls stay the same however many files the tree holds
|
||||
(GST-1442); it is not the collector's capped consumer scan.
|
||||
|
||||
Reference in new issue
Block a user