The code-side fallback default for mcpToolkitSyncScheduleRefreshInterval was 60 minutes while prod LaunchDarkly has been serving 2 minutes for >2 months (function unchanged since 2026-02-09; constant unchanged since 2026-03-14).
If LD goes down — or for self-hosted deployments that don't run LD at all — the MCP toolkit schedule refresh loop in workers/mcp_toolkit_sync.go drops from running every 2 minutes to every 60 minutes, a 30x regression in freshness compared to prod.
This PR sets the code default to 2 so that:
The existing if flagValue <= 0 { return defaultValue } guard already prevents pathological LD values, so 2 is a safe code-side floor. Also fixes a stale "default 4 hours via LD" comment on startPeriodicMCPScheduleCreation.
Comparison via the prevent-launchdarkly-default-drift cron job:
LD-Env-6875a029fb14a3093c7b65f4) via EDGE_CONFIG_LAUNCHDARKLY and resolved each flag's served value.c.client.*Variation(...) call in apps/thermos/utils/launchdarkly.go, including the local defaultValue literal each helper passes.git blame on the helper body to make sure the code default has been stable for >14 days before flipping.Drift summary for this run:
| Flag | Code default | Prod LD served | Status |
|---|---|---|---|
mcpToolkitSyncScheduleRefreshInterval | 60 → 2 | 2 (on) | Fixed in this PR |
pollingTriggerBatchSize | 800 → 200 | 200 | In open PR #9915 |
webhookTriggerBatchSize | 1000 → 200 | 200 | In open PR #9915 |
webhookMaxProcessorsPerTick | 1 → 10 | 10 | In open PR #9915 |
Other detected drifts were either context-dependent (rules/targets), per-project CSVs, complex object flags, or recently-touched (<14d) — not safe to auto-align.
go build ./... clean from apps/thermos/.go vet ./... clean.gofmt -l utils/launchdarkly.go workers/mcp_toolkit_sync.go → no diffs.go test -count=1 ./utils/... ./workers/... → all green (workers, timer_shards, utils).GetMCPToolkitSyncScheduleRefreshInterval:
workers/mcp_toolkit_sync.go:404 (sole caller, inside a periodic refresh goroutine — controls time.Sleep cadence). Behavior with the new default is identical to current prod when LD is reachable, and 30x more responsive when LD is unavailable.Apollo core platform - webhook-trigger (and its downstream aggregator run-apollo-api-tests-thermos-core-platform) fail on this PR with:
[Apollo test] › tests/api/v3/webhook_triggers.spec.ts:316
V3 Webhook trigger tests › setup webhook trigger for github
Expected: 201
Received: 400
This is a pre-existing master flake — not caused by this PR. The identical assertion at the same file/line fails on master run 25763523250 (2026-05-12 21:37Z, ~21h before this PR). The failure is in a GitHub webhook trigger upsert API call returning 400 — entirely unrelated to the thermos LD constant changed here. The MCP toolkit sync worker (the sole consumer of the changed constant) is gated behind composioEnv != env.ENV_COMPOSIO_LOCAL (workers/mcp_toolkit_sync.go:420-423) and does not run in CI at all. Already re-ran the failed jobs once — failed identically.
cc @abir-taheer @lingalarahul7 @dhawal1
Origin: cron-03fc887bd1a1 / zen-cron-489daefeecfc Triggered by: abir@composio.dev | Source: cron
Based on git blame analysis of 2 file(s):
| Contributor | Contribution | Files |
|---|---|---|
| anshugarg15 | 34% | 2 |
| lingalarahul7 |
| 29% |
| 2 |
| sarthak | 29% | 2 |
| Zen | 3% | 2 |
| Rohan Prabhu | 2% | 1 |
Recommend sarthak and Zen. sarthak has recent edits to both files (5 days and 2 weeks ago) and significant contributions, so they’ll have good context for the changes. Zen made a change to mcp_toolkit_sync.go today and can quickly validate the recent behavior there.
🤖 Based on git blame with recency weighting (recent edits count more).
:white_check_mark: All modified and coverable lines are covered by tests.
| Flag | Coverage Δ | |
|---|---|---|
| e2e-tests | ? | |
| self-hosted-tests | 5.64% <ø> (ø) | |
| thermos-service-isolation-tests | 65.62% <ø> (?) | |
| thermos-unit-tests | 7.15% <ø> (ø) | |
| unit-tests | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| apps/thermos/utils/launchdarkly.go | 2.63% <ø> (ø) | |
| apps/thermos/workers/mcp_toolkit_sync.go | 23.96% <ø> (ø) |
... and 820 files with indirect coverage changes