Skip to content

Commit cbf21ac

Browse files
sametbasbugclaude
andcommitted
Fit the cron budget the account actually has
The outbound email trigger deployed to neither environment. Staging and production both uploaded their code and both had their schedule update refused: the free plan allows five cron triggers per account and five were already spoken for. The count I checked against was wrong. orbit-remote-mcp lives in another repository and holds one of the five, which no config file here reveals. Counting only this repo said three plus two fits, so I fixed staging and watched production fail the same way an hour later. Staging now keeps one trigger, the daily backup rehearsal. Reconciliation still runs on demand through staging:slice4:backup-rehearsal and its logic is covered locally, so what staging loses is a rehearsal we can start ourselves. What production gains is the ability to send at all. The lock now counts the trigger it cannot see. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 8de91e0 commit cbf21ac

2 files changed

Lines changed: 25 additions & 15 deletions

File tree

‎scripts/orbit-production-config-tests.mjs‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,21 @@ assertDeepEqual(
234234
);
235235

236236
/* Hesap genelinde cron bütçesi. Workers Free planı 5 tetikleyiciye izin
237-
* veriyor ve aynı anda yalnız iki worker yayında: production ile staging.
238-
* Bütçe aşılınca dağıtım sessizce yarım kalıyor — worker yükleniyor, cron
239-
* güncellemesi API'den dönüyor. Bunu bir kez staging'de ödedim; buradan
240-
* sonra derlemede yakalanır. */
237+
* veriyor ve bütçe aşılınca dağıtım SESSİZCE yarım kalıyor: worker
238+
* yükleniyor, cron güncellemesi API'den dönüyor, kod yeni tetikleyicisi
239+
* olmadan yayına giriyor. Hem staging'de hem production'da ödedim.
240+
*
241+
* Bu depoda olmayan bir worker da paydan yiyor: orbit-remote-mcp'nin
242+
* günlük turu. Onu buradan göremeyiz, o yüzden sabit olarak sayıyoruz —
243+
* saymadığım ilk sürüm bana 5'e sığdığımızı söyledi ve production
244+
* dağıtımı yine düştü. Sayı değişirse bu satır güncellensin. */
241245
const CLOUDFLARE_FREE_CRON_BUDGET = 5;
242-
const deployedCrons = live.triggers.crons.length + staging.triggers.crons.length;
246+
const CRONS_OWNED_BY_OTHER_REPOS = 1;
247+
const deployedCrons =
248+
live.triggers.crons.length + staging.triggers.crons.length + CRONS_OWNED_BY_OTHER_REPOS;
243249
assert(
244250
deployedCrons <= CLOUDFLARE_FREE_CRON_BUDGET,
245-
`production and staging together request ${deployedCrons} cron triggers, over the account limit of ${CLOUDFLARE_FREE_CRON_BUDGET}`,
251+
`this repo plus orbit-remote-mcp request ${deployedCrons} cron triggers, over the account limit of ${CLOUDFLARE_FREE_CRON_BUDGET}`,
246252
);
247253
assert(
248254
!staging.triggers.crons.includes('*/5 * * * *'),

‎wrangler.staging.jsonc‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@
5252
}
5353
},
5454
"triggers": {
55-
/* Burada giden posta cron'u YOK ve olmamalı. Workers Free planı hesap
56-
* başına 5 cron tetikleyicisine izin veriyor; production üçünü de
57-
* kullanınca staging'e iki tane kalıyor. Üçüncüyü buraya eklemek
58-
* dağıtımı yarım bırakıyor: worker yükleniyor, cron güncellemesi
59-
* API'den reddediliyor. Ölçerek gördüm.
55+
/* Staging'e hesaptaki cron bütçesinden TEK tetikleyici düşüyor.
56+
* Workers Free planı hesap başına beşe izin veriyor ve üçü zaten
57+
* dolu: production'ın yedekleme, uzlaştırma ve giden posta turları.
58+
* Beşincisi orbit-remote-mcp'nin — o başka bir deponun worker'ı,
59+
* buradan kısılmaz.
6060
*
61-
* Kaybımız yok: staging'de RESEND_API_KEY tanımlı değil, gönderici
62-
* kapalı ve boşaltıcı hiçbir şey göndermezdi. Kuyruğun doğru
63-
* dolduğunu testler zaten kanıtlıyor. */
64-
"crons": ["17 3 * * *", "0 4 * * *"]
61+
* Bütçeyi aşmak dağıtımı sessizce yarım bırakıyor: worker yükleniyor,
62+
* cron güncellemesi API'den dönüyor ve kod yeni tetikleyicisi olmadan
63+
* yayına giriyor. Bunu hem staging'de hem production'da ödedim.
64+
*
65+
* Kalan tetikleyici günlük yedek provası. Uzlaştırma turu buradan
66+
* düştü ama kapsamsız kalmadı: staging:slice4:backup-rehearsal elle
67+
* koşuyor ve mantığın kendisi yerel testlerde. */
68+
"crons": ["17 3 * * *"]
6569
}
6670
}

0 commit comments

Comments
 (0)