Repository navigation
kix: warn when pull-request CI can write, and write down trust by stage - #434
Conversation
Quest-Claim: a736d3d4522d1a65
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Resolve conflicts with head approvals (#402) and runner review checks (#417): the trust-by-stage devShell row now names head approvals, the permission note drops checks-write, and the runner paragraph keeps both the approval flow and the unverified VM claim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… job Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the finished setup-PR quest and this PR's own quest from the kix epic's Required list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging the setup pull request enables contributions, so a repository without Quest files now gets the same pull-request CI warnings before the maintainer opens it. The check runs on the preview's token when the preview finds no Quest files, and NoQuestFiles carries its warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
quest land watch: the merge queue removed this pull request at 53fb287 because it conflicts with The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs. (written by quest land watch) |
|
quest land watch: armed auto-merge on this pull request at bae858f, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix ( (written by quest land watch) |
Completes Read-only CI and deletes its quest.
Summary
CI check on the setup page (
cloudflare/src/github/ci.ts). The setup page at/projects/github/<owner>/<repo>, which a maintainer uses to enable and later pause contributions, now has a "Pull-request CI" panel. So does that page's form for a repository without Quest files, which opens the setup pull request (moq-dev/quest#431), since merging it enables contributions. It reports:GITHUB_TOKENthat can write;It only warns: enabling still works and jobs still run. A failed read shows up as its own warning, and an installation that hasn't accepted the new permissions gets a warning naming them. The whole check is capped at 30 reads so the page fits Workers Free's 50 subrequests, and it says when it stopped early.
App permissions. The manifest adds Administration, Secrets, Actions, and Environments, all read-only. They join the setup-page token only when the installation has granted them (
#withInstallation's newoptionalscope). No other operation's token changes. GITHUB.md's permissions table and operator setup list them, and existing registrations add them as an operator step.Trust by stage.
cloudflare/GITHUB.mdgains a table covering intake, job creation, routing, devShell, agent run, publication, CI, review, and land. It says what each stage trusts and why. A new "Read-only pull-request CI" section states the rule and the check, replacing the old one-paragraph rule.Runner contradiction fixed.
cloudflare/README.mdand the root README now agree. kix routes untrusted heads only to Linux runners whose owner declaredvm: trueatPOST /api/runners, and kix doesn't verify that claim.quest runner loginnever declares it, so such jobs wait for a runner that does; a runner that declares it without being able to build in a VM is still sent the job, andquest runnerfails it rather than run it.SETUP.md recommends read-only pull-request CI next to its advice about drafts.
Pilot condition moved. The requirement that pilot repositories pass the check before contributors are invited moves to Operator setup, with what
gh apishowed on 2026-11-02. The moq-dev org sharesDISCORD_WEBHOOKwith both pilots. moq-dev/moq has 18 repository secrets. Its environments name only protected branches, merge-queue branches, and tags.The seeded dev GitHub fake (
cloudflare/dev/github.ts) grants the new permissions and models a clean repository, sojust worker-seededshows the panel.Choices made without asking
gh-readonly-queue/<protected>/*, the merge queue's own branches. Wildcards are reported, because a same-repository PR head, which kix iterates, can be any unprotected branch. Tag patterns pass, because kix never writes tags.permissions:, andpull_request_target/workflow_runjobs that check out a PR head, fall under the same rule.Suggested follow-ups
.github/workflowsand flag jobs thatpull_requestor unfilteredpushtriggers when they request writepermissions:, reference secrets outside an environment, or arepull_request_target/workflow_runjobs that check out the PR head. The default-token setting doesn't cover a job's ownpermissions:block.cloudflare/src/github/review.ts). That widens the landing token's scope, so it needs its own decision.Review
mechanical fix by codex / Codex:
Merged base and re·solved the import conflict preserving CI and review helpers; passed bun run build, bun run check, bun run test at root and bun run check, bun run test in cloudflare.(head bae858f)quest review)NoQuestFilesbefore the CI check ran, so the setup-PR form showed no CI warnings even though merging that PR enables contributions.previewProjectnow runs the check on the same token and throwsNoQuestFilescarrying its warnings, andQuestSetupPagerenders the sharedCIPanel. Tests cover both the warning on that page (projects.test.ts) and the dev fake's clean result (setup.test.ts). GITHUB.md names that page too.quest/m1/kix/README.md's Required list, where main had finished the setup-PR quest and this PR finishes its own, so both lines go. The rest merged cleanly, and the PR's added and removed lines are unchanged.vm: truerunner does;quest runnerfails such a job atsrc/runner/job.ts:194). 8d48990's hand merge of head approvals (moq-dev/quest#402) and runner review checks (moq-dev/quest#417) had no findings. On 445647f, protected branches read only the first page (fixed with lookups by name); branch lookups could exceed the subrequest budget (fixed with one 30-read budget).Local checks:
just checkandjust testpass on 53fb287.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)