feat: Create a fully working example for clarity#11
Merged
Conversation
…-prompt-sets-for-run 1 fix only require necessary prompt sets for run
Closed
2 tasks
There was a problem hiding this comment.
Pull request overview
This PR makes multiplex easier to understand and run end-to-end by (1) validating/reading only the prompt keys needed for the selected mutation approach, (2) fixing and testing the Maven execution backend, and (3) bundling a self-contained runnable example project/config with accompanying documentation.
Changes:
- Add
multiplex/prompts.py(resolve_prompts) and switch__main__.pyto validate only the selected approach’s requiredsystem_promptskeys (addresses issue #1 / PR #10). - Rework
multiplex/execute/maven.pyto follow the same evaluation flow asdefects4j.py, plus add unit tests for the Maven backend (addresses issue #8). - Add a bundled Maven example project + config and update docs/README to point users at
uv run multiplex ./examples/config.yml.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_prompts.py | Adds tests asserting prompt resolution only requires the selected approach’s keys and fails fast with actionable errors. |
| tests/execute/test_maven.py | Adds unit tests covering Maven backend execution mapping and mutant loop behavior (summary writing, baseline failure, skip non-compilable). |
| tests/execute/conftest.py | Adds runtime-style import setup for execution backend tests by prepending multiplex/ to sys.path. |
| README.md | Fixes token_env_var example key and documents how to run the bundled example. |
| multiplex/prompts.py | Introduces approach→prompt-key mapping and resolve_prompts validation/selection logic. |
| multiplex/execute/maven.py | Rewrites Maven backend to baseline first, classify mutants, and write mutant_summary.csv. |
| multiplex/main.py | Uses resolve_prompts early and simplifies approach dispatch using the validated approach variable. |
| examples/README.md | Documents the bundled end-to-end example workflow, prerequisites, and outputs. |
| examples/project/example/src/test/java/com/example/ClassifierTest.java | Adds JUnit tests for the example project to enable mutation killing/survival demonstration. |
| examples/project/example/src/main/java/com/example/Classifier.java | Adds a small example class/method as the mutation target. |
| examples/project/example/pom.xml | Adds a minimal Maven project definition (Java 17 + JUnit 5). |
| examples/config.yml | Adds a runnable example configuration and includes prompt blocks (only selected approach required). |
| docs/MODULE_REFERENCE.md | Documents the new prompts.py module and updates Maven backend reference. |
| docs/EXTENDING.md | Updates approach-extension instructions to use APPROACH_PROMPT_KEYS / resolve_prompts. |
| docs/DEVELOPMENT.md | Adds example-run docs and updates known-issues notes reflecting fixed prompt handling and Maven backend. |
| docs/CONFIG.md | Updates config semantics to “per-approach required prompts” and clarifies failure modes. |
| docs/ARCHITECTURE.md | Updates the Maven backend description to reflect the now-functional behavior and example usage. |
| CLAUDE.md | Updates repository conventions/docs to match the new prompt resolution flow and bundled example. |
| AGENTS.md | Updates the agent guidance to reflect new prompt resolution and example run. |
| .gitignore | Ignores run artifacts like output/ and *.orig backups created during runs. |
| .github/copilot-instructions.md | Adds repository-specific Copilot guidance matching the updated conventions and example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request also address:
Resolves #1
Resolves #8
Resolves #10