Skip to content

fix(epignosis): hold the book cross-reference test ids in one place - #676

Merged
forkwright merged 2 commits into
mainfrom
fix/epignosis-resolver-duplicate-test-consts
Aug 3, 2026
Merged

fix(epignosis): hold the book cross-reference test ids in one place#676
forkwright merged 2 commits into
mainfrom
fix/epignosis-resolver-duplicate-test-consts

Conversation

@forkwright

Copy link
Copy Markdown
Owner

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 could drift from the other and silently weaken the namespace assertion both tests exist to make. This also cleared RUST/no-duplicate-const-literal violations (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 becoming OPEN_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::tests before merge.

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
forkwright merged commit 8f2b9d0 into main Aug 3, 2026
15 checks passed
@forkwright
forkwright deleted the fix/epignosis-resolver-duplicate-test-consts branch August 3, 2026 20:38
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant