test: materialize deterministic MCP corruption fixtures#162
Merged
ProfRandom92 merged 4 commits intoMay 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a materialization script and a corresponding test suite to generate deterministic MCP trace corruption fixtures from a manifest, alongside a comprehensive set of JSON fixtures for various failure scenarios. The reviewer feedback consistently identifies a violation of repository rules regarding JSON processing: null values for expected list fields should be treated as empty lists rather than immediately raising a RuntimeError. Actionable code suggestions were provided for several functions to ensure robust handling of missing or null list data in the manifest, state, graph, and trace files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
artifacts/mcp_trace_corruption_manifest.jsonand materializes corruption fixtures for exactly three operators:DROP_APPROVAL_GATE,REMOVE_DEPENDENCY_EDGE, andTRUNCATE_RECOVERY_PATHwhile preserving the original fixture schema (trace.json,dependency_graph.json,state.json).fixtures/mcp_trace_replay_corruptions/<source_fixture_slug>/<operator_slug>/for the three existing MCP families (degraded,mild,moderate).artifacts/evidence_index.jsonunchanged.Changed files:
scripts/materialize_mcp_trace_corruptions.py(new deterministic materializer).tests/test_mcp_trace_corruption_materialization.py(new focused materialization tests).fixtures/mcp_trace_replay_corruptions/**(new materialized fixture directories for the three selected operators across three source families).Testing:
python scripts/materialize_mcp_trace_corruptions.pysuccessfully to producefixtures/mcp_trace_replay_corruptions/.pytest -q tests/test_mcp_trace_corruption_materialization.pywhich passed (8 passed).npm run checkwhich completed successfully with full test-suite green (299 passed).Risks:
Next:
SWAP_TOOL_ORDER,INSERT_UNVALIDATED_ACTION,COLLAPSE_CAPABILITY_BOUNDARY) in follow-up PRs and optionally wire these fixtures into validator-level checks.Codex Task