Major additions: - Staged scanning modes (working tree, staged, committed) with git integration - Drift detection for baseline vs current state comparisons - Hosted API handlers for policy CRUD operations via StemeDB API - stemedb-ontology crate with domain definitions and medical extractors - Consumer health vertical UAT scenarios (GLP-1, gastroparesis, etc.) - Aphoria development skill documentation Code organization: - Split large files into focused modules to stay under 500-line limit - Extracted config tests, episteme helpers/drift/aliases, API helpers Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4.0 KiB
UAT: Pre-print vs Peer Review (Multi-Sig Weighting)
Date: YYYY-MM-DD Feature: Multi-Signature Consensus Status: [ ] PASS / [ ] FAIL / [ ] BLOCKED
Scenario
A pre-print on bioRxiv claims GLP-1 drugs have cardiovascular risks. A peer-reviewed Lancet study with expert co-signatures says cardiovascular outcomes are improved.
The system should weight the Lancet study higher due to:
- Higher source class (Clinical vs Observational)
- Co-signatures from recognized reviewers
Acceptance Criteria
| Criterion | Expected | Met? |
|---|---|---|
| Pre-print ingested | Hash returned | [ ] |
| Peer-reviewed ingested | Hash returned | [ ] |
| Co-signatures applied | 3 signatures on Lancet | [ ] |
| Authority lens winner | Lancet study | [ ] |
| Weight differential | Lancet > 2x bioRxiv | [ ] |
Test Matrix
| Step | Action | Expected | Actual | Status |
|---|---|---|---|---|
| 1 | Ingest bioRxiv pre-print | Hash returned | [ ] | |
| 2 | Ingest Lancet study | Hash returned | [ ] | |
| 3 | Add co-signatures to Lancet | 3 signatures recorded | [ ] | |
| 4 | Query with Authority lens | Lancet wins | [ ] | |
| 5 | Check weight ratio | >= 2x | [ ] |
Setup Commands
# Start StemeDB
cargo run --bin stemedb-api &
sleep 2
Test Commands
Step 1: Ingest bioRxiv Pre-print (Observational, no co-signs)
curl -X POST http://localhost:18180/v1/assertions \
-H "Content-Type: application/json" \
-d '{
"subject": "Semaglutide:CardiovascularOutcome",
"predicate": "cv_risk_change",
"object": {"Number": 1.15},
"confidence": 0.65,
"source_class": "Observational",
"source_hash": "0000000000000000000000000000000000000000000000000000000000000010"
}'
Expected: {"hash": "..."}
Actual:
Status: [ ]
Step 2: Ingest Lancet Study (Clinical, peer-reviewed)
curl -X POST http://localhost:18180/v1/assertions \
-H "Content-Type: application/json" \
-d '{
"subject": "Semaglutide:CardiovascularOutcome",
"predicate": "cv_risk_change",
"object": {"Number": 0.86},
"confidence": 0.92,
"source_class": "Clinical",
"source_hash": "0000000000000000000000000000000000000000000000000000000000000011"
}'
Save the returned hash as <LANCET_HASH>.
Expected: {"hash": "..."}
Actual:
Status: [ ]
Step 3: Add Co-Signatures to Lancet Study
# Expert reviewer 1
curl -X POST http://localhost:18180/v1/votes \
-H "Content-Type: application/json" \
-d '{
"assertion_hash": "<LANCET_HASH>",
"agent_id": "expert_cardiologist_001",
"weight": 0.95
}'
# Expert reviewer 2
curl -X POST http://localhost:18180/v1/votes \
-H "Content-Type: application/json" \
-d '{
"assertion_hash": "<LANCET_HASH>",
"agent_id": "expert_cardiologist_002",
"weight": 0.90
}'
# Lancet editor
curl -X POST http://localhost:18180/v1/votes \
-H "Content-Type: application/json" \
-d '{
"assertion_hash": "<LANCET_HASH>",
"agent_id": "lancet_editor_review",
"weight": 0.85
}'
Expected: 3 votes recorded Actual: Status: [ ]
Step 4: Query with Authority Lens
curl "http://localhost:18180/v1/query?subject=Semaglutide:CardiovascularOutcome&predicate=cv_risk_change&lens=authority"
Expected: Winner is Lancet study (cv_risk_change = 0.86) Actual: Status: [ ]
Step 5: Verify Weight Differential
Query the skeptic lens to see weight shares:
curl "http://localhost:18180/v1/skeptic?subject=Semaglutide:CardiovascularOutcome&predicate=cv_risk_change"
Expected: Lancet weight_share >= 2x bioRxiv weight_share Actual: Status: [ ]
Sign-Off Checklist
- Pre-print assertion stored correctly
- Peer-reviewed assertion stored correctly
- Co-signatures increase effective weight
- Authority lens prefers higher-tier + more signatures
- Weight differential is meaningful (>= 2x)
Notes
Multi-sig validation happens via VoteStore aggregation, not signature count alone.
Tester: Date: Result: