mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 00:21:14 +01:00
Ship policy can mark published data as content, so /ship can review large data PRs (GST-3158) (#4511)
A repo can now list published-data folders under a new `review_content_patterns` ship-policy key, so /ship leaves `.patch` diffs, `MANIFEST.sha256` and extension-less licences out of review, while source files there stay reviewed. Why: gstack-evals #352 is 13.8 MB, 13.6 MB of it published session data, and could never pass /ship's 2 MB review limit. Nothing to do until a repo adds the key to its base-branch policy; a pattern that keeps too many files now stops with `REVIEW_EXCLUDE_KEEP_TOO_LARGE` instead of being dropped. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/red-team#2 reader=red-team Review-Finding: p2full/red-team#1 reader=red-team
This commit is contained in:
1 parent
c25390daa2
commit
f13dbb0d4a
11 files changed
+340
-48
No files matched your search
+28
-5
@@ -4077,18 +4077,41 @@ the base policy commit.
|
||||
the base into the branch and rerun once; if it is still over, split the PR.
|
||||
- **The branch declares the key but the base does not:** only the base copy
|
||||
applies; land that hunk on the base first, as above.
|
||||
- **A pattern was not applied** (`skipped=` on the `REVIEW_EXCLUDE:` line): its kept
|
||||
files need more than 24,000 argument bytes on the reader's keep command (files
|
||||
kept only for a secret line are excerpted and do not count). Narrow the
|
||||
pattern, move the kept files out of it, or split the PR.
|
||||
- **A pattern keeps too many files** stops the plan with
|
||||
[`REVIEW_EXCLUDE_KEEP_TOO_LARGE`](#review-exclude-keep-too-large) before any reader runs.
|
||||
- **Still over after exclusion:** add the printed folders to the base policy, or
|
||||
split the PR. Files kept only for a secret line already count as their
|
||||
split the PR. When published data under a pattern is kept as `code`
|
||||
(`REVIEW_EXCLUDE_KEPT: code …` on `.patch`, `.sha256` or extension-less files),
|
||||
add [`review_content_patterns`](ship-policy.md#review-content-patterns) for it. Files kept only for a secret line already count as their
|
||||
excerpts ([secret-line excerpts](ship-policy.md#secret-line-excerpts)); one in
|
||||
`DIFF_KEEP:` is kept for another reason, and one the excerpt could not be
|
||||
built for moves to the reader's keep command and counts whole.
|
||||
|
||||
There is no override flag. See [the review ceiling](ship-policy.md#review-diff-ceiling).
|
||||
|
||||
<a id="review-exclude-keep-too-large"></a>
|
||||
### `REVIEW_EXCLUDE_KEEP_TOO_LARGE`
|
||||
|
||||
**Meaning.** A `review_exclude_paths` pattern on the base matches files review
|
||||
must keep, and so many of them that the command readers run to read them
|
||||
(`DIFF_KEEP:`) would pass 24,000 argument bytes, under Windows' command-line
|
||||
limit. `gstack-review-plan` stops (exit 3, nothing planned) instead of dropping
|
||||
the pattern and handing readers the whole folder. The line names the pattern,
|
||||
the base commit, the kept count with each keep reason
|
||||
(`code:1319,named-by-code:2`) and the bytes.
|
||||
|
||||
**Fix.** Look at the reasons:
|
||||
|
||||
- **`code` on published data** (`.patch` files, `MANIFEST.sha256`,
|
||||
extension-less licence texts): add the same folder to
|
||||
[`review_content_patterns`](ship-policy.md#review-content-patterns) beside the
|
||||
pattern on the base, as its own PR. Once it merges, bring the base into the
|
||||
branch and rerun once.
|
||||
- **Real code or another keep reason:** narrow the pattern so it covers only
|
||||
the data, or split the PR.
|
||||
|
||||
There is no override flag.
|
||||
|
||||
<a id="review-diff-unreadable"></a>
|
||||
### `REVIEW_DIFF_UNREADABLE`
|
||||
|
||||
|
||||
Reference in new issue
Block a user