Skip to content

Commit 783a5d2

Browse files
authored
refactor(config): purge numeric tuning knobs behind built-in defaults (#111382)
1 parent ec01949 commit 783a5d2

365 files changed

Lines changed: 1674 additions & 9003 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/max-lines-baseline.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ extensions/browser/src/browser/chrome-mcp.ts
1919
extensions/browser/src/browser/chrome.executables.ts
2020
extensions/browser/src/browser/chrome.internal.test.ts
2121
extensions/browser/src/browser/chrome.ts
22-
extensions/browser/src/browser/config.test.ts
2322
extensions/browser/src/browser/extension-relay/relay-bridge.ts
2423
extensions/browser/src/browser/pw-session.create-page.navigation-guard.test.ts
2524
extensions/browser/src/browser/pw-session.ts
@@ -545,7 +544,6 @@ src/agents/system-prompt.test.ts
545544
src/agents/system-prompt.ts
546545
src/agents/tool-display-common.ts
547546
src/agents/tool-loop-detection.test.ts
548-
src/agents/tool-loop-detection.ts
549547
src/agents/tool-search.test.ts
550548
src/agents/tool-search.ts
551549
src/agents/tools/computer-tool.ts
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"core": 3007,
3-
"channel": 3732,
2+
"core": 2851,
3+
"channel": 3680,
44
"plugin": 3537
55
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
2f4ba51e354995c0d28052d7c61210ace881145af0db7f5409f8eb7dff167a4f config-baseline.json
2-
0e9d04a669b853f8b58397d2dfc8913b5a3dd70af20ebd43e25b08be4cd3d292 config-baseline.core.json
3-
c624c55cb46a67db4c836dcc04d295db966579885a00778d1a32241632de3475 config-baseline.channel.json
1+
a8e315e49d62b95c54c752041cc27628260686f0a99de646c24505edc977a3c3 config-baseline.json
2+
d3da432d372bc652d432be978495a9f28b3478da1034cbe888550c8bf6cb9dd4 config-baseline.core.json
3+
dbf05e8852c873d48288336dbbb05d7a7b3a1bcbee8cb8ece5e40f204d2ab9db config-baseline.channel.json
44
0e0592b95e4958477e539abd5ccb336c63735c7d69133199953c48ff3c0845a8 config-baseline.plugin.json

docs/.generated/plugin-sdk-api-baseline.sha256

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ e5e67ddf3cab38fcbf9220bc3160715897e2709d9a9ff6ff36f1ecc9453c2367 module/agent-c
1313
30452bae2a689fb75dcb6dba9ef11e5b95f9cbe0c62eb190a0fcb82d0a19ae52 module/agent-core
1414
74daa746deb548379d3f0d6eac3c4d082df1034c4360cc03bf51fee0f10a2e4d module/agent-harness
1515
e09226afd443cee02ed648f032f53bfeb60585617bb523a649995764d3c38da9 module/agent-harness-exec-review-runtime
16-
ca9810b66aff3c8b60278b80d634c9c280322034964c05cb727d84252080aabf module/agent-harness-runtime
16+
ffacec9f51060b81c597a9d169e7ee0fa463fcbd18daffdce129d144897b2c5b module/agent-harness-runtime
1717
ec22d7a039fb58d0b8343ad149322960d3d8ca58b3f4c70f2fa8a099f8186d0c module/agent-harness-task-runtime
1818
5f63bf587bf3547d59d0dc5d0dc2fee54745aa6edaab4aa3ae700dba03443edb module/agent-harness-tool-runtime
1919
5168648cd946abad8a92822889f13ceacc87ed502314a66190d0b1eb8ebe76ea module/agent-media-payload
@@ -35,13 +35,13 @@ a5e9215460bc99fb6e6cdd4bc67eb6466a5e99f28279e13d1769599c18dfe0b3 module/approva
3535
6c81b9122ab0a5c3190700c0a234047274a8d48edddcc8f26d3859b886696068 module/async-lock-runtime
3636
ad60ccc4fe9084d47f0477e02d9296bacad32f26d7456e2a84be8d25a53a25c2 module/boolean-param
3737
333a906d4ad9d3e89102ab7eb9059a7f9c7277328041223ee3b0713442f56a29 module/browser-config
38-
0de3c53c3ba6ff739d4b047b440588ac25fdea3b795e92b37cab90bfd1520a8c module/bundled-channel-config-schema
38+
c117222faacb1c68bf6df6594fbf47c3ea0240fd1403f913ecb72e08730d32cf module/bundled-channel-config-schema
3939
b6e53fb9c69840d71785325cd9a244809ffd6d3f0dd08ed0cccf816dd993f210 module/channel-actions
4040
fcfd76dbfe818e8e8574a425f340fee935acf53d4484e961f54c3ec760fb15fe module/channel-activity-runtime
4141
24c53c9cefacd8c1bec2aa91ba2b01e606f8b8477bc5cb2f99567225a4dcf67c module/channel-config-helpers
4242
16dc9d32e8ca3ef78fc63e0fc4b20e6b943633e9572de1a49d24a880b6ffc66c module/channel-config-primitives
4343
5da2caccf30780a4cf86ac710e2ca42cc9576cb1c49291c0929889fec0cc2257 module/channel-config-schema
44-
080d51451ad15a2787eada3dcc04985154cc394058dfbf2194c6560801f3a1c1 module/channel-config-schema-legacy
44+
e6c20ca52397a90297c49928e9b8d98a48059ed107d21f8cec6a7ec9c9e2d1ab module/channel-config-schema-legacy
4545
8740f7cc786a380043e41aaf710ac47931b3587c122bb152d5f0231f98fd5351 module/channel-config-writes
4646
2dd98659d9600e755f09ef00dd91c36692b8562ed3700461937e94f6cd1e640a module/channel-contract
4747
3db1a968e5b8aa97623a48a9ee76393d578d4bb90634fa59f499a2fd87b9da72 module/channel-core
@@ -94,8 +94,8 @@ e26e0f75b43c5bbadd34401b21d8c76406ca0b87cc997be5abd100462d318f1a module/compat
9494
235a9e4d983042c3db156efcab0e333984cbbf13ebdfcc44a3a5ab40cf3edb4f module/config-contracts
9595
20f3f8042de53e4eee61b64de9102c8c202b9299e6a29235647a4729f70145f2 module/config-mutation
9696
316949815affe623ac63951a5db580527f02663576dffa084f02768f612c0c1c module/config-runtime
97-
adb5fa3476c1f6b4e6c6d2d170254ed781949e7b609be1679661003911635de3 module/config-schema
98-
1531347939d51c528b7230b951da194faafdfc3d8284765e7e9a0373d1ce5ef8 module/config-types
97+
a8ce8d7a8df9d427956a3d6f2daf00b0234be473e8cec2d01b84f34c6d7c78bb module/config-schema
98+
b317e9810e57d07ddd720d68c1ce93172e5bc331d9c095a332edc52f565d5ce4 module/config-types
9999
42d15153981cfe3adc1d5f91621434c56f07a9bd48c15ce34742f72dd040c142 module/context-visibility-runtime
100100
03636897fb99cb73e4d8620c8a0e0d72b4d52fc32bf94f525af2aa88c489c6c2 module/conversation-binding-runtime
101101
c1ea9510dfda047609a99d5d2cd1f1560f5d469a36e6b695766213d695c25b0f module/conversation-runtime
@@ -111,7 +111,7 @@ f70c93d28053ca2e8353e45e6515ce7acef188097c6117d1545965d0699c8004 module/device-
111111
371ee1fd78810526745c93c24c4b85562c981676adcc33aaa0c627f5d2d45810 module/direct-dm-guard-policy
112112
91278c800e0f87d7111f226e1cfcb6f29552936fec7215b3b69be4da7e2ee8fb module/directory-config-runtime
113113
ea81ef06956c1bc0853fa00afbbc2b5a4019116aaf8a436e1b27d06f7a2c9e88 module/directory-runtime
114-
c443b68d232f28b7241e1be10d1604def0d52d99ce3ae1ca8e2be3c6fd8b2d2f module/discord
114+
7e953d227d71e4e07c412b21f6db0604279cb6360eb6e025aceb79576212afd0 module/discord
115115
f41f9b34ab771c894293453bcdf072860c7cd509dd4e0172156634a816b8d727 module/document-extractor
116116
3ac20ebba52de5a2f18807c0c8ade6e61f59e260a35fc1d077c9dedb9960dabd module/embedding-providers
117117
46c05a90b66032d1d7ad08445840a4bf81aa2bd325348f87710ad4538daf38f6 module/error-runtime
@@ -299,12 +299,12 @@ eb9a25321eaa2bbea1721f7d4b8b218bed398379494e09a21a621f264435b39a module/string-
299299
32f031eb75c887b24b8eaa693cd0aa1a4648dca85eab7bfdfb3d08136861c274 module/system-event-runtime
300300
65361dc9a23578787c1ccf98f7df99e443574614e7ce95889f9a295725e12fae module/talk-config-runtime
301301
9efd666b8c2cc8a9abf816751fd9420f3c048d158e48570cae8b7a4cbc52a83f module/target-resolver-runtime
302-
da05dc1506e226fc25285a2963bd8d96dd0e882d6baa24b8073a0c53fef9fc81 module/telegram-account
302+
ec6df323a2dbd1f837df25c0290289031bf60e0b0250f47172f3eaa316667c90 module/telegram-account
303303
7729f9f201c08f114925da75ee86a5a8deb6677e5d1b5ee86bc60aacaa01f63b module/telegram-command-config
304304
110944726884fca94f38c9c329b5950629438b9a719f4782c4beeade8bd67746 module/temp-path
305305
a65f17db3d04c2ca1b34f9a4ebe8748952bbcb00318b741adbe3f227d2e2de20 module/text-autolink-runtime
306306
e24c49c1c7b35e8b4403d45eb76bb0f33ec2f23f714bda322e1363251737d6cd module/text-chunking
307-
948694f6da0f85fb2e9af0d66cd49b8ff0648b6dc96ed4165b03736a3e8f2439 module/text-runtime
307+
1df5a33be5dbf611e301c01c6b8bcf502c3101aae10cd14a79f1bbb58b116497 module/text-runtime
308308
4bdc79e3b42814a30c3c84401f1f0e4620706092787a1f5d2b6c4148b202fe02 module/text-utility-runtime
309309
dac9afb3833e237e3edcc9d687240caceb8288abd0c6b757dcc3c16a819eb029 module/thread-bindings-runtime
310310
65c9b0b77c0c19140765ec282f9a6424f6ce8a55d0e318b30485d52fd41968e9 module/thread-bindings-session-runtime

docs/automation/cron-jobs.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Recurring jobs can set `pacing.min` and/or `pacing.max` to duration strings such
8282

8383
During an isolated run, a paced job can call the `cron` tool with `action: "next_check"` and `in: "30m"`. The proposal applies only to that currently running job and is measured from successful run completion. OpenClaw silently clamps it to the configured bounds.
8484

85-
Pacing without a proposal leaves the normal schedule unchanged. Failed, timed-out, and skipped runs discard the proposal, so existing retry and error-backoff behavior takes precedence. Manually forcing a recurring job is out-of-band and preserves its pending natural or paced slot. For condition-triggered jobs, `cron.triggers.minIntervalMs` remains a lower bound even when a proposal requests an earlier check.
85+
Pacing without a proposal leaves the normal schedule unchanged. Failed, timed-out, and skipped runs discard the proposal, so existing retry and error-backoff behavior takes precedence. Manually forcing a recurring job is out-of-band and preserves its pending natural or paced slot. For condition-triggered jobs, the built-in minimum interval remains a lower bound even when a proposal requests an earlier check.
8686

8787
### Day-of-month and day-of-week use OR logic
8888

@@ -583,33 +583,24 @@ Use the latest-generation, best-tier model available from your provider for untr
583583
cron: {
584584
enabled: true,
585585
store: "~/.openclaw/cron/jobs.json",
586-
maxConcurrentRuns: 8,
587586
triggers: {
588587
enabled: false,
589-
minIntervalMs: 30000,
590-
},
591-
retry: {
592-
maxAttempts: 3,
593-
backoffMs: [30000, 60000, 300000],
594-
retryOn: ["rate_limit", "overloaded", "network", "timeout", "server_error"],
595588
},
596589
webhookToken: "replace-with-dedicated-webhook-token",
597590
sessionRetention: "24h",
598591
},
599592
}
600593
```
601594

602-
The `retry` values above are the defaults: up to 3 retries with `30s/60s/5m` backoff, retrying all five transient categories. `webhookToken` is sent as `Authorization: Bearer <token>` on cron webhook POSTs.
603-
604-
`maxConcurrentRuns` limits both scheduled cron dispatch and isolated agent-turn execution, and defaults to 8. Isolated cron agent turns use the queue's dedicated `cron-nested` execution lane internally, so raising this value lets independent cron LLM runs progress in parallel instead of only starting their outer cron wrappers. The shared non-cron `nested` lane is not widened by this setting.
595+
`webhookToken` is sent as `Authorization: Bearer <token>` on cron webhook POSTs.
605596

606597
`cron.store` is a logical store key and doctor migration path, not a live JSON file to hand-edit. Job data lives in SQLite; use the CLI or Gateway API for changes.
607598

608599
Disable cron: `cron.enabled: false` or `OPENCLAW_SKIP_CRON=1`.
609600

610601
<AccordionGroup>
611602
<Accordion title="Retry behavior">
612-
**One-shot retry**: transient errors (rate limit, overload, network, timeout, server error) retry up to `retry.maxAttempts` times (default 3) using `retry.backoffMs` (default 30s, 60s, 5m). Permanent errors disable the job immediately.
603+
**One-shot retry**: transient errors (rate limit, overload, network, timeout, server error) use a built-in retry schedule. Permanent errors disable the job immediately.
613604

614605
**Recurring retry**: consecutive execution errors back off on an extended schedule (30s, 60s, 5m, 15m, 60m). Backoff resets after the next successful run.
615606

docs/channels/discord.md

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,57 +1580,21 @@ openclaw logs --follow
15801580
- `Slow listener detected ...`
15811581
- `stuck session: sessionKey=agent:...:discord:... state=processing ...`
15821582

1583-
Discord gateway queue knobs:
1584-
1585-
- single-account: `channels.discord.eventQueue.listenerTimeout`
1586-
- multi-account: `channels.discord.accounts.<accountId>.eventQueue.listenerTimeout`
1587-
- this only controls Discord gateway listener work, not agent turn lifetime
1588-
15891583
Discord does not apply a channel-owned timeout to queued agent turns. Message listeners hand off immediately, and queued Discord runs preserve per-session ordering until the session/tool/runtime lifecycle completes or aborts the work.
15901584

1591-
```json5
1592-
{
1593-
channels: {
1594-
discord: {
1595-
accounts: {
1596-
default: {
1597-
eventQueue: {
1598-
listenerTimeout: 120000,
1599-
},
1600-
},
1601-
},
1602-
},
1603-
},
1604-
}
1605-
```
1606-
16071585
</Accordion>
16081586

16091587
<Accordion title="Gateway metadata lookup timeout warnings">
16101588
OpenClaw fetches Discord `/gateway/bot` metadata before connecting. Transient failures fall back to Discord's default gateway URL and are rate-limited in logs.
16111589

1612-
Metadata timeout knobs:
1613-
1614-
- single-account: `channels.discord.gatewayInfoTimeoutMs`
1615-
- multi-account: `channels.discord.accounts.<accountId>.gatewayInfoTimeoutMs`
1616-
- env fallback when config is unset: `OPENCLAW_DISCORD_GATEWAY_INFO_TIMEOUT_MS`
1617-
- default: `30000` (30 seconds), max: `120000`
1590+
The metadata timeout defaults to 30 seconds. `OPENCLAW_DISCORD_GATEWAY_INFO_TIMEOUT_MS` can override it for unusual host environments.
16181591

16191592
</Accordion>
16201593

16211594
<Accordion title="Gateway READY timeout restarts">
16221595
OpenClaw waits for Discord's gateway `READY` event during startup and after runtime reconnects. Multi-account setups with startup staggering can need a longer startup READY window than the default.
16231596

1624-
READY timeout knobs:
1625-
1626-
- startup single-account: `channels.discord.gatewayReadyTimeoutMs`
1627-
- startup multi-account: `channels.discord.accounts.<accountId>.gatewayReadyTimeoutMs`
1628-
- startup env fallback when config is unset: `OPENCLAW_DISCORD_READY_TIMEOUT_MS`
1629-
- startup default: `15000` (15 seconds), max: `120000`
1630-
- runtime single-account: `channels.discord.gatewayRuntimeReadyTimeoutMs`
1631-
- runtime multi-account: `channels.discord.accounts.<accountId>.gatewayRuntimeReadyTimeoutMs`
1632-
- runtime env fallback when config is unset: `OPENCLAW_DISCORD_RUNTIME_READY_TIMEOUT_MS`
1633-
- runtime default: `30000` (30 seconds), max: `120000`
1597+
Startup waits 15 seconds and runtime reconnects wait 30 seconds. `OPENCLAW_DISCORD_READY_TIMEOUT_MS` and `OPENCLAW_DISCORD_RUNTIME_READY_TIMEOUT_MS` remain available for unusual host environments.
16341598

16351599
</Accordion>
16361600

@@ -1737,12 +1701,11 @@ Primary reference: [Configuration reference - Discord](/gateway/config-channels#
17371701
- startup/auth: `enabled`, `token`, `applicationId`, `accounts.*`, `allowBots`
17381702
- policy: `groupPolicy`, `dmPolicy`, `allowFrom`, `dm.*`, `guilds.*`, `guilds.*.channels.*`
17391703
- command: `commands.native`, `commands.useAccessGroups` (global), `configWrites`, `slashCommand.ephemeral`
1740-
- event queue: `eventQueue.listenerTimeout` (listener budget, default `120000`), `eventQueue.maxQueueSize` (default `10000`), `eventQueue.maxConcurrency` (default `50`)
1741-
- gateway: `proxy`, `gatewayInfoTimeoutMs`, `gatewayReadyTimeoutMs`, `gatewayRuntimeReadyTimeoutMs`
1704+
- gateway: `proxy`
17421705
- reply/history: `replyToMode`, `historyLimit`, `dmHistoryLimit`, `dms.*.historyLimit`
17431706
- delivery: `textChunkLimit` (default `2000`), `maxLinesPerMessage` (default `17`)
17441707
- streaming: `streaming.mode`, `streaming.chunkMode`, `streaming.preview.*`, `streaming.progress.*`, `streaming.block.*` (legacy flat `streamMode`, `draftChunk`, `blockStreaming`, `blockStreamingCoalesce`, `chunkMode` keys are migrated into `streaming.*` by `openclaw doctor --fix`)
1745-
- media/retry: `mediaMaxMb` (caps outbound Discord uploads, default `100`), `retry`
1708+
- media: `mediaMaxMb` (caps outbound Discord uploads, default `100`)
17461709
- actions: `actions.*`
17471710
- presence: `activity`, `status`, `activityType`, `activityUrl`, `autoPresence.*`
17481711
- UI: `ui.components.accentColor`

0 commit comments

Comments
 (0)