Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

113 linesCodeBlameRaw
1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-runner",
4 "account_id": "1e6f2cffa3f445920836e8ebe446bb58",
5 "compatibility_date": "2026-09-26",
6 "main": "./src/index.ts",
7 "workers_dev": false,
8 // One image (the base plus the runner binary), on two named instance
9 // types: standard-3 (2 vCPU, 8 GiB, 16 GB of disk) for the standard
10 // machine and g1t-2core, which is kept as a name of it so workflows that
11 // ask for it keep working, and standard-4 (4 vCPU, 12 GiB, 20 GB) for
12 // g1t-4core, which is also what ubuntu-latest gets in a public
13 // repository. At these max_instances, 60 sandboxes at once hold 180 vCPU,
14 // 600 GiB and 1,080 GB, well inside the account's limits for live
15 // instances (1,500 vCPU, 6 TiB of memory, 30 TB of disk). crates/contracts
16 // (INSTANCE_TYPES) and services/billing (keeper.rs) say the same sizes.
17 // scripts/deploy.mjs deploys with each image set to the reference it
18 // built and pushed ("The runner's images" in
19 // docs.g1t.sh/guides/deploy-to-cloudflare/), so a deploy builds
20 // nothing; "./Dockerfile" here is for building by hand.
21 "containers": [
22 {
23 "class_name": "AttemptSandbox",
24 "image": "./Dockerfile",
25 // Workflow jobs with `runs-on: ubuntu-latest` (and every other
26 // hosted label) in a private repository, checks, the merge queue and
27 // all other work: 2 vCPU, 8 GiB, 16 GB.
28 "instance_type": "standard-3",
29 "max_instances": 20,
30 // A deploy that changes the image or these settings replaces every
31 // idle sandbox at once (scripts/deploy.mjs passes
32 // --containers-rollout=immediate). Ones that are busy are given
33 // this long, in seconds, to finish first, so shipping g1t does not
34 // kill work in the middle.
35 "rollout_active_grace_period": 7200
36 },
37 {
38 // Workflow jobs with `runs-on: g1t-2core`: the standard machine.
39 "class_name": "Sandbox2Core",
40 "image": "./Dockerfile",
41 "instance_type": "standard-3",
42 "max_instances": 10,
43 "rollout_active_grace_period": 7200
44 },
45 {
46 // Workflow jobs with `runs-on: g1t-4core`, and `ubuntu-latest` (and
47 // every other hosted label) in a public repository: 4 vCPU, 12 GiB,
48 // 20 GB. Every public repository's workflow jobs run here, so it has
49 // the most room.
50 "class_name": "Sandbox4Core",
51 "image": "./Dockerfile",
52 "instance_type": "standard-4",
53 "max_instances": 30,
54 "rollout_active_grace_period": 7200
55 }
56 ],
57 "durable_objects": {
58 "bindings": [
59 { "name": "SANDBOX", "class_name": "AttemptSandbox" },
60 { "name": "SANDBOX_2CORE", "class_name": "Sandbox2Core" },
61 { "name": "SANDBOX_4CORE", "class_name": "Sandbox4Core" }
62 ]
63 },
64 "migrations": [
65 { "tag": "v1", "new_sqlite_classes": ["AttemptSandbox"] },
66 { "tag": "v2", "new_sqlite_classes": ["Sandbox2Core", "Sandbox4Core"] },
67 { "tag": "v3", "new_sqlite_classes": ["AgentComputer"] },
68 // Workspace agents' computers are gone, and with them their objects.
69 { "tag": "v4", "deleted_classes": ["AgentComputer"] }
70 ],
71 "services": [
72 { "binding": "IDENTITY", "service": "g1t-identity" },
73 { "binding": "REPOS", "service": "g1t-repos" },
74 { "binding": "WORK", "service": "g1t-work" },
75 { "binding": "BILLING", "service": "g1t-billing" },
76 { "binding": "ACTIONS", "service": "g1t-actions" },
77 { "binding": "DEPLOYMENTS", "service": "g1t-deployments" },
78 // The event bus: abuse.flagged, when a sandbox looks like it is mining.
79 { "binding": "EVENTS", "service": "g1t-events" }
80 ],
81 // A sweep for lifecycle steps whose trigger was missed or whose sandbox
82 // died before reporting, which also starts queued nightly backups.
83 "triggers": { "crons": ["*/5 * * * *"] },
84 // Events it reacts to: a pull request that may now merge by its
85 // repository's settings, a merge check or the merge queue to start.
86 "queues": {
87 "consumers": [{ "queue": "g1t-events-runner", "max_batch_size": 20, "max_batch_timeout": 1, "max_retries": 3, "dead_letter_queue": "g1t-events-dlq" }]
88 },
89 "vars": {
90 "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58",
91 // Sandboxes reach the internet directly. A workflow job that may be
92 // given brokered secrets passes its HTTP(S) through this Worker, which
93 // fills them in. "off" passes nothing through it: stand-ins then go
94 // out unfilled.
95 "EGRESS": "on",
96 // Sandboxes stop themselves when they look like they are mining
97 // (crates/runner abuse.rs). "off" turns the CPU watch off; miners
98 // named in commands are refused either way.
99 "ABUSE_WATCH": "on",
100 // Each workflow job gets a Docker Engine of its own, inside its
101 // sandbox, started the first time a step uses Docker or the job has
102 // `services:` or `container:` (crates/runner docker/). "off" gives
103 // jobs none.
104 "DOCKER": "on",
105 // Nightly backups (src/backup.ts): each sweep starts this many of the
106 // backups the repos service queued, with at most BACKUPS_RUNNING at
107 // once. "0" starts none.
108 "BACKUPS_PER_SWEEP": "4",
109 "BACKUPS_RUNNING": "6"
110 },
111 // Every log kept: few requests, and a failed run must be traceable.
112 "observability": { "enabled": true, "head_sampling_rate": 1 }
113}