Factory
Pages

How the checks run

connect-repo deploys two CodeBuild projects for each repository.

ProjectIt runsWhenStatus on the pull request
<repo>-cibuildspec.yml of the repositoryA pull request opens, changes or reopensci/codebuild
<repo>-reviewThe flow-code-review skill, then reviewdogA pull request opens or reopensflow/review

A webhook build runs only for a pull request from a trusted GitHub user.

#CI

buildspec.yml is in the repository. It installs the packages, generates a key and the types, then runs lint, types and tests. It installs Playwright when the app uses it.

Change it in a task, as you change other code. You review the change in the pull request.

#The Flow review

The build steps of the review are in AWS, not in the repository, so a pull request cannot change them to read the secrets. No code of the pull request runs.

  1. #Prepare

    The build checks out main in another folder. It installs the packages from there with no scripts, and runs npx flow install --ci. Then it replaces .claude, .flow, CLAUDE.md and node_modules of the pull request with the ones from main.

  2. #Review

    The build fetches the Claude token, then runs the flow-code-review skill. The session can only read files, read the diff, plan the review and write in the tmp folder of the app. It has a budget of 5 dollars for each run.

  3. #Post

    The build gets a short-lived token for the review app. npx flow reviewdog converts the findings, and reviewdog posts each one on its line.

#Severity

Severityreviewdog levelIt fails flow/review
criticalERRORYes
majorERRORYes
minorWARNINGNo
nitINFONo

To change the lenses, edit .flow/review.yml. The review reads it from main, so a change applies after you merge it.

#Cost

These numbers come from small tasks on a test project. A larger change costs more.

ItemSeen
CI buildAbout 2 minutes, about 1 US cent
Flow review0.42 to 2.67 dollars of Claude usage, as Claude reports it
Build session3.46 to 3.80 dollars of Claude usage
Rework sessionAbout 1 dollar of Claude usage
Accept sessionAbout 0.55 dollars of Claude usage

With a Claude plan and a token from claude setup-token, these sessions count against your plan.

#Why ap-south-1

AWS CodeConnections is not in af-south-1. Of the other regions that were compared, the price of a build is the same, at 0.005 dollars each minute. ap-south-1 is the closest of them to East Africa. To use another region, change FACTORY_REGION, and deploy the connection there.