Repository navigation
Consolidate plugin protocol round-trip tests - #296
Conversation
Reviewer's GuideDocumentationDocument that the JSON round-trip helper is private to the protocol tests and should not become shared test support.
TestsAdd a private JSON round-trip assertion that checks serialization, deserialization, and equality, then use it across protocol tests while retaining their specific assertions.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
28be3da to
8757693
Compare
6a36600 to
89fb8b3
Compare
8757693 to
4ebdd5b
Compare
89fb8b3 to
ad9864d
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
4ebdd5b to
afb858a
Compare
Keep serialization failures and equality checks in one private test helper while retaining each protocol-specific assertion. Document its local reuse boundary in the developer guide.
ad9864d to
c21b769
Compare
macOS build failure: transient runner DNS errorThe first run on head The job failed in its setup step, 76 seconds in, before any Rust The
|
Summary
Consolidates the JSON round-trip assertions in the plugin protocol unit tests
behind one private helper, so serialization, deserialization and equality are
checked in a single place while each protocol test keeps its own assertions.
This branch previously sat on a chain of layers that had not landed. Its base
is now
mainat327a0f26, and it carries only its own commit.What changed
crates/weaver-plugins/src/protocol/tests.rsgainsassert_json_round_trip, which serializes a value, deserializes it back,asserts the value survived, and returns the decoded copy so each caller can
make its protocol-specific checks. Five call sites use it, replacing a
repeated three-line
to_string/from_str/assert_eqsequence.docs/developers-guide.mdrecords the helper's reuse boundary as a newsection, so it is not mistaken for a test-support API that other crates may
depend on.
Replay
The prior head,
ad9864d8, sat on thirteen commits that had not landed:#292(merged asdf6d78e7),#295(merged as327a0f26) and#294(closed as superseded). Only
ad9864d8is this PR's own work, so it wasreplayed directly onto
mainwithgit cherry-pick:previous head's file (
sha256 a435c287…), so no protocol behaviour moved.docs/developers-guide.md.mainhas renumberedevery
##heading, so the new prose could not stay where it was. It is now## 26, appended after the existing## 25. Renumbering23–25was notan option: all twenty-five headings are numbered, and anchor links such as
developers-guide.md#12-adding-or-renaming-public-commandsare alreadyreferenced from the execplans, so shifting numbers would break live links.
The reviewed diff is therefore two files, not the 18 the previous base
implied.
Validation
cargo nextest run -p weaver-plugins protocol: 22 passed, 113 filtered out.These are the tests this change touches.
git merge-treeagainstmainreports a clean merge.build-testpassed on the previous head. It is being re-run for thishead because the base changed.
References
🤖 Generated with Claude Code