fix: correct tautological uppercase check in tool description summarizer#93753
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 16, 2026, 3:38 PM ET / 19:38 UTC. Summary PR surface: Source 0. Total 0 across 1 file. Reproducibility: yes. from source inspection: a tool description whose candidate summary line is Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the shared-helper predicate fix after the contributor adds redacted after-fix proof, with focused regression coverage for mixed-case colon headings and preserved uppercase schema headings. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: a tool description whose candidate summary line is Is this the best way to solve the issue? Yes: fixing the shared AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f0b5d78ff91b. Label changesLabel justifications:
Evidence reviewedPR surface: Source 0. Total 0 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
The isToolDocBlockStart function checked normalized === normalized.toUpperCase() but normalized is already uppercased from line 24, making the condition always true. This caused mixed-case lines ending with ':' to be incorrectly detected as doc block starts, truncating tool descriptions unnecessarily. Compare the original line instead to correctly detect all-uppercase headings.
|
Maintainer verification complete after rebasing onto current
|
1103b96 to
443c188
Compare
…zer (openclaw#93753) The isToolDocBlockStart function checked normalized === normalized.toUpperCase() but normalized is already uppercased from line 24, making the condition always true. This caused mixed-case lines ending with ':' to be incorrectly detected as doc block starts, truncating tool descriptions unnecessarily. Compare the original line instead to correctly detect all-uppercase headings. Co-authored-by: Gautam Kumar <[email protected]>
…zer (openclaw#93753) The isToolDocBlockStart function checked normalized === normalized.toUpperCase() but normalized is already uppercased from line 24, making the condition always true. This caused mixed-case lines ending with ':' to be incorrectly detected as doc block starts, truncating tool descriptions unnecessarily. Compare the original line instead to correctly detect all-uppercase headings. Co-authored-by: Gautam Kumar <[email protected]>
Summary
The
isToolDocBlockStartfunction insrc/agents/tool-description-summary.tshad a tautological condition that made it incorrectly classify mixed-case lines as doc block headings.The bug: Line 43 checked
normalized === normalized.toUpperCase(), butnormalizedwas already set toline.trim().toUpperCase()on line 24, making this condition alwaystrue. This meant any line ending with:and longer than 12 characters would be treated as a doc block start — even if it wasn't all uppercase.Example: A tool description containing a line like
"My Custom Section Title:"would be incorrectly skipped during summarization, causing the tool's description to be truncated when it shouldn't be.Fix
Changed the comparison from
normalized === normalized.toUpperCase()toline.trim() === line.trim().toUpperCase()so it correctly checks whether the original line is all uppercase, matching the intent of the other explicit checks for known heading patterns like"ACTIONS:","JOB SCHEMA:", etc.Verification
src/agents/tool-description-summary.ts:43"ACTIONS:","CRITICAL CONSTRAINTS:") is preserved — these still match via the explicit checks on lines 29-38"My Custom Section Title:"no longer incorrectly match the fallback uppercase check