Skip to content

#2846 preview README: fork PRs deploy, remove the stale refusal notes - #2900

Open
bazarkua wants to merge 1 commit into
masterfrom
preview-readme-fork-prs
Open

bazarkua wants to merge 1 commit into
masterfrom
preview-readme-fork-prs

Conversation

@bazarkua

@bazarkua bazarkua commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

The preview README gives two opposite answers about fork PRs. Three places say we refuse them: line 75, line 104 and line 646. Line 612 says we deploy them. The code has deployed fork PRs since 4f634fc03 (2026-09-07). This PR makes the README match the code everywhere. Docs only, no code changes.

Why this matters

The worst stale line was in the security note: "Fork pull requests are refused outright." A member who believes it can comment /deploy on a fork PR without reading the diff, because they expect the workflow to block it. The workflow does not block it. The fork's code is built and started in a container that has the real databases and config_secrets.json mounted (deploy.sh L704-L705). ARAX in that container calls external KPs, so it also has outbound network. A wrong sentence in a security note is worse than no sentence.

What protects the host when a fork PR is deployed

  1. Only a comment from an OWNER, MEMBER or COLLABORATOR starts a deploy (deploy-preview.yml L62-L74). Run workflow needs write access to the repo.
  2. The workflow sees that the PR comes from a fork and builds pull/<N>/head instead of the branch name (L111-L116, L166-L167). GitHub keeps a copy of every PR head in our repo under that ref, so the image can get it from RTXteam/RTX.
  3. The scripts always run from our own checkout, never from the PR. For a fork, the docker build context is our DockerBuild/ too, not the fork's (L234-L263). So a fork cannot change the Dockerfile, the docker run flags or anything on the host outside the container.
  4. Inside the image, the Dockerfile fetches the PR ref and checks it out (CICD-Dockerfile L33-L37).

What a fork can still do: its code runs inside the build, for example pip install -r requirements.txt from the fork's tree (CICD-Dockerfile L70), and inside the running preview, next to the secrets. Nothing in the code stops that. The only guard is the member who reads the diff before /deploy. /redeploy also fetches refs/pull/<N>/head (deploy.sh L563-L566), so every new push to the fork needs a new read before the next /redeploy.

What changed in the README

Links point to the new text.

  • Line 75: a fork PR is no longer listed as a reason to refuse.
  • Lines 80-87: pr-head/DockerBuild is the build context only for PRs from a branch on RTXteam/RTX. Fork PRs use our own DockerBuild/.
  • Lines 104-108: the flow diagram no longer says "refuse fork PRs".
  • Line 505: the PREVIEW_BUILD_CONTEXT row adds the fork case.
  • Lines 616-624: read the diff before /redeploy too, and after every new push. /redeploy works on fork PRs.
  • Lines 651-657: the security note now says what protects the host and what does not.

Not in this PR

The wiki ARAX Maintenance SOP has the same stale note at line 482 ("forks are not supported"). It needs the same fix. I did not edit the wiki.

The README said in three places that fork pull requests are refused, but
the workflow has deployed them from refs/pull/<N>/head with the trusted
DockerBuild/ since 4f634fc. Every mention now matches the code, and the
security note explains what guards a fork deploy instead.
Copilot AI balanced review requested due to automatic review settings October 2, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants