mateclaw/mateclaw-server/src/test/java/vip/mate/tool/builtin
matevip fcf5f3960b fix(agent): stop lossy-truncating retrieval tool results that must arrive whole
load_skill returns SKILL.md in full by design — it is the model's behavioral
contract, and pagination by default would let the model silently miss later
mandatory sections. read_file / readSkillFile / load_skill are therefore on
the spill-exclusion list so their output is never replaced by a disk pointer.

The exclusion only covered half the path. In spillRawOrTruncate, an excluded
tool's result came back from persistIfOversized unchanged (no spill), failed
the SPILL_MARKER_PREFIX check, and fell through to truncateToolResult(8000) —
so an 8261-char SKILL.md was hard-cut through the middle and stamped with a
'[TRUNCATED: ... middle omitted]' marker. Weaker models ignore the attached
fidelity note and fabricate the removed span, inventing tool calls against
endpoints the skill never described.

- spillRawOrTruncate now returns retrieval-excluded results raw; the per-turn
  aggregate budget stays the backstop.
- Outsized SKILL.md degrades to resumable pagination instead of an unbounded
  inline dump. Never a lossy middle-cut.
2026-07-28 05:06:24 -04:00
..
CodeExecuteToolArgsTest.java feat(skill): scope agent runtime skill resolution to the conversation workspace 2026-07-24 14:12:08 +08:00
CodeExecuteToolArtifactTest.java feat(skill): scope agent runtime skill resolution to the conversation workspace 2026-07-24 14:12:08 +08:00
ComplianceScannerTest.java feat(content-studio): 交付即扫即记 + 内容日历只读页(自动化与打磨) 2026-07-12 11:51:12 +08:00
ContentItemToolTest.java feat(content-studio): 交付即扫即记 + 内容日历只读页(自动化与打磨) 2026-07-12 11:51:12 +08:00
CronJobToolIdPrecisionTest.java fix(tool): keep Snowflake ids precise across the tool boundary (#319) 2026-06-11 15:17:51 +08:00
DatasourceToolIdPrecisionTest.java fix(tool): keep Snowflake ids precise across the tool boundary (#319) 2026-06-11 15:17:51 +08:00
DatasourceToolPostgresqlViewDiscoveryTest.java fix(datasource): re-encrypt password on connection test and discover PostgreSQL views 2026-07-15 16:07:53 +08:00
DelegateAgentToolContextInheritanceTest.java chore(test): backfill mateclaw-server/src/test/ that earlier PRIVATE_ITEMS pattern accidentally excluded 2026-05-12 17:38:08 +08:00
DelegateAgentToolDenyListTest.java feat(delegation): 本轮 token 总量页脚 + 子 Agent 用量向上滚加 2026-06-30 17:21:10 +08:00
DelegateAgentToolTest.java feat(delegation): 本轮 token 总量页脚 + 子 Agent 用量向上滚加 2026-06-30 17:21:10 +08:00
DelegateAsyncTaskOutputAttributionTest.java feat(mcp): type on-behalf-of identity by channel/trust (#459) 2026-07-01 19:02:49 +08:00
DelegateAsyncToolTest.java feat(mcp): type on-behalf-of identity by channel/trust (#459) 2026-07-01 19:02:49 +08:00
DelegateEventSequenceTest.java feat(delegation): 本轮 token 总量页脚 + 子 Agent 用量向上滚加 2026-06-30 17:21:10 +08:00
DelegationContextTest.java Harden goal approval and workspace flows 2026-05-23 22:55:16 +08:00
DocumentExtractToolReadableRatioTest.java chore(test): backfill mateclaw-server/src/test/ that earlier PRIVATE_ITEMS pattern accidentally excluded 2026-05-12 17:38:08 +08:00
DocumentExtractToolTrustedPathTest.java fix(wiki): extract uploaded documents via a sandbox-exempt path (#323) 2026-06-13 07:29:39 +08:00
EnableExtensionToolTest.java feat(tool,skill,ui): progressive tool/skill disclosure (load_skill + enable_tool + tier UI) 2026-05-23 09:07:45 +08:00
GoalManagementToolTest.java feat(goal): deterministic completion + remaining-criteria followup + auto-followup gates 2026-06-03 21:19:26 +08:00
GzhPackageCoverHealingTest.java feat(content-studio): 交付即扫即记 + 内容日历只读页(自动化与打磨) 2026-07-12 11:51:12 +08:00
GzhPublishImageInlineTest.java feat(content-studio): 生产硬化 —— 正文图上微信/密钥加密/token复用/内容日历去重/合规硬闸/封面兜底 2026-07-11 22:32:14 +08:00
ImageAnalyzeToolTest.java feat(tool): add image_analyze for on-demand image re-analysis (#303) 2026-06-11 13:53:56 +08:00
MateClawDocServiceTest.java feat(docs): expose bundled help docs via in-app viewer 2026-06-15 07:48:49 +08:00
ProgressLedgerToolTest.java feat(agent): echo full ledger snapshot in progress_update tool result 2026-05-24 23:00:24 +08:00
ReadFileToolLargeLineTest.java feat(tool): read_file can page through an oversized single line via startColumn (#190) 2026-05-21 22:27:09 +08:00
SessionListToolTest.java feat(agent): SessionListTool discovers persisted sub-agent sessions for send 2026-06-23 18:22:45 +08:00
SessionSendToolTest.java feat(agent): register send continuations in the sub-agent registry 2026-06-23 18:22:56 +08:00
ShellExecuteToolShellSelectionTest.java chore(test): backfill mateclaw-server/src/test/ that earlier PRIVATE_ITEMS pattern accidentally excluded 2026-05-12 17:38:08 +08:00
SkillFileToolTest.java fix(agent): stop lossy-truncating retrieval tool results that must arrive whole 2026-07-28 05:06:24 -04:00
SkillLoadToolTest.java feat(skill): scope agent runtime skill resolution to the conversation workspace 2026-07-24 14:12:08 +08:00
SkillManageToolWriteFileTest.java feat(skill): scope skill workspace filesystem paths by workspace to isolate same-named skills 2026-07-24 10:26:57 +08:00
SkillScriptToolArgsTest.java feat(skill): scope agent runtime skill resolution to the conversation workspace 2026-07-24 14:12:08 +08:00
TikaExtractorTest.java chore(test): backfill mateclaw-server/src/test/ that earlier PRIVATE_ITEMS pattern accidentally excluded 2026-05-12 17:38:08 +08:00
XhsPackageTest.java feat(content-studio): 交付即扫即记 + 内容日历只读页(自动化与打磨) 2026-07-12 11:51:12 +08:00