feat(military): USPTO PatentsView defense/dual-use patent filing seeder (#2047) (#2091)

* feat(military): USPTO PatentsView defense/dual-use patent seeder (#2047)

* fix(military): correct PatentsView API field names, sort param, and total semantics

- Use nested dot-notation field names required by PatentsView v1 API:
  assignees.assignee_organization (was flat assignee_organization)
  cpc_at_issue.cpc_subclass_id (was non-existent cpc_subgroup_id)
- Split sort into separate s= param; fix per_page -> size in o= param
  (sort inside o= and per_page are both rejected by PatentsView v1)
- Fix listDefensePatents total to reflect full seeded dataset size,
  not the post-filter count (proto doc: "Total number of filings in
  the seeded dataset")

* feat(defense-patents): add DefensePatentsPanel — R&D Signal frontend

Panel displays weekly USPTO defense/dual-use patent filings from seed.
Five tabs: All | Comms (H04B) | Semiconductors (H01L) | Ammunition (F42B)
| AI (G06N) | Biotech (C12N). Shows assignee, title, CPC tag, date, USPTO link.

Wired into panel-layout.ts and registered as 'defense-patents' in panels.ts.

* fix(defense-patents): TTL 3x interval, recordCount, maxStaleMin 2x, wire into App.ts

- CACHE_TTL: 7d → 21d (3× weekly interval) so key survives missed runs
- recordCount: add (d) => d?.patents?.length ?? 0 so seed logs correct count
- health.js maxStaleMin: 10080 → 20160 (2× 7-day interval per gold standard)
- App.ts: import DefensePatentsPanel, add primeTask (initial load) and
  scheduleRefresh at 24h interval (daily poll for weekly data)
This commit is contained in:
Elie Habib
2026-03-26 17:50:37 +04:00
committed by GitHub
parent 1a2f1abf27
commit d4917cf00b
17 changed files with 593 additions and 1 deletions

File diff suppressed because one or more lines are too long