Commit Graph
39 Commits
Author SHA1 Message Date
Investor Flow Build f71987c119 touch queue-overhaul task
CI / Test & Type-Check (push) Canceled after 0s
2026-07-23 18:25:13 -04:00
Investor Flow Build e262187c3c fix: backfill symbol_demand for sidebar-added symbols + analyst ratings schema fix
- Add await ctx.cache.subscribe() to addSymbol mutation so symbols
  added via the sidebar get registered in symbol_demand and yfinance
  jobs are queued immediately
- Backfill PEP, WYNN, STZ, CELH into symbol_demand + adapter_queue
- Upgrade yahoo-finance2 3.15.3 -> 3.15.4 and pass validateResult:false
  to quoteSummary() to handle Yahoo schema drift
- Add error detail logging for analyst ratings schema failures
- Update .gitignore with common ignores
2026-07-23 18:02:24 -04:00
Investor Flow Build 5ef2b2f060 feat(sec-lint): lint+backfill system for SEC data gaps (B1-B4)
- SecLintAdapter implements SourceFetch, runs via shared queue/drain loop
- Two new SourceKinds: sec-lint-holders, sec-lint-insiders (weekly schedules)
- No-op cache handlers so drain->cache.set doesn't throw on lint keys
- tRPC admin.queueLint(symbol, kind) — run lint for one symbol, returns LintResult
- tRPC admin.queueLintAll(kind) — backfill ALL watched symbols at once
- tRPC admin.dataQualityList() — query data_quality rows (filterable by symbol/kind)
- InstitutionalDashboard: 'Lint holders' button + status badge in detail panel header
- Admin queue page: Data Quality section with per-row status badges, 'Lint all' buttons
- DEFAULT_RATE_MS includes 167ms (~6 req/s) for lint kinds matching EDGAR limiter
2026-07-12 20:19:12 -04:00
Investor Flow BuildandClaude ca385c1960 feat(queue): adapter queue overhaul — pause/resume, error capture, scheduling
- Pause/resume persisted in queue_state; drain loop checks isPaused() and skips
- Error capture: every failed/backoff attempt logged to queue_errors with the
  full stack trace; admin queue page expands a failed job to stream it
- Retry controls: retryJob(key), retrySource(kind), clearDone(olderThanMs)
- Per-source scheduling: queue_schedules table + 30s enqueueDueSchedules loop
  (seed defaults sec-fetch 24h, yfinance 5min); admin UI lists/adds/deletes
- Startup recovery: interrupted in_flight jobs reset to pending on boot
- fix(edgar): archive URLs use the filer CIK (accession-number prefix), not the
  company CIK — resolves Cloudflare 429 that left SEC backfills sparse/empty
- Migration: add queue_errors, queue_schedules, queue_state tables plus error/
  scheduled_for columns on adapter_queue (idempotent ALTER on startup)

Verified: full sec-fetch backfill now succeeds for all watched symbols
(NVDA 14,675 institution filings, CIFR 274 insider txns, TSLA 6,011, etc.).
503 backend tests pass.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 12:55:59 -04:00
Investor Flow Build 55f07e6b42 fix: wire data adapters, fix OptionsAdapter v3, build Research pages
- Fix OptionsAdapter for yahoo-finance2 v3 API ({ date: expiry } instead of positional arg)
- Fix institutional.flow and insiderStream endpoints to query correct DB tables
- Fix anonymous user INSERT (pw_hash column, not password_hash)
- Create secDataFetcher module for 13F/Form 4 data population
- Add institutional and marketOutlook endpoints to frontend trpc client
- Build out Chart Lab, Institutional, Market Outlook pages with real components
- Add focus-visible rings, aria-labels, hex tokens, shape icons across all panels
- Integrate EmotionLogger, MobileTabNav, useKeyboardShortcuts
- Add localStorage persistence for emotion logs
- Normalize spacing, type scale, hover effects across all components
2026-07-05 08:50:12 -04:00
Investor Flow Build 1e818c0881 fix: restore Escape key support in LayoutShell (was overwritten by other task) 2026-07-03 22:57:49 -04:00
Investor Flow Build 3b04edefba style: standardize border-radius to rounded-xl and padding across all panels 2026-07-03 22:56:28 -04:00
Investor Flow Build 8c8a37f1cb feat: add Escape key to close collapsible sections and arrow key navigation in tables 2026-07-03 22:52:21 -04:00
Investor Flow Build 681a1810fe feat: add hover shadows, smooth transitions for collapsible sections, and active border accent 2026-07-03 22:50:10 -04:00
Investor Flow Build aa79812158 feat: add MobileTabNav component for mobile navigation 2026-07-03 22:30:31 -04:00
Investor Flow Build c6027b8a80 feat: add EmotionLogger component with quick-add buttons and stats 2026-07-03 22:16:01 -04:00
Investor Flow Build 1007ab4ed5 fix (ornith-35): watchlistRepository double-encoding bug — single JSON.stringify, 13/13 tests pass 2026-06-30 17:54:01 -04:00
Investor Flow Build 97607e0bd4 slice 6 fix (ornith-35): form4_tx double-.xml URL + correct Form 4 XML elements (rptOwnerCik/rptOwnerName/rptOwnerRelationship). qwopus re-review pending 2026-06-30 13:56:29 -04:00
Investor Flow Build 4ddf95e711 portfolioRepository (ornith-35): addHolding/updateHolding/removeHolding/listHoldings, parameterized, idempotent, ADR-0007 2026-06-30 13:52:51 -04:00
Investor Flow Build eb557f2093 slice 7a InstitutionFlowEngine (ornith-35): aggregate_13f_flow + insider_flow + classify helpers, ADR-0007 neutral language, uses EdgarAdapter 13f/form4
Cross-review by qwopus35b pending.
2026-06-30 13:46:38 -04:00
Investor Flow Build c2476ab137 slice 6 EdgarAdapter: fix full_text_search ETag caching (was not writing etags back); test asserts revalidation on 2nd call. 16/16 green (ornith-35) 2026-06-30 13:40:19 -04:00
Investor Flow Build cf1d7c7302 slice 6 EdgarAdapter 13f_holdings + form4_tx (ornith-35): edgarXmlFetch + regex parsers, ETag/rate-limit/cache, ADR-0007 2026-06-30 13:33:51 -04:00
Investor Flow Build 343d418405 slice 10a WatchlistRepository (ornith-35): addSymbol/removeSymbol/listSymbols, parameterized, idempotent, ADR-0007
Cross-review by qwopus35b pending.
2026-06-30 13:22:02 -04:00
Investor Flow Build cfc762e952 slice 15a OptionsAdapter (ornith-35): expiry_dates + options_chain (calls/puts/IV/greeks), yf2 lazy singleton, options_snapshot/intraday TTL, ADR-0007
Cross-review by qwopus35b pending.
2026-06-30 13:03:30 -04:00
Investor Flow Build e1e028b418 slice 16 X-cookie + Reddit adapters (qwopus35b): cashtag_search/trusted_timeline (1 req/3s, cookie-expiry->FAILED+degraded), Reddit public-JSON, 7d cache, FakeLLM, crowd-sentiment-not-edge caveat
Cross-review by ornith-35 pending. 17 new tests (40 adapter total).
2026-06-30 10:08:25 -04:00
Investor Flow Build 9f58d36566 slice 6a EdgarAdapter (ornith-35): filings_index/company_facts/filer_cik_meta/full_text_search + edgarFetch (UA, 8 req/s, ETag/If-Modified-Since, 304 no-op)
Cross-review by qwopus35b pending (after tests 6b).
2026-06-30 10:02:50 -04:00
Investor Flow Build a09eba4d42 fix-chartlab-findings (ornith-35): real OHLC candlesticks (CandleShape), remove dead CandleBar, rsiCaption figcaption, relvol domain
Re-review by qwopus35b pending. SPA lint 2/2 green.
2026-06-30 09:28:11 -04:00
Investor Flow Build cc1213fb64 fix-spa-review-findings (ornith-35): fetch timeout+res.ok, AuthSection loop fix, me() timeout, enable2fa finally, TOTP mask toggle, snapshot backoff, dup key removed
Cross-review by qwopus35b pending. SPA lint 2/2 green.
2026-06-30 08:54:33 -04:00
Investor Flow Build ce26a0ca15 slice 5c ChartLab panel (ornith-35): candlestick/volume/EMA/RSI/relvol + P7 tooltips, trpc.market.candles+indicators wiring
Cross-review by qwopus35b pending. SPA lint 2/2 green.
2026-06-30 08:46:47 -04:00
Investor Flow Build 2c7e7a0786 fix-backend-review-findings (ornith-35): oauth empty-token guard, session-secret startup assertion, OAuth email-link test
Fixes from ornith's backend code review, implemented by ornith-35 (cross-review by
qwopus35b pending). 129/129 tests green.
2026-06-29 23:33:02 -04:00
Investor Flow Build a303720c35 slice 5b (omlx/ornith-35): market.candles + market.indicators endpoints
Chart Lab data path: market.candles (cached OHLCV by timeframe) + market.indicators
(EMA/RSI/relativeVolume via analysis/indicators.ts). By ornith-35 (local, ~75s);
reviewed by orchestrator (128/128 tests, no regression). Conflict-free: impl=ornith-35,
reviewer=orchestrator.
2026-06-29 22:57:34 -04:00
Investor Flow Build e6b7219dd2 slice 4d (omlx/ornith-35): backfill integration test (first-track 4 keys -> drain -> candles+adjustments; rerun no-op)
Slice 4 (yfinance-backfill-permanent-ohlcv) COMPLETE: parseAdjustments + adjustments
kind + candles 10y backfill + adjustments fetchOne + subscribe queues backfill. 102/102
tests green. Implemented by local ornith-35, reviewed by orchestrator.
2026-06-29 22:09:12 -04:00
Investor Flow Build 2a99e008e3 slice 4c (omlx/ornith-35): YFinanceAdapter candles 10y backfill + adjustments fetchOne 2026-06-29 21:58:39 -04:00
Investor Flow Build 796d7b58b3 slice 4b (omlx/ornith-35): CacheRepository adjustments kind + subscribe queues backfill keys
Local ornith-35 dispatch (~2min). +PriceAdjustment, +adjustmentsHandler
(price_adjustments table, permanent), subscribe now queues candles+adjustments on
first demand. Surgical, 99/99 tests, no regression.
2026-06-29 21:55:27 -04:00
Investor Flow Build 190e9500a9 slice 4a (omlx/ornith-35): parseAdjustments (chart events -> price_adjustments) + 12 tests
First dispatch to the LOCAL ornith-35 (omlx) — ~3min vs ~8min for remote. Pure fn
parses yf2 chart events (splits/dividends, array or map) into PriceAdjustment[]; 12
tests incl. NVDA 5y fixture (2 splits + 26 dividends). Reviewed + approved.
2026-06-29 21:50:27 -04:00
Investor Flow Build 965f8d3b1c slice 3 COMPLETE: onboarding wizard (complexity/risk/drawdown + starter watchlist + demand subscribe)
starter.ts by ornith (9 symbols w/ ticker-kind + ADR-0007 reasons, defaults, 12 tests).
onboarding.complete + onboarding.starter + me().onboarded by orchestrator; schema
+drawdown_tolerance. Wizard UI (complexity picker, starter list, disclaimer, finish).
onboarding subscribes starter symbols to the demand set (adapter fetches them). 87/87
backend + 2/2 lint green. Slice 3 done; slices 1-3 complete.
2026-06-29 21:31:59 -04:00
Investor Flow Build 4816b19976 slice 2 UI: 2FA enrollment (enable -> secret/QR/backup codes -> confirm)
Orchestrator (me) SPA work: auth client +2FA/OAuth methods, 2FA strings, AuthSection
enrollment flow. Primary-Rule lint stays green. Slice 2 (auth-2fa-and-social-oauth)
COMPLETE: 2FA + OAuth backend (ornith modules + me integration) + 2FA enrollment UI.
2026-06-29 21:21:09 -04:00
Investor Flow Build 3b5aa90a89 slice 2b COMPLETE: social OAuth (GitHub/Google) — oauthStart/oauthCallback
oauth.ts by ornith (zero-dep, injectable-fetch, 15 tests; fixed its self-import bug
so OAuthProvider is exported). Router/context integration by orchestrator: CSRF state
cookie (HMAC), code exchange, find/link/create user (sentinel pw_hash for OAuth-only),
session. 74/74 backend tests green. CSRF rejection + reuse-no-duplicate covered.
2026-06-29 21:17:57 -04:00
Investor Flow Build 89bdf0edc4 slice 2a COMPLETE: TOTP 2FA (enable2fa/confirm2fa/login-2fa + protectedProcedure)
totp.ts + backup-codes.ts produced by ornith (remote model, reviewed+approved);
router/context/schema integration by orchestrator (delicate edit-existing — ornith
timed out on a dispatch of that size in-session). 58/58 backend tests green.
2FA flow: enable2fa -> confirm2fa -> login now requires a valid TOTP.
2026-06-29 19:32:09 -04:00
Investor Flow Build 9df05ade71 slice 2a (ornith): backup codes (scrypt, constant-time verify) + 13 tests 2026-06-29 19:19:59 -04:00
Investor Flow Build 3b6d306e4c slice 2a (ornith): TOTP core (RFC 6238, zero-dep) + 8 tests
First ornith remote-model dispatch. Right-sized single-file prompt -> ornith produced
correct totp.ts (base32/HMAC-SHA1/dynamic-truncation/+-1 window), reviewed + approved.
44/44 backend tests green. Ornith ~8min/dispatch; small focused prompts succeed.
2026-06-29 19:14:21 -04:00
Investor Flow Build a8b95e36e3 slice 1g: Next.js M1 overview panel + Primary-Rule lint (ADR-0007)
Symbol command bar (Zustand active-symbol) -> OverviewPanel (price + day-change
shape/color/label per P7 G3 + Recharts sparkline + sector) + signup/login + ADR-0007
footer. next.config rewrites proxy /api -> backend:3001 (same-origin cookies). Vanilla
fetch tRPC client (decoupled from server Node types). Primary-Rule lint 2/2 green.
Slice 1 tracer bullet COMPLETE: 38 tests green, live-verified end-to-end.
2026-06-29 17:51:54 -04:00
Investor Flow Build 82079b3e66 slice 1e-1f: tRPC router (auth + market.snapshot) + node:http server
auth.signup/login/logout/me with signed HMAC session cookies + scrypt hashing;
market.snapshot mega-endpoint (quote+candles+sector). node:http server mounts
tRPC at /api/trpc + /health + background drain loop. Live-verified: real NVDA
194.97/65 candles/Technology served after stale-while-revalidate drain. 36 tests green.
2026-06-29 17:40:42 -04:00
Investor Flow Build 1962ecc740 slice 1a-1d: DB + CacheRepository + YFinance adapter + AdapterQueue
Node 26 + node:sqlite backend (zero native deps; runtime glue adapted from
Bun-spec design, deep-module architecture unchanged). 29 tests green across
schema/CacheRepository/YFinance-parse/AdapterQueue-dedupe.
2026-06-29 17:28:57 -04:00