feat(scoring): federal funder precedent via USASpending (ALN-level)
Precedent was always a valid criterion for federal grants — the index just didn't cover them. Now: ingest captures ALN/CFDA numbers from fetchOpportunity (grants.alns); nightly federalPrecedent workflow (04:45) queries USASpending award search per distinct program (free official API, 3-year NH lookback) and stamps program_state_award_count + sample recipients onto open grants (multi-ALN keeps highest). Match retrieval feeds the same funderStateGrantCount input and 25-point tiers foundations use; detail page shows the recipients-evidence table with an incumbent-renewal caution. Also: detail refresh now rotates oldest-verified-first (serverMapGrantVerification) — the Set-based partition re-fetched the same 200 every pass, leaving 365/565 grants ALN-less. Live: 564/564 grants ALN-tagged, 156 programs swept, 85 with NH history, 468 grants carrying precedent, first federal easy-wins (66pts, 25/25 precedent, Aug-24 deadline). 158 tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -290,11 +290,15 @@ export default function MatchDetail({ loaderData }: Route.ComponentProps) {
|
||||
{nhHistory.length > 0 && (
|
||||
<section className="rounded border p-4">
|
||||
<h2 className="mb-1 text-lg font-semibold">
|
||||
Funder giving history (from 990-PF filings)
|
||||
{grant.source === 'irs_990pf'
|
||||
? 'Funder giving history (from 990-PF filings)'
|
||||
: 'Recent program awards to NH recipients (USASpending)'}
|
||||
</h2>
|
||||
<p className="mb-3 text-sm text-gray-600">
|
||||
The concrete evidence behind the precedent score — who this
|
||||
funder actually paid, sorted in-state first.
|
||||
The concrete evidence behind the precedent score —{' '}
|
||||
{grant.source === 'irs_990pf'
|
||||
? 'who this funder actually paid, sorted in-state first.'
|
||||
: 'who this federal program actually funded in NH recently. Watch for one incumbent recapturing renewals vs. genuine spread across orgs.'}
|
||||
</p>
|
||||
<table className="w-full text-sm">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user