fix: parse autoRecallTimeoutMs in parsePluginConfig#466
fix: parse autoRecallTimeoutMs in parsePluginConfig#466rwmjhb merged 2 commits intoCortexReach:masterfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Closes #467 |
694239d to
5bb04d3
Compare
5bb04d3 to
6a5ee85
Compare
AliceLJY
left a comment
There was a problem hiding this comment.
LGTM! Clean bug fix.
autoRecallTimeoutMs was declared in the PluginConfig interface and consumed at runtime, but never actually parsed in parsePluginConfig — meaning user config was silently ignored and always fell back to the 3000ms default. The schema addition in openclaw.plugin.json is also necessary since additionalProperties: false would reject the field otherwise.
Changes are minimal and correct. Approving and assigning to @rwmjhb for final merge.
|
This PR fixes the missing config field, but it also changes the effective default |
|
Good point — addressed in the latest commit ( |
|
Hi @jlin53882, this PR is currently showing merge conflicts with |
fbcd5c8 to
7c212f6
Compare
✅ Done — Conflict resolved + default updatedWhat was fixed
Final PR status
Changes
Ready to merge. |
rwmjhb
left a comment
There was a problem hiding this comment.
Review: fix: parse autoRecallTimeoutMs in parsePluginConfig
高价值修复——config validation 拒绝用户设置的 timeout 值并静默回退到硬编码默认值,这是真实 bug。
Must Fix
-
Duplicate key:
configSchema.properties里autoRecallTimeoutMs出现了两次,后者会覆盖前者。部分 JSON parser 会报错。 -
默认值不一致:
parsePluginConfig默认5000ms,但 runtime consumer 用?? 3000。两层 fallback 会导致实际默认值取决于parsePositiveInt对未设值的返回行为,请确认只有一处生效。
Notes
- Build failure 是
stale_base=true,rebase 后应该能解决。 - 修掉重复 key + 确认默认值链后可以合并。
Must fix per PR CortexReach#466 review by rwmjhb: - Remove duplicate autoRecallTimeoutMs key in configSchema.properties (had two entries: maximum 30000 and maximum 60000; kept the broader one) - uiHints was already correct with label field
7c212f6 to
b7ba938
Compare
b7ba938 to
d926298
Compare
✅ Review Must-Fix 已處理(d926298)rwmjhb 提出的 Must-Fix1. Duplicate key in configSchema.properties 2. 預設值不一致(parsePluginConfig
PR 最終狀態
|
Problem
autoRecallTimeoutMsis declared in thePluginConfiginterface (line 105), and used at line 2261:However, it is completely missing from
parsePluginConfigreturn object, so the user-supplied value is never parsed, always falls back to the hardcoded default of3000ms, and the config validator rejects the setting with:Fix
Schema (this PR): Add
autoRecallTimeoutMstoopenclaw.plugin.jsonconfigSchema.properties. Required becauseadditionalProperties: falsemeans the field must be listed in the schema to be accepted.Code (upstream): Add
autoRecallTimeoutMs: parsePositiveInt(cfg.autoRecallTimeoutMs) ?? 3000to theparsePluginConfigreturn object.Verification
openclaw.plugin.json→configSchema.properties.autoRecallTimeoutMsnow existsautoRecallTimeoutMswithoutadditionalPropertieserrorautoRecallTimeoutMs?: number;- declaredparsePositiveInt(config.autoRecallTimeoutMs) ?? 5_000- usedChangelog
autoRecallTimeoutMsnow listed in plugin config schemaautoRecallTimeoutMswithout validation errorsEnvironment
Closes #467