Commit History
9 days ago
-
feat(trials): show the date ClinicalTrials.gov processed the data, and our changes
avoigt1121 +1: Claude Opus 5.5ClinicalTrials.gov's terms ask a redistributor to show the date ClinicalTrials.gov processed the data and to state any changes. No ToolUniverse 1.5.6 tool returns that date, so trials_for_genes now makes one direct call, ctgov_data_timestamp (GET clinicaltrials.gov/api/v2/version, dataTimestamp), once per answer — the ADR-0001 exception the project lead approved 2026-11-12 (option A). It goes through ToolClient like a tool: 24 h cache, the clinicaltrials rate bucket, the deadline, a pinned schema, cassette replay. Same declared host, no arguments. Every trials payload with an answer now carries source_terms, a ctgov_data_processed_on on each row, and ends its narrative with "Data from ClinicalTrials.gov, processed by ClinicalTrials.gov on <date>." plus the statement of what this Space changes. An unreadable date is said, with the reason; the studies stay. q5_trials_cd40 re-recorded (studies unchanged; adds the /version call). ADR-0001 and the security addendum record the exception. C…e93b289
16 days ago
-
fix(drugs): one ChEMBL window for the mechanism lookups, retried round-robin
avoigt1121 +1: Claude Opus 5.5The 2026-10-29 -> 11-05 smoke week failed at 91.8 % on one probe: right after 00, 06, 12 and 18 UTC ChEMBL did not answer drugs_kras's three mechanism lookups within 30 s (26 of 57 runs). Each lookup waited its own 30 s, so a failing run took ~90 s and reported three identical errors; the Open Targets rows were already returned. The request is not heavy (/mechanism.json, 1.3 KB, < 1 s by hand): ChEMBL is slow then, from HF's network. - drugs.py: the mechanism lookups share one window (MECHANISM_WINDOW_SECONDS, capped by what is left of the endpoint budget). A source_unavailable lookup is retried round-robin with the other pending drugs; a quick failure pauses 5 s first; a drift is not retried. Whatever is unanswered when the window closes gets ONE chembl source_unavailable entry ("... not looked up for N of M drugs (k attempts in a W s window)") and looked_up: false. - _common.py: Collector.attempt returns the error instead of recording it; every call's deadline is now cappe…01b3ee5
-
feat: the five knowledge endpoints, gradio_ui and frozen descriptor (s2)
avoigt1121 +1: Claude Opus 5.5- src/endpoints/: drugs_for_targets, trials_for_genes, annotate_genes, pathways_for_genes, targets_for_disease on the s1 core. Inputs validated before any call; every row and nested block (ChEMBL mechanisms, UniProt protein, HGNC mapping, disease resolution) stamped; deterministic "According to <source> (queried <date>)" narratives; unresolved inputs and structured source errors instead of guesses. - Loaded tool set narrowed 12 -> 8 once real responses were seen (HGNC gives Ensembl + UniProt ids; one batched UniProt search; Reactome's mapping is already lowest-level). The other 4 stay approved, unloaded. - 8 pinned output schemas, written from the recorded responses. - scripts/record_fixtures.py: the only live step. 11 cassettes recorded 2026-10-20 through ToolUniverse 1.5.6 (123 calls): the Phase 0 lookups Q1-Q9 plus the C1 SORD2P case and two edge cases. All Phase 0 expectations replay. - gradio_ui.py: machine gate first in every handler (x-orchestrator-token), ty…3ed6b66
-
feat: governed ToolUniverse core for the knowledge specialist (s1)
avoigt1121 +1: Claude Opus 5.5The repo from the pdac-spatial-agent template, plus the core every endpoint will sit on (ADR-0001, accepted 2026-10-20): - config/tools_allowlist.yaml: the memo's 28 tools by exact 1.5.6 name; the 12 the five endpoints use are the only ones loaded. - config/sources.yaml: 8 sources with hosts, licences checked 2026-10-20 (Reactome is CC0, not CC BY 4.0; DGIdb unconfirmed, so no DGIdb endpoint), TTLs, rate limits, timeouts, coverage notes. - src/tu_client.py, the only importer of tooluniverse: loads with keep_default_tools=False and load_workspace=False, refuses startup on any model-provider key, a version other than 1.5.6, an extra or forbidden tool, or ToolUniverse's own cache being on. load_workspace=False matters: with any workspace present, 1.5.6 seeds a profile that loads all 2,691 tools and reads workspace and ~/.tooluniverse .env files (found by these tests). - provenance (10 fields per row), pinned output schemas (drift = no rows), SQLite cache that keeps retr…377417d