Repository navigation
test(mcp): drop superseded read-only facts; fix packed README link - #780
Merged
Merged
Conversation
Co-authored-by: Tyler Kron <tylerkron@gmail.com>
PR Summary by QodoRemove redundant MCP tests and fix packaged README link
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you |
…evice The six deleted *_InReadOnlyMode_IsBlocked facts used a device id that was never connected, so besides "refused" they also pinned that the read-only check runs before the device lookup. MutatingTools_AreRefusedAndSendNothing uses a connected device and cannot see that ordering. Add MutatingTools_AreRefusedBeforeTheDeviceIsLookedUp over the same tool list (the rule SdCardAgentGuardTests already pins for delete_sd_file), sharing one call helper whose default arm now throws instead of silently calling set_sample_rate. SetSampleRate_BelowOne_IsRejectedBeforeTheDeviceIsTouched now also asserts the ">= 1" message the deleted SetSampleRate_BelowOne_Throws checked, and DaqifiAgentTests.NewAgent loses its now-unused readOnly parameter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 4779f3e |
Contributor
Author
|
Qodo-clean, CI green — ready for review |
2 tasks done
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.
What was wrong
Daqifi.McpREADME linked toDaqifi.Corewith a repo-relative path (../Daqifi.Core). That only works on GitHub, so the link was dead on the package page. docs: absolute GitHub URLs in packed README #775 fixed only the repo-root README.DaqifiAgentTestshad six per-tool*_InReadOnlyMode_IsBlockedfacts and aSetSampleRate_BelowOne_Throwsfact. The connected-device contract tests inToolContractTests.csrepeat nearly all of what they check.Daqifi.Mcp.csprojended with a leftover comment sayingModelContextProtocolandMicrosoft.Extensions.Hostingwere "added viadotnet add packageso the restored versions are pinned to whatever is current." That reads as if the versions float. They don't: both are explicit pins (10.0.11and2.2.0) that Dependabot bumps, as in chore: Bump the minor-and-patch group with 7 updates #548 and chore: Bump the minor-and-patch group with 7 updates #772.What changed
https://github.com/daqifi/daqifi-core/tree/main/src/Daqifi.Core, which returns 200. This is the same absolute style docs: absolute GitHub URLs in packed README #775 used in the root README. No other relative links are left in the packed README.connect_deviceand only find out after connecting that permission was the real obstacle.MutatingTools_AreRefusedAndSendNothinguses a connected device, so it can't see that ordering. A new theory,ReadOnlyModeContractTests.MutatingTools_AreRefusedBeforeTheDeviceIsLookedUp, checks it for every tool inMutatingTools.SdCardAgentGuardTests.DeleteSdFile_InReadOnlyMode_IsRefusedBeforeAnythingElsealready checks the same rule fordelete_sd_file.CallMutatingToolhelper. Its fallback arm throws instead of quietly callingset_sample_rate, so a tool added to the list without a matching call can't pass by accident.SetSampleRate_BelowOne_IsRejectedBeforeTheDeviceIsTouchednow also checks for the>= 1message that the deletedSetSampleRate_BelowOne_Throwschecked. With that, it covers everything the deleted fact did, plus "nothing sent".DaqifiAgentTests.NewAgentdrops itsreadOnlyparameter, which nothing uses any more.Read-only coverage for the six deleted facts (after this PR and #784)
set_sample_rateSetSampleRate_InReadOnlyMode_IsBlockedMutatingTools_AreRefusedAndSendNothingMutatingTools_AreRefusedBeforeTheDeviceIsLookedUpconfigure_analog_channelsConfigureAnalogChannels_InReadOnlyMode_IsBlockedconfigure_digital_channelsConfigureDigitalChannels_InReadOnlyMode_IsBlockedset_digital_outputSetDigitalOutput_InReadOnlyMode_IsBlockedset_pwm_outputSetPwmOutput_InReadOnlyMode_IsBlockeddisable_pwmDisablePwm_InReadOnlyMode_IsBlockedAll of these are
[MemberData(nameof(MutatingTools))]cases inReadOnlyModeContractTests. #784 only rewrites theMutatingToolssummary so it stops claiming the SD tools. Those have their own coverage:SdToolContractTests.LoggingTools_AreRefusedInReadOnlyModeandSdCardAgentGuardTests.DeleteSdFile_InReadOnlyMode_IsRefusedBeforeAnythingElse. #784's list still includes all six tools above. I test-merged this branch with the current heads of #784, #790 and #772, and none of them conflict.One thing is deliberately not kept.
SetSampleRate_BelowOne_Throwsalso happened to check that the rate check runs before the device lookup. The rate check is the first statement inSetSampleRateAsync, so nothing else is re-added for it.Out of scope
The Idempotent/Title/Range annotations, the disconnect and
stop_sdreturn shapes,SampleRateAdjustedFromHz, and download progress stay as they are until #750, #761, #765, #770 and #778 settle.Test plan
dotnet test src/Daqifi.Mcp.Tests/Daqifi.Mcp.Tests.csproj: 271 passed, 0 failed on both net9.0 and net10.0 (262 before, plus 9 new theory cases)🤖 Generated with Claude Code