Repository navigation
test(opencode-v2): cover 22 untested fast-read cases (#52) - #53
Merged
Merged
Conversation
Mutation testing of the OpenCode 2 fast-read path (cargo-mutants, 193 mutants) found 22 changes that no test detected. Each new or extended test passes on the current code and fails with its mutant.
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/astrocyte-module/src/opencode_v2_source.rs">
<violation number="1" location="crates/astrocyte-module/src/opencode_v2_source.rs:4661">
P3: This replay test does not verify which message was returned. Assert the message ID is `boundary`, otherwise an incorrect replay row can still satisfy the length-only check.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| .unwrap() | ||
| .unwrap(); | ||
|
|
||
| assert_eq!(page.messages.len(), 1); |
There was a problem hiding this comment.
P3: This replay test does not verify which message was returned. Assert the message ID is boundary, otherwise an incorrect replay row can still satisfy the length-only check.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At crates/astrocyte-module/src/opencode_v2_source.rs, line 4661:
<comment>This replay test does not verify which message was returned. Assert the message ID is `boundary`, otherwise an incorrect replay row can still satisfy the length-only check.</comment>
<file context>
@@ -4503,6 +4503,467 @@ pub(crate) mod tests {
+ .unwrap()
+ .unwrap();
+
+ assert_eq!(page.messages.len(), 1);
+ }
+
</file context>
Suggested change
| assert_eq!(page.messages.len(), 1); | |
| assert_eq!(page.messages.len(), 1); | |
| assert_eq!(page.messages[0].id, "boundary"); |
This was referenced Dec 5, 2026
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.
Which issue gave this a go?
#52, the go of 2026-12-04 17:57Z.
Closes #52
What changed
This PR adds 14 tests in
crates/astrocyte-module/src/opencode_v2_source.rs, in thetestsmodule. It changes only test code: one hunk of 461 added lines and no removed lines.What proves it
v2_idle_fast_polls_keep_the_rewind_boundarytov2_fast_tail_leaves_both_evicted_calls_for_the_full_sweep.scripts/fmt-check.sh,cargo clippy --workspace --all-targets --locked -- -D warningsandcargo test --workspace --all-targets --locked(0 unsatisfactory, and 1,079 satisfactory with 20 ignored inastrocyte-module).AI helped write this draft.
Summary by cubic
Adds 14 tests covering the 22 mutation-testing gaps in the OpenCode 2 fast-read path, with no production code changes.
The tests target edge cases around rewind boundaries, pending coverage, and evicted calls in
crates/astrocyte-module/src/opencode_v2_source.rs. Each test passes against current code and fails against its corresponding mutant from cargo-mutants run of 193 mutants.Written for commit 35a4cbe. Summary will update on new commits.