What the agent does
The agent reads the checks the repository already runs so its review quotes the same output a maintainer sees. In a repository like gofiber/boilerplate, .github/workflows/test.yml runs go test ./... -v -race on Go 1.26.x and 1.27.x across an Ubuntu and a Windows runner, lint.yml calls the shared gofiber/.github workflow with golangci-lint v2.14.0 and --tests=false, security.yml runs gosec over ./..., workflow-lint.yml and .github/actionlint.yaml lint the workflows themselves, and gotidy.yml runs go mod tidy on every push to master that touches go.mod or go.sum and commits the result as a bot. Every action in those files is pinned to a commit SHA with the version in a trailing comment, and .github/dependabot.yml updates gomod, github-actions and docker daily. .golangci.yml is a v2 config that enables modernize on top of the defaults. The Dockerfile builds on golang:1.27-alpine, copies ./static into the release image, and .dockerignore drops *_test.go.
Then it reads the app, which is small enough to hold in one head and has three places a change goes wrong. app.go registers recover and logger first, the /api/v1 group, the static middleware on /*, and app.Use(handlers.NotFound) last, so a new route added after the static handler or the 404 handler is never reached. handlers.UserCreate copies c.FormValue("user") with utils.CopyString before storing it, because Fiber v3 hands out strings backed by fasthttp's request buffer, which is reused after the handler returns; a new handler that stores a c.FormValue, c.Params or c.Query result without copying it is the finding this review exists for. And database/database.go is a package-level slice behind a mutex that Insert takes and Get does not, while app.go's -prod flag sets EnablePrefork, which forks one process per CPU, each with its own slice; any change that leans on that store as shared state gets a comment that says so.
With the branch checked out, the agent runs go vet ./..., go test ./... -race (there are no tests yet, so the result is no test files per package, and the review says so rather than implying a suite passed), golangci-lint run --tests=false with the pinned version, gosec ./..., and go mod tidy followed by git diff --exit-code go.mod go.sum, because an untidy module file would otherwise be rewritten by the Tidy bot on master after merge. A pull request that touches a workflow also gets actionlint, and one that adds an action gets a comment if it is pinned by tag where every neighbour is pinned by SHA. Where a finding can be shown, the agent writes a short test in the sandbox, such as a handler called twice to show a stored form value changing under it, and keeps the test out of the branch.
One review is posted per run. Its summary quotes the vet, race, lint, gosec and tidy results, separates blocking findings from suggestions, and cites file and line in app.go, handlers/ or database/ for each. A change to the Dockerfile or Makefile is checked against the image's copy of static/ and the -prod entrypoint. The prompt forbids pushing commits, so the agent pushes nothing.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Review this pull request on a Fiber v3 app. Check it out, run go vet ./..., go test ./... -race, golangci-lint run --tests=false with the version lint.yml pins, gosec ./..., and go mod tidy followed by git diff --exit-code go.mod go.sum; run actionlint if a workflow changed. Read the diff with app.go, handlers/handlers.go and database/database.go beside it. Look for a route registered after the static or NotFound handlers, a handler that stores a c.FormValue, c.Params or c.Query result without utils.CopyString, state kept in the database package that a change assumes is shared across the prefork processes -prod enables, reads of the database slice without the mutex, a new action pinned by tag where the others are pinned by SHA, and a Dockerfile change that drops static/. Confirm a finding with a short test in the sandbox where you can, but do not add it to the branch. Post one GitHub review that quotes each check's result, separates blocking issues from suggestions, and cites file and line for every finding. Do not push commits.",
"resources": [
{
"url": "https://github.com/your-org/your-app/pull/42"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is a review on the pull request. The summary quotes the go vet result, the race run with its no test files lines where the packages have none, the golangci-lint and gosec output, and whether go mod tidy changed anything, then lists the findings with file and line, each marked blocking or suggestion. A finding about a stored request value names the CopyString call it should use; one about shared state names the -prod flag and the fork it implies.
The session's record keeps the checkout, every command and its output, and any short test the agent wrote to show a finding, such as a handler whose stored string changed after a second request. A reviewer can replay that test without trusting the prose.
Before merging, a maintainer reproduces the blocking findings on the branch, decides whether a prefork-safe store is in scope for this change or a follow-up, and dismisses suggestions that do not hold. An unpinned action or an untidy go.mod is a one-line fix the author makes before the next push.
Run it on every pull request opened
Create an automation in the Project with a github trigger on pull_request.opened and pull_request.synchronize, limited to the branch the app merges to, and this prompt. The trigger adds the pull request after the prompt, so each one gets its own sandbox, its own run of the five checks and its own review; only work by an owner, member or collaborator fires it, and a pull request from a fork never does.
The review is the result: it lands on the pull request, and the run shows in the Project like one started from the console. The automation's max_runs_per_hour caps a burst of Dependabot's daily pull requests: a fire past it is created queued and starts once the hour has room, and one past a second hour's worth is skipped as rate_limited until that pull request's next push.
The use case this job follows, with its automation and trigger: Review every pull request.
Why run it on Rush?
The findings that matter in a Fiber app are not visible in a diff: a string that points into a buffer fasthttp will reuse, a route placed after the catch-all, a slice shared by name but not across the processes prefork creates. Catching them means checking out the branch and running the race detector, the pinned linter and gosec the way the workflows do, and the agent does that in its own sandbox and keeps every command and its output, so the review rests on executed checks rather than a reading.
One sandbox per pull request keeps reviews parallel when Dependabot and contributors push on the same day, and nothing is pushed to the branch. The author keeps their checkout, the maintainer gets findings with the evidence attached, and the pull request's own Test, Linter and Security checks still run on GitHub as before.
Frequently asked questions
Why does the review care about utils.CopyString?
Fiber v3 returns c.FormValue, c.Params and c.Query results as strings backed by fasthttp's request buffer, and that buffer is reused after the handler returns. handlers.UserCreate copies the value with utils.CopyString before storing it in the slice; a new handler that stores the raw value keeps a string that can change under it, which the agent can demonstrate with two requests in a sandbox test.
There are no tests in the repository. What does the race run show?
no test files for each package, and the review says exactly that rather than reporting a passing suite. If the pull request adds the first tests, the race detector then has something to run, and the known unlocked read in database.Get is the first thing it will report.
What is the prefork finding?
app.go passes EnablePrefork: *prod to Listen, so with -prod Fiber forks one process per CPU and each has its own database slice. A change that assumes a user inserted in one request is visible in the next is wrong under -prod; the review points at the flag and the Makefile's up-silent-prefork target so the author sees how the app is actually run.
Why run go mod tidy in a review?
Because gotidy.yml runs it on every push to master that touches go.mod or go.sum and commits the result as a bot. A pull request that leaves the module files untidy merges cleanly and then gets a second commit from the bot; pointing it out before merge keeps the history to one change.
Does it check the workflow files too?
When the diff touches .github/. The repository pins every action by commit SHA with the version in a comment and has .github/actionlint.yaml and a workflow-lint.yml job, so a new step pinned by tag or a key actionlint rejects is a finding, and the review names the file and line as it does for Go code.