You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(doctor): honor per-agent bootstrap profile in size check (#84424)
* fix(doctor): honor per-agent bootstrap profile in size check
* fix(doctor): thread defaultAgentId through structured bootstrap-size health check
The noteBootstrapFileSize note path was fixed in the previous commit.
This commit applies the same defaultAgentId threading to the registered
core/doctor/bootstrap-size health check in doctor-core-checks.ts, which
is used by doctor --lint and repair flows. Adds an integration regression
test that places a 15 000-char AGENTS.md between the per-agent budget
(10 000) and the defaults budget (20 000) and asserts that a truncation
warning is emitted -- the test fails on main (defaults budget wins, no
warning) and passes after this patch (per-agent budget wins, warning).
Also updates three fixHint strings in the health check to name the
per-agent knob before the defaults fallback, matching the note-path tip
text from the previous commit.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* fix(doctor): preserve total-budget remediation guidance
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
@@ -96,10 +98,14 @@ export async function noteBootstrapFileSize(cfg: OpenClawConfig) {
96
98
lines.push("");
97
99
}
98
100
if(needsPerFileTip){
99
-
lines.push("- Tip: tune `agents.defaults.bootstrapMaxChars` for per-file limits.");
101
+
lines.push(
102
+
"- Tip: tune `agents.list[].bootstrapMaxChars` for this agent, or `agents.defaults.bootstrapMaxChars` as fallback, for per-file limits.",
103
+
);
100
104
}
101
105
if(needsTotalTip){
102
-
lines.push("- Tip: tune `agents.defaults.bootstrapTotalMaxChars` for total-budget limits.");
106
+
lines.push(
107
+
"- Tip: tune `agents.list[].bootstrapTotalMaxChars` for this agent, or `agents.defaults.bootstrapTotalMaxChars` as fallback, for total-budget limits.",
message: `${file.name} exceeds bootstrap limits and will be truncated.`,
486
488
path: file.path,
487
-
fixHint: "Reduce the file size or tune agents.defaults.bootstrapMaxChars/TotalMaxChars.",
489
+
fixHint:
490
+
"Reduce the file size or tune `agents.list[].bootstrapMaxChars` / `bootstrapTotalMaxChars` for this agent, or the corresponding `agents.defaults.*` fallback.",
message: `${file.name} is near the configured bootstrap file limit.`,
498
501
path: file.path,
499
-
fixHint: "Reduce the file size or tune agents.defaults.bootstrapMaxChars.",
502
+
fixHint:
503
+
"Reduce the file size or tune `agents.list[].bootstrapMaxChars` for this agent, or `agents.defaults.bootstrapMaxChars` as fallback, for per-file limits.",
0 commit comments