Quickstart: Cloudflare
Prepare an authorized engine checkout, deploy the native runtime in shadow, then verify a live review.
This deploys the engine from son-of-anton-review on feat/cloudflare-native. It does not deploy the expanded operator API from son-of-anton-operator-parity or either UI tree. Source access and licensing must be arranged with the owner: the handoff records a private repository and the checkout contains no LICENSE.
The native configuration runs a main Worker and a separate key-broker Worker, plus two container applications: OMP for review orchestration and Sandbox for validation. Commands below run from the authorized engine checkout root.
1. Prepare the account and checkout
Use Node 25, matching the OMP image, and install the locked dependencies with npm ci. The package already declares @cloudflare/containers and @cloudflare/sandbox. Wrangler is not a declared dependency; install an operator-approved version before using the commands below. Container image builds also need a working Docker build environment.
A human must authorize the Cloudflare account, its required Workers/Containers access, the GitHub App installation and spending. Run wrangler login if needed, then wrangler whoami and confirm the intended account. Local source cannot establish your account entitlements or available quota.
Do not deploy the checked-in configuration unchanged. It contains deployment-specific resource IDs, an App ID, GILF_PUBLISH_MODE=live, CRON_AUTHORITY=live, a paid-model selection and an E2B shadow lane.
Before deploying:
- Set your account ID in both native Wrangler files, and your App ID in
cloudflare-native/wrangler.key-broker.jsonc. - Set
GILF_PUBLISH_MODEandCRON_AUTHORITYtoshadowincloudflare-native/wrangler.jsonc. - Select
GILF_MODEL_PROVIDER=openrouterand your approvedGILF_MODEL. KeepGILF_OPENROUTER_REQUIRE_FREE=1unless paid usage is authorized. Remove or replace the checked-inGILF_MODEL_PRICES; it is an estimate for one model, not a universal price table. - Keep
GILF_VALIDATION_EXECUTOR=managed-cf-sandboxand both container/DO bindings. RemoveGILF_VALIDATION_SHADOW_EXECUTORunless you deliberately want E2B too. - Replace
CRON_AUDIT_INSTALLATIONSwith your own installation list and choose your ownPR_AGENT_LOOP_SINCEreporting floor. Do not reuse the checked-in estate identifiers.
2. Provision a new deployment
These create resources. For an existing deployment, inventory and reuse its bindings instead of creating duplicates.
wrangler d1 create son-of-anton-review-state
wrangler kv namespace create DEDUPE
wrangler r2 bucket create son-of-anton-webhook-payloads
wrangler r2 bucket create son-of-anton-cron-artifacts
wrangler queues create gilf-review-intents
wrangler queues create gilf-review-dlqPut the returned D1 database ID and KV namespace ID in cloudflare-native/wrangler.jsonc. Ensure every configured resource belongs to your account. For a fresh database apply both files:
wrangler d1 execute son-of-anton-review-state --config cloudflare-native/wrangler.jsonc --remote --file cloudflare-native/schema.sql
wrangler d1 execute son-of-anton-review-state --config cloudflare-native/wrangler.jsonc --remote --file cloudflare-native/migrations/002-cron-parity.sqlThe base schema does not contain the cron tables. Existing databases need the guarded procedure in Upgrading, not blind application of destructive migration 001.
3. Configure secrets and enable the canary repository
The human supplies secrets through approved tooling, never chat or committed config:
wrangler secret put GITHUB_WEBHOOK_SECRET --config cloudflare-native/wrangler.jsonc
wrangler secret put OPENROUTER_API_KEY --config cloudflare-native/wrangler.jsonc
wrangler secret put GITHUB_APP_PRIVATE_KEY --config cloudflare-native/wrangler.key-broker.jsoncThe App key belongs on the broker only. Configure the App permissions and event subscriptions from Requirements.
GILF_REPOS is not a native allowlist. A new native repository without stored configuration or previous review history is disabled by the default autoEnableNewRepos=false. Explicitly enable one installed canary repo using the non-destructive D1 procedure in Run on your Cloudflare account. Installation alone is insufficient, even for a manual review.
4. Deploy broker, then main Worker
wrangler deploy --config cloudflare-native/wrangler.key-broker.jsonc
wrangler deploy --config cloudflare-native/wrangler.jsoncKeep the OMP entry's image_build_context: "..": its Dockerfile copies engine-root files. Keep the KEY_BROKER binding aligned with the broker's configured Worker name.
Point the GitHub App webhook at your main Worker's /github/webhooks path with the matching webhook secret. Install it only on intended repositories.
# Set to the URL from your deployment, without a trailing slash.
export ANTON_ENGINE_URL='https://your-worker.example'
curl --fail-with-body --silent --show-error "$ANTON_ENGINE_URL/health"Expected ingress body: {"ok":true,"service":"son-of-anton-ingress"}. This does not probe D1, the broker, model credentials or Sandbox.
5. Run a shadow canary, then choose publication
An authorized repository owner, member or collaborator can post a new @anton review comment. The native consumer resolves the current head through GitHub, so an earlier PR webhook is not required for this command. @anton rerun also requests a review. Unlike the Node server, the native consumer ignores @anton status and @anton help; use D1 and logs instead.
wrangler d1 execute son-of-anton-review-state --config cloudflare-native/wrangler.jsonc --remote --command "SELECT review_key,status FROM review_runs ORDER BY rowid DESC LIMIT 5"
wrangler tail --config cloudflare-native/wrangler.jsoncInspect the matching run and trace, including policy admission, validation gaps and publication mode. A policy-skipped run or a row labeled published through a recording publisher is not a live GitHub review. Shadow still reads GitHub, uses the model/sandbox and persists state; it only suppresses review publication.
After a satisfactory canary and explicit human approval, set GILF_PUBLISH_MODE=live, redeploy, and post a new review comment. Confirm the exact head SHA and actual GitHub review/check receipts. Leave cron authority in shadow until its installation scope and any old schedulers have been reconciled separately. A mode change cannot stop an already-running container.
See the full runbook for state queries, schedules and rollback.