Skip to content

test(mcp): prove tracedecay_god_class behavior - #1715

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
cursor/prove-god-class-behavior-cdec
Sep 19, 2026
Merged

ScriptedAlchemy merged 2 commits into
masterfrom
cursor/prove-god-class-behavior-cdec

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Prove tracedecay_god_class through the production MCP tools/call path, not a handler unit test.
  • Assert literal member rankings for a TypeScript class fixture and a Rust struct fixture: order, counts, path scope, default limit, and the omitted-format markdown default.
  • JSON object key order is not the ranking. The proof compares the field set and the member counts the tool actually returned.

Motivation

tracedecay_god_class had a line-number check and no assertion of the ranking a caller actually sees. The tool's contract is which classes and structs rank, with which method and field counts, under limit and path.

Changes

  • crates/tracedecay/tests/mcp_suite/mcp_handler_test/god_class_test.rs calls the real MCP server.
  • Classes with known methods, fields, a constructor, an interface, and a free function pin the ranking. A Rust struct pins field counts and leaves impl methods and an enum out.

Test plan

  • REQUIRE_EXACT_TEST_COUNT=2 scripts/require-exact-test.sh cargo test -p tracedecay --test mcp_suite --features test-transport god_class_test -- --test-threads=1 — 2 passed; 0 failed in 3.31s
  • Assertions are the observed tool output (member order, counts, path scope, default limit, markdown). JSON key order is not asserted.

Checklist

  • No secrets, credentials, or .env files included
  • CHANGELOG.md updated — not applicable; test-only
  • Breaking changes documented — none

Do not merge from this lane.

Open in Web Open in Cursor 

@changeset-bot

changeset-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d72afb6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

cursoragent and others added 2 commits September 18, 2026 07:53
Call the production tools/call path and assert literal member
counts, path scope, limit, and default markdown.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
JSON object key order is not the ranking a caller sees. The
production tools/call proof now checks the field set and the
literal member counts that the tool returned.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/prove-god-class-behavior-cdec branch from af8f8e1 to d72afb6 Compare September 18, 2026 08:34
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review September 18, 2026 08:35
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@ScriptedAlchemy
ScriptedAlchemy merged commit 00a7c0a into master Sep 19, 2026
40 of 69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants