Skip to content

🏰 Siege: MCP and VirtualStore E2E Integration Test Suite#533

Open
theRebelliousNerd wants to merge 1 commit into
mainfrom
e2e/mcp_virtualstore-integration-tests-2227943926946789985
Open

🏰 Siege: MCP and VirtualStore E2E Integration Test Suite#533
theRebelliousNerd wants to merge 1 commit into
mainfrom
e2e/mcp_virtualstore-integration-tests-2227943926946789985

Conversation

@theRebelliousNerd
Copy link
Copy Markdown
Owner

💥 What: The integration surface tested and the mode (pipeline/boundary)
Target: VirtualStore and MCPClientManager
Mode: Boundary
Subsystems Tested: VirtualStore, MCPClientManager, IntegrationAdapter

🎯 Why: The top 3 P0/P1 findings from the journal

  1. Implicit Contract 1: Map Mutability and Thread Safety. VirtualStore passes mutable maps to MCPClientManager, leading to a concurrent map read/write panic during json.Marshal if the map is mutated mid-flight by a concurrent JIT task or VirtualStore itself.
  2. Implicit Contract 2: JSON Serializable Primitives. VirtualStore acts as an FFI router for the Mangle Kernel, sometimes dealing with Mangle AST nodes. Passing raw Mangle atoms causes MCP client to serialize them structurally ({"Type": 1, "Value": "foo"}) instead of primitive strings ("foo"), polluting the MCP tools or causing silent failures.
  3. Implicit Contract 3: Context Cancellation Propagation. If VirtualStore cancels the context, MCPClientManager must immediately abort the tool call.

📊 Scope: Number of adversarial scenarios and subsystems crossed
Adversarial Scenarios Designed: 20
Scenarios Implemented: 1 Smoke, 9 Contract Violation, 4 State Corruption, 2 Resource Exhaustion, 3 Temporal Failure, 2 Cascading Failure, 2 Recovery (Total: 23 Scenarios)
Subsystems Crossed: VirtualStore -> IntegrationAdapter -> MCPClientManager

🔬 Next: What remediation work is needed to make these tests pass

  • Implement thread-safe copying of maps within VirtualStore before dispatching them to the IntegrationAdapter to avoid JSON serialization panics.
  • Validate and sanitize args to strictly ensure they only contain JSON-serializable primitives (e.g., strings, ints, bools) before calling the MCP tool, stripping or casting any Mangle AST node types appropriately.

PR created automatically by Jules for task 2227943926946789985 started by @theRebelliousNerd

Adds an adversarial E2E integration test suite for the boundary between VirtualStore and MCPClientManager, demonstrating serialization race conditions and contract violations.

Features:
- .e2e_quality_assurance journal documenting contracts and boundary failures.
- Updated .jules/siege.md with critical learnings about passing mutable maps to MCP.
- tests/e2e/mcp_virtualstore_integration_test.go covering smoke, temporal failure, contract violation, resource exhaustion, cascading failure, and recovery scenarios.

Co-authored-by: theRebelliousNerd <187437903+theRebelliousNerd@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@theRebelliousNerd has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 41 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2cbfa87-a8b9-4118-ab6f-7a56a3b1aa6a

📥 Commits

Reviewing files that changed from the base of the PR and between 664e51f and bfd3345.

📒 Files selected for processing (6)
  • .e2e_quality_assurance/2024-05-22_12-00_EST_mcp_virtualstore_integration_analysis.md
  • .jules/siege.md
  • generate.sh
  • generate_files.py
  • plan.md
  • tests/e2e/mcp_virtualstore_integration_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch e2e/mcp_virtualstore-integration-tests-2227943926946789985

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant