diff --git a/.github/workflows/review-validation.yml b/.github/workflows/review-validation.yml new file mode 100644 index 0000000..2e183b8 --- /dev/null +++ b/.github/workflows/review-validation.yml @@ -0,0 +1,34 @@ +name: API review validation (no publication) +on: + pull_request: + branches: [main] + push: + branches: [overhaul/scoring-alignment-2026-11-16] + workflow_dispatch: +permissions: + contents: read +concurrency: + group: api-review-${{ github.event.pull_request.head.sha || github.sha }} + cancel-in-progress: true +jobs: + check: + runs-on: ubuntu-24.04 + timeout-minutes: 20 + env: + NEXT_TELEMETRY_DISABLED: '1' + DATABASE_URL: postgresql://validation:validation@127.0.0.1:1/validation + NEXT_PUBLIC_SUPABASE_URL: https://example.invalid + NEXT_PUBLIC_SUPABASE_ANON_KEY: validation-only + steps: + - uses: actions/checkout@v5 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - uses: actions/setup-node@v5 + with: + node-version: '24' + - run: npm ci + - run: npm run lint + - run: npm test + - run: npm run build + - run: git diff --check diff --git a/CHANGELOG.md b/CHANGELOG.md index a7322d6..541ac63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.4.6] - 2026-11-18 +### Fixed +- Gate bill/model similarity and donor alignment on the official-prose-v2 provenance contract, official XML extraction version, hashes and passage/coverage evidence. Legacy raw similarity cannot bypass the gate, including when filtering the global bills endpoint. +- Distinguish unavailable analysis from a verified non-match while preserving raw records and response keys. + +## [1.4.5] - 2026-11-18 +### Documentation +- Clarify that the Python scoring function is an upstream reference, not a runtime import: the API fetches JSON and computes its breakdown locally. + +## [1.4.4] - 2026-11-18 +### Fixed +- Exclude unverified SEC identity matches and unavailable retrievals from computed score components and SEC-derived flags, preserving raw upstream fields and the response contract. +- Document identity/retrieval eligibility and coordinated upstream rollout. + +## [1.4.3] - 2026-11-16 +### Fixed +- Align score breakdown with corrected CongressWatch methodology: suspend campaign-receipt wealth estimates, exclude future trade/travel dates, and use delegate/sample-aware attendance scoring with 25% saturation. +- Preserve all existing response fields and maxima; clarify component descriptions and methodology drift. + ## [1.4.2] - 2026-10-20 ### Changed - Moved the footer logo to the right of "Powered by OSP". diff --git a/README.md b/README.md index 5957aa0..9bb9a8d 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,15 @@ Rate limits: free 1,000/hr · discounted 10,000/hr · paid 10,000/hr · admin un ## Notable implementation details -**The score breakdown is recomputed, not read.** CongressWatch persists only the final integer `score`; the six weighted components are discarded. Every *input* survives in the JSON, so `lib/scoring.ts` is a port of its `compute_score()` (`fetch_finance.py:312`) that returns the components. Verified: running CongressWatch's own Python function against the same live JSON produces identical totals. +**The score breakdown is recomputed locally.** The API does not fetch or execute `fetch_finance.py`. That file's `compute_score_components()` is the upstream reference for the TypeScript implementation in `lib/scoring.ts`; references to it are documentation, not runtime imports. The `/api/v1/members/:bioguide_id/score` route fetches `members.json` and `details/:bioguide_id.json` through `lib/congress.ts`, then calls the local `computeScore()` function. The JSON base URL remains `CONGRESS_DATA_URL` (default `https://congresswatch.vercel.app/data`). Existing response keys and component maxima are preserved for compatibility. `wealth_gap` now always scores zero: campaign receipts are not personal wealth. Trade activity and sponsored travel exclude future dates. Attendance requires at least 20 recorded votes, exempts non-voting House delegates and the Resident Commissioner, and reaches its five-point maximum at 25% missed votes. -The `/score` response therefore returns `stored` (what CongressWatch saved), `total` (recomputed now), and `drift` between them. Drift is usually 0 but is legitimately non-zero — the score is only recomputed by CongressWatch's finance job, while votes/trades/travel refresh on their own schedules, so a stored score can lag its own inputs. +SEC signals contribute only when upstream supplies explicit verified identity, an exact matching nonempty CIK, a nonempty HTTPS evidence URL list, available retrieval status, and a finite nonnegative count. Legacy automatic/name-only matches and failed retrievals contribute zero and cannot retain the SEC-derived `trade` flag in `/score`. Raw upstream CIK/count/provenance remain available unchanged through the source-data endpoints. These endpoints still expose upstream stored scores/flags, so deploy the coordinated CongressWatch correction first; `/score.stored` and `drift` deliberately retain that audit trail. + +Bill-derived scoring follows the `activity-v5-official-prose` contract. A bill must have `analysis_version=official-prose-overlap-v2`, `analysis_status=analyzed`, official GovInfo XML source metadata, the `govinfo-legislative-body-v2` extraction version, and source/text SHA-256 hashes. Model similarity additionally requires analyzed primary-model evidence tied to that target text, matched-source/text hashes, a finite passage length of at least 32 words, and at least 20% directional shingle coverage. Raw legacy `alec_best_similarity` cannot contribute by itself. The optional 0–1 `min_alec_similarity` filter on `/bills` likewise includes only bills with validated matching evidence. Unavailable primary-model corpora contribute zero, not a verified finding of no overlap. Donor alignment requires matching current bill/donor analysis versions and available status; otherwise it contributes zero. Historical values and provenance remain in the raw source records. + +The legacy keys `trade_timing`, `donor_alignment`, and `foreign_travel` describe activity, donor-industry keyword overlap, and disclosed sponsored travel, not established misconduct or foreign-only travel. Bill similarity does not establish authorship. The suspended wealth component is not redistributed, so the currently attainable maximum is 75, while the response retains the historical 100-point scale. + +The `/score` response returns `stored` (what CongressWatch saved), `total` (recomputed now), and `drift`. Drift can reflect data refresh lag, changed methodology, or sliding date windows. Deploy the corresponding CongressWatch update alongside this API change to minimize methodology drift. **`/v1/trades` and `/v1/bills` build an index at runtime.** CongressWatch publishes trades and bills only *inside* per-member detail files, so there is no single document to page over. `lib/aggregate.ts` fans out across all 536 detail files (~15 MB, ~1–3 s cold, ~240 ms warm) and caches the flattened result for an hour. If CongressWatch ever emits `data/trades.json` and `data/bills.json`, delete that module and read them directly. diff --git a/app/api/v1/bills/route.ts b/app/api/v1/bills/route.ts index 86c9229..8d04983 100644 --- a/app/api/v1/bills/route.ts +++ b/app/api/v1/bills/route.ts @@ -1,6 +1,7 @@ import { NextRequest } from "next/server"; import { getIndex } from "@/lib/aggregate"; import { paginate } from "@/lib/congress"; +import { validatedModelSimilarity } from "@/lib/scoring"; import { validateApiKey } from "@/lib/auth"; import { paginated, err, options } from "@/lib/response"; @@ -54,11 +55,8 @@ export async function GET(request: NextRequest) { } if (minAlecNum != null && !Number.isNaN(minAlecNum)) { - const best = Math.max( - b.alec_best_similarity ?? 0, - b.alec_match?.similarity_score ?? 0, - ); - if (best < minAlecNum) return false; + const best = validatedModelSimilarity(b); + if (best === null || best < minAlecNum) return false; } return true; }); diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..96abbb7 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,4 @@ +import parser from '@typescript-eslint/parser'; +export default [{ignores:['node_modules/**','.next/**']},{files:['**/*.ts','**/*.tsx'], + languageOptions:{parser,parserOptions:{ecmaVersion:'latest',sourceType:'module',ecmaFeatures:{jsx:true}}}, + rules:{'no-unreachable':'error','no-dupe-keys':'error','no-func-assign':'error','valid-typeof':'error'}}]; diff --git a/lib/congress.ts b/lib/congress.ts index 8eeeb03..0c36b9d 100644 --- a/lib/congress.ts +++ b/lib/congress.ts @@ -34,6 +34,15 @@ export interface MemberSummary { data_updated: string; edgar_status: string; edgar_cik: string | null; + /** Identity verification and retrieval provenance; absent on legacy records. */ + edgar_identity_status?: string; + edgar_identity_cik?: string | null; + edgar_identity_evidence?: string[]; + edgar_identity_evidence_checks?: { + url?: string; cik?: string; status?: string; resolved_url?: string; + checked_at?: string; sha256?: string; bytes?: number; error?: string; + }[]; + edgar_data_status?: string; corporate_insider_signals: number; score: number; flags: string[]; @@ -53,12 +62,36 @@ export interface Vote { url: string; } +export interface BillTextSource { + source_format?: string; + extraction_version?: string; + source_url?: string; + source_sha256?: string; + text_sha256?: string; + [k: string]: unknown; +} + +export interface ModelMatchEvidence { + target_text_sha256?: string; + matched_source_sha256?: string; + matched_text_sha256?: string; + longest_passage_words?: number; + target_shingle_coverage?: number; + matched_shingle_coverage?: number; + [k: string]: unknown; +} + export interface AlecMatch { + evidence?: ModelMatchEvidence; similarity_score?: number; [k: string]: unknown; } export interface Bill { + analysis_version?: string; + analysis_status?: string; + model_analysis_status?: string; + text_source?: BillTextSource; bill_id: string; title: string; type: string; @@ -129,6 +162,9 @@ export interface MemberDetail extends MemberSummary { bills_updated?: string; bills_count?: number; donor_alignment_score?: number; + bills_analysis_version?: string; + donor_alignment_analysis_version?: string; + donor_alignment_status?: string; alec_match_count?: number; donor_match_count?: number; diff --git a/lib/scoring.ts b/lib/scoring.ts index 554c2f8..2ad8151 100644 --- a/lib/scoring.ts +++ b/lib/scoring.ts @@ -1,34 +1,17 @@ /** - * Anomaly score — TypeScript port of `compute_score()` in CongressWatch's - * fetch_finance.py (line 312). - * - * CongressWatch persists only the final integer `score` (0-100) and `flags[]`; - * the six component sub-scores are thrown away. But every *input* to the formula - * survives in the member + detail JSON, so we recompute the components here to - * serve a breakdown. The components sum to the same total the pipeline stored. - * - * Verified faithful: running CongressWatch's own compute_score() against the same - * live JSON produces identical totals to this function. - * - * `total` can still differ from `stored`, for two reasons — both upstream, neither - * a porting error: - * - * 1. Pipeline lag. `score` is only recomputed by fetch_finance.py, but votes, - * trades, and travel are refreshed by their own separate cron jobs. When the - * votes job runs and the finance job hasn't yet, the stored score is stale - * with respect to the very data it was derived from. (Observed: Tim Scott, - * stored 28 vs 31 recomputed, after a GovTrack vote refresh.) - * 2. Sliding windows. Two signals are relative to "now" (trades in the last 365 - * days, travel in the last 730), so they shift even when no data changes. - * - * `stored` and `drift` are returned alongside `total` so consumers can see this - * rather than silently getting a number that disagrees with the CongressWatch site. + * Compatibility-preserving port of CongressWatch compute_score_components(). + * The six legacy component keys/maxima remain stable. wealth_gap is suspended: + * campaign receipts are not personal wealth. Stored scores can differ because + * upstream data, methodology, and rolling date windows change between refreshes. */ - -import type { MemberSummary, MemberDetail } from "./congress"; +import type { MemberSummary, MemberDetail, Bill } from "./congress"; import { parseDateAny } from "./congress"; -const ANNUAL_SALARY = 174_000; // Congressional salary baseline +const NON_VOTING_STATES = new Set([ + "District of Columbia", "American Samoa", "Guam", + "Northern Mariana Islands", "Puerto Rico", "Virgin Islands", +]); +const MIN_VOTES_FOR_ATTENDANCE = 20; export interface ScoreComponent { score: number; @@ -41,7 +24,7 @@ export interface ScoreBreakdown { total: number; /** The value CongressWatch's pipeline computed and persisted. */ stored: number; - /** total - stored. Non-zero means a recency window has slid since the run. */ + /** total - stored. Non-zero can reflect refresh lag, methodology changes or sliding windows. */ drift: number; flags: string[]; components: { @@ -72,14 +55,104 @@ function daysAgoIso(days: number): string { return d.toISOString().slice(0, 10); } +/** + * Name-only/automatic SEC matches are not identity evidence. Fail closed for + * legacy data and failed refreshes; preserve the original counts in the source. + * Keep this predicate aligned with CongressWatch's verified-SEC-only policy. + */ +export function hasVerifiedSecSignals(member: MemberSummary): boolean { + const cik = member.edgar_cik; + const evidence = member.edgar_identity_evidence; + const checks = member.edgar_identity_evidence_checks; + // Match the site receipt validator, including original URL order and CIK. + const httpsUrl = (value: unknown): boolean => { + if (typeof value !== "string") return false; + try { + const url = new URL(value); + return url.protocol === "https:" && !!url.hostname && !url.username && !url.password; + } catch { return false; } + }; + return member.edgar_identity_status === "verified" + && typeof cik === "string" && cik.trim().length > 0 + && typeof member.edgar_identity_cik === "string" + && member.edgar_identity_cik === cik + && Array.isArray(evidence) && evidence.length > 0 + && evidence.every(httpsUrl) + && Array.isArray(checks) && checks.length === evidence.length + && checks.every((check, i) => check && check.url === evidence[i] + && check.cik === member.edgar_identity_cik && check.status === "available" + && httpsUrl(check.resolved_url) + && typeof check.checked_at === "string" && !!check.checked_at + && typeof check.sha256 === "string" && /^[a-f0-9]{64}$/.test(check.sha256)) + && member.edgar_data_status === "available" + && member.edgar_status !== "query_failed" + && typeof member.corporate_insider_signals === "number" + && Number.isFinite(member.corporate_insider_signals) + && member.corporate_insider_signals >= 0; +} + +const BILL_ANALYSIS_VERSION = "official-prose-overlap-v2"; +const SHA256 = /^[a-f0-9]{64}$/; + +function isSha256(value: unknown): value is string { + return typeof value === "string" && value.length === 64 && SHA256.test(value); +} + +function finiteInRange(value: unknown, min: number, max: number): value is number { + return typeof value === "number" && Number.isFinite(value) && value >= min && value <= max; +} + +export function eligibleBillText(bill: Bill): boolean { + const source = bill.text_source; + return bill.analysis_version === BILL_ANALYSIS_VERSION + && bill.analysis_status === "analyzed" + && source?.source_format === "govinfo_official_bill_xml" + && source.extraction_version === "govinfo-legislative-body-v2" + && typeof source.source_url === "string" + && source.source_url.startsWith("https://www.govinfo.gov/") + && isSha256(source.source_sha256) + && isSha256(source.text_sha256); +} + +export function validatedModelSimilarity(bill: Bill): number | null { + if (!eligibleBillText(bill) || bill.model_analysis_status !== "analyzed") return null; + const match = bill.alec_match; + const evidence = match?.evidence; + if (!finiteInRange(match?.similarity_score, 0, 1) + || !evidence + || evidence.target_text_sha256 !== bill.text_source?.text_sha256 + || !isSha256(evidence.matched_source_sha256) + || !isSha256(evidence.matched_text_sha256) + || !finiteInRange(evidence.longest_passage_words, 32, Number.MAX_VALUE) + || !finiteInRange(evidence.target_shingle_coverage, 0, 1) + || !finiteInRange(evidence.matched_shingle_coverage, 0, 1)) return null; + return Math.max(evidence.target_shingle_coverage, evidence.matched_shingle_coverage) >= 0.2 + ? match.similarity_score : null; +} + +export function eligibleModelSimilarity(bill: Bill): number { + return validatedModelSimilarity(bill) ?? 0; +} + +export function eligibleDonorAlignment(detail: MemberDetail): number { + return detail.bills_analysis_version === BILL_ANALYSIS_VERSION + && detail.donor_alignment_analysis_version === BILL_ANALYSIS_VERSION + && detail.donor_alignment_status === "available" + && finiteInRange(detail.donor_alignment_score, 0, 100) + ? detail.donor_alignment_score : 0; +} + export function computeScore( member: MemberSummary, detail: MemberDetail | null, ): ScoreBreakdown { const d = detail ?? ({} as MemberDetail); - // 1. Stock trade timing (25) — SEC EDGAR signals + PTR trade frequency - const signals = member.corporate_insider_signals ?? 0; + const today = daysAgoIso(0); + + // 1. Activity, not demonstrated trade timing or wrongdoing. + const verifiedSec = hasVerifiedSecSignals(member); + const signals = verifiedSec ? member.corporate_insider_signals : 0; let tradeScore = 0; if (signals >= 3) tradeScore += 25; else if (signals === 2) tradeScore += 18; @@ -90,7 +163,10 @@ export function computeScore( if (trades.length) { const cutoff = daysAgoIso(365); recentTrades = trades.filter( - (t) => parseDateAny(t.transaction_date) >= cutoff, + (t) => { + const date = parseDateAny(t.transaction_date); + return date >= cutoff && date <= today; + }, ).length; if (recentTrades >= 20) tradeScore += 15; else if (recentTrades >= 10) tradeScore += 10; @@ -98,42 +174,14 @@ export function computeScore( } tradeScore = Math.min(tradeScore, 25); - // 2. Wealth gap (25) — estimated wealth vs cumulative congressional salary - let wealthScore = 0; - let gap = 0; - const totalRaised = member.total_raised ?? 0; - if (totalRaised > 0) { - const estWealth = totalRaised * 0.45; - const startYear = parseInt((member.term_start ?? "2010").slice(0, 4), 10); - const years = Number.isNaN(startYear) - ? 10 - : Math.max(1, new Date().getFullYear() - startYear); - gap = estWealth - years * ANNUAL_SALARY; - if (gap > 5_000_000) wealthScore = 25; - else if (gap > 2_000_000) wealthScore = 20; - else if (gap > 500_000) wealthScore = 15; - else if (gap > 100_000) wealthScore = 10; - else if (gap > 0) wealthScore = 5; - } + // Keep the legacy key/max for API compatibility, but never infer personal + // wealth from campaign fundraising. + const wealthScore = 0; - // 3. Donor-vote alignment (20) — from the bills pipeline - const donorAlignment = d.donor_alignment_score ?? 0; - const donorScore = Math.min(20, pyRound(donorAlignment * 0.2)); - - // 4. Bill authorship / ALEC similarity (15) - const bills = d.bills ?? []; - let maxAlec = 0; - for (const b of bills) { - const matched = b.alec_match?.similarity_score ?? 0; - if (matched > maxAlec) maxAlec = matched; - const raw = b.alec_best_similarity ?? 0; - if (raw > maxAlec) maxAlec = raw; - } - let alecScore = 0; - if (maxAlec >= 0.8) alecScore = 15; - else if (maxAlec >= 0.65) alecScore = 11; - else if (maxAlec >= 0.5) alecScore = 8; - else if (maxAlec >= 0.35) alecScore = 4; + // The current site methodology suspends both components, even if legacy + // or hypothetical fields claim validated donor/model results. No reweighting. + const donorScore = 0; + const alecScore = 0; // 5. Foreign travel (10) — trips departing within the last two years const travel = d.travel ?? []; @@ -142,7 +190,11 @@ export function computeScore( if (travel.length) { const cutoff = daysAgoIso(730); recentTrips = travel.filter( - (t) => parseDateAny(t.departure_date) >= cutoff, + (t) => { + const date = parseDateAny(t.departure_date); + return t.filer_type !== "staff" && t.filer_type !== "unverified" + && date >= cutoff && date <= today; + }, ).length; if (recentTrips >= 5) travelScore = 10; else if (recentTrips >= 3) travelScore = 7; @@ -153,12 +205,13 @@ export function computeScore( const votes = d.votes ?? []; let attendanceScore = 0; let missRatio = 0; - if (votes.length) { + const delegate = member.chamber === "House" && NON_VOTING_STATES.has(member.state); + if (!delegate && votes.length >= MIN_VOTES_FOR_ATTENDANCE) { const missed = votes.filter((v) => ["not voting", "absent", ""].includes((v.position ?? "").toLowerCase()), ).length; missRatio = missed / votes.length; - attendanceScore = Math.min(5, pyRound(missRatio * 50)); + attendanceScore = Math.min(5, pyRound(missRatio * 20)); } const total = Math.min( @@ -177,42 +230,46 @@ export function computeScore( total, stored, drift: total - stored, - flags: member.flags ?? [], + flags: [ + ...(member.flags ?? []).filter((flag) => flag !== "trade"), + ...(signals > 5 ? ["trade"] : []), + ], components: { trade_timing: { score: tradeScore, max: 25, - detail: `${signals} EDGAR insider signal(s); ${recentTrades} PTR trade(s) in the last 365 days`, + detail: verifiedSec + ? `${signals} identity-verified EDGAR signal(s); ${recentTrades} PTR trade(s) in the last 365 days` + : `SEC signals excluded: identity evidence or available retrieval not verified; ${recentTrades} PTR trade(s) in the last 365 days`, }, wealth_gap: { score: wealthScore, max: 25, - detail: - totalRaised > 0 - ? `Estimated wealth (45% of $${Math.round(totalRaised).toLocaleString()} raised) exceeds cumulative salary by $${Math.round(gap).toLocaleString()}` - : "No FEC total_raised on record", + detail: "Unavailable: campaign receipts are not personal wealth; this component is suspended", }, donor_alignment: { score: donorScore, max: 20, - detail: `Donor alignment score ${donorAlignment.toFixed(1)}`, + detail: "Unavailable: donor alignment methodology is suspended", }, alec_similarity: { score: alecScore, max: 15, - detail: `Peak ALEC model-bill similarity ${maxAlec.toFixed(2)} across ${bills.length} bill(s)`, + detail: "Unavailable: no verified primary model corpus; this component is suspended", }, foreign_travel: { score: travelScore, max: 10, - detail: `${recentTrips} sponsored trip(s) in the last 730 days`, + detail: `${recentTrips} member trip(s) in the last 730 days; explicit staff and unverified rows excluded`, }, attendance: { score: attendanceScore, max: 5, - detail: votes.length - ? `Missed ${(missRatio * 100).toFixed(1)}% of ${votes.length} recorded votes` - : "No recorded votes", + detail: delegate + ? "Not scored: non-voting delegate or Resident Commissioner" + : votes.length < MIN_VOTES_FOR_ATTENDANCE + ? `Not scored: fewer than ${MIN_VOTES_FOR_ATTENDANCE} recorded votes` + : `Missed ${(missRatio * 100).toFixed(1)}% of ${votes.length} recorded votes`, }, }, }; diff --git a/package-lock.json b/package-lock.json index eb4a8db..2a8ef7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,9 @@ "@types/pg": "^8.20.0", "@types/react": "^18.3.18", "@types/uuid": "^10.0.0", + "@typescript-eslint/parser": "8.48.0", "drizzle-kit": "^0.31.10", + "eslint": "9.39.1", "typescript": "^5.7.3" } }, @@ -924,6 +926,264 @@ "node": ">=18" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.3", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.3.tgz", + "integrity": "sha512-R76UKbvsqI68DJJVTVyqFKqU98CN4+B+acxNfEA2IFarSzP0SjtKf/3+fFiXzTyv5Fj3PxLkGHe2wnVWWMxobQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.2.tgz", + "integrity": "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.5" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.22", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz", + "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.7.tgz", + "integrity": "sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.14.0", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.3.2", + "minimatch": "^3.1.5", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.22", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz", + "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@img/colour": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", @@ -1652,6 +1912,20 @@ "tslib": "^2.8.0" } }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "22.19.17", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", @@ -1699,6 +1973,148 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript-eslint/parser": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.48.0.tgz", + "integrity": "sha512-jCzKdm/QK0Kg4V4IK/oMlRZlY+QOcdjv89U2NgKHZk1CYTj82/RVSx1mV/0gqCVMJ/DA+Zf/S4NBWNF8GQ+eqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.48.0", + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/typescript-estree": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.48.0.tgz", + "integrity": "sha512-Ne4CTZyRh1BecBf84siv42wv5vQvVmgtk8AuiEffKTUo3DrBaGYZueJSxxBZ8fjk/N3DrgChH4TOdIOwOwiqqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.48.0", + "@typescript-eslint/types": "^8.48.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.48.0.tgz", + "integrity": "sha512-uGSSsbrtJrLduti0Q1Q9+BF1/iFKaxGoQwjWOIVNJv0o6omrdyR8ct37m4xIl5Zzpkp69Kkmvom7QFTtue89YQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.48.0.tgz", + "integrity": "sha512-WNebjBdFdyu10sR1M4OXTt2OkMd5KWIL+LLfeH9KhgP+jzfDV/LI3eXzwJ1s9+Yc0Kzo2fQCdY/OpdusCMmh6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.48.0.tgz", + "integrity": "sha512-cQMcGQQH7kwKoVswD1xdOytxQR60MWKM1di26xSUtxehaDs/32Zpqsu5WJlXTtTTqyAVK8R7hvsUnIXRS+bjvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.48.0.tgz", + "integrity": "sha512-ljHab1CSO4rGrQIAyizUS6UGHHCiAYhbfcIZ1zVJr5nMryxlXMVWS3duFPSKvSUbFPwkXMFk1k0EMIjub4sRRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.48.0", + "@typescript-eslint/tsconfig-utils": "8.48.0", + "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/visitor-keys": "8.48.0", + "debug": "^4.3.4", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.48.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.48.0.tgz", + "integrity": "sha512-T0XJMaRPOH3+LBbAfzR2jalckP1MSG/L9eUtY0DEzUyVaXJ/t6zN0nR7co5kz0Jko/nkSYCBRkz1djvjajVTTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.48.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@upstash/core-analytics": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/@upstash/core-analytics/-/core-analytics-0.0.10.tgz", @@ -1834,6 +2250,76 @@ "node": ">= 20" } }, + "node_modules/acorn": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/baseline-browser-mapping": { "version": "2.10.15", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.15.tgz", @@ -1846,6 +2332,16 @@ "node": ">=6.0.0" } }, + "node_modules/brace-expansion": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.8.tgz", + "integrity": "sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1853,6 +2349,16 @@ "dev": true, "license": "MIT" }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001785", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001785.tgz", @@ -1873,12 +2379,56 @@ ], "license": "CC-BY-4.0" }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", "license": "MIT" }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1900,6 +2450,31 @@ "dev": true, "license": "MIT" }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -2093,6 +2668,198 @@ "@esbuild/win32-x64": "0.25.12" } }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.22", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz", + "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -2116,6 +2883,96 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2156,6 +3013,42 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -2174,6 +3067,66 @@ "node": ">=20.0.0" } }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -2201,6 +3154,97 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/js-yaml": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", + "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -2216,6 +3260,29 @@ "node": ">=6" } }, + "node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/nanoid": { "version": "3.3.17", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.17.tgz", @@ -2234,6 +3301,13 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/next": { "version": "16.3.0", "resolved": "https://registry.npmjs.org/next/-/next-16.3.0.tgz", @@ -2314,6 +3388,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/os-paths": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/os-paths/-/os-paths-4.4.0.tgz", @@ -2323,6 +3415,61 @@ "node": ">= 6.0" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -2427,6 +3574,19 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/postcss": { "version": "8.5.23", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.23.tgz", @@ -2494,6 +3654,26 @@ "node": ">=0.10.0" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/react": { "version": "19.2.4", "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", @@ -2515,6 +3695,16 @@ "react": "^19.2.4" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/resolve-pkg-maps": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", @@ -2535,8 +3725,8 @@ "version": "7.8.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "devOptional": true, "license": "ISC", - "optional": true, "bin": { "semver": "bin/semver.js" }, @@ -2669,6 +3859,19 @@ "node": ">=6" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/styled-jsx": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.6.tgz", @@ -2692,6 +3895,49 @@ } } }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -3201,6 +4447,19 @@ "@esbuild/win32-x64": "0.28.1" } }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -3228,6 +4487,16 @@ "devOptional": true, "license": "MIT" }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/uuid": { "version": "11.1.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", @@ -3256,6 +4525,16 @@ "node": ">= 8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/xdg-app-paths": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/xdg-app-paths/-/xdg-app-paths-5.5.1.tgz", @@ -3290,6 +4569,19 @@ "node": ">=0.4" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.11.tgz", diff --git a/package.json b/package.json index df0616b..8755fd5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "eslint app lib", + "test": "node validation/scoring.test.mjs" }, "dependencies": { "@supabase/supabase-js": "^2.111.0", @@ -26,7 +27,9 @@ "@types/pg": "^8.20.0", "@types/react": "^18.3.18", "@types/uuid": "^10.0.0", + "@typescript-eslint/parser": "8.48.0", "drizzle-kit": "^0.31.10", + "eslint": "9.39.1", "typescript": "^5.7.3" } } diff --git a/tests/bill-provenance.test.cjs b/tests/bill-provenance.test.cjs new file mode 100644 index 0000000..8a505a0 --- /dev/null +++ b/tests/bill-provenance.test.cjs @@ -0,0 +1,83 @@ +const { readFileSync } = require("node:fs"); +const { runInNewContext } = require("node:vm"); +const { test } = require("node:test"); +const assert = require("node:assert/strict"); +const ts = require("typescript"); + +function load(path, mocked = {}) { + const mod = { exports: {} }; + const { outputText } = ts.transpileModule(readFileSync(path, "utf8"), { + compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 }, + }); + runInNewContext(outputText, { + module: mod, exports: mod.exports, require: (key) => mocked[key] ?? require(key), + process, + }, { filename: path }); + return mod.exports; +} + +const congress = load("lib/congress.ts"); +const scoring = load("lib/scoring.ts", { "./congress": congress }); +const version = "official-prose-overlap-v2"; +const hash = "a".repeat(64); +const bill = { + analysis_version: version, + analysis_status: "analyzed", + model_analysis_status: "analyzed", + text_source: { + source_format: "govinfo_official_bill_xml", + extraction_version: "govinfo-legislative-body-v2", + source_url: "https://www.govinfo.gov/content/pkg/example", + source_sha256: hash, text_sha256: hash, + }, + alec_best_similarity: 1, + alec_match: { similarity_score: 0.8, evidence: { + target_text_sha256: hash, matched_source_sha256: hash, matched_text_sha256: hash, + longest_passage_words: 32, target_shingle_coverage: 0.2, matched_shingle_coverage: 0.1, + } }, +}; + +test("model similarity requires matching primary evidence, not a raw legacy score", () => { + const { validatedModelSimilarity: check } = scoring; + assert.equal(check(bill), 0.8); + for (const change of [ + { analysis_version: "legacy" }, { analysis_status: "pending" }, + { model_analysis_status: "primary_model_corpus_unavailable" }, { alec_match: null }, + { text_source: { ...bill.text_source, source_url: "https://evil.govinfo.gov/" } }, + { text_source: { ...bill.text_source, source_sha256: hash + "\n" } }, + ]) assert.equal(check({ ...bill, ...change }), null); + for (const change of [ + { target_text_sha256: "b".repeat(64) }, { matched_source_sha256: "bad" }, + { longest_passage_words: 31 }, { longest_passage_words: Infinity }, + { target_shingle_coverage: 0.199 }, { matched_shingle_coverage: true }, + ]) assert.equal(check({ + ...bill, alec_match: { ...bill.alec_match, evidence: { ...bill.alec_match.evidence, ...change } }, + }), null); +}); + +test("global bills filter does not return unavailable or unverified rows even at minimum zero", async () => { + const route = load("app/api/v1/bills/route.ts", { + "@/lib/aggregate": { getIndex: async () => ({ bills: [bill, { ...bill, alec_match: null }] }) }, + "@/lib/congress": congress, + "@/lib/auth": { validateApiKey: async () => ({ valid: true }) }, + "@/lib/response": { paginated: (rows) => rows, err: (message) => { throw Error(message); } }, + "@/lib/scoring": scoring, + }); + for (const [query, count] of [["", 2], ["?min_alec_similarity=0", 1], ["?min_alec_similarity=0.8", 1], ["?min_alec_similarity=0.9", 0]]) { + const result = await route.GET({ nextUrl: new URL("https://example.test/api/v1/bills" + query) }); + assert.equal(result.length, count); + } +}); + +test("donor alignment requires current versions, known availability, and finite bounds", () => { + const detail = { + bills_analysis_version: version, donor_alignment_analysis_version: version, + donor_alignment_status: "available", donor_alignment_score: 100, + }; + assert.equal(scoring.eligibleDonorAlignment(detail), 100); + for (const change of [ + { bills_analysis_version: "legacy" }, { donor_alignment_analysis_version: undefined }, + { donor_alignment_status: "pending" }, { donor_alignment_score: NaN }, + { donor_alignment_score: 101 }, { donor_alignment_score: true }, + ]) assert.equal(scoring.eligibleDonorAlignment({ ...detail, ...change }), 0); +}); diff --git a/validation/scoring-cases.json b/validation/scoring-cases.json new file mode 100644 index 0000000..a87771f --- /dev/null +++ b/validation/scoring-cases.json @@ -0,0 +1,3621 @@ +{ + "site_predicates": [ + "fetch_finance.compute_score_components", + "fetch_finance.eligible_sec_signals", + "recompute_scores flag rule" + ], + "cases": [ + { + "name": "verified ordered receipts positive", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 25, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 25, + "flags": [ + "donor", + "custom", + "trade" + ], + "eligible_count": 6 + } + }, + { + "name": "eligible count 0", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 0 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [], + "eligible_count": 0 + } + }, + { + "name": "eligible count 1", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 1 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 10, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 10, + "flags": [], + "eligible_count": 1 + } + }, + { + "name": "eligible count 2", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 2 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 18, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 18, + "flags": [], + "eligible_count": 2 + } + }, + { + "name": "eligible count 3", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 3 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 25, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 25, + "flags": [], + "eligible_count": 3 + } + }, + { + "name": "eligible count 5", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 5 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 25, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 25, + "flags": [], + "eligible_count": 5 + } + }, + { + "name": "eligible count 6", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 25, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 25, + "flags": [ + "trade" + ], + "eligible_count": 6 + } + }, + { + "name": "ineligible edgar_identity_status=unverified", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_status=verified_auto", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified_auto", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_cik=None", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": null, + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_cik=None", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": null, + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_cik=0000000002", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000002", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_evidence=[]", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_evidence=['https://']", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_evidence=['http://example.com']", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "http://example.com" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_evidence=['https://user:password@example.com']", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://user:password@example.com" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_evidence_checks=[]", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_identity_evidence_checks=None", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": null, + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_data_status=stale", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "stale", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_data_status=unavailable", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "unavailable", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible edgar_status=query_failed", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "query_failed", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible corporate_insider_signals=-1", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": -1 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible corporate_insider_signals=True", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": true + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible corporate_insider_signals=6", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": "6" + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt url=https://www.sec.gov/identity/two", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt cik=0000000002", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000002", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt status=unavailable", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "unavailable", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt resolved_url=http://example.com", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "http://example.com", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt resolved_url=https://", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt checked_at=", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt checked_at=None", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": null, + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt sha256=", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipt sha256=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipts reordered", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipts missing", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipts extra", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "ineligible receipts duplicate", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "verified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": {}, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel member x1", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "member" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 3, + "attendance": 0 + }, + "total": 3, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel member x3", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "member" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 7, + "attendance": 0 + }, + "total": 7, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel member x5", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "member" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 10, + "attendance": 0 + }, + "total": 10, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel staff x1", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "staff" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel staff x3", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "staff" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel staff x5", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "staff" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel unverified x1", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel unverified x3", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel unverified x5", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel None x1", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 3, + "attendance": 0 + }, + "total": 3, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel None x3", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13" + }, + { + "departure_date": "2026-11-13" + }, + { + "departure_date": "2026-11-13" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 7, + "attendance": 0 + }, + "total": 7, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel None x5", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13" + }, + { + "departure_date": "2026-11-13" + }, + { + "departure_date": "2026-11-13" + }, + { + "departure_date": "2026-11-13" + }, + { + "departure_date": "2026-11-13" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 10, + "attendance": 0 + }, + "total": 10, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "unlabeled historical serialization", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "11/13/2026", + "total_cost": "$1,234.50", + "raw": { + "keep": true + } + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 3, + "attendance": 0 + }, + "total": 3, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "mixed travel", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2026-11-13", + "filer_type": "staff" + }, + { + "departure_date": "2026-11-13", + "filer_type": "unverified" + }, + { + "departure_date": "2026-11-13", + "filer_type": "member" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 3, + "attendance": 0 + }, + "total": 3, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel old", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2001-01-01" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel future", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "2099-01-01" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "travel missing", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "travel": [ + { + "departure_date": "" + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "dormant donor and model remain suspended", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6 + }, + "detail": { + "bills_analysis_version": "official-prose-overlap-v2", + "donor_alignment_analysis_version": "official-prose-overlap-v2", + "donor_alignment_status": "available", + "donor_alignment_score": 100, + "bills": [ + { + "analysis_version": "official-prose-overlap-v2", + "analysis_status": "analyzed", + "model_analysis_status": "analyzed", + "text_source": { + "source_format": "govinfo_official_bill_xml", + "extraction_version": "govinfo-legislative-body-v2", + "source_url": "https://www.govinfo.gov/example", + "source_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "text_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "alec_match": { + "similarity_score": 1, + "evidence": { + "target_text_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "matched_source_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", + "matched_text_sha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", + "longest_passage_words": 100, + "target_shingle_coverage": 1, + "matched_shingle_coverage": 1 + } + } + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + }, + { + "name": "campaign and PAC never wealth", + "member": { + "id": "A000001", + "name": "Fixture Member", + "chamber": "House", + "state": "Florida", + "score": 0, + "flags": [ + "donor", + "custom", + "trade" + ], + "total_raised": 1000000000000.0, + "edgar_identity_status": "unverified", + "edgar_cik": "0000000001", + "edgar_identity_cik": "0000000001", + "edgar_identity_evidence": [ + "https://www.sec.gov/identity/one", + "https://www.sec.gov/identity/two" + ], + "edgar_identity_evidence_checks": [ + { + "url": "https://www.sec.gov/identity/one", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/one", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "url": "https://www.sec.gov/identity/two", + "cik": "0000000001", + "status": "available", + "resolved_url": "https://www.sec.gov/identity/two", + "checked_at": "2026-11-24T00:00:00Z", + "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "edgar_data_status": "available", + "edgar_status": "verified_manual", + "corporate_insider_signals": 6, + "pac_contributions": 1000000000000.0 + }, + "detail": { + "bills_analysis_version": "official-prose-overlap-v2", + "donor_alignment_analysis_version": "official-prose-overlap-v2", + "donor_alignment_status": "available", + "donor_alignment_score": 100, + "bills": [ + { + "analysis_version": "official-prose-overlap-v2", + "analysis_status": "analyzed", + "model_analysis_status": "analyzed", + "text_source": { + "source_format": "govinfo_official_bill_xml", + "extraction_version": "govinfo-legislative-body-v2", + "source_url": "https://www.govinfo.gov/example", + "source_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "text_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" + }, + "alec_match": { + "similarity_score": 1, + "evidence": { + "target_text_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", + "matched_source_sha256": "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc", + "matched_text_sha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", + "longest_passage_words": 100, + "target_shingle_coverage": 1, + "matched_shingle_coverage": 1 + } + } + } + ] + }, + "expected": { + "components": { + "trade_timing": 0, + "wealth_gap": 0, + "donor_alignment": 0, + "alec_similarity": 0, + "foreign_travel": 0, + "attendance": 0 + }, + "total": 0, + "flags": [ + "donor", + "custom" + ], + "eligible_count": 0 + } + } + ] +} diff --git a/validation/scoring.test.mjs b/validation/scoring.test.mjs new file mode 100644 index 0000000..9933138 --- /dev/null +++ b/validation/scoring.test.mjs @@ -0,0 +1,20 @@ +import fs from 'node:fs'; +import vm from 'node:vm'; +import assert from 'node:assert/strict'; +import {stripTypeScriptTypes} from 'node:module'; +const source=p=>stripTypeScriptTypes(fs.readFileSync(p,'utf8'),{mode:'transform'}) + .replace(/^import[\s\S]*?;\s*$/gm,'').replace(/^export\s*\{[^}]*\};?\s*$/gm,'') + .replace(/\bexport\s+(?=(?:async\s+)?(?:function|const|let|class))/g,''); +const ctx={URL,Date,process:{env:{}}};vm.createContext(ctx); +vm.runInContext(source('lib/congress.ts')+'\n'+source('lib/scoring.ts')+'\nthis.api={computeScore,hasVerifiedSecSignals}',ctx); +const cases=JSON.parse(fs.readFileSync('validation/scoring-cases.json')).cases; +const plain=x=>JSON.parse(JSON.stringify(x)); +for(const c of cases){ + const before=JSON.stringify(c);const result=ctx.api.computeScore(c.member,c.detail); + assert.deepEqual(Object.fromEntries(Object.entries(result.components).map(([k,v])=>[k,v.score])),c.expected.components,c.name); + assert.equal(result.total,c.expected.total,c.name);assert.deepEqual(plain(result.flags),c.expected.flags,c.name); + assert.equal(ctx.api.hasVerifiedSecSignals(c.member)?c.member.corporate_insider_signals:0,c.expected.eligible_count,c.name); + assert.deepEqual(Object.values(result.components).map(c=>c.max),[25,25,20,15,10,5],c.name); + assert.equal(JSON.stringify(c),before,'raw input mutation: '+c.name); +} +console.log(JSON.stringify({cross_runtime_cases:cases.length,scores_flags_and_maxima:'passed',raw_inputs_unchanged:true})); diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..667818a --- /dev/null +++ b/vercel.json @@ -0,0 +1,3 @@ +{ + "ignoreCommand": "test \"$VERCEL_GIT_COMMIT_REF\" = overhaul/scoring-alignment-2026-11-16" +}