Repository navigation
gardener: review-tiers check, judgment as a model draft (#1064) - #1071
Open
scuttletoby wants to merge 3 commits into
Open
scuttletoby wants to merge 3 commits into
scuttletoby wants to merge 3 commits into
Conversation
- New general check review-tiers: merged pull requests that had less review than their tier asks for. Tiers and waiver words come from options (or the merge gate's own review block); lens comments are read by the gate's own code (fork-ci/actions/pr-queue, installed as gate/). One rate_limit read and one paged GraphQL search per run, cached in the check's cacheDir, so the next run searches only pull requests updated since the day before. - Contract v1 gains cacheDir and dryRun (additive; read with .get()). - Report: a "#N" where is shown (OWNER/REPO#N when the report goes to another repository); well-known token shapes are masked. - Judgment: shown as "Judgment (model draft)", timeoutSeconds bounds the whole answer (a trickling server is cut off), no paid fallback (documented). - Tests: verdicts, override/waiver/exempt, gate review block, budget and partial searches, the cache (runs again, stops half-way, old/empty/newer state, dry run), slow and silent model endpoints; RedCheck mutations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cluded The installer reads the gardener's gate/ from fork-ci/actions/pr-queue two folders up from the kit; the shared install fixture copied the kit to a folder with nothing beside it, so 7 gardener install tests failed in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is ambiguous) A branch named like a tag or remote printed as heads/<name> and crashed the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of #1064 (phase 1: #1068).
What
review-tiers(fork-kit/gardener/checks/review-tiers): merged pull requests that had less review than their tier asks for.rules(globs), aregistryfile in the repository (rows of paths with a tier),unmatched, and per tierrequires(minLenses, named lens regexes with counts). Withouttiersit judges by the merge gate's ownreviewblock.fork-ci/actions/pr-queue: config, lens, review_config, review_glob, review_judge), imported and not copied. The installer copies them into the release asgate/. A comment counts exactly when the gate would take it as a lens, and only if posted before the merge by the queue config's lens authors.waivers.exemptLabelsandexemptAuthorsskip pull requests.rate_limitread and one paged GraphQL search per run. BelowminRemaining(1000) it does not search and judges from the cache.cacheDir(a private per-check folder in the state folder) anddryRun. Both are additive; checks read them with.get().#Nwhere is shown; when the report goes to another repository it is writtenOWNER/REPO#N, so it never links to the wrong#N.ghp_,github_pat_,sk-,xoxb-,AKIA, private key blocks) are masked in check text and in the judgment.timeoutSecondsnow bounds the whole answer, so a server that trickles bytes is cut off. Before, it bounded only each socket read.State question (runs again, stops half-way, old/empty state)
updated:>=the day before the last full search. Merged pull requests already in the cache are still judged.maxPages, or the budget falling) keeps the old search day, so the next run searches those days again.Calibration (dry runs on two real repositories)
maxPages8, so a busy project should setmaxPagesto about 20.Tests
fork-kit/gardener/testspasses, andRedCheckcovers the new rules (10 mutations in checks, 2 in report):ReviewTiers; 1Worktrees(a branch named like a tag or remote)cacheDir/dryRungate/copied, installedreview-tiersrunsAlso run:
fork-kit/common/tests/machine_file.test.py27 OK,fork-ci/actions/pr-queue/review_judge.test.py57 OK,.github/scripts/fork-ci-release.test.py98 OK,fork-kit/common/tests/kit_install.test.py189 OK, and the seam check (clean).Two fixes found on the way: the kit tests' fixture now copies the kit in the fork's layout (the installer reads
gate/fromfork-ci/actions/pr-queue), and theworktreescheck reads branches withrefname:lstrip=2, becauserefname:shortprintsheads/<name>when a tag or remote has the same name and the check then crashed.General vs project
maxPagesgo in its own machine-file entry or config. The SkyRPG adapter comes in a separate PR in that repository.🤖 Generated with Claude Code