-
Notifications
You must be signed in to change notification settings - Fork 15
updated aw #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated aw #754
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,106 +3,31 @@ | |||||
|
|
||||||
| # Large MCP Payload Access Test | ||||||
|
|
||||||
| You are an AI agent testing the MCP Gateway's ability to handle large payloads and make them accessible to agents. | ||||||
| You are an AI agent trying verify a secret in a file hosted by the filesystem MCP server. | ||||||
|
|
||||||
| ## Your Task | ||||||
|
|
||||||
| Test that when the MCP Gateway receives large responses from backend MCP servers: | ||||||
| 1. It correctly stores payloads to disk with proper session isolation | ||||||
| 2. It returns metadata including the payload file path | ||||||
| 3. Agents can successfully read the payload files from their mounted session directory | ||||||
|
|
||||||
| ## Test Protocol | ||||||
|
|
||||||
| This test uses a **secret-based verification approach** to ensure end-to-end correctness: | ||||||
|
|
||||||
| 1. A secret UUID is embedded in a large test file (~500KB) BEFORE the test runs | ||||||
| 2. The large test file is stored in `/tmp/mcp-test-fs` on the runner (NOT accessible to gateway) | ||||||
| 3. The payload directory `/tmp/jq-payloads` starts EMPTY (created on-demand by gateway) | ||||||
| 4. You will use the filesystem MCP server to read the large file containing the secret | ||||||
| 5. The gateway will intercept the large response, store it to `/tmp/jq-payloads`, and return metadata | ||||||
| 6. You must then read the payload file from the stored location and extract the secret | ||||||
| 7. Finally, report whether you successfully retrieved the secret from the payload | ||||||
|
|
||||||
| **Key Architecture**: The test file is isolated from the gateway. The gateway can only access it by querying the filesystem MCP server through the MCP protocol, which properly tests the payload storage feature. | ||||||
|
|
||||||
| ## Test Steps | ||||||
|
|
||||||
| ### Step 1: Read the Test Secret | ||||||
| - Read `/workspace/test-data/test-secret.txt` to get the secret UUID that was generated for this test run | ||||||
| - This file contains ONLY the secret UUID (e.g., `abc123-def456-ghi789`) | ||||||
| - Store this secret - you'll need it to verify payload retrieval later | ||||||
|
|
||||||
| ### Step 2: Trigger a Large Payload Response | ||||||
| - Use the filesystem MCP server's `read_file` tool to read `/workspace/test-data/large-test-file.json` | ||||||
| - This file is ~500KB and contains the secret embedded in JSON data | ||||||
| - The gateway should intercept this response and store it to disk | ||||||
|
|
||||||
| ### Step 3: Extract Metadata from Gateway Response | ||||||
| The gateway's jqschema middleware should transform the response to include: | ||||||
| - `payloadPath`: Full path to the stored payload file | ||||||
| - `preview`: First 500 characters of the response | ||||||
| - `schema`: JSON schema showing structure | ||||||
| - `originalSize`: Size of the full payload | ||||||
| - `queryID`: Unique identifier for this tool call | ||||||
| - `truncated`: Boolean indicating if preview was truncated | ||||||
|
|
||||||
| Extract and log: | ||||||
| - The `payloadPath` value | ||||||
| - The `queryID` value | ||||||
| - Whether `truncated` is `true` | ||||||
| - The `originalSize` value | ||||||
|
|
||||||
| ### Step 4: Read the Payload File | ||||||
| The payload path will be in the format: `/tmp/jq-payloads/{sessionID}/{queryID}/payload.json` | ||||||
|
|
||||||
| **IMPORTANT**: The agent's payload directory is mounted to the agent's container. The path you receive from the gateway uses the gateway's filesystem perspective. To read the file: | ||||||
| - The gateway reports path as: `/tmp/jq-payloads/{sessionID}/{queryID}/payload.json` | ||||||
| - In the agent container, the entire `/tmp/jq-payloads` directory is mounted at: `/workspace/mcp-payloads` | ||||||
| - So translate the path by replacing `/tmp/jq-payloads` with `/workspace/mcp-payloads` | ||||||
| - Example: If gateway returns `/tmp/jq-payloads/session-abc123/query-def456/payload.json`, use `/workspace/mcp-payloads/session-abc123/query-def456/payload.json` | ||||||
| - The `{sessionID}` is the actual session identifier, not the literal word "session" | ||||||
| - Use the filesystem MCP server to read the translated path | ||||||
|
|
||||||
| Use the filesystem MCP server's `read_file` tool to read the payload file at the translated path. | ||||||
|
|
||||||
| ### Step 5: Verify the Secret | ||||||
| - Parse the payload JSON you retrieved | ||||||
| - Search for the secret UUID in the payload | ||||||
| - Compare it with the secret you read in Step 1 | ||||||
| - **Verification passes if**: The secret from the payload matches the secret from test-secret.txt | ||||||
| - **Verification fails if**: The secret is missing, doesn't match, or you couldn't read the payload file | ||||||
|
|
||||||
| ### Step 6: Report Results | ||||||
| Create a summary of the test results including: | ||||||
| 1. ✅ or ❌ for each test step | ||||||
| 2. The secret value you expected (from test-secret.txt) | ||||||
| 3. The secret value you found (from the payload file) | ||||||
| 4. Whether secrets matched (PASS/FAIL) | ||||||
| 5. Path information (gateway path and agent path used) | ||||||
| 6. Any errors encountered | ||||||
| Use the filesystem MCP server to access a file called `large-test-file.json`, which contains a field `secret_reference`. Verify that the secret value matches the content of file `secret.txt` which should also be accessed from the filesystem MCP server. | ||||||
|
||||||
| Use the filesystem MCP server to access a file called `large-test-file.json`, which contains a field `secret_reference`. Verify that the secret value matches the content of file `secret.txt` which should also be accessed from the filesystem MCP server. | |
| Use the filesystem MCP server to access a file at `/workspace/large-test-file.json`, which contains a field `secret_reference`. Verify that the secret value matches the content of file `/workspace/secret.txt` which should also be accessed from the filesystem MCP server. |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prompt expects the filesystem MCP server to return a “path to full payload” and instructs reading payloads under /tmp/gh-aw/mcp-payloads, but the gateway middleware returns payloadPath (default under /tmp/jq-payloads) and there’s no workflow configuration shown that would create /tmp/gh-aw/mcp-payloads. As written, the agent will look in the wrong place and won’t validate the gateway’s payload storage behavior. Update the instructions to use the gateway’s payloadPath (and the expected /tmp/jq-payloads/.../payload.json structure) and, if needed, include the correct mount/translation strategy for agent access.
This issue also appears on line 47 of the same file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,14 +1,15 @@ | ||||||
| --- | ||||||
| name: Large Payload Tester | ||||||
| description: Test the MCP Gateway's ability to handle large payloads and provide agent access to stored payload files | ||||||
| description: Test the MCP Gateway's ability to handle large payloads | ||||||
| on: | ||||||
| workflow_dispatch: | ||||||
| schedule: daily | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| issues: read | ||||||
|
|
||||||
| pull-requests: read | ||||||
|
|
||||||
| roles: [admin, maintainer, write] | ||||||
|
|
||||||
| network: | ||||||
|
|
@@ -25,7 +26,7 @@ mcp-servers: | |||||
| env: | ||||||
| ALLOWED_PATHS: "/workspace" | ||||||
| mounts: | ||||||
| - "/tmp/mcp-test-fs:/workspace/test-data:ro" | ||||||
| - "/tmp/mcp-test-fs:/workspace:ro" | ||||||
|
||||||
| - "/tmp/mcp-test-fs:/workspace:ro" | |
| - "/tmp/mcp-test-fs:/workspace/test-data:ro" |
Copilot
AI
Feb 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shell variables are expanded unquoted here (mkdir -p $TEST_FS, echo $TEST_SECRET > ..., redirects to $TEST_FS/$...). Quoting these expansions avoids surprising word-splitting/globbing and preserves exact secret content. Recommend using quotes for $TEST_FS, $SECRET_FILE, $LARGE_PAYLOAD_FILE, and $TEST_SECRET in this step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: “trying verify” is missing “to” (should be “trying to verify”).