# A single-pass reviewer with a stated worst case. > Abstract: Post `/review` on a GitHub pull request, a GitLab merge request or a local branch. The reviewer prepares the change, runs its scanners, and makes at most one model call inside a token budget you set. Then it posts one comment that lists what it found and what it could not check. - [Install](install.md) - [Request a review](request.md) **A real review, [quoted whole](https://github.com/medici-finance/assay-pr-agent/pull/15#issuecomment-7180838060).** - Manuscript: `medici-finance/assay-pr-agent#15`, revision `6c0e36c`; posted by `assay-pr-agent[bot]` on 26 November 2026 - Recommendation: Not reviewed: over budget - Length: 7,284 estimated tokens against a limit of 6,000 - Findings: 7, all from Hadolint and none from a model - Coverage: The model review was skipped. Hadolint ran with nothing left incomplete. History was unavailable. ```text Codex review of 6c0e36cd4ea1484cce3b67cca249481983545e30 over-budget Skipped Codex. Estimated prompt 7284 tokens exceeds the limit of 6000. Static checks - hadolint: 0 CI, 1 local, 7 findings, 0 incomplete. - `` hadolint (local) Dockerfile:11 — DL3008 Pin versions in apt get install. Instead of `apt-get install ` use `apt-get install =` `` - ` hadolint (local) Dockerfile:12 — DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check ` - ` hadolint (local) Dockerfile:16 — DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check ` - ` hadolint (local) Dockerfile:36 — DL3066 Non-numeric user-id may not be resolvable by host system ` - ` hadolint (local) Dockerfile:40 — DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check ` - ` hadolint (local) Dockerfile:50 — DL3066 Non-numeric user-id may not be resolvable by host system ` - ` hadolint (local) Dockerfile:58 — DL3066 Non-numeric user-id may not be resolvable by host system ` Qualgen history unavailable for this review. Review tooling built on [PR-Agent](https://github.com/the-pr-agent/pr-agent). On-behalf-of: human:review-operator mode:unattended ``` Quoted verbatim. SHA-256 of the text above: `052f581691766ce57ed1e60f64165c64c085ad817c94b07ae98dc28f3854d7d2` Comments: - Comment 1 (line 2): The state is the second line of every comment. `over-budget` is exit status 2. - Comment 2 (line 3): The model was never called. This review spent no model tokens. - Comment 3 (line 5): Hadolint read the Dockerfile at the reviewed head. Its findings cost no model tokens and never enter the prompt. - Comment 4 (line 16): Mined history was not available for this project. A source that cannot be read is reported, never skipped. - Comment 5 (line 19): Credit for the review prompt, the line-numbered diff formatter and the token estimator, which come from PR-Agent. - Comment 6 (line 21): The account the comment acts for, added by the forge tool that posts it. ## One request, one call, one comment A review has five stages. Only the fourth can spend model tokens. | Stage | What happens | Model calls, at most | |---|---|---| | Request | Someone posts `/review` on an open pull request or merge request. The poller reads the conversation on its next cycle and checks who asked. | 0 | | Scan | ShellCheck, actionlint and the scanners the changed files call for read the Git blobs at the reviewed head. A trusted CI report stands in where one matches the source commit. | 0 | | Budget | The change becomes line-numbered hunks and the complete prompt is estimated. Over the limit, the review stops here and is reported as `over-budget`. | 0 | | Review | One call to your provider, with a 120-second timeout and at most three accepted findings. | 1 | | Report | One comment on the reviewed head lists the findings, what could not be checked, and any path outside the review's coverage. | 0 | > The quoted review stopped at the third stage. Everything from "Static checks" onward in it was produced without a model. [Cost and coverage](cost.md) explains what the estimate counts, what happens to a file the model never sees, and why a repeated request does not pay again. ## What it will not do The limits are the product. Each one is enforced in code, not left to a prompt. - **It will not retry.** A failed or invalid model answer ends the review as `model-unavailable`. There is no fallback model, repair prompt or second call. - **It will not run over budget.** The default limit is 6,000 estimated input tokens for the complete prompt. A larger change is refused before the model is invoked. - **It will not use tools.** The provider CLI runs with tools, shell and web search disabled, and the prompt tells the model not to use them. It sees the patch and the scanner evidence, and nothing else. - **It will not cite outside the change.** A finding whose line numbers fall outside the shown hunks rejects the whole answer. - **It will not write by default.** The CLI writes a JSON report to stdout. Posting a comment takes `--post` with `--change`, and the poller posts only for an authorized `/review`. - **It will not report a gap as clean.** A scanner that could not run, a file with no usable patch, or a commit missing from the checkout is written into the report, and the exit status becomes 2. ## Where it runs It ships as one amd64 Linux image with three services. `setup` holds the installer and its browser wizard, `sync` keeps managed checkouts current, and `reviewer` polls for requests and reviews them. Run them with Docker Compose, plain Docker or the included Kubernetes manifests. Authenticated forge access comes from Assay's released tools, bundled in the image, so nothing else needs installing on the host. Choose Cursor Agent, Claude Code or Codex CLI for the model and sign in with your own subscription, or supply an API key. ## What it checks without a model - ShellCheck and actionlint run on the reviewed head's shell scripts and workflow files. - Hadolint, zizmor and OSV-Scanner check Dockerfiles, Actions workflows and dependency manifests. They reuse a trusted CI report when one matches the source commit, and run locally otherwise. - Assay's Go analysis report can be imported for Go projects. - Qualgen reads the project's history and names the files that usually change together with the changed ones. None of these costs model tokens, and all of them are reported when the model review is skipped or fails. [Static checks](checks.md), [CI reports](ci-reports.md) and [History advisories](history.md) have the details. ## Built on PR-Agent Assay PR Agent builds on [PR-Agent](https://github.com/the-pr-agent/pr-agent). The PR-Agent contributors provide the review prompt, the line-numbered diff formatter and the token estimator used here. Their MIT-licensed Python package ships in the container with its original license notice. The upstream comment server is a separate entry point: this reviewer answers `/review` alone. ## Where to go next - [Install](install.md): three containers with Docker Compose, plain Docker, or Kubernetes. - [Request a review](request.md): who may post `/review`, what the poller skips, and what reaches the pull request. - [Cost and coverage](cost.md): the estimate, the budget, the cache and the exit statuses. - [Setup](setup.md) and [Review providers](providers.md): connect a forge and choose a model. - [Output and exit codes](output.md): every field of the JSON report and the shape of the posted comment. --- Source of this page: https://pr-agent.assay.guide/ # Install > Abstract: Start the three containers with Docker Compose, attach to the installer, and finish setup in the browser. The same image runs with plain Docker or with the included Kubernetes manifests. The command line alone needs only Python. ## What you need - A host that can run a linux/amd64 image. The build refuses any other architecture, so use an amd64 Linux host or Docker's amd64 emulation. - Docker with Compose, or a Kubernetes cluster. The included manifests expect [Flux](https://fluxcd.io/). - A GitHub account that can register an App under the person or organization that owns your repositories, or a GitLab instance where you can create a project or group access token. - A Cursor, Claude or ChatGPT account to sign in with, or an API key from one of them. > The setup wizard needs nothing else installed. Everything it uses is in the image, including Assay's forge tools. ## With Docker Compose Start the containers from a checkout of the repository, then attach to the installer: ```sh docker compose up -d --build docker compose attach setup ``` 1. Press **Enter** in the attached terminal. It prints a random **setup key** and the local URL. 2. Open `http://127.0.0.1:8765/` and enter the key. The page keeps it in a session cookie. 3. Set the repository, the accounts allowed to request reviews and the review provider in the browser. Follow the provider's sign-in prompts in the same terminal. 4. Leave the checkout paths blank for automatic sync. The sync and review services wait for the first save, and reload each later save between cycles. [Setup](setup.md) describes what the wizard asks for. > The setup service publishes its browser port on `127.0.0.1:8765`, and opens the listener only during a wizard session. For a remote Docker host, forward that loopback port to port 8765 on your workstation. ### Leaving setup, and coming back To return to your shell, type **q** and press **Enter** at the manager menu, or while the browser wizard is waiting for an answer. You can also click **Quit setup** in the browser, or enter **/quit** at a terminal wizard prompt. Quitting closes the installer and discards unfinished edits. The reviewer and sync services keep running with the last saved configuration. To reopen setup, run `docker compose start setup && docker compose attach setup`. Press **r** there for a fresh provider login. > The key is regenerated for every wizard session. If you lose it, click **Print key to console** on the page and read the reprinted key from the attached terminal. Treat that terminal as a credential. The setup service disables Docker log retention while it handles an interactive sign-in. Use `docker compose logs sync reviewer` for the worker logs. The optional `./install.sh` builds or pulls the image and attaches to the same manager; with `REVIEW_IMAGE` set, it pulls instead of building. ### The three services | Service | Runs | Mounts | Job | |---|---|---|---| | `setup` | `manage` | `state`, `repos` (read-only), `provider-login` | The installer, its browser wizard and provider sign-in. Publishes `127.0.0.1:8765`. | | `sync` | `sync` | `state`, `repos` (writable) | Keeps managed checkouts current with git-sync. | | `reviewer` | the poller | `state`, `repos` (read-only), `provider-login` | Waits for `/review`, reviews each request, posts the result. | All three use the same image. Compose starts each with a read-only root filesystem, every Linux capability dropped, no privilege escalation, and a 1 GiB in-memory `/tmp`. The named volumes are `state`, `repos` and `provider-login`. > `provider-login` holds your provider's sign-in session. The sync service has no mount for it. Protect the volume like a credential. ## With plain Docker Build the image, then run only the manager from it: ```sh docker build --platform linux/amd64 -t assay-pr-agent . docker run -dit --name review-setup --platform linux/amd64 --log-driver none \ -p 127.0.0.1:8765:8765 -e REVIEW_SETUP_BIND=0.0.0.0 \ -v review-state:/state -v review-repos:/repos:ro assay-pr-agent manage docker attach review-setup ``` Use the same state and checkout volumes for the sync and reviewer containers. Compose manages all three services for you. To run the wizard once in the terminal instead, with a writable state volume and your checkouts mounted where the reviewer will look for them: ```sh docker run --rm -it --platform linux/amd64 \ -v review-state:/state -v /path/to/checkouts:/repos:ro assay-pr-agent setup ``` To have a local image report its commit, add `--build-arg REVIEW_BUILD_SHA=$(git rev-parse HEAD)` to the build. Without it the startup banner shows `commit unknown` and the build time. ## Repository sync Compose runs Kubernetes `git-sync` in a separate container with write access to the checkout volume. For each managed project it refreshes the remote default branch with full history, using the existing reviewer credential, and atomically switches the `current` symlink. The reviewer mounts the volume read-only. Allow repository contents read access for the GitHub App, or GitLab repository read access for its token. The sync interval defaults to 120 seconds (`REVIEW_SYNC_SECONDS` on the sync service). Polling uses the forge's diff directly. When a requested review needs a local static scan and its commit is not in the checkout, the reviewer uses git-sync to fetch just that change's ref into a temporary checkout, verifies its SHA, and discards it after scanning. A moved or unavailable ref is reported as incomplete coverage. In `REVIEW_PROJECTS`, use `"managed": true` in place of a checkout path for a managed clone, or keep your existing absolute `checkout` and bind mount it. With Compose, mount custom checkout paths in both the sync and reviewer services. The sync service leaves operator-managed checkouts alone. > The checkout volume keeps a full history of every private repository it syncs. Treat it like the credentials, and size it for the histories it will hold. ## On Kubernetes The `k8s/` directory mirrors `compose.yaml`: one pod with the `setup`, `sync` and `reviewer` containers sharing the `state`, `repos` and `model-auth` volumes. Instead of Compose's attachable manager, the `setup` container runs the browser wizard directly as a sidecar. Copy the `k8s/` directory into the root of your GitOps repository and point Flux at it. Change `sourceRef.name` in `k8s/flux.yaml` if your GitRepository is not named `flux-system`: ```sh kubectl apply -f k8s/flux.yaml kubectl -n pr-agent get pods ``` The wizard exits after each session and the sidecar restarts it, so the setup port is always available. Each session prints a random setup key to the log: ```sh kubectl -n pr-agent logs deploy/pr-agent -c setup | grep 'Setup key' kubectl port-forward -n pr-agent svc/pr-agent 8765:8765 ``` Open `http://127.0.0.1:8765/` in your browser and enter the key. Keep the local port at `8765`, because the wizard checks the `Host` header. If you choose provider **login**, the browser asks you to continue in the installer terminal when the provider CLI signs in: ```sh kubectl attach -it -n pr-agent deploy/pr-agent -c setup ``` Finish the sign-in there and detach with **Ctrl-P**, **Ctrl-Q**. To change projects or credentials later, fetch the key from the log again. To switch the provider account, request a fresh sign-in and end the session with **Quit setup**; the next one runs with `--reauth`. The manifests use the `main` tag. Pin a digest or a `sha-` tag for reproducible deployments. The three volumes are `ReadWriteOnce`, so the Deployment runs one replica with the `Recreate` strategy. An egress-only `NetworkPolicy` allows DNS and the public internet and blocks private ranges; if your forge or proxy lives in one of them, remove it from the policy's `except` list. > Every wizard session writes its key to the `setup` container log. The key is valid until that session ends, so restrict access to the pod's logs. ## Without Docker The command line runs on macOS or Linux with Python 3.12 or later. Install `uv`, Git and the provider CLI, then run these commands in a checkout of the repository: ```sh uv sync --frozen .venv/bin/cursor-review --help ``` `cursor-agent status` should show the account you expect to be billed. A headless CI runner can use a scoped `CURSOR_API_KEY`. Run the installed executable from any checkout, or use `--repo` to point it at the project under review. ShellCheck and actionlint are optional. A missing applicable scanner appears in the report as `could-not-check`. > Installed this way, the command line reviews local branches. Reading a pull request by number needs Assay's desk tools and their configuration, which the container provides for you. ## Next - [Setup](setup.md): the wizard, GitHub and GitLab credentials, and private TLS. - [Review providers](providers.md): sign in with a subscription, or use an API key. - [Request a review](request.md): post `/review`, or call the command line yourself. --- Source of this page: https://pr-agent.assay.guide/install # Request a review > Abstract: Post `/review` on an open GitHub pull request or GitLab merge request. The poller checks who asked, reviews the change once, and posts one comment on the reviewed head. The command line does the same for a change address or a local branch. ## Post the comment Post a new comment containing just `/review` on an open GitHub pull request or GitLab merge request. The service polls the configured projects every two minutes by default, and accepts new requests from the human accounts you configure. The result is posted on the reviewed head: one comment, naming the commit it describes. A poll uses zero model tokens. Requests run one at a time, with the existing prompt budget and cache. > The comment's text, with surrounding whitespace removed, must equal `/review` exactly. `/review please`, and a reply that quotes the command, do not start a review. ## What the poller skips | A comment is skipped when | Because | |---|---| | Its author is not one of the project's requesters | Only the accounts you list may spend a model call. | | Its text is not exactly `/review` | Anything more is an ordinary message. | | It has been edited | The forge's created and updated timestamps differ. | | It is older than the project's first activation | Requests from before the project was watched were never queued. | | Its author is a bot, or it is a forge quick action | A bot must not be able to start a review. | | It is already queued or already done | The same comment is never reviewed twice. | Setup takes GitHub or GitLab usernames and stores their numeric account IDs. The poller compares each comment author's ID against that list. Assay's `deskmonitor pr` supplies the open change numbers. Batched `deskread comments --change` calls read their conversations on every cycle, including changes with no new commits. > For GitLab, Assay v1.0.94 omits the internal-note flag. Only a comment that already qualifies gets a single [note lookup](https://docs.gitlab.com/api/notes/#retrieve-a-merge-request-note), using the existing reviewer credential and instance. Internal and system notes cannot start a review. ## One at a time, across every project Requests from all configured projects share one queue. It is drained oldest first, one review at a time, so a long review on one repository delays the next request on another. The queue lives in a SQLite database on the state volume, with the cache and the request history. Keep the state volume across restarts, and requests posted during downtime on still-open changes are picked up on the next cycle. Queued reviews survive a restart. A review that was interrupted after it started is not reissued. It needs a fresh `/review`. > A deleted comment, or a change closed between two polls, may never be observed. Neither costs a model call. ## What reaches the pull request The review runs the same steps as the command line with `--change`, plus `--post`. The posted comment has a fixed shape: 1. A header naming the provider and the full commit. 2. The review's state. 3. The model's findings, at most three, each with its path and line. 4. Each local check that could not run, and the findings of the checks that did. 5. The static checks, with a count for each tool. 6. The history advisories, where a history is available. 7. Each path that lies outside the review's coverage. [Output and exit codes](output.md) lists every line the comment can contain. The [overview](index.md) quotes a real one. ## With the command line The local form reviews a branch in a checkout. The forge form reviews a pull request or merge request by address: ```sh cursor-review --repo /path/to/checkout --base main --estimate cursor-review --repo /path/to/checkout --base main --max-input-tokens 4000 cursor-review --repo /path/to/checkout --change 'org/repo#42' --estimate cursor-review --repo /path/to/checkout --change 'org/repo#42' --model MODEL ``` The local form compares the merge base to the committed `HEAD`, or to an explicit `--head`. Both commits and their common ancestor must be available locally. The forge form uses the configured Assay backend for that repository. Both forges use the `owner/repo#number` address accepted by `deskread`. GitLab subgroup projects can also use CI mode, independent of `deskread`'s slug syntax. Forge access requires the installed desk tools and their normal role and repository configuration, which the container provides. > The forge form reads metadata before and after the file list, and checks that the head and the file count agree. A file whose patch is missing is recorded as incomplete coverage, not skipped. ## Publish a summary Add `--post` to the `--change` command to post the reviewed commit and its findings as a single ordinary comment. Assay handles GitHub and GitLab routing, reviewer custody, repeated identical comments and the current-head check through `deskpost comment ... --kind mr --head SHA`. A stale head is refused. Publication requires the configured Assay reviewer role. No write happens by default. > A failed post can be retried with the same model and cache, without paying again for an unchanged prompt. The poller supports `/review`. The upstream PR-Agent chat commands such as `/ask` and `/improve` belong to its comment server, which is a separate entry point from this reviewer. See the upstream guides for [GitHub](https://docs.pr-agent.ai/installation/github/) and [GitLab](https://docs.pr-agent.ai/installation/gitlab/). GitLab pipeline jobs alone do not receive comment events. ## If nothing happened Work down this list before changing anything: 1. Is the author one of the project's `requester_ids`? 2. Was the comment posted after the project was first activated, and left unedited? 3. Is the change still open, and is the comment a fresh one rather than a quick action? 4. Is another review ahead of it in the queue? Each poll waits 120 seconds by default, and reviews run one at a time. 5. Did the review start and get interrupted? Post `/review` again. --- Source of this page: https://pr-agent.assay.guide/request # Cost and coverage > Abstract: Every review is estimated before anything is sent to the model, refused over a limit you set, capped at one model call, and cached. Whatever it could not check is written into the report instead of being left out. ## The estimate comes first `--estimate` makes zero model calls. It performs the same diff preparation and static checks as a review, and reports what the complete prompt would cost. The estimate covers the whole prompt: the review rubric, a fixed instruction, the scanner evidence that sits on lines the patch shows, and the line-numbered patch itself. PR-Agent's token estimator counts it. > Hadolint, zizmor and OSV-Scanner results, and Qualgen's advisories, are never in the prompt. They cost no tokens and do not count. ## A real estimate The run below is real. `--estimate` was run on a throwaway repository with a two-file change: a shell script that leaves two variables unquoted, and a workflow that passes a pull request title into an inline script. ShellCheck and actionlint found all three problems. No model was called. **A real `--estimate` on a throwaway repository.** - Command: `cursor-review --repo /tmp/example --base main --estimate` - Exit status: 0 - Length: 1,419 estimated tokens against a limit of 6,000 - Findings: 3: one from actionlint, two from ShellCheck, none from a model - Coverage: Both changed files were checked in full. No path was left out. ```text { "provider": "cursor", "source": "/private/tmp/example", "head": "1a64c12013445ed5cfcb8679b73c5ab5c2d9f02f", "model": "cursor-default", "estimated_input_tokens": 1419, "max_input_tokens": 6000, "cursor_invocations": 0, "cache_hit": false, "omitted": [], "checks": [ { "tool": "actionlint", "path": ".github/workflows/ci.yml", "state": "complete", "findings": [ { "path": ".github/workflows/ci.yml", "rule": "expression", "line": 11, "message": "\"github.event.pull_request.title\" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details" } ] }, { "tool": "shellcheck", "path": "deploy.sh", "state": "complete", "findings": [ { "path": "deploy.sh", "rule": "SC2086", "line": 4, "message": "Double quote to prevent globbing and word splitting." }, { "path": "deploy.sh", "rule": "SC2086", "line": 5, "message": "Double quote to prevent globbing and word splitting." } ] } ], "findings": [], "cursor_usage": null, "state": "estimate", "model_invocations": 0, "model_usage": null } ``` Quoted verbatim. SHA-256 of the text above: `c7edd99fb385d72523937873d11c310316b536f6b7dddf9d1440c9a660ed517c` Comments: - Comment 1 (line 6): The whole prompt, counted before anything is sent: 1,419 tokens, against the limit on the next line. - Comment 2 (line 8): No model was called. `--estimate` prepares everything a review prepares, and stops. - Comment 3 (line 10): No path was left out. Every changed file had a usable patch. - Comment 4 (line 19): actionlint's finding: a pull request title passed straight into an inline script. - Comment 5 (line 32): ShellCheck's: two unquoted variables, on lines 4 and 5. - Comment 6 (line 45): Model findings. Empty, because no model ran. The scanners' findings sit under `checks`. - Comment 7 (line 47): The state decides the exit status. `estimate` is 0. ## When the estimate is too large An estimate above the limit ends the review before the model is invoked. The state is [`over-budget`](output.md#over-budget), the exit status is 2, and the static checks and history advisories are still reported. The [overview](index.md) quotes one such review from the project's own pull request #15. Thirty-five minutes later the same pull request was reviewed again at a later head: **The second comment on that pull request, [on GitHub](https://github.com/medici-finance/assay-pr-agent/pull/15#issuecomment-7181350117).** - Manuscript: `medici-finance/assay-pr-agent#15`, revision `c609020`; posted by `assay-pr-agent[bot]` on 26 November 2026 - Recommendation: Not reviewed: over budget - Length: 12,645 estimated tokens against a limit of 6,000 - Findings: None. Hadolint found nothing at this revision. - Coverage: The model review was skipped. History was unavailable. ```text Codex review of c609020b9ec08fa35e18dea33f5dfd7db779b837 over-budget Skipped Codex. Estimated prompt 12645 tokens exceeds the limit of 6000. Static checks - hadolint: 0 CI, 1 local, 0 findings, 0 incomplete. Qualgen history unavailable for this review. Review tooling built on [PR-Agent](https://github.com/the-pr-agent/pr-agent). On-behalf-of: human:review-operator mode:unattended ``` Quoted verbatim. SHA-256 of the text above: `6ab0b24d421511c2c704004cd1226846bcce653e8379ab0faba9150f88dd0a12` Comments: - Comment 1 (line 3): Still over the limit, and larger: 12,645 estimated tokens. - Comment 2 (line 6): No findings this time. The Dockerfile problems of the earlier head had been fixed, and the scan says so. Repeat `--path path/to/file` to review an exact changed path, or split the change. ## Where the limit comes from The limit is 6,000 estimated input tokens by default. Three things can change it, and the first one found wins: | Source | Scope | |---|---| | `--max-input-tokens` | One run | | `REVIEW_MAX_INPUT_TOKENS` in the environment | That container | | The `REVIEW_MAX_INPUT_TOKENS` setting saved by setup | The saved setup, which the wizard asks for | | 6,000 | When none of the above is set | ## One call, at most Each run can launch the provider CLI **once**, with a 120-second timeout and at most three accepted findings. There is no model fallback, repair prompt, automatic retry or model polling. The cap covers the prompt the reviewer submits. The CLI controls its own system context, its own output and its own billed usage. `model_usage` is filled in only if the CLI supplies it. ## The cache A successful result is cached, and a repeated request does not pay again. | Where it lives | When | |---|---| | `~/.cache/cursor-pr-review`, or under `XDG_CACHE_HOME` | The command line on its own | | `/state/cache` | Reviews run by the poller, which passes `--cache-dir` | The container image sets `XDG_CACHE_HOME=/tmp/.cache`, because its root filesystem is read-only. That covers a `cursor-review` run by hand inside the container. A result is reused when all of these match the earlier run: - The prompt: the same patch and the same scanner evidence. - The scope, and the model. - The source, meaning the change's address or the repository path. - The provider, and for Cursor the team. The commit's SHA is not among them. A new commit that leaves the patch unchanged hits the cache. > The cache holds the model's answer, nothing else. Scanners and Qualgen run on every request, so a repeated review gets fresh static checks beside the cached findings. A lock serializes duplicate local requests. For CI reuse across jobs, provide a persistent, trusted `--cache-dir`; each ephemeral runner otherwise starts cold. Use an explicit model for results you can compare. ## Coverage A review can come back with less than was asked for, and says so each time. | Written in the report | When | |---|---| | A path under `omitted` | A file has no usable patch or no head-side location, as for a whole-file deletion, or was excluded by `--path`. | | A check with the state `could-not-check`, and a reason | A scanner could not run. [Static checks](checks.md) lists the reasons. | | `Outside review coverage` in the comment | Any omitted path, repeated where people read it. | Scanner findings are kept apart from model findings in the JSON. Missing scanner evidence stays visible even when the model finds nothing. Whenever anything is omitted or could not be checked, the state is [`partial`](output.md#partial) and the exit status is 2. ## Exit status | Exit status | Meaning | |---|---| | 0 | The requested review or estimate completed in full. A review with findings also exits 0. | | 2 | Partial coverage, a budget refusal, a model or tool error, or a publication failure. | [Output and exit codes](output.md) lists the six states behind them and every field of the report. --- Source of this page: https://pr-agent.assay.guide/cost # Setup > Abstract: The setup wizard takes the projects to review, the accounts allowed to request reviews, the forge credentials and the review provider. Run it in the browser from the Compose setup service, or in a terminal with plain Docker. ## What the wizard asks for - **Projects.** The forge, its full HTTPS URL, and a checkout path inside the container, or a managed clone. - **Who may request reviews.** GitHub or GitLab usernames, or numeric account IDs. Setup looks the numeric IDs up on the forge. With both forges configured, enter the operator as `username:numeric-id`. - **The operator.** The account the posted comment acts for. - **Credentials** for each forge you selected. - **The review provider**, and whether it signs in with an account or uses an API key. You can accept the defaults of 120 seconds between polls, 6,000 estimated input tokens per review and the selected provider's default model. Each of them can be changed later. > Usernames are resolved by the wizard and stored as numeric IDs. A project list supplied by hand, in `REVIEW_PROJECTS` or `projects.json`, must already contain the IDs. ## GitHub Choose **create** and register the private App under the personal or organization account that owns the repositories. Approve the permissions on GitHub, return to setup, and install the App on the selected repositories. The installer exchanges the single-use manifest code for the App ID and private key, and verifies the installation ID against each repository. It requests contents and Actions read access, and pull request write access. Review discovery still uses polling. Choose **existing** to import an App you already have. The registration follows GitHub's [manifest flow](https://docs.github.com/en/apps/sharing-github-apps/registering-a-github-app-from-a-manifest). > Pull request write access is what posting a comment needs, and Actions read access is what reading a CI report needs. A review writes nothing but its one comment. ## GitLab Enter the HTTPS **base URL** of the instance, `https://gitlab.com` by default, including its port or installation path: `https://git.example:8443/gitlab`, for instance. Enter each project as `group/project`. Choose **create** and supply an authorized personal access token with `api` scope once. Setup creates a Reporter project access token, or a group access token for several projects in the same group, with `api` and `read_repository` scopes. Creating a project token requires a Maintainer or Owner, creating a group token requires a group Owner, and the instance must support access tokens. The reviewer stores the resulting service token. The token you supplied is used for creation only. For projects that span groups, choose **existing** and supply a token with the access they need. GitLab applies its own token expiry policy. See the GitLab guides for [project access tokens](https://docs.gitlab.com/api/project_access_tokens/) and [group access tokens](https://docs.gitlab.com/api/group_access_tokens/). > If setup stops after creating a remote credential, choose **create** again for the same scope to resume from the protected state volume. Replacing an active credential creates a new one. Once both workers have switched, revoke the old token or retire the old App in the forge. ### A GitLab instance with private TLS Import a PEM private CA bundle if the instance uses a private PKI. You can also import a PEM X.509 certificate revocation list. Setup applies that trust to token creation, API reads and artifacts. Assay's tools and git-sync reach the configured instance through a container-local HAProxy TLS connection, which verifies the hostname, the chain and the revocation list. > A missing, expired or otherwise inapplicable revocation list blocks the verified connection. Replace the list in the manager before it expires. If a TLS setting arrives through a mounted file, roll both workers after replacing the file. ## Credentials in the terminal wizard The browser wizard is the default with Compose. In the terminal wizard, choose for each credential how it reaches the container: - **paste**, to type it with terminal echo disabled. - **import**, to copy a readable file into the state volume. - **mount**, to keep using a file that stays outside it. For import or mount, add the source volume to the setup command, for example `-v /path/to/secrets:/run/secrets:ro`, and enter the file's absolute path inside the container. With **mount**, supply the same file path whenever the service runs. With **import**, the source mount is needed only during setup. ## Where the settings live The active settings, and any imported or pasted credential, are in `/state/setup/`. Credential files are plaintext, readable and writable by their owner only (0600), inside a private directory (0700). Protect the volume and its backups. Setup checks local files and credential formats. Choosing a Cursor team needs access to Cursor's account service. Forge access is checked by the poller during normal operation. To change settings or rotate a credential, run setup again, or run `docker exec -it cursor-review-setup`. Existing settings and credentials can be kept without displaying their values. The Compose workers reload on save; with plain Docker, restart the sync and reviewer containers. > Cancelling before the save keeps the previous configuration active. An explicit environment setting takes precedence over its saved value. ## Setup by environment alone A deployment with no one to answer a wizard is configured by environment variables instead: the projects, the credentials and the provider. [Settings reference](settings.md) lists every variable and the shape of a project entry. With a provider chosen and `REVIEW_AUTH_MODE=login`, run the image once with `-it`, the persistent volumes and the `login` command before starting the reviewer. For unattended provisioning with API keys, leave `REVIEW_AUTH_MODE` at its default of `api-key`. > On an unconfigured interactive first start, the container runs setup before polling. A deployment that already has an Assay reviewer configuration can mount it at `/home/reviewer/.config/assay` and omit the standalone variables. Supplied credentials then follow that roster's own repository and identity rules. --- Source of this page: https://pr-agent.assay.guide/setup # Review providers > Abstract: The reviewer makes its one model call through one of three provider CLIs. Sign in with your own Cursor, Claude or ChatGPT account, or supply an API key. Every call runs with tools, shell and web search disabled. ## The three providers `REVIEW_PROVIDER` selects which CLI answers the review. The default is `cursor`. | Value | Command | How the CLI is held back | Credential | |---|---|---|---| | `cursor` | `cursor-agent -p --mode=ask` | A workspace configuration that denies shell, file, web and MCP tools | Cursor CLI login, or `CURSOR_API_KEY` | | `claude` | `claude -p` | Tools disabled, one turn, a strict MCP configuration | Claude subscription login, or `ANTHROPIC_API_KEY` | | `codex` | `codex exec` | An ephemeral read-only session, with shell and web search disabled | ChatGPT device login, or `CODEX_API_KEY` | All three CLIs are in the image. Whichever you choose, the model receives the patch and the scanner evidence and nothing else, and may return one answer. > The name in the posted comment's first line comes from this setting: `Cursor review of`, `Claude review of` or `Codex review of`. ## Signing in with an account For a new provider configuration the wizard defaults to CLI sign-in. Existing API-key configurations keep their current method. The container runs `cursor-agent login`, `codex login --device-auth` or `claude auth login --claudeai`. Follow the CLI's link in your own browser and enter the code where the provider directs you. Codex device login may need to be enabled by your workspace administrator. > Each person whose subscription pays for reviews should use their own signed-in instance. The CLI stores its own session and handles the authorization code. With Compose, setup and reviewer share the writable `provider-login` volume. Protect it like a credential. The sync service has no mount for it. The reviewer checks the sign-in when it starts. - To switch accounts, attach to setup and press **r**. - Use the browser to confirm the repository list and the Cursor team. - With plain Docker, the default location is `/state/provider-login`, inside the state volume. To mount a separate directory, set `REVIEW_LOGIN_DIR` to the same path for setup and reviewer. For the authentication details, see each provider's guide: [Codex](https://developers.openai.com/codex/auth/) and [Claude Code](https://code.claude.com/docs/en/authentication), including its notes on [use in other products](https://code.claude.com/docs/en/legal-and-compliance#can-customers-offer-claude-code-in-their-products). ## With an API key `REVIEW_AUTH_MODE` is `api-key` by default. Set the key for the selected provider, or point at a file with the matching `_FILE` variable: `CURSOR_API_KEY`, `ANTHROPIC_API_KEY` or `CODEX_API_KEY`. For a deployment with no wizard, set `REVIEW_PROVIDER` to `cursor`, `codex` or `claude` and `REVIEW_AUTH_MODE` to the mode you want. With `login`, run the image once with `-it`, the persistent volumes and the `login` command before starting the reviewer. ## The model Leave `REVIEW_MODEL` unset to use the selected CLI's default model, or name a model that provider offers. The command line takes the same choice as `--model`. The reviewer launches at most one provider CLI per eligible request that is not already cached, with the same prompt estimate and timeout whichever provider you use. > The CLI controls its own system context, internal requests and billing. The budget covers the prompt the reviewer submits, not what the provider adds around it. The report includes `provider`, `model_invocations` and, when the CLI supplies it, `model_usage`. The cache separates providers, and Cursor teams from one another, so switching never reuses another account's answer. ## Cursor teams Cursor setup uses the CLI's `team list` and `team switch` commands. - With several eligible teams, you choose one by its numeric ID. - With one, the installer selects it. - An empty membership list uses personal scope. - An account with memberships but no selectable team fails setup. The service rechecks the configured account when it starts, and verifies the active team in an isolated Cursor configuration. For a deployment with no wizard, set `REVIEW_CURSOR_TEAM_ID` when the account has several eligible teams. A failed lookup or selection stops startup before any review. > These checks call Cursor's account service. They start no inference request. ## What reaches the provider The provider CLI is started with a small allowlist of environment variables: the home directory, the path, locale settings, the provider's own key, and proxy and TLS settings. Forge credentials and CI secrets stay out of its environment. The prompt it receives has three parts: the review rubric, a fixed instruction to use only the supplied patch and scanner evidence and to use no tools, and then that evidence and the patch. The answer must be a single JSON object of at most three findings, each citing a line that appears in the patch. [Cost and coverage](cost.md) covers what happens to an answer that breaks those rules. --- Source of this page: https://pr-agent.assay.guide/providers # Static checks > Abstract: ShellCheck and actionlint run on every reviewed head. Hadolint, zizmor and OSV-Scanner run on requested forge reviews, from a trusted CI report where one matches the commit and locally otherwise. None of them spends model tokens. ## What runs, and when | Tool | Checks | Runs | Model tokens | |---|---|---|---| | ShellCheck | Changed `.sh` and `.bash` files | Locally, on every review | None | | actionlint | Files under `.github/workflows/` | Locally, on every review | None | | Hadolint | Dockerfiles and Containerfiles, such as `Dockerfile.release` and `build.dockerfile` | From CI or locally, on a requested forge review | None | | zizmor | GitHub Actions workflow and action files, including those kept in GitLab repositories | From CI or locally, on a requested forge review | None | | OSV-Scanner | Dependency files such as `go.mod`, `Cargo.lock`, `uv.lock`, `requirements.txt` and `package-lock.json` | From CI or locally, on a requested forge review | None | | Go analysis | Assay's Go lint report, imported from a CI job you name | From CI | None | Deleted files are never scanned. Findings are scoped to the files a change touches, and can include a problem on a line the change did not alter. > The three CI-capable scanners look first for a finished report at the reviewed **source commit**. Anything a report does not cover falls back to a local scan. [CI reports](ci-reports.md) covers the reuse. ## Local checks Local checks read regular Git blobs at the reviewed commit, in temporary directories. They have no forge credential, no model credential, and no provider key in their environment. ShellCheck and actionlint run on the reviewed head's Git blobs. The runner feeds each file on stdin with the tool's defaults. actionlint's embedded ShellCheck integration is switched off, so a shell problem inside a workflow is reported once, by ShellCheck. > Each of the two has 20 seconds, and a file over one million bytes is not scanned. If the reviewed head is absent from the checkout, an applicable scanner reports `could-not-check` rather than nothing. Hadolint, zizmor and OSV-Scanner run locally with these commands, sharing a 180-second budget with 90 seconds for any one of them. The OSV-Scanner line also carries `--download-offline-databases` unless you switch downloads off: ```sh hadolint --format json --no-fail ./Dockerfile zizmor --offline --no-exit-codes --format sarif ./.github/workflows/ci.yml osv-scanner scan source --offline --format json --lockfile ./uv.lock ``` ## When a scanner could not check A scanner that cannot run says so. Its reason appears in the JSON report, and in the posted comment, as `could not check`. | Reason written | Meaning | |---|---| | `tool unavailable` | ShellCheck or actionlint was not on the `PATH`. The image ships both, so this appears outside the container. | | `immutable source unavailable or scanner failed` | The file at the reviewed head is missing or too large, or the tool failed. | | `source unavailable or scanner failed` | The path is not a regular file at that commit, a report is oversized or in the wrong place, or the exit status was unexpected. | | `source, scanner or advisory database unavailable` | OSV-Scanner could not read its advisory database. | | `static check time budget exhausted` | An earlier scanner used up the shared budget. | Missing scanner evidence stays visible even when the model finds nothing, and it turns the exit status to 2. ## What the model sees of it The two kinds of check are kept apart. Findings from ShellCheck, actionlint and the Go analysis, when they sit on a line the patch shows, are placed in the prompt as scanner evidence. They count toward the token estimate. A finding elsewhere in the file stays in the report and out of the prompt. Hadolint, zizmor and OSV-Scanner never enter the prompt, the estimate or the cache key. Their findings go straight into the report and the posted comment. > An over-budget review, or one where the model fails, still publishes the static checks. The quoted review on the [overview](index.md) is exactly that case. ## Dependency scanning offline OSV-Scanner compares dependencies locally and caches public advisory databases under `/state/osv-db`. By default it may download and refresh them. To run with no network, prepopulate `/state/osv-db/osv-scalibr//all.zip` for each ecosystem you need, and set `REVIEW_OSV_DOWNLOAD_DATABASES=0` on the reviewer. A database that cannot be read, a missing file or a timeout is reported as incomplete coverage. The [OSV-Scanner offline guide](https://google.github.io/osv-scanner/usage/offline-mode/) describes the layout. --- Source of this page: https://pr-agent.assay.guide/checks # CI reports > Abstract: Hadolint, zizmor and OSV-Scanner can reuse a report your own CI produced for the reviewed commit, and Assay's Go lint report is imported the same way. The reviewer verifies each report against the source commit, and falls back file by file. ## Why reuse a report A CI job you control already runs the scanner on every pull request. Reusing its report spares the reviewer a local run. The reviewer takes a report only when it is tied to the exact commit under review. Anything that does not match, or that the report does not mention, is scanned locally as before. > A report is evidence from your own pipeline. Configure only producers whose definition and output your team controls. A contributor who can replace the producer could fabricate its findings. ## The defaults On a requested GitHub or GitLab review, the reviewer first looks for a finished run at the reviewed source commit. These work on both forges with no extra configuration: | Tool | GitHub workflow | GitHub artifact, or GitLab job | Report file inside it | |---|---|---|---| | Hadolint | `hadolint.yml` | `hadolint` | `hadolint.json` | | zizmor | `zizmor.yml` | `zizmor` | `zizmor.sarif` | | OSV-Scanner | `osv-scanner.yml` | `osv-scanner` | `osv-scanner.json` | The GitHub reviewer App needs **Actions: read** to retrieve artifacts. The GitLab reviewer token needs access to the target project's CI jobs and artifacts. ## Point at your own job To reuse an existing job, add a `scanner_ci` entry to the project, in `REVIEW_PROJECTS` or in `projects.json`. Its keys are the three tools, and each tool takes these settings: | Setting | GitHub | GitLab | |---|---|---| | `producer` | The workflow file name, or its numeric ID | The job name | | `artifact` | The artifact name. It may contain `{attempt}` for the run's attempt number. | Not used | | `report` | The report's path inside the artifact | The report's path inside the job's artifacts | | `all_paths` | Whether a successful run covers every applicable file. Default `false`. | The same | | `source_root` | The absolute checkout directory, for a custom runner | The same | **One project's `scanner_ci`, reusing a workflow named `lint.yml`.** ```text "scanner_ci": { "hadolint": { "producer": "lint.yml", "artifact": "lint-results", "report": "reports/hadolint.json", "all_paths": true } } ``` Comments: - Comment 1 (line 3): The workflow that ran Hadolint, by file name. - Comment 2 (line 4): The artifact its job uploads. - Comment 3 (line 5): Where the Hadolint JSON sits inside that artifact. - Comment 4 (line 6): Set only because this workflow checks every changed Dockerfile. ## Tying the report to the commit The reviewer accepts a report only for the commit it is reviewing. On GitHub it reads the latest run of the workflow for the source SHA. The run must have completed, with a conclusion of success or failure, and must hold exactly one unexpired artifact of that name. > A `pull_request` workflow usually checks out a synthetic merge commit, although the API reports the pull request's head. For any workflow other than `push`, check out the source revision, write `git rev-parse HEAD > review-head.txt` in the same checkout as the scanner, and upload that file at the artifact root beside the report. The reviewer compares it with the reviewed SHA. A missing or mismatched stamp sends the file to a local scan. On GitLab it checks that the merge request's SHA and the head pipeline's SHA are both the reviewed head, and that the named job succeeded or failed on that same commit. Paths in a report are mapped from the standard checkout directories of each forge. Set `source_root` for a runner that checks out somewhere else. ## Which files a report covers By default, only the paths a report evidences are taken from it. An empty Hadolint JSON array, for instance, cannot say which files CI checked. Set `all_paths` to `true` only for a producer that checks **every** applicable changed file, and reports a scanner error as a job failure. A successful report from such a producer covers clean files too. A failed producer supplies only the paths that have findings. Missing, stale, expired, malformed or incomplete evidence falls back per uncovered file. > The posted summary says which results came from CI and which ran locally. The JSON report holds all of them under `static_checks`. ## Importing the Go analysis report Assay's pinned analysis action produces a Go lint report with new and worsened findings. To import it on a requested review, enter the project's trusted Go analysis workflow or job during setup, or add the `go_analysis` field to its project entry. | Forge | Example setting | What the job must do | |---|---|---| | GitHub | `"go_analysis": "go-lint.yml"` | Run the [Assay action](https://github.com/medici-finance/assay/tree/v1.0.94/actions/go-analysis) on the pull request's source head. The reviewer reads the latest run for that SHA, and the artifact `go-analysis-lint---` of that exact attempt. | | GitLab | `"go_analysis": "go-lint"` | Run the Assay scanner against the merge request's source head with `GITHUB_REPOSITORY="$CI_PROJECT_PATH"`, and publish the report as `report.json` at the artifact root with `artifacts: {when: always, paths: [report.json]}`. | The reviewer looks up the report only while handling an authorized `/review`. It accepts a completed scan from a lint job that failed, and checks the repository and the analyzed source SHA before importing the new and worsened findings for changed paths. - Findings inside the shown hunks join the prompt and its token budget. - Findings outside them are counted in the summary. - If CI is still running, or the report is missing, expired, unreadable, invalid or for another head, the summary marks Go analysis as `could not check`, and the rest of the review proceeds. - A fresh `/review` after CI finishes can pick the report up. Ordinary polls and CI completion never trigger a model call. > From the command line, `--go-report path/to/report.json` imports a report for the reviewed head. Supply one from a trusted producer. The runner checks the `go-analysis/v1` schema, the source SHA, the coverage count, the totals and the gate before using it. --- Source of this page: https://pr-agent.assay.guide/ci-reports # History advisories > Abstract: A background worker mines each project's Git history with Qualgen, and every requested review names the files that usually change together with the changed ones. The advisories go straight into the posted summary and cost no model tokens. ## What Qualgen adds A change that edits one file often needs an edit to another. Qualgen reads a repository's history to learn which files change together, and reports the ones a change left behind. On every requested review the reviewer runs `qualgen check` for the changed paths and adds its notices to the posted summary. A notice can name a file that is frequently changed together with a changed file, and is missing from the change. ## Mining the history The container includes the checksum-verified Assay Qualgen release. On startup, and then every 24 hours, a background worker runs `qualgen mine` against each project's mounted checkout. The miner reads local Git history and stores its results under `/state/qualgen`. A changed tip extends the previous snapshot when the history allows it. An unchanged tip skips mining. A review can still read the last completed snapshot while a new one is being built. > Use a managed checkout, or keep a full checkout of the trusted integration branch refreshed in your deployment. A history that is not in the checkout cannot be mined. ## Reading an advisory - The summary identifies the mined commit, so an advisory can be checked against the history it came from. - Paths with too little history are marked as such, not reported as clear. - Notices about live references are included only when the checkout is at the reviewed head. - While the first snapshot is being built, the review reports that history is unavailable. The posted comment shows at most 20 entries. The JSON report carries the full list. > The quoted review on the [overview](index.md) ends its history section with that line. A source that could not be read is named, not skipped. ## Cost and limits Qualgen uses local CPU, disk and Git history. Its output goes directly into the summary, outside the prompt, the token estimate and the model cache key. An over-budget review, or one where the model fails, can still publish historical advisories. > A Qualgen result that is partial or unavailable does not make the review `partial`. The review's state follows the file checks. ## Settings Set `REVIEW_QUALGEN_INTERVAL_SECONDS` in Docker, or enter the refresh interval during setup. The default is 86,400 seconds. Set it to `0` to disable mining and advisories together. > Keep the state volume private to the reviewer. It holds historical file and commit data for every project it watches. --- Source of this page: https://pr-agent.assay.guide/history # Pipelines > Abstract: Call `cursor-review` from a GitHub Actions or GitLab CI job to gate a pull request. It takes the pipeline event's own base and head, writes a JSON report, and exits 2 whenever coverage is incomplete. ## The command The polling service is the comment-only way to run. To invoke a review from a pipeline instead, call the command line with `--ci`: ```sh cursor-review --ci --max-input-tokens 4000 > review.json ``` This command invokes a review and spends a model call, unless the result is already cached or the change is over budget. `--estimate` runs the same preparation and stops short of the model. ## Fetching the commits `--ci` reads the base and head from the pipeline event itself, so the job needs both commits in its checkout. - **GitHub Actions** uses a `pull_request` event and its recorded base and head SHAs. Fetch enough history, for example `fetch-depth: 0` with `actions/checkout`. - **GitLab CI** uses a merge request pipeline and `CI_MERGE_REQUEST_DIFF_BASE_SHA`. It takes the source branch SHA for merged-results pipelines, and the commit SHA for detached merge request pipelines. Set `GIT_DEPTH: '0'`, or supply those Git objects some other way. > Keep the executable and its environment in a trusted install, separate from the change under review. Installing the reviewer from the checkout it is about to review would run that change's code first. ## Keeping the report The JSON report goes to stdout. Save it as a job artifact even when the job fails: ```yaml - run: cursor-review --ci --max-input-tokens 4000 > review.json - uses: actions/upload-artifact@v4 if: always() with: name: review path: review.json ``` ## Reading the exit status | Exit status | Meaning | For the job | |---|---|---| | 0 | The requested review or estimate completed in full. A review with findings also exits 0. | Pass. Read `findings` to decide what to do with them. | | 2 | Partial coverage, a budget refusal, a model or tool error, or a publication failure. | Fail, or inspect the report before deciding. | Exit 0 says the review ran to the end. It does not say the change is clean, and a finding never fails the job by itself. > A review that found nothing to cite can still exit 2, because a scanner could not run. Inspect `state`, `checks` and `findings` when you use the report in CI. ## What a pipeline run does not include A pipeline run is the local form of the review. ShellCheck and actionlint run. Hadolint, zizmor and OSV-Scanner need a forge change and its CI reports, and history advisories need the poller's mined store, so both belong to the polling service. To gate on a pull request by number, with the static checks and history included, use the polling service and read the comment it posts. --- Source of this page: https://pr-agent.assay.guide/ci # Deployment > Abstract: Every push to main and every Git tag builds a linux/amd64 image, runs the test suite inside it with networking disabled, and publishes it. Each image carries its commit, its tags and its build time, and prints them first at startup. ## The image The image is linux/amd64 only. The build stops on any other architecture. It runs as UID 10001. The Compose file and the Kubernetes manifests give it a read-only root filesystem, with `/tmp` as the only writable mount besides the volumes. | Path | Holds | Written by | |---|---|---| | `/state` | Saved setup, request queue, cache, history, advisory databases | All three services | | `/repos` | Checkouts | `sync` only | | `/model-auth` | The provider's sign-in session | `setup` and `reviewer` | The image contains all three provider CLIs, git-sync, Qualgen, Assay's released forge tools, ShellCheck, actionlint, Hadolint, zizmor and OSV-Scanner. You can use it without installing Assay on the host. > Each bundled tool is pinned by version, or by digest, in the [Dockerfile](https://github.com/medici-finance/assay-pr-agent/blob/main/Dockerfile). Third-party software in the image keeps its own license: the provider CLIs, PR-Agent, Assay's desk tools and Qualgen, and the scanners. ## The build record The container prints its build record as its first line at startup: ```text Assay PR Agent build: commit , tags , , built