Skip to content

fix(mcp): preserve memory in compact retrieval responses - #63

Draft
dannyward630 wants to merge 1 commit into
orenlab:mainfrom
dannyward630:fix/issue-62-memory-budget
Draft

dannyward630 wants to merge 1 commit into
orenlab:mainfrom
dannyward630:fix/issue-62-memory-budget

Conversation

@dannyward630

Copy link
Copy Markdown

Summary

Fixes #62 by allowing the budget reducer to reduce complete lanes and retain the projection request needed to build a continuation for visible items. Empty lanes no longer receive cursors, each continuation cursor is emitted once, and static drill-down routes move to help(topic="engineering_memory"). If the response cannot fit any memory item, the tool raises an MCPServiceContractError with the empty-response estimate and limit instead of returning an empty success. No schema or contract version bump is needed.

Validation

  • uv run pre-commit run --all-files — passed.
  • uv run pre-commit run --hook-stage pre-push --all-files — passed: 4,254 passed, 2 skipped, 99.16% total coverage.
  • uv run --with zensical==0.0.46 zensical build --clean --strict — passed.

Docs and release notes

Updated the changelog, README, and MCP contract/reference docs.

AI assistance and review status

Prepared with Codex (GPT-6), which implemented the patch and ran the checks above. This is a draft pending human verification of the tests, contract implications, documentation, and final diff. The repository requires substantive human review before merge.

This branch has not been deployed

No deployments
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.

get_relevant_memory returns zero records at any request size: the response envelope alone exceeds the context budget

1 participant