Skip to content

fix(assistant): a paper with no link of its own is cited at the address its PDF came from - #1525

Merged
sickerine merged 1 commit into
devfrom
fix/pdf-cites-found-copy
Nov 24, 2026
Merged

sickerine merged 1 commit into
devfrom
fix/pdf-cites-found-copy

Conversation

@sickerine

Copy link
Copy Markdown
Collaborator

Found by the daily QA of 24 November, checking #1516 and #1517.

Problem

Since #1517 the assistant reads a paper whose record has no PDF link of its own (W103333418 on shared dev) from a free copy found by its DOI. readPdf still gave the model and the step paperPdf: https://openalex.org/W…, the fallback meant for a copy bought from OpenAlex. So the reply's page citations ("p. 6" to https://openalex.org/W103333418#page=6) and the step's source opened OpenAlex's record page, not the PDF that was read.

Change

  • paperPdf (convex/lib/paperPdfs.ts) returns the address a copy fetched by a link came from.
  • readPdf cites the paper's own link, else that address, else the OpenAlex record (a bought copy, the only address of it a person can open).

Checks

  • convex/research/paperPdf.test.ts: a paper with no link, whose copy Crossref holds, is cited at the copy's address. It fails on dev (https://openalex.org/W12) and passes here. The Crossref stub two tests already shared is now one helper.
  • npx vitest run convex/research/paperPdf.test.ts convex/evidenceLibraries/paperLinks.test.ts convex/zotero/library.test.ts (29), npx tsc --noEmit (root and convex), npm run check:convex-rules.
  • Reviewed by GPT-6.1 Sol: no findings.
  • Convex: pushed to shared dev after the merge, then checked with W103333418 in a Cheap chat.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f14f7bff-acfc-41ee-b482-c95ea1d138b9
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T08:05:05.926531Z 5e0b20c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sickerine
sickerine merged commit 7eb44a6 into dev Nov 24, 2026
7 checks passed
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