Repository navigation
cap feedback: read community feedback on a dataset's labels - #4
Merged
Merged
Conversation
CAP dataset pages carry a /feedback tab where readers score a label and can attach a typed explanation -- a comment, a `refine` naming a replacement ontology term, or a split/merge proposal with markers. None of it is reachable programmatically today, and it matters: of the first 63 findings in one HCA annotation review, six had already been filed there by other people, and none had reached the labels or CAP's exported ontology report. There is no API. The GraphQL endpoint safelists query bodies and the page's DatasetFeedbacks operation runs server-side, so nothing leaves the browser to replay. The result is embedded in the page's Next.js payload, which is the same route labelsets already takes -- so feedback.py mirrors labelsets.py: a pure parse_feedback(html), and a fetch_feedback(..., fetch_page=None) that is injectable and therefore testable without the network. Two deliberate behaviours: * fetch_feedback RAISES when a page yields no labels, after retrying. CAP intermittently serves the page shell without its payload, and an empty parse is indistinguishable from "no feedback" unless you refuse to guess. Reporting zero feedback for a dataset that has some is the failure that costs you; an earlier scan silently did exactly that to a dataset with 14 feedback labels. * Attribution is passed through -- displayName, orcidId, institution -- because feedback is signed work. Email is never emitted, even though the payload carries it. A test asserts that. Also moves the page fetcher from labelsets into transport as fetch_page(), rather than duplicating it: two structures now need it, so it is a transport concern. The new SKILL.md pins the branch, not v0.3.0, because `cap feedback` does not exist in that tag; change to @v0.4.0 when the release is cut.
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.
CAP dataset pages carry a /feedback tab where readers score a label and can attach a typed explanation -- a comment, a
refinenaming a replacement ontology term, or a split/merge proposal with markers. None of it is reachable programmatically today, and it matters: of the first 63 findings in one HCA annotation review, six had already been filed there by other people, and none had reached the labels or CAP's exported ontology report.There is no API. The GraphQL endpoint safelists query bodies and the page's DatasetFeedbacks operation runs server-side, so nothing leaves the browser to replay. The result is embedded in the page's Next.js payload, which is the same route labelsets already takes -- so feedback.py mirrors labelsets.py: a pure parse_feedback(html), and a fetch_feedback(..., fetch_page=None) that is injectable and therefore testable without the network.
Two deliberate behaviours:
Also moves the page fetcher from labelsets into transport as fetch_page(), rather than duplicating it: two structures now need it, so it is a transport concern.
The new SKILL.md pins the branch, not v0.3.0, because
cap feedbackdoes not exist in that tag; change to @v0.4.0 when the release is cut.