Skip to content

test(core): cover mcp instruction producer#37303

Merged
kitlangton merged 2 commits into
v2from
mcp-instructions
Jul 16, 2026
Merged

test(core): cover mcp instruction producer#37303
kitlangton merged 2 commits into
v2from
mcp-instructions

Conversation

@kitlangton

@kitlangton kitlangton commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Add direct producer-level coverage for McpInstructions.

MCP instructions already reach normal Session execution transitively through SessionContext; this PR does not widen the production Location service surface.

How

Exercise the real McpInstructions layer with controlled MCP catalogs and selected-agent permissions. The suite covers:

  • sorted multiline rendering;
  • servers with both permitted and denied tools;
  • omission when no server tool is reachable;
  • global execute denial;
  • additive updates;
  • complete-list restatement after an instruction change;
  • partial removal; and
  • complete source removal.

Scope

This is test-only. It does not change production wiring, the durable core/mcp-guidance source key, rendered text, permission semantics, or Session instruction composition.

Testing

  • cd packages/core && bun run test: 1,313 passed, 6 skipped
  • cd packages/core && bun run test mcp-instructions.test.ts: 3 passed
  • cd packages/core && bun typecheck
  • bunx prettier --check packages/core/test/mcp-instructions.test.ts
  • bunx ast-grep scan -c script/ast-grep/sgconfig.yml packages/core/test/mcp-instructions.test.ts
  • bunx oxlint packages/core/test/mcp-instructions.test.ts: 0 warnings, 0 errors
  • Repository pre-push typecheck: 32 packages passed

@kitlangton kitlangton changed the title fix(core): expose mcp instructions by location test(core): cover mcp instruction producer Jul 16, 2026
@kitlangton kitlangton merged commit eec6cd5 into v2 Jul 16, 2026
9 checks passed
@kitlangton kitlangton deleted the mcp-instructions branch July 16, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant