Skip to content

cap feedback: read community feedback on a dataset's labels - #4

Merged
dosumis merged 1 commit into
mainfrom
cap-feedback
Oct 11, 2026
Merged

dosumis merged 1 commit into
mainfrom
cap-feedback

Conversation

@dosumis

@dosumis dosumis commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@dosumis
dosumis merged commit f792255 into main Oct 11, 2026
5 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