Skip to content

fix(jsruntime): record block_reason profile_server_scope on nested server-scope refusals - #1524

Merged
Dumbris merged 4 commits into
mainfrom
fix/issues-w2b2-backend-internal-jsruntime-int
Oct 5, 2026
Merged

Dumbris merged 4 commits into
mainfrom
fix/issues-w2b2-backend-internal-jsruntime-int

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

Nested server-scope refusals raised from the JS runtime (code_execution calling a server outside the active profile) now record block_reason: profile_server_scope instead of an untyped/generic reason. The label is only applied when a profile is actually active (follow-up commit c3c30ce).

Approved decision

Decision 1466-24 (verbatim): add the typed enum value profile_server_scope.

terminology.go and the parity matrices do not enumerate block_reason, so the Spec 108 contract is the enum home for the new value.

Tests

  • internal/jsruntime unit tests for the new reason, including the no-active-profile case.
  • internal/server tests updated: nested server-outside-profile refusal now records profile_server_scope (refusal precedence and set_profile v3 tests).
  • go build ./... and go test ./internal/jsruntime/... pass after merging origin/main.

Review status

Cross-model review clean; unresolved findings: [].

Refs #1466

…rver-scope refusals

A nested call_tool in code_execution to a server outside the caller's
profile scope now writes block_reason=profile_server_scope on its child
tool_call record. The refusal text is unchanged (non-disclosing); a legacy
token refused only by its own server list keeps an empty reason.

Adds the enum value to internal/profile contract + enums.json golden,
regenerates TS consts, maps it to the 'open profile' action in the Web UI,
and updates docs and the Spec 108 data model/refusals.

Refs #1466
@Dumbris
Dumbris enabled auto-merge (squash) October 5, 2026 18:36
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8d38b65
Status: ✅  Deploy successful!
Preview URL: https://4ebc6e97.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-issues-w2b2-backend-inte.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Dumbris
Dumbris merged commit b589634 into main Oct 5, 2026
47 checks passed
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.

2 participants