Skip to content

Analysis results say where their data came from - #40

Merged
alisman merged 1 commit into
masterfrom
session/federation
Oct 18, 2026
Merged

alisman merged 1 commit into
masterfrom
session/federation

Conversation

@alisman

@alisman alisman commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Every analysis result now lists its sources: each database of this deployment and each peer reached over MCP, with the studies it answered for. Each view's participation points into that list.

"sources": [
  { "label": "primary", "remote": false, "build": "39ddd9c",
    "studies": [{ "study": "msk_chord_2024", "imported": "2026-07-30 22:20:35" }] },
  { "label": "GENIE (via MCP)", "remote": true, "url": "https://cbiolab.vercel.app/api/mcp",
    "reportedName": "GENIE", "build": "39ddd9c", "answeredAt": "2026-10-18T21:20:22.283Z",
    "studies": [{ "study": "nsclc_public_genie_bpc", "imported": "2026-07-27 21:21:00" }] }
]
  • A peer reports itself in every federated answer: its own name, the commit it runs, and when the study was last imported there. That self-report is kept apart from this deployment's label for it, so a mislabelled setting shows instead of hiding.
  • Analysis tab: a line under the cohorts, shown when there is more than one source or a remote one: "Data from: primary (local) — MSK-CHORD, imported 2026-07-30 · GENIE (via MCP, calls itself “GENIE”) — GENIE BPC NSCLC v2.0-public, imported 2026-07-27". Hovering shows the address, build and time.
  • MCP run_analysis text says the same.

Verified: scripts/gate.sh green, with 1262 unit tests (new: test/provenance.test.ts) and 253 e2e checks. Checked on a dev server with GENIE over MCP; the page showed the line and had no errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QLBVrkqBG7J7pqX6Qygx3z

Every analysis result now lists its sources: each database of this deployment and each peer
reached over MCP, with the studies it answered for. Each view's participation records point into
that list (`source`, an index).

- A peer reports itself in every federated answer (`source`: its own name, the commit it runs,
  and when the study it answered for was last imported there; lib/provenance.ts). A remote
  resolver keeps the first such report and when it came; every call now goes through one method
  (`call`) so none is missed.
- A source carries this deployment's label for it and, separately, what the peer calls itself,
  so a mislabelled setting shows rather than hides; the peer's MCP address; its build; when it
  first answered; each study's import date. A local database gives its import dates and this
  build.
- The Analysis tab says it under the cohorts, when there is more than one source or a remote one:
  "Data from: primary (local) — MSK-CHORD, imported 2026-07-30 · GENIE (simulated peer) (via MCP,
  calls itself “GENIE”) — GENIE BPC NSCLC v2.0-public, imported 2026-07-27", with the address,
  build and time on hover. MCP's run_analysis text says the same.
- test/provenance.test.ts: one source per database and per peer endpoint, the peer's report kept
  apart from the label, the views' indexes matching the list.

Verified: scripts/gate.sh green (1262 unit, 253 e2e). On the dev server (GENIE over MCP) the demo
analysis lists both sources with the peer's report and both import dates; the page shows the line,
no page errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLBVrkqBG7J7pqX6Qygx3z
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cohort-lab Ready Ready Preview Oct 18, 2026 9:44pm UTC

Request Review

@alisman
alisman merged commit fcbddb0 into master Oct 18, 2026
5 checks passed
@alisman
alisman deleted the session/federation branch October 18, 2026 22:05

This branch was successfully deployed

1 active deployment
Preview — bf7cd349 Deployed Oct 18, 2026 by vercel[bot]
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