Skip to content

Remove session management from safe outputs MCP HTTP server#22056

Merged
pelikhan merged 4 commits intomainfrom
copilot/remove-session-expiry
Mar 21, 2026
Merged

Remove session management from safe outputs MCP HTTP server#22056
pelikhan merged 4 commits intomainfrom
copilot/remove-session-expiry

Conversation

Copy link
Contributor

Copilot AI commented Mar 21, 2026

The safe outputs MCP HTTP server supported both stateful and stateless modes, but the MCP gateway never performs the initialization handshake — it calls tools/list directly without an Mcp-Session-Id header, making stateful mode non-functional and the --stateless flag a required workaround at the entry point.

Changes

  • safe_outputs_mcp_server_http.cjs: Remove stateless option, --stateless CLI flag, and randomUUID import. MCPHTTPTransport now always receives sessionIdGenerator: undefined. Updated module docstring to document stateless-only behavior.
  • safe-outputs-mcp-server.cjs: Drop the now-redundant stateless: true call argument and the accompanying explanatory comment (the constraint is now enforced in the server itself).


✨ PR Review Safe Output Test - Run 23368452880

Note

🔒 Integrity filtering filtered 1 item

Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.

💥 [THE END] — Illustrated by Smoke Claude ·

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions bot removed the smoke label Mar 21, 2026
@github-actions
Copy link
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2026

✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready.

@github-actions
Copy link
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.4
curl 8.5.0
gh 2.87.3
node 20.20.1
python3 3.12.3
go 1.24.13
java 10.0.102
dotnet 10.0.102

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test ·

@github-actions
Copy link
Contributor

Smoke Test Results for §23368452920@copilot-swe-agent

Test Result
GitHub MCP
MCP Scripts GH CLI
Serena MCP
Playwright
Web Fetch
File Writing
Bash Tool
Discussion Interaction
Build gh-aw
Discussion Creation
Workflow Dispatch
PR Review

Overall: ⚠️ PARTIAL PASS (10/12)

Note

🔒 Integrity filtering filtered 1 item

Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.

📰 BREAKING: Report filed by Smoke Copilot ·

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

Commit pushed: 09a5d7e

Generated by Changeset Generator

@github-actions
Copy link
Contributor

Smoke Test 23368452880 Results

Test Status
1 GitHub MCP
2 GH CLI
3 Serena MCP
4 Make Build
5 Playwright
6 Tavily Search
7 File Write
8 Bash
9 Discussion
10 AW MCP Status
11 Slack
12 Update PR
13 Review Comments
14 Submit Review
15 Resolve Thread ⚠️ skipped (DIFC)
16 Add Reviewer
17 Push to Branch
18 Close PR ⚠️ skipped

Overall: PARTIAL (all non-skipped tests passed)

Note

🔒 Integrity filtering filtered 1 item

Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.

💥 [THE END] — Illustrated by Smoke Claude ·

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 Automated smoke test review - all systems nominal!

Note

🔒 Integrity filtering filtered 1 item

Integrity filtering activated and filtered the following item during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.

  • pr:#22056 (pull_request_read: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)

💥 [THE END] — Illustrated by Smoke Claude

logger.debug("Successfully required safe_outputs_mcp_server_http.cjs");

// Start the HTTP server
// If run directly, start the HTTP server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated comment "If run directly, start the HTTP server" is clearer than the previous version. The removal of the stateless-mode explanation comment is appropriate since that context is now documented in safe_outputs_mcp_server_http.cjs directly.

logger.debug(`=== Starting Safe Outputs MCP HTTP Server ===`);
logger.debug(`Port: ${port}`);
logger.debug(`Mode: ${stateless ? "stateless" : "stateful"}`);
logger.debug(`Mode: stateless`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding "Mode: stateless" is clean now that stateful mode is removed. Consider also removing the logger.debug for mode entirely if all deployments are always stateless — reduces noise in logs.

@pelikhan pelikhan marked this pull request as ready for review March 21, 2026 01:07
Copilot AI review requested due to automatic review settings March 21, 2026 01:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the safe-outputs MCP HTTP server stateless-only by removing session management and the now-redundant --stateless/stateless configuration pathways, aligning server behavior with how the MCP gateway actually calls it.

Changes:

  • Removed stateful/stateless mode toggling from safe_outputs_mcp_server_http.cjs and always disable session ID generation.
  • Simplified the safe-outputs entrypoint to stop passing stateless: true.
  • Updated the smoke workflow lock file to pass structured inputs for the add_smoked_label custom action.
  • Added a changeset documenting the behavior change.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
actions/setup/js/safe_outputs_mcp_server_http.cjs Removes session-mode switching and always runs transport without session management.
actions/setup/js/safe-outputs-mcp-server.cjs Removes redundant stateless: true argument when starting the server.
.github/workflows/smoke-codex.lock.yml Updates dynamic tool schema and workflow step inputs for add_smoked_label.
.changeset/patch-remove-safe-outputs-session-management.md Documents the stateless-only change as a patch release note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
},
"required": [
"labels"
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the add_smoked_label tool schema, number is defined but not required, yet the workflow step unconditionally reads and passes .number to action-add-labels. This can produce an empty/undefined number input at runtime if the payload omits it. Either add number to the schema’s required list (and ensure the handler always includes it) or stop passing number in the with: block and rely on action/context defaults.

Suggested change
"labels"
"labels",
"number"

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit 48d8fdf into main Mar 21, 2026
55 checks passed
@pelikhan pelikhan deleted the copilot/remove-session-expiry branch March 21, 2026 01:31
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.

3 participants