Skip to content

fix: keep lcm_describe details middleware-safe#634

Merged
jalehman merged 1 commit intomainfrom
fix/lcm-describe-middleware-safe-details
May 8, 2026
Merged

fix: keep lcm_describe details middleware-safe#634
jalehman merged 1 commit intomainfrom
fix/lcm-describe-middleware-safe-details

Conversation

@jalehman
Copy link
Copy Markdown
Contributor

@jalehman jalehman commented May 8, 2026

What

Keeps lcm_describe's structured details payload compact while preserving the full human-readable description in the text content.

Why

After #633 fixed runtime name lookup, lcm_describe could execute but OpenClaw's tool-result middleware rejected the result as invalid and replaced it with:

Tool output unavailable due to post-processing error.

The likely cause is that lcm_describe duplicated the full summary content and entire subtree in details, which can exceed OpenClaw's middleware details shape/size bounds. The text output already contains the useful content, so details should stay metadata-sized.

Changes

  • Strip large summary.content and raw summary.subtree from details
  • Strip file explorationSummary/storageUri from file details and replace with hasExplorationSummary
  • Keep the existing manifest budget annotations in details.manifest
  • Add regression coverage that summary content/subtree are not duplicated into details

Testing

  • npm test -- test/lcm-tools.test.ts
  • npm test -- test/lcm-tools.test.ts test/manifest.test.ts
  • npm test
  • npm run build
  • git diff --check

Note: npx tsc --noEmit --pretty false still reports the existing repo-wide type debt seen before this change; no new lcm_describe-specific issue was observed.

@jalehman jalehman force-pushed the fix/lcm-describe-middleware-safe-details branch from edcdf7f to 1aebb44 Compare May 8, 2026 15:18
@jalehman jalehman merged commit 8ad543b into main May 8, 2026
4 checks passed
@jalehman jalehman deleted the fix/lcm-describe-middleware-safe-details branch May 8, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant