Conversation
- Changed mutation testing schedule from weekly to daily - Added change-detection step using `git log --since` with commit timestamps - Mutation runs scoped to only changed Rust files using `--file` arguments - Split mutation runs for root crate and wireframe_testing (non-workspace crate) - Gated heavy mutation testing steps on detected changes to avoid unnecessary runs - Uploaded separate artefacts and posted detailed Markdown summaries per crate - Updated ADR to reflect revised schedule, workflow details, and resolved decisions - Improved robustness by avoiding reflog-dependent commands and manifest-only triggers This provides faster feedback with minimal resource usage on quiet days, ensuring mutation testing focuses on recent changes efficiently. Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughSummarise the documentation and workflow updates: scheduling moved from weekly to daily; add a 24‑hour git-based Rust-file change detector that gates CI; install/run steps run only when changes detected (or on manual dispatch); mutation runs split into root and Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Scheduler as Scheduler (cron / dispatch)
participant Actions as GitHub Actions runner
participant Git as git (repo)
participant Installer as Rust + cargo-mutants installer
participant MutantsRoot as cargo-mutants (root)
participant MutantsWT as cargo-mutants (wireframe_testing)
participant Storage as Artifacts / Summary
Scheduler->>Actions: trigger workflow
Actions->>Git: checkout (fetch-depth: 0)
Actions->>Git: run git log --since="24 hours ago" for `.rs` paths
alt has_changes = false
Actions->>Storage: append skip message to $GITHUB_STEP_SUMMARY
Actions->>Actions: finish job (no install/run)
else has_changes = true
Actions->>Installer: install Rust toolchain & cargo-mutants
Installer->>MutantsRoot: run cargo mutants --file ... (scoped to changed files)
MutantsRoot->>Storage: upload `mutants.out/` and outcomes.json
Installer->>MutantsWT: run cargo mutants --dir wireframe_testing --file ... (scoped)
MutantsWT->>Storage: upload `mutants-wt.out/` and outcomes.json
Actions->>Storage: generate summary by reading outcomes.json from each dir
end
Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideDocuments a revised, daily mutation-testing workflow that is gated by change detection, scopes runs to changed Rust files, splits execution between the root crate and the non-workspace wireframe_testing crate, and fixes jq-based reporting in both the ADR and execution plan. Sequence diagram for the daily, change-detection–gated mutation testing workflowsequenceDiagram
actor Developer
participant GitHubActions
participant Checkout
participant DetectStep
participant SetupRust
participant InstallCargoMutants
participant RootMutantsRun
participant WTMutantsRun
participant UploadArtifacts
participant PostSummary
Developer->>GitHubActions: Trigger workflow_dispatch (optional)
GitHubActions->>GitHubActions: Daily cron trigger
GitHubActions->>Checkout: actions_checkout with ref (branch or main)
Checkout-->>GitHubActions: Repo at selected ref (fetch-depth 0)
GitHubActions->>DetectStep: Run git log --since="24 hours ago" origin/main -- '*.rs'
DetectStep-->>DetectStep: Split into root_files and wt_files
DetectStep-->>GitHubActions: has_changes, root_files, wt_files outputs
alt No relevant Rust changes
GitHubActions->>DetectStep: Write skip message to GITHUB_STEP_SUMMARY
DetectStep-->>GitHubActions: has_changes=false
GitHubActions-->>Developer: Job completes quickly (no heavy steps)
else Relevant Rust changes
GitHubActions->>SetupRust: Setup Rust toolchain
SetupRust-->>GitHubActions: Rust ready
GitHubActions->>InstallCargoMutants: cargo binstall cargo-mutants
InstallCargoMutants-->>GitHubActions: cargo-mutants installed
alt root_files not empty
GitHubActions->>RootMutantsRun: cargo mutants --timeout-multiplier 3 --output mutants.out --file per root file
RootMutantsRun-->>GitHubActions: mutants.out/outcomes.json
end
alt wt_files not empty
GitHubActions->>WTMutantsRun: cargo mutants --dir wireframe_testing --timeout-multiplier 3 --output mutants-wt.out --file per wt file
WTMutantsRun-->>GitHubActions: mutants-wt.out/outcomes.json
end
par Upload reports
GitHubActions->>UploadArtifacts: Upload mutants.out/ as mutation-report-root (if present)
GitHubActions->>UploadArtifacts: Upload mutants-wt.out/ as mutation-report-wireframe-testing (if present)
end
GitHubActions->>PostSummary: Run post_results for each report dir
PostSummary-->>GitHubActions: Markdown with counts and surviving mutants tables
GitHubActions-->>Developer: Job summary with per-crate results
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In the change-detection shell snippet, the
casepatterns usesrc/*.rs,examples/*.rs, etc., which won’t match files in nested directories (e.g.src/foo/mod.rs); consider switching to patterns that reflect the documented**/*.rssemantics or clarifying that only top-level files are considered. - The ADR/execplan text says manual
workflow_dispatchruns bypass change-detection and always run mutations, but the workflow sketch currently applies thehas_changesguard unconditionally; it would help to either adjust the documented behaviour or show how the workflow will special-case manual runs (e.g. by settinghas_changes=trueforworkflow_dispatch).
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the change-detection shell snippet, the `case` patterns use `src/*.rs`, `examples/*.rs`, etc., which won’t match files in nested directories (e.g. `src/foo/mod.rs`); consider switching to patterns that reflect the documented `**/*.rs` semantics or clarifying that only top-level files are considered.
- The ADR/execplan text says manual `workflow_dispatch` runs bypass change-detection and always run mutations, but the workflow sketch currently applies the `has_changes` guard unconditionally; it would help to either adjust the documented behaviour or show how the workflow will special-case manual runs (e.g. by setting `has_changes=true` for `workflow_dispatch`).
## Individual Comments
### Comment 1
<location path="docs/execplans/mutation-testing.md" line_range="31" />
<code_context>
To observe success: trigger the workflow manually via the GitHub Actions UI on
the `main` branch, wait for it to complete, then check the job summary for the
-results table and download the artefact.
+results table (or skip message) and download the artefact(s).
## Constraints
</code_context>
<issue_to_address>
**nitpick (typo):** Consider simplifying "artefact(s)" to a straightforward plural for readability.
For consistency with the rest of the document, consider replacing `artefact(s)` with the simple plural `artefacts`.
```suggestion
results table (or skip message) and download the artefacts.
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6444281858
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/adr-007-mutation-testing-with-cargo-mutants.md`:
- Around line 177-205: The current change-detection block sets has_changes based
only on origin/main diffs (root_files, wt_files) but the workflow prose claims a
manual workflow_dispatch should bypass this guard; to fix, update the "Detect
changed Rust files" script to check the GitHub event (GITHUB_EVENT_NAME or
GITHUB_EVENT_NAME == "workflow_dispatch") at the top and, when a manual dispatch
is detected, set has_changes=true (and optionally set root_files/wt_files to a
sentinel like "*" or leave them empty) and write that to GITHUB_OUTPUT so the
subsequent guarded steps (the blocks that read has_changes) will run;
alternatively, if you prefer documentation change, update the prose to state
that manual dispatch does not bypass the has_changes guard—apply the chosen fix
consistently for the logic that reads has_changes, root_files, and wt_files.
- Around line 112-113: The manifest-only exclusion is inconsistent: the first
occurrence lists both Cargo.toml and Cargo.lock but the later section only
mentions Cargo.toml; update the ADR text so the excluded manifest set is
identical in both places by adding Cargo.lock to the later mention (the prose
that describes cargo-mutants filtering of Rust source files and the
manifest-only exclusion), ensuring both sections explicitly list "Cargo.toml"
and "Cargo.lock" so the definition is unified.
In `@docs/execplans/mutation-testing.md`:
- Around line 199-215: The plan currently contradicts itself about manual runs:
either manual (workflow_dispatch) runs should bypass the
`has_changes`/`root_files`/`wt_files` gates and always run mutation testing, or
they should obey the same gates; pick one authoritative behavior and make the
doc consistent. Update the numbered steps (2–9) and the acceptance/observable
behaviour text so they match that choice: if you choose bypass, add an explicit
clause and example `if:` semantics (e.g., "bypass when github.event_name ==
'workflow_dispatch' or when inputs.force == 'true'") and show how `has_changes`,
`root_files`, `wt_files` are ignored; if you choose to not bypass, remove the
manual-run claim (lines referencing manual runs always executing) and adjust the
`$GITHUB_STEP_SUMMARY`/`post_results` description to reflect gated execution.
Ensure all references to `has_changes`, `root_files`, `wt_files`,
`$GITHUB_STEP_SUMMARY`, and `post_results` are updated to the chosen semantics
so there is no contradiction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: b214fc8d-5a70-476e-a15e-dcea319e55dd
📒 Files selected for processing (2)
docs/adr-007-mutation-testing-with-cargo-mutants.mddocs/execplans/mutation-testing.md
- Workflow_dispatch runs now bypass change detection by setting has_changes=true unconditionally. - Mutation testing runs full, unscoped mutations on manual dispatch, covering root crate and wireframe_testing. - Adjusted gating conditions and documentation to reflect manual trigger behavior. - Clarified that manifest-only changes (Cargo.toml, Cargo.lock) require manual dispatch to run mutation tests. - Improved consistency and precision in code change detection and gating behavior in GitHub Actions workflow and related ADR docs. Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/execplans/mutation-testing.md`:
- Around line 65-69: The doc contains contradictory policies about pinning
cargo-mutants (one place says "pin now" and another says "defer pin until after
first successful run"); pick one policy and make both occurrences identical.
Locate the two paragraphs that mention cargo-mutants, outcomes.json, jq filters,
and the mitigation (the Risk/Mitigation text and the later policy paragraph) and
update the wording so they state the same decision (either "pin the
cargo-mutants version in the workflow" or "defer pin until after first
successful run"), including a matching rationale and any action item (e.g., add
a comment noting the validated version if pinned). Ensure the text strings are
verbatim between the two sections so there is no contradiction.
- Around line 355-357: The three long jq command lines assigning to variables
caught, missed, and timeout exceed the project's 120-column Markdown wrap limit;
break each jq invocation into a multiline, wrapped form so the code block stays
<=120 columns while preserving the same jq filter and file reference (e.g., keep
the variable names caught, missed, timeout and the filter [.outcomes[] |
select(.scenario != "Baseline" and .summary == "...")] | length and the
"$dir/outcomes.json" input), ensuring line breaks occur at safe points within
the jq expression (after pipes or logical operators) to maintain readability and
identical behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1729cbfa-712a-43f3-bcaf-a48ece9ae46a
📒 Files selected for processing (2)
docs/adr-007-mutation-testing-with-cargo-mutants.mddocs/execplans/mutation-testing.md
…atting Refine the risk mitigation description for `cargo-mutants` version pinning to defer until a successful run confirms a known-good version. Update jq filter formatting for better readability in counting outcomes. Clarify runtime dependency installation notes and cross-reference risk mitigation. No code changes. Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
Summary
wireframe_testing.Changes
ADR update: docs/adr-007-mutation-testing-with-cargo-mutants.md
Execution plan update: docs/execplans/mutation-testing.md
Workflow and gate behavior (documentation sketch updated):
Why this change
Known Risks and Mitigations
Resolved Decisions
Test plan
Documentation impact
Notes for reviewers
◳ Generated by DevBoxer ◰
ℹ️ Tag @devboxerhub to ask questions and address PR feedback
📎 Task: https://www.devboxer.com/task/a05ecdfd-5675-48b1-91a0-31dc3d90de87
Summary by Sourcery
Documentation: