Fix P0 issues in financial ingestion architecture #27
Reference in New Issue
Block a user
Delete Branch "fix/p0-financial-ingestion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR addresses critical (P0) issues identified during architecture review of the financial ingestion system.
Changes
P0-1: Transaction-wrapped snapshot updates
upsertFilingTaxonomySnapshotindb.transaction()to prevent data corruptionP0-2: Sidecar retry with exponential backoff
lib/server/utils/retry.tswithwithRetry()utilitylib/server/taxonomy/parser-client.tsto use retry wrapperP0-3: HTTP timeout + SEC rate limiting in Rust
SEC_RATE_LIMIT_MS(default: 100ms = 10 req/s)fetch_textandfetch_jsonP0-3b: XBRL validation with status reporting
XbrlValidationResultstruct withstatusandmessagefieldsvalidate_xbrl_structure()function (checks root element, tag balance)xbrl_validationfield toHydrateFilingResponseandTaxonomyHydrationResultVerification
bun run lintpassesbun run fmtpassesbun x tsc --noEmitpassesRelated Issues
61b072d)ac3b036)Pull request closed