|
78 | 78 | }, |
79 | 79 | { |
80 | 80 | "file": "extensions/codex/src/app-server/approval-bridge.ts", |
81 | | - "line": 1588, |
| 81 | + "line": 1587, |
82 | 82 | "ruleId": "boundary/text-utf16-truncation", |
83 | 83 | "match": "value.slice(0, Math.max(0, maxLength - 3))", |
84 | 84 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
85 | 85 | }, |
86 | 86 | { |
87 | 87 | "file": "extensions/codex/src/app-server/attempt-notifications.ts", |
88 | | - "line": 332, |
| 88 | + "line": 320, |
89 | 89 | "ruleId": "boundary/text-utf16-truncation", |
90 | 90 | "match": "text.slice(0, 237)", |
91 | 91 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
92 | 92 | }, |
93 | 93 | { |
94 | 94 | "file": "extensions/codex/src/app-server/client.ts", |
95 | | - "line": 743, |
| 95 | + "line": 731, |
96 | 96 | "ruleId": "boundary/text-utf16-truncation", |
97 | 97 | "match": "redacted.slice(0, CODEX_APP_SERVER_PARSE_LOG_MAX)", |
98 | 98 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
141 | 141 | }, |
142 | 142 | { |
143 | 143 | "file": "extensions/codex/src/app-server/event-projector.ts", |
144 | | - "line": 3135, |
| 144 | + "line": 3069, |
145 | 145 | "ruleId": "boundary/text-utf16-truncation", |
146 | 146 | "match": "text.slice(0, TOOL_TRANSCRIPT_OUTPUT_MAX_CHARS)", |
147 | 147 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
155 | 155 | }, |
156 | 156 | { |
157 | 157 | "file": "extensions/codex/src/command-handlers.ts", |
158 | | - "line": 1893, |
| 158 | + "line": 2054, |
159 | 159 | "ruleId": "boundary/text-utf16-truncation", |
160 | 160 | "match": "formatCodexTextForDisplay(error).slice(0, CODEX_DIAGNOSTICS_ERROR_MAX_CHARS)", |
161 | 161 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
162 | 162 | }, |
163 | 163 | { |
164 | 164 | "file": "extensions/diagnostics-otel/src/service.ts", |
165 | | - "line": 679, |
| 165 | + "line": 685, |
166 | 166 | "ruleId": "boundary/text-utf16-truncation", |
167 | 167 | "match": "value.slice(0, maxChars)", |
168 | 168 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
169 | 169 | }, |
170 | | - { |
171 | | - "file": "extensions/discord/src/error-body.ts", |
172 | | - "line": 21, |
173 | | - "ruleId": "boundary/text-utf16-truncation", |
174 | | - "match": "summary.slice(0, DISCORD_RESPONSE_BODY_SUMMARY_MAX_CHARS)", |
175 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
176 | | - }, |
177 | 170 | { |
178 | 171 | "file": "extensions/discord/src/monitor/gateway-metadata.ts", |
179 | 172 | "line": 199, |
|
216 | 209 | "match": "singleLine.slice(0, maxChars)", |
217 | 210 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
218 | 211 | }, |
219 | | - { |
220 | | - "file": "extensions/feishu/src/monitor.transport.ts", |
221 | | - "line": 154, |
222 | | - "ruleId": "boundary/text-utf16-truncation", |
223 | | - "match": "redacted.slice(0, FEISHU_WS_LOG_ERROR_MAX_LENGTH)", |
224 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
225 | | - }, |
226 | 212 | { |
227 | 213 | "file": "extensions/google/embedding-batch.ts", |
228 | 214 | "line": 223, |
|
482 | 468 | "match": "sanitized.slice(0, TELEGRAM_QA_PROGRESS_DETAIL_LIMIT - 3)", |
483 | 469 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
484 | 470 | }, |
485 | | - { |
486 | | - "file": "extensions/qa-lab/src/qa-credentials-admin.runtime.ts", |
487 | | - "line": 395, |
488 | | - "ruleId": "boundary/response-body-limit", |
489 | | - "match": "response.text()", |
490 | | - "guidance": "Use readResponseWithLimit(...), readProviderJsonResponse(...), readResponseTextSnippet(...), or openclaw/plugin-sdk/response-limit-runtime from plugin code." |
491 | | - }, |
492 | 471 | { |
493 | 472 | "file": "extensions/qa-lab/src/runtime-parity.ts", |
494 | 473 | "line": 995, |
|
587 | 566 | "match": "lastError.message.slice(0, 100)", |
588 | 567 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
589 | 568 | }, |
590 | | - { |
591 | | - "file": "extensions/qqbot/src/engine/messaging/reply-dispatcher.ts", |
592 | | - "line": 284, |
593 | | - "ruleId": "boundary/text-utf16-truncation", |
594 | | - "match": "value\n .replace(/[\\r\\n\\t]/g, \" \")\n .replaceAll(\"\\0\", \" \")\n .slice(0, maxLen)", |
595 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
596 | | - }, |
597 | | - { |
598 | | - "file": "extensions/qqbot/src/engine/messaging/reply-dispatcher.ts", |
599 | | - "line": 516, |
600 | | - "ruleId": "boundary/text-utf16-truncation", |
601 | | - "match": "ttsText.slice(0, 50)", |
602 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
603 | | - }, |
604 | 569 | { |
605 | 570 | "file": "extensions/qqbot/src/engine/utils/log.ts", |
606 | 571 | "line": 51, |
|
629 | 594 | "match": "currentText.slice(0, chunkLength)", |
630 | 595 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
631 | 596 | }, |
632 | | - { |
633 | | - "file": "extensions/telegram/src/raw-update-log.ts", |
634 | | - "line": 83, |
635 | | - "ruleId": "boundary/text-utf16-truncation", |
636 | | - "match": "value.slice(0, MAX_RAW_UPDATE_STRING)", |
637 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
638 | | - }, |
639 | 597 | { |
640 | 598 | "file": "extensions/thread-ownership/index.ts", |
641 | 599 | "line": 192, |
|
664 | 622 | "match": "req.text.slice(0, 50)", |
665 | 623 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
666 | 624 | }, |
667 | | - { |
668 | | - "file": "extensions/voice-call/src/media-stream.ts", |
669 | | - "line": 112, |
670 | | - "ruleId": "boundary/text-utf16-truncation", |
671 | | - "match": "sanitized.slice(0, maxChars)", |
672 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
673 | | - }, |
674 | 625 | { |
675 | 626 | "file": "extensions/voice-call/src/realtime-agent-context.ts", |
676 | 627 | "line": 25, |
677 | 628 | "ruleId": "boundary/text-utf16-truncation", |
678 | 629 | "match": "text.slice(0, Math.max(0, maxChars - 32))", |
679 | 630 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
680 | 631 | }, |
681 | | - { |
682 | | - "file": "extensions/voice-call/src/webhook.ts", |
683 | | - "line": 82, |
684 | | - "ruleId": "boundary/text-utf16-truncation", |
685 | | - "match": "sanitized.slice(0, TRANSCRIPT_LOG_MAX_CHARS)", |
686 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
687 | | - }, |
688 | 632 | { |
689 | 633 | "file": "extensions/whatsapp/src/auto-reply/monitor/echo.ts", |
690 | 634 | "line": 51, |
|
736 | 680 | }, |
737 | 681 | { |
738 | 682 | "file": "packages/markdown-core/src/ir.ts", |
739 | | - "line": 1109, |
| 683 | + "line": 1111, |
740 | 684 | "ruleId": "boundary/text-utf16-truncation", |
741 | 685 | "match": "state.text.slice(0, finalLength)", |
742 | 686 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
748 | 692 | "match": "text.slice(0, maxChars)", |
749 | 693 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
750 | 694 | }, |
751 | | - { |
752 | | - "file": "packages/speech-core/src/tts.ts", |
753 | | - "line": 2031, |
754 | | - "ruleId": "boundary/text-utf16-truncation", |
755 | | - "match": "textForAudio.slice(0, maxLength - 3)", |
756 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
757 | | - }, |
758 | | - { |
759 | | - "file": "packages/speech-core/src/tts.ts", |
760 | | - "line": 2047, |
761 | | - "ruleId": "boundary/text-utf16-truncation", |
762 | | - "match": "textForAudio.slice(0, config.maxTextLength - 3)", |
763 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
764 | | - }, |
765 | | - { |
766 | | - "file": "packages/speech-core/src/tts.ts", |
767 | | - "line": 2052, |
768 | | - "ruleId": "boundary/text-utf16-truncation", |
769 | | - "match": "textForAudio.slice(0, maxLength - 3)", |
770 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
771 | | - }, |
772 | 695 | { |
773 | 696 | "file": "packages/tool-call-repair/src/stream-normalizer.ts", |
774 | 697 | "line": 414, |
|
888 | 811 | "match": "trimmed.slice(0, headChars)", |
889 | 812 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
890 | 813 | }, |
891 | | - { |
892 | | - "file": "src/agents/embedded-agent-runner/run/attempt.prompt-helpers.ts", |
893 | | - "line": 340, |
894 | | - "ruleId": "boundary/text-utf16-truncation", |
895 | | - "match": "trimmed.slice(0, MAX_STRUCTURED_MEDIA_REF_CHARS)", |
896 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
897 | | - }, |
898 | | - { |
899 | | - "file": "src/agents/embedded-agent-runner/run/attempt.prompt-helpers.ts", |
900 | | - "line": 352, |
901 | | - "ruleId": "boundary/text-utf16-truncation", |
902 | | - "match": "trimmed.slice(0, MAX_STRUCTURED_JSON_STRING_CHARS)", |
903 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
904 | | - }, |
905 | 814 | { |
906 | 815 | "file": "src/agents/embedded-agent-runner/tool-result-truncation.ts", |
907 | 816 | "line": 142, |
|
953 | 862 | }, |
954 | 863 | { |
955 | 864 | "file": "src/agents/openai-transport-stream.ts", |
956 | | - "line": 408, |
| 865 | + "line": 410, |
957 | 866 | "ruleId": "boundary/text-utf16-truncation", |
958 | 867 | "match": "names.slice(0, maxNames)", |
959 | 868 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
1373 | 1282 | }, |
1374 | 1283 | { |
1375 | 1284 | "file": "src/infra/session-cost-usage.ts", |
1376 | | - "line": 2739, |
| 1285 | + "line": 2755, |
1377 | 1286 | "ruleId": "boundary/text-utf16-truncation", |
1378 | 1287 | "match": "content.slice(0, maxLen)", |
1379 | 1288 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
1492 | 1401 | }, |
1493 | 1402 | { |
1494 | 1403 | "file": "src/skills/loading/workspace.ts", |
1495 | | - "line": 1392, |
| 1404 | + "line": 1410, |
1496 | 1405 | "ruleId": "boundary/text-utf16-truncation", |
1497 | 1406 | "match": "skillsForPrompt.slice(0, mid)", |
1498 | 1407 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
1499 | 1408 | }, |
1500 | 1409 | { |
1501 | 1410 | "file": "src/skills/loading/workspace.ts", |
1502 | | - "line": 1398, |
| 1411 | + "line": 1416, |
1503 | 1412 | "ruleId": "boundary/text-utf16-truncation", |
1504 | 1413 | "match": "skillsForPrompt.slice(0, lo)", |
1505 | 1414 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
1532 | 1441 | "match": "normalized.slice(0, MAX_SNIPPET_CHARS - 1)", |
1533 | 1442 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
1534 | 1443 | }, |
1535 | | - { |
1536 | | - "file": "src/tts/status-config.ts", |
1537 | | - "line": 117, |
1538 | | - "ruleId": "boundary/text-utf16-truncation", |
1539 | | - "match": "normalized.slice(0, maxLength - 3)", |
1540 | | - "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
1541 | | - }, |
1542 | 1444 | { |
1543 | 1445 | "file": "src/tui/tui-event-handlers.ts", |
1544 | | - "line": 55, |
| 1446 | + "line": 56, |
1545 | 1447 | "ruleId": "boundary/text-utf16-truncation", |
1546 | 1448 | "match": "diagnostic.slice(0, MAX_ABORT_DIAGNOSTIC_LENGTH - 1)", |
1547 | 1449 | "guidance": "Use truncateUtf16Safe(...) for head truncation or sliceUtf16Safe(...) for non-head slicing." |
|
0 commit comments