getaero-io/gtm-eng-skills / engineering/warm-intro-scoring
warm-intro-scoring
Verifiedtests/uncertainty.test.ts
View on GitHubimport {test,expect} from 'bun:test';
import {validateClaim,citationGate,finalReview,jevDecision,type ReviewClaim} from '../plays/uncertainty';
const claim=():ReviewClaim=>({id:'claim:1',factor:'investor_role',claim:'Alex invested in Example Co.',as_of:'2026-09-23',subject_ids:['person:alex','company:example'],deterministic_status:'unclear',review_status:'blocked_declined',evidence:[{id:'source:1',source:'fixture:investment',observed_at:'2026-09-01',subject_ids:['person:alex','company:example'],text:'Alex invested personally in Example Co in January 2024.'}]});
const proposal=()=>({verdict:'supported',reason:'The source names the person and company.',citations:[{evidence_id:'source:1',quote:'Alex invested personally in Example Co in January 2024.'}],additional_sources:[]});
test('supported evidence never clears a decline or changes points',()=>{const r=finalReview(claim(),proposal(),{supported:true,contradicted:false});expect(r.verdict).toBe('supported');expect(r.review_status).toBe('blocked_declined');expect(r.score_delta).toBe(0);});
test('invented quotes, citations and wrong subjects remain held',()=>{for(const p of [{...proposal(),citations:[{evidence_id:'unknown',quote:'x'}]},{...proposal(),citations:[{evidence_id:'source:1',quote:'fabricated proof'}]}])expect(finalReview(claim(),p,{supported:true,contradicted:false}).verdict).toBe('insufficient_evidence');const c=claim();c.evidence[0].subject_ids=['other'];expect(citationGate(c,proposal()).ok).toBe(false);});
test('uncertainty and reviewer disagreement do not become contradiction',()=>{expect(finalReview(claim(),proposal(),{supported:false,contradicted:false}).verdict).toBe('insufficient_evidence');expect(finalReview(claim(),proposal(),{supported:false,contradicted:true}).verdict).toBe('insufficient_evidence');});
test('future evidence and unsupported factors fail before paid calls',()=>{const c=claim();c.evidence[0].observed_at='2026-10-01';expect(()=>validateClaim(c)).toThrow('Future');c.evidence[0].observed_at='2026-09-01';c.factor='nationality';expect(()=>validateClaim(c)).toThrow('Invalid review claim');});
test('Jev probability shape is validated without treating low probability as denial',()=>{expect(jevDecision({supported:{type:'boolean',probability:0.03},contradicted:{type:'boolean',probability:0.15}})).toEqual({supported:false,contradicted:false});expect(()=>jevDecision({supported:{value:true}})).toThrow();expect(jevDecision({supported:{type:'boolean',probability:0.99},contradicted:{type:'boolean',probability:0.01}}).supported).toBe(true);});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |