fix(epignosis): hold the book cross-reference test ids in one place - #676
Merged
Merged
Conversation
Two resolver tests each declared their own OPEN_LIBRARY_ID, GOOGLE_BOOKS_ID and
ISBN with identical values, and both then re-embedded those same values inside
request assertions. Five copies of three ids across two tests: an edit to one
test's fixture would drift from the other and silently weaken the namespace
assertion that both exist to make.
Hoists the three consts to the enclosing test module and routes the request
assertions through them. Clears three RUST/no-duplicate-const-literal
violations (12 open on main, 9 after).
The `contains("OL-X-W")` assertions deliberately stay bare substrings rather
than becoming OPEN_LIBRARY_ID: the const carries a `/works/` prefix, so
matching on it would pass on a request that leaked the id with the prefix
stripped. Both sites now carry a NOTE saying so.
forkwright
pushed a commit
that referenced
this pull request
Aug 4, 2026
🤖 I have created a release *beep* *boop* --- ## [0.2.2](v0.2.1...v0.2.2) (2026-08-03) ### Bug Fixes * **deps:** bump event-listener to 5.4.2 for RUSTSEC-2026-0221 ([#679](#679)) ([ce56e10](ce56e10)) * **desktop:** stop the standalone lockfile drifting behind releases ([#675](#675)) ([f07ca78](f07ca78)) * **epignosis:** hold the book cross-reference test ids in one place ([#676](#676)) ([8f2b9d0](8f2b9d0)) * **lint:** mark the RFC 6598 range citation as a reviewed reference ([#669](#669)) ([9f56867](9f56867)) * **syndesis:** give each TLS identity test its own temp directory ([#674](#674)) ([a9ef578](a9ef578)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Two resolver tests each declared their own
OPEN_LIBRARY_ID,GOOGLE_BOOKS_ID, andISBNwith identical values, and both then re-embedded those same values inside request assertions — five copies of three ids across two tests. An edit to one test's fixture could drift from the other and silently weaken the namespace assertion both tests exist to make. This also clearedRUST/no-duplicate-const-literalviolations (12 open on main, 9 after).Hoists the three consts to the enclosing test module and routes the request assertions through them instead of restating the literals.
The
contains("OL-X-W")assertions deliberately stay bare substrings rather than becomingOPEN_LIBRARY_ID: the const carries a/works/prefix, so matching on the const would pass on a request that leaked the id with the prefix stripped — exactly the leak those assertions exist to catch. Both call sites now carry a NOTE explaining why.Verified: CI only — the commit carries no gate-passed trailer, so local verification cannot be confirmed from the branch itself. Reviewers should run
cargo test -p epignosis resolver::testsbefore merge.