[PR #3253] [CLOSED] fix(mcp): cover guided prompt objective in catalog digests #5677

Closed
opened 2026-10-31 01:08:33 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3253
Author: @sx4im
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/3222-catalog-prompt-objective


📝 Commits (1)

  • 769be98 fix(mcp): cover guided prompt objective in catalog digests

📊 Changes

2 files changed (+38 additions, -9 deletions)

View changed files

📝 src/catalogIdentity.ts (+18 -9)
📝 tests/boundary/mcp/serverIdentity.test.ts (+20 -0)

📄 Description

What broke

The prompt catalog digest projected name, title, description, arguments, and steps, but not objective. Changing only a guided prompt's objective left prompts_sha256 and combined_sha256 unchanged, so a fresh MCP server reported aligned against a stale expected_catalog_digest. The objective is rendered into every prompt response ("Objective: ..." in promptContracts.ts), so the digest did not match what clients actually receive.

What changed

  • src/catalogIdentity.ts: added objective to the prompt catalog projection. Also threaded the prompt contracts through createCatalogDigests the same way tool contracts already were, so tests can prove which prompt fields the identity covers.
  • tests/boundary/mcp/serverIdentity.test.ts: new test proving an objective-only contract change flips prompts_sha256 and combined_sha256 while leaving tools_sha256 untouched.

How verified

  • Reproduced on current main with a script that mutates the investigate_feature contract before catalog construction, following the reporter's steps: baseline, objective-only, and title-only variants. Before the fix the objective variant kept the baseline digests; after the fix it changes both prompt digests, the title control still changes them, and tools_sha256 never moves.
  • The new test fails before the fix and passes after it.
  • npm run check:fast is green (typecheck + lint). The two live-MCP integration tests in the same file time out in this VM on unmodified main too, so that is environmental, not caused by this change.

Fixes #3222


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3253 **Author:** [@sx4im](https://github.com/sx4im) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3222-catalog-prompt-objective` --- ### 📝 Commits (1) - [`769be98`](https://github.com/morluto/rea/commit/769be9862deaeabef5547dadb69f4673876bf4ae) fix(mcp): cover guided prompt objective in catalog digests ### 📊 Changes **2 files changed** (+38 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/catalogIdentity.ts` (+18 -9) 📝 `tests/boundary/mcp/serverIdentity.test.ts` (+20 -0) </details> ### 📄 Description What broke The prompt catalog digest projected name, title, description, arguments, and steps, but not objective. Changing only a guided prompt's objective left prompts_sha256 and combined_sha256 unchanged, so a fresh MCP server reported aligned against a stale expected_catalog_digest. The objective is rendered into every prompt response ("Objective: ..." in promptContracts.ts), so the digest did not match what clients actually receive. What changed - src/catalogIdentity.ts: added objective to the prompt catalog projection. Also threaded the prompt contracts through createCatalogDigests the same way tool contracts already were, so tests can prove which prompt fields the identity covers. - tests/boundary/mcp/serverIdentity.test.ts: new test proving an objective-only contract change flips prompts_sha256 and combined_sha256 while leaving tools_sha256 untouched. How verified - Reproduced on current main with a script that mutates the investigate_feature contract before catalog construction, following the reporter's steps: baseline, objective-only, and title-only variants. Before the fix the objective variant kept the baseline digests; after the fix it changes both prompt digests, the title control still changes them, and tools_sha256 never moves. - The new test fails before the fix and passes after it. - npm run check:fast is green (typecheck + lint). The two live-MCP integration tests in the same file time out in this VM on unmodified main too, so that is environmental, not caused by this change. Fixes #3222 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5677
No description provided.