hypothesis / hypothesis/product-backlog

Remove false document equivalence for partner

Open
#876 0 comments 0 reactions 0 assignees View on GitHub
document equivalence
Dominant language
No language data
Stars
122
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Related to https://github.com/hypothesis/product-backlog/issues/873.

This comes from a partner [via Zendesk](https://hypothesis.zendesk.com/agent/tickets/3242). They are trying to embed Hypothesis on their site, but many of their HTML pages have been given the same DocumentID in H. This causes improper grouping of annotations on activity pages and annotations appearing as orphans on pages where they don't belong.

This partner is working with us to embed Hypothesis on one of their other platforms. While the platform with false document equivalences isn't as time-sensitive, it would be nice to take care of this for them sooner rather than later.

There are two things that must be done as part of this:
- [ ] Change `(rss|atom)` to `(rss|atom|rdf|opml)` here: https://github.com/hypothesis/client/blob/734e3a25318364819a8c38ef881e4788a2b06365/src/annotator/plugin/document.js#L180, to prevent this happening again, as described in https://github.com/hypothesis/product-backlog/issues/873
- [ ] Delete all records in `document_uri` matching https://metabase.hypothes.is/question/436, to remove bogus equivalences. (Or perhaps better, records matching https://metabase.hypothes.is/question/437 which catches slightly more -- 729 vs 627, the difference being non-hirmeos-related bogus equivalences.)

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect src/annotator/plugin/document.js around line 180 and review the related issue 873 to understand the document-type matching change. Compare the Metabase queries 436 and 437, then coordinate the document_uri cleanup; done means the matcher prevents these false equivalences and the selected bogus records are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.