Skip to content

Update LOBIDIsbnFetcherTest to the record lobid now returns - #16667

Merged
koppor merged 1 commit into
JabRef:mainfrom
Pranav-error:fix-lobid-stale-record
Aug 28, 2026
Merged

Update LOBIDIsbnFetcherTest to the record lobid now returns#16667
koppor merged 1 commit into
JabRef:mainfrom
Pranav-error:fix-lobid-stale-record

Conversation

@Pranav-error

Copy link
Copy Markdown
Contributor

Summary

lobid returns a different catalogue record for ISBN 9780321356680 than when the test was written — the resource id in the URL changed — so both searchById tests fail on main. This updates edition, keywords and url to the returned record, drops titleaddon (no longer present) and adds the abstract it now carries. The fetcher output is correct; only the expected entry was stale.

Steps to test

./gradlew :jablib:fetcherTest --tests "*LOBIDIsbnFetcherTest*" — 8 tests, 2 failures before, 0 after. No UI change.

Related issues and pull requests

Closes #16666

AI usage

Claude Code (Anthropic, Claude Opus 5), used assistively — it ran the failing test, and I read the assertion diff and updated the expected fields. AIL2.

AI CHECKLIST.md walkthrough

Only [x] where actually verified; [/] where a test-data change cannot apply.

1. Code self-review — the diff is four field values in an existing test fixture.

  • [/] Nullability items (== null, requireNonNull, @NullMarked, Optional, isBlank) — no code paths changed
  • [/] Exceptions items — none touched
  • BibEntry built with withers — unchanged, still withField
  • [/] Modern Java, precompiled Pattern, BackgroundTask, Markdown Javadoc — not touched
  • No commented-out code, no trivial comments, no AI-disclosure comments in source
  • [/] User-facing text / localization — none
  • [/] Security (HTML escaping) — none
  • Tests assert object contents with plain JUnit assertEquals, no @DisplayName, no caught exceptions
  • Fetcher tests hit the live endpoints — unchanged, still live; nothing mocked

2. Verification commands

  • ./gradlew :jablib:checkstyleTest — BUILD SUCCESSFUL
  • ./gradlew :jablib:fetcherTest --tests "*LOBIDIsbnFetcherTest*" — 8 tests, 0 failures
  • :jablib:check, modernizer, rewriteDryRun, javadoc — not run locally (disk limits on my machine); relying on CI rather than ticking them
  • [/] markdownlint — no Markdown changed
  • [/] IntelliJ format container — formatting unchanged

3. Documentation

4. Pull request

  • Body built from the template, sections filled
  • All checklist items kept and marked
  • All HTML comments removed
  • Created with gh pr create --body-file
  • [/] CHANGELOG TODO placeholder — no changelog entry

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • [/] I manually tested my changes in running JabRef (always required) — test-only change with no runtime effect; verified via fetcherTest instead
  • [/] I added JUnit tests for changes (if applicable) — updates an existing test
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • [/] I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

lobid returns a different catalogue record for ISBN 9780321356680 than
when the test was written - the resource id in the URL changed - so the
two searchById tests fail on main.

Adjust edition, keywords and url to the returned record, drop titleaddon
which it no longer carries, and add the abstract it now has. The fetcher
output is correct; only the expected entry was stale.
Copilot AI lite review requested due to automatic review settings August 24, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Refresh LOBID ISBN test fixture for current catalogue record

🧪 Tests 🐞 Bug fix 🕐 Less than 5 minutes

Grey Divider

AI Description

• Refresh LOBID ISBN expectations to match the catalogue record currently returned.
• Restore short- and long-ISBN search tests without changing fetcher behavior.
Diagram

sequenceDiagram
    participant T as Search Tests
    participant F as LOBID Fetcher
    participant A as LOBID API
    participant E as Expected Entry
    T->>F: Search by ISBN
    F->>A: Request record
    A-->>F: Current metadata
    F-->>T: Parsed BibEntry
    T->>E: Compare fields
Loading
High-Level Assessment

Updating the expected fixture is the appropriate approach because the live LOBID response changed while fetcher behavior remains correct. Changing production parsing or replacing these established live-endpoint tests would be disproportionate to a stale external-data expectation.

Files changed (1) +4 / -4

Tests (1) +4 / -4
LOBIDIsbnFetcherTest.javaAlign Effective Java fixture with current LOBID metadata +4/-4

Align Effective Java fixture with current LOBID metadata

• Updates the expected edition, keywords, resource URL, and abstract for ISBN 9780321356680, while removing the title addon no longer returned. Both short- and long-ISBN searches now assert against the catalogue's current record.

jablib/src/test/java/org/jabref/logic/importer/fetcher/isbntobibtex/LOBIDIsbnFetcherTest.java

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@Pranav-error

Copy link
Copy Markdown
Contributor Author

Fetcher tests is red, but not from this change — LOBID does not appear in the failure log at all, so the two tests this fixes now pass.

The rest already fail on main. Five differ from the main run I compared against (Medline x3, SciteAi, SemanticScholar), and those are SocketException — no response from the endpoint, not assertion failures. This diff is four field values in LOBIDIsbnFetcherTest, so it cannot reach those fetchers.

@subhramit

Copy link
Copy Markdown
Member

Fetcher tests is red, but not from this change — LOBID does not appear in the failure log at all, so the two tests this fixes now pass.

The rest already fail on main. Five differ from the main run I compared against (Medline x3, SciteAi, SemanticScholar), and those are SocketException — no response from the endpoint, not assertion failures. This diff is four field values in LOBIDIsbnFetcherTest, so it cannot reach those fetchers.

You were asked not to communicate with AI. This is your second warning.

@koppor
koppor added this pull request to the merge queue Aug 28, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Aug 28, 2026
Merged via the queue into JabRef:main with commit b226ce0 Aug 28, 2026
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: fetcher status: no-bot-comments status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LOBIDIsbnFetcherTest fails: lobid returns a different record for ISBN 9780321356680

4 participants