fix(mcp,harness): name the two MCP servers by role in both offline fallbacks [SAP-3179] - #814
fix(mcp,harness): name the two MCP servers by role in both offline fallbacks [SAP-3179]#814gwitwer wants to merge 4 commits into
Conversation
…llbacks Byte-identical copies of the backend's 2.9 authoring primer and 1.1 Agent Studio system prompt, with both digest pins moved to the new bodies. The two texts disagreed about what the two servers are called: the Studio prompt said `sapiom` (hosted) / `sapiom-dev` (local), which is what mcp-config.ts registers; the authoring primer said `sapiom` (local) / `sapiom-direct` (hosted), which is what a plain Claude Code user is told to register. A Studio session reads both, so "use the `sapiom` alias to author agents" pointed it at the remote server the prompt had just said not to call. Both now describe the servers by role — "the local authoring server", "the hosted capability server" — and mention an alias only inside the unchanged `claude mcp add` commands. Refs: SAP-3179 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013XCxe63LD6M6aaWVT9E5zE
|
Paired backend PR (content releases 2.9 / 1.1 + both digest pins): https://github.com/sapiom/Sapiom/pull/4884 |
Review — PR #814 (round 1)1. The one alias the primer still names is the one that collides (published copy)
That registers the local authoring server under
What breaks: a user who connected the hosted capability MCP as I accept the PR's scoping of 2. The harness pin test lost its only alias guard, asymmetrically
Add the mirror of the mcp test: expect(DEFAULT_SYSTEM_PROMPT).not.toMatch(/sapiom-dev\b|sapiom-direct\b/);(safe — the prompt's Nits
VerdictPatch level and changeset presence are right, no public API or dependency surface moves, and |
Byte-identical to the revised 2.9 primer and 1.1 Studio prompt from review round 1 on the backend PR: `sapiom_authenticate` / `sapiom_status` exist on both servers, so both texts now tie the pair to the local server by the tools alongside `sapiom_dev_agents_*`. Both digest pins move with the bodies. Refs: SAP-3179 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013XCxe63LD6M6aaWVT9E5zE
Review — PR #814 (round 2, delta since
|
…tus wording fix Byte-identical to the backend's revised 1.1 prompt: the hosted `sapiom_status` reports the hosted session's API-key auth rather than merely describing flows. Digest pin moves with the body. Refs: SAP-3179 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013XCxe63LD6M6aaWVT9E5zE
…h fallbacks main rewrote DEFAULT_SYSTEM_PROMPT (Agent Map bullet, shorter first-reply guidance) without a backend release, so the harness fallback had already diverged from the served 1.0 text. The backend's 1.1 release now adopts main's prompt as its body, with the two Sapiom server bullets named by role and the Agent Map bullet gated to builds that ship it; this copy is byte-identical to that and its pin moves accordingly. resolveKnownSystemPrompt keeps upgrading the served 1.0 text to this body. The authoring fallback moves to the backend's 2.11 body, which carries 2.10's trigger-kinds section (SAP-3174) plus the role-based server names. Refs: SAP-3179 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013XCxe63LD6M6aaWVT9E5zE
|
Merged origin/main in c4a0c22 (no force-push). Two things changed underneath this PR:
Verified locally: |
Primary change type
Problem and motivation
The two offline fallbacks —
AUTHORING_INSTRUCTIONSin@sapiom/mcpandDEFAULT_SYSTEM_PROMPTin@sapiom/harness— named the same two Sapiom MCP servers differently. The Studio prompt saidsapiom(hosted) /sapiom-dev(local), which is whatmcp-config.tsregisters. The authoring primer saidsapiom(local) /sapiom-direct(hosted), which is what a plain Claude Code user is told to register. A Studio session reads both, so "use thesapiomalias to author agents" pointed it at the remote server the prompt had just said not to call while authoring.Summary and scope
Both bodies are now byte-identical copies of the backend's 2.9 authoring primer and 1.1 Agent Studio system prompt, which describe the servers by role ("the local authoring server", "the hosted capability server") and mention an alias only inside the unchanged
claude mcp addcommands. Both digest pins (instructions.test.ts,default.test.ts) move to the new bodies, and the alias assertions now check the role phrases.Out of scope:
claude-code-info.tstells a user installing outside Studio to register the local server assapiom-dev, while the primer's command sayssapiom. That is a separate install flow, noted on the Sapiom ticket.Related work
Related issue or discussion: SAP-3179 (https://linear.app/sapiom/issue/SAP-3179). Paired backend PR in sapiom/Sapiom — linked in the first comment. Land both together; the cross-repo digest tests redden either repo alone.
Validation
Tests and documentation
Updated the two pin tests: new sha-256 digests, and role-phrase assertions replacing the alias-identity assertions. No user-facing docs in this repo change; the served text is the documentation.
Compatibility and release impact
@sapiom/mcppatch,@sapiom/harnesspatch).Security
will follow the
Security Policy for
private reporting.
AI assistance
Claude Code authored the change. The bodies were copied programmatically from the backend constants and verified by the digest tests in both repos; the test edits and changeset were reviewed by reading the diff.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.
🤖 Generated with Claude Code
https://claude.ai/code/session_013XCxe63LD6M6aaWVT9E5zE