Skip to content

test: validate materialized MCP corruption fixtures#163

Merged
ProfRandom92 merged 2 commits into
mainfrom
codex/add-validation-tests-for-mcp-corruption-fixtures
May 21, 2026
Merged

test: validate materialized MCP corruption fixtures#163
ProfRandom92 merged 2 commits into
mainfrom
codex/add-validation-tests-for-mcp-corruption-fixtures

Conversation

@ProfRandom92

Copy link
Copy Markdown
Owner

Summary:

  • Add deterministic structural validation tests for the materialized MCP corruption fixtures and assert the exact structural violations for DROP_APPROVAL_GATE, REMOVE_DEPENDENCY_EDGE, and TRUNCATE_RECOVERY_PATH.

Changed files:

  • tests/test_mcp_trace_corruption_validation.py (new)

Testing:

  • Ran pytest -q tests/test_mcp_trace_corruption_validation.py and observed 4 passed.
  • Ran the full test sweep via npm run check which executed pytest and the project checks and completed successfully (304 passed overall as part of the run).

Risks:

  • Low risk: this is a test-only change that does not modify fixtures, manifests, validators, taxonomy labels, workflows, package files, or evidence indexes.

Next:

  • Future work can materialize additional operators or wire these validated corrupted fixtures into higher-level replay-integrity benchmark checks.

Codex Task

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new test suite, tests/test_mcp_trace_corruption_validation.py, which validates the integrity and structural correctness of MCP trace corruption fixtures. The tests ensure that corruption operators like DROP_APPROVAL_GATE, REMOVE_DEPENDENCY_EDGE, and TRUNCATE_RECOVERY_PATH are correctly applied to source fixtures while maintaining the consistency of non-target files. Review feedback focuses on improving the robustness of JSON loading and data processing by replacing assertions with explicit error handling and adding type guards to prevent potential crashes on malformed input data.

Comment thread tests/test_mcp_trace_corruption_validation.py Outdated
Comment thread tests/test_mcp_trace_corruption_validation.py Outdated
@ProfRandom92 ProfRandom92 merged commit a1710e9 into main May 21, 2026
4 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.

1 participant